From 9087111e75ee7b9ef64510940d28e95b376a3f01 Mon Sep 17 00:00:00 2001 From: shantichanal <158101918+shantichanal@users.noreply.github.com> Date: Mon, 16 Jun 2025 15:42:06 +0200 Subject: [PATCH] Update blsync documentation with dynamic fetching. (Fixes Issue #31980 ) --- docs/fundamentals/blsync.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/fundamentals/blsync.md b/docs/fundamentals/blsync.md index a28326e677..8e66ef383a 100644 --- a/docs/fundamentals/blsync.md +++ b/docs/fundamentals/blsync.md @@ -9,7 +9,26 @@ description: Running geth with integrated beacon light client ## Usage -### 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). + +Replace `` with your select beacon api provider from the provided list of [lightsync endpoints](https://s1na.github.io/light-sync-endpoints/). Replace `` with a url from the list of maintained [checkpoint sync endpoints](https://eth-clients.github.io/checkpoint-sync-endpoints/). The following command can be used to run geth client with blsync directly. + +```terminal +export BEACON= && \ +export CHECKPOINT= && \ +geth --beacon.api=$BEACON --beacon.checkpoint=$(curl -s $CHECKPOINT/checkpointz/v1/status | jq -r '.data.finality.finalized.root') +``` + +#### Example +```terminal +export BEACON=https://lodestar-sepolia.chainsafe.io && \ +export CHECKPOINT=https://sepolia.beaconstate.info && \ +geth --sepolia --beacon.api=$BEACON --beacon.checkpoint=$(curl -s $CHECKPOINT/checkpointz/v1/status | jq -r '.data.finality.finalized.root') +``` + +### Running with Manual Checkpoint Fetch To run blsync as part of Geth, you need to specify a public HTTP endpoint and a checkpoint: @@ -29,6 +48,7 @@ A checkpoint is the block root of the first proposed slot of a finalized beacon - Copy the block root field. ![Copy the block root](/images/docs/blsync3.png) + ## Testing a Beacon API Endpoint To verify that your Beacon API is reachable and returning valid data, you can use a simple `curl` command to request the light client bootstrap header for a given block root.