-
Notifications
You must be signed in to change notification settings - Fork 21.1k
website: add example curl command to test Beacon API endpoint in blsync.md #31980
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
Conversation
❌ Deploy Preview for geth-website failed.Built without sensitive environment variables
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this endpoint belongs to the nimbus
client. The docs are solely for geth
related utilities.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Shanti! What I'm hoping for here in the example is more of a one line command that gets the checkpoint and starts geth using blsync with that root.
It should look something like this
export BEACON=<server URL>
geth --beacon.api=$BEACON --beacon.checkpoint=$(curl <rest of command to get the check point root>)
You'll want to use jq
to access the exact values from the JSON response from the beacon api.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Started leaving a few comments, but decided to push a few commits instead. Mostly I think the checkpoint URL isn't needed here since the finalized block can be determined from the light sync endpoint. I also reordered things a bit!
docs/fundamentals/blsync.md
Outdated
### Integrated mode | ||
### Using Dynamic Checkpoint Fetch | ||
|
||
This will automatically fetch the latest finalized checkpoint and launch Geth in snap sync mode with light client support (blsync). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will automatically fetch the latest finalized checkpoint and launch Geth in snap sync mode with light client support (blsync). | |
This will automatically fetch the latest finalized checkpoint and launch Geth with blsync enabled. |
Since snap sync has long been default, I don't think we need to mention explicitly. Also updating to specify blsync explicitly since it is already defined as a light client mode.
docs/fundamentals/blsync.md
Outdated
export BEACON=<beacon> && \ | ||
export CHECKPOINT=<checkpoint> && \ | ||
geth --beacon.api=$BEACON --beacon.checkpoint=$(curl -s $CHECKPOINT/checkpointz/v1/status | jq -r '.data.finality.finalized.root') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need to separate these two servers. The light sync server will also be providing the standard beacon API so you can query eth/v1/beacon/headers/finalized
This adds a short example section showing how to use curl to verify that a Beacon API endpoint is reachable and returns valid light client headers. Helps developers quickly test endpoint connectivity before integration.