Skip to content

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

Merged
merged 1 commit into from
Jun 24, 2025

Conversation

shazam8253
Copy link
Contributor

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.

Copy link

netlify bot commented Jun 5, 2025

Deploy Preview for geth-website failed.

Built without sensitive environment variables

Name Link
🔨 Latest commit 25e3ce4
🔍 Latest deploy log https://app.netlify.com/projects/geth-website/deploys/685b08e9c09f9a000891d92c

Copy link
Contributor

@tr1sm0s1n tr1sm0s1n left a 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.

Copy link
Member

@lightclient lightclient left a 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.

shazam8253 pushed a commit to shazam8253/go-ethereum that referenced this pull request Jun 16, 2025
@lightclient lightclient changed the title Add example curl command to test Beacon API endpoint in blsync.md website: add example curl command to test Beacon API endpoint in blsync.md Jun 24, 2025
Copy link
Member

@lightclient lightclient left a 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!

### 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).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Comment on lines 19 to 21
export BEACON=<beacon> && \
export CHECKPOINT=<checkpoint> && \
geth --beacon.api=$BEACON --beacon.checkpoint=$(curl -s $CHECKPOINT/checkpointz/v1/status | jq -r '.data.finality.finalized.root')
Copy link
Member

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

@lightclient lightclient merged commit 1d9d377 into ethereum:website Jun 24, 2025
1 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants