Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eth/v1/node/syncing endpoint returns wrong value #14226

Open
eenagy opened this issue Jul 16, 2024 · 4 comments
Open

eth/v1/node/syncing endpoint returns wrong value #14226

eenagy opened this issue Jul 16, 2024 · 4 comments
Assignees
Labels
API Api related tasks Bug Something isn't working

Comments

@eenagy
Copy link

eenagy commented Jul 16, 2024

Describe the bug

Prysm returns true for el_offline after el connected, this should be false.

Has this worked before in a previous version?

Not sure.

🔬 Minimal Reproduction

  1. Start any el client
besu  --rpc-http-enabled --data-path=$HOME/.run-a-node/sepolia --network=SEPOLIA --engine-jwt-secret=$HOME/.run-a-node/sepolia/jwt.hex --rpc-http-api=ETH --rpc-http-port=8545
  1. Start prysm
beacon-chain  --accept-terms-of-use --sepolia --datadir=$HOME/.run-a-node/sepolia --checkpoint-sync-url=https://beaconstate-sepolia.chainsafe.io --disable-grpc-gateway=false --execution-endpoint=http://localhost:8551 --genesis-beacon-api-url=https://beaconstate.info --grpc-gateway-port=5052 --http-modules=eth --jwt-secret=$HOME/.run-a-node/sepolia/jwt.hex
  1. Wait until you see the message the Connected to new endpoint endpoint=http://localhost:8551
  2. Check for status
curl -s -X GET -H Content-Type: application/json http://localhost:5052/eth/v1/node/syncing

See that the el_offline is true instead of false

{"data":{"head_slot":"5450336","sync_distance":"131","is_syncing":true,"is_optimistic":false,"el_offline":true}}

For this test, I have included besu, but same result with erigon/geth/nethermind/reth. All other CL client will return false when EL is connected.

Error

No response

Platform(s)

Linux (x86)

What version of Prysm are you running? (Which release)

beacon-chain version Prysm/v5.0.4/3b184f43c86baf6c36478f65a5113e7cf0836d41. Built at: 2024-06-21 00:26:00+00:00

Anything else relevant (validator index / public key)?

No response

@eenagy eenagy added the Bug Something isn't working label Jul 16, 2024
@james-prysm james-prysm added the API Api related tasks label Jul 16, 2024
@james-prysm
Copy link
Contributor

james-prysm commented Jul 16, 2024

I don't believe this is a bug, it'll return "el_offline":true if it's not synced to head. if the execution client returns any errors it'll retry and the endpoint will return "el_offline":true

@eenagy
Copy link
Author

eenagy commented Jul 17, 2024

According to the specs, this looks like a bug: Beacon Node Syncing Endpoint.

I've tested this endpoint with several clients before reporting it. lighthouse, lodestar, nimbus-eth2, and teku all report true initially, then false; however, prysm seems inconsistent with the other clients.

I have a work-in-progress branch where I test client configs against each other; if that helps, please check it out.

@james-prysm
Copy link
Contributor

perhaps other clients are returning false when it's syncing? will followup with my teammate

@eenagy
Copy link
Author

eenagy commented Jul 17, 2024

@james-prysm I don't think the sync status has anything to do with el_offline. All other clients initially return (true) then when execution client is connected they return false. If you disconnect (shut down the client), they change the status back to true.
I'm basing this on what I see happening when values are returned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Api related tasks Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants