Checkpoint sync #
Checkpoint sync starts the consensus layer from a recent finalized beacon state instead of from genesis. In specborn it is its own command, specborn checkpoint-sync. This page explains how it works, how to obtain and verify the anchor yourself, and how to run it.
What it is today.
specborn checkpoint-syncfollows the consensus chain of Hoodi, Sepolia or a devnet from your anchor: forward sync, backfill, and the head over gossip. On Hoodi and Sepolia the command has no execution state, so every head stays optimistic (NOT_VALIDATED); on local devnets it can execute the payloads (below). Execution state sync by snap is a separate command,specborn el-sync. It has no JSON-RPC, no beacon API, no transaction pool and no validator options, and it is a separate command fromspecborn run(which syncs from genesis). See Networks.
Why there is no default checkpoint provider #
specborn ships no checkpoint-sync URL, on purpose: a built-in provider is a central party that every node trusts by default, and the node would contact it without the operator choosing to. In specborn the anchor is always the operator's input: two SSZ files you obtained yourself, from a source you chose. Without them the command does not start; the alternative that needs no one's state is syncing from genesis (specborn run, on the networks where that is possible, see Networks).
The anchor is TRUSTED: the node cannot prove that a state you hand it is the real chain's. What it does check is listed below.
Obtaining an anchor #
You need, from the same moment:
- the finalized
BeaconState, SSZ-encoded (Fulu or Gloas; earlier forks are refused); - its
SignedBeaconBlock, SSZ-encoded.
The usual way is the standard beacon API of a consensus node you run or trust (another client on your own machine, a friend's node, a provider you chose):
API=http://127.0.0.1:5052 # a beacon node you trust
curl -sf -H 'Accept: application/octet-stream' "$API/eth/v2/debug/beacon/states/finalized" -o state.ssz
curl -sf -H 'Accept: application/octet-stream' "$API/eth/v2/beacon/blocks/finalized" -o block.ssz
Finality can advance between the two requests; the node then refuses the pair because the block's state_root is not the state's root. Fetch both again.
Verifying the anchor yourself #
Do not trust a single source. Before starting:
- Note the finalized checkpoint (block root and epoch) your source reports, for example
"$API/eth/v1/beacon/states/finalized/finality_checkpoints". - Ask at least one independent source for the same thing: a second beacon node operated by someone else, a block explorer, a friend. The roots must agree for the same epoch.
- Give the node that independently obtained checkpoint as
--ws-checkpoint ROOT:EPOCH(root as0x…, epoch as a decimal number).
This is the weak-subjectivity checkpoint of the consensus specifications (phase0 "Weak Subjectivity Sync Procedure"): the node then checks that the block at that epoch on its finalized chain has that root.
The checkpoint authenticates the anchor only when its root is the anchor itself or a confirmed descendant of it (Specborn/Node/Checkpoint/Anchor.lean, reading A2). So take the second source's checkpoint at the anchor's epoch or later — the finalized checkpoint it reports when you fetch the anchor, or shortly after, does that — not an older one.
What the node checks #
At start and while running (docs/pieces/cpsync.md §7, §12.1):
- the state and block decode with the shipped SSZ decoder for the fork of the state's epoch (Fulu or Gloas; earlier is refused);
- the block's
state_rootis the root of the state (the only check on the anchor itself, as in the reference'sget_forkchoice_store); - the fork choice can follow from the anchor (rule A3 of
docs/pieces/cpsync.md: an anchor block not at the first slot of its epoch is refused); - with
--ws-checkpoint: after every step, the checkpoint is checked against the finalized chain. It stays pending (ws_pending=…in the status line) until the node holds that part of the chain — by backfilling below the anchor, or by syncing above it — and becomesnoneonce confirmed. A conflicting root stops the node, and so does a checkpoint that can no longer be resolved; - backfill below the anchor verifies the hash chain of every batch and every proposer signature before storing anything.
Not checked: whether the anchor is within the weak-subjectivity period. The library has the period computation (isWithinWsPeriod in Specborn/Node/Checkpoint/WeakSubjectivity.lean), but the command does not call it. Use a recent finalized state.
Running it #
specborn checkpoint-sync \
--network ./hoodi --anchor-state ./state.ssz --anchor-block ./block.ssz \
--bootnodes ./hoodi/bootstrap_nodes.yaml \
--ws-checkpoint 0xROOT:EPOCH --datadir ./cp-data
--network DIRholdsconfig.yaml(mainnet preset) and the network's executiongenesis.json(fork times and blob schedule); nogenesis.sszis needed.- Peers:
--bootnodes FILE(a file ofenr:records, one per line, such as a network'sbootstrap_nodes.yaml) makes the node discover consensus peers over discv5; or--peers FILElists them yourself (see Networking). --run-for-ms Nends the run after N milliseconds; without it, it runs until killed.
Every option is in the CLI reference. The scripts the project used live in Tests/Cpsync/live/ (cpsync-hoodi.sh shows a complete Hoodi invocation, including how it prepared config.yaml). Before piece cpsync round 27 the command ran only through the cpsync test stage; it is now in the binary.
What you will see #
One CPSLOT <slot> … line per slot. The fields that matter most:
| Field | Meaning |
|---|---|
sync= | FOLLOWING once at the peers' head; SYNCING(…) before |
head=… head_slot=… | the fork-choice head |
optimistic= | true while the head's payload has not been executed (always, without the execution catch-up) |
may_sign_attestation= | whether a validator would be allowed to attest on this head (false on an optimistic head); the node runs no validator, this shows the gate |
ws_pending= | the weak-subjectivity checkpoint not yet confirmed, or none |
anchor=ROOT@SLOT | the anchor you supplied |
backfill_oldest=, backfilled=, backfill_done= | progress of the backfill below the anchor |
peers= | connected peers (at most 16) |
el= | the state of the execution catch-up: none without an execution start; waiting_for_start_block(…) until the finalized chain confirms the start block; catching_up(…) while payloads are queued (on Gloas also until backfill is done); synced(…) once caught up; stopped(…) if it stopped. Under specborn el-sync --follow, a suffix start_final=false(start=N) while finality has not passed the engine's start block N |
Optimistic sync and the execution catch-up #
The execution side has no state at the anchor. Every payload whose stateless checks pass is imported optimistically (NOT_VALIDATED), as bellatrix/optimistic-sync.md specifies, and no validator duty is taken on an optimistic head. Nothing is ever marked VALID without an engine answer.
Three execution starts turn on the execution catch-up, in which the in-process engine executes the payloads from a start block on, and heads move to VALID:
--el-genesis FILE(the execution genesis block, RLP), for a chain that is Gloas from genesis (with a Gloas anchor) or Fulu from genesis (with a Fulu anchor); anything else is refused at start. It needs backfill: the payloads below the anchor are executed from the genesis once backfill has fetched them. Run on Kurtosis devnets (docs/pieces/cpsync.md§14.5; Fulu:docs/pieces/hoodiel.md§3.3b).--el-state FILE(Fulu anchors only): an execution state at a block at or below the anchor's payload, in the format the node writes to its data directory (el-state.rlp, below). It is checked at start (the chain of headers, the state root recomputed, the network's chain id); a state above the anchor's payload is refused, because its block would be taken asVALIDwithout being executed.- With
--datadirand a Fulu anchor, the node keeps the state of its finalized execution block in the data directory, in the store and as the fileel-state.rlp, each time that block changes (execution state: persisted at execution block …). Restarted with the same anchor and data directory and neither option above, it starts the engine from that state (checkpoint sync: execution catch-up from the execution state persisted in the store at block …). Another node can be given the file with--el-state.
Every payload above the start block is executed: those already imported by the catch-up, and on Fulu each new payload whose parent the engine knows at import. A Fulu payload whose parent the engine does not know is dropped from the catch-up (execution catch-up: payload at slot … dropped: its parent … is not known to the engine) and stays NOT_VALIDATED. The catch-up queue holds at most 65,536 payloads and 1 GiB; beyond that the catch-up stops.
None of this reaches Hoodi, Sepolia or mainnet with this command: their genesis is neither Fulu nor Gloas, and the node cannot obtain a Hoodi execution state today (docs/pieces/hoodiel.md §3.5). Execution state sync by snap is the separate command specborn el-sync; its --follow mode runs this command's node from a Gloas anchor (a Fulu anchor is refused) and executes the payloads above the downloaded state.
The start block waits for the finalized chain. The block the catch-up starts from (the execution genesis of --el-genesis, Fulu or Gloas, or the block of an --el-state file) is not trusted on its own. The engine that knows it is installed only once the finalized chain confirms it: at start, when the anchor names it (Fulu: the anchor's payload or its parent; Gloas: the anchor state's latest execution block hash), or later, when a backfilled finalized block builds on it (execution catch-up: start block … confirmed by the payload of backfilled block at slot …; engine installed, on Gloas … by the bid of …; at start the node says when it waits: checkpoint sync: the start block … is not the anchor's payload or its parent: … or checkpoint sync: the execution genesis … is not named by the anchor: …). The state the node persisted itself is installed at once, without this confirmation. Until then the status line shows el=waiting_for_start_block(…) and every head stays NOT_VALIDATED. If backfill finishes and no finalized block has confirmed the start block (a genesis or state file of another chain, or a state below the backfill), the catch-up stops with execution catch-up: stopped: … ; payloads stay NOT_VALIDATED and el=stopped(…); the node keeps following the consensus chain optimistically. Check that the file matches the network, then restart. With --no-backfill there is no backfill to finish, so an unconfirmed start block keeps the catch-up waiting until its queue limit stops it: give an --el-state at the anchor's payload or its parent.
Evidence #
- Hoodi (Fulu), run
cpsync-hoodi-r30of the shippedspecborn checkpoint-sync(60 minutes, peers discovered from the published bootnodes, anchor from a public checkpoint provider, weak-subjectivity checkpoint from a second, independent beacon API): after the node began following, its head equalled the head of two independent public beacon APIs in 268 of 274 status lines; every head optimistic (docs/pieces/cpsync.md§25.4; transcriptTests/Cpsync/live/logs/cpsync-hoodi-r30.txt). TESTED. - Sepolia (Gloas), run
cpsync-sepolia-r28(an earlier binary): head equal to two public beacon APIs in 217 of 236 lines while following, with the recovery of missing parent payload envelopes exercised 9 times (docs/pieces/cpsync.md§23). TESTED. - Local devnet, Gloas from genesis, with the execution catch-up (
cpsync-live-el-r30b, latest releases of four other consensus clients): head, block at slot, canonical chain and finalized checkpoint equal to all four clients in all 224 compared lines, backfill to slot 0, every headVALID(docs/pieces/cpsync.md§25.4). TESTED. - Local devnet, Fulu from genesis, with the Fulu execution catch-up (run
hoodiel-fulu-r3of the hoodiel piece's binary, three other consensus clients): with--el-genesis, then a restart from the data directory, then a fresh node with--el-stategiven the first node's file, everyFOLLOWINGheadVALIDand every compared line equal on the three clients; given the state file of another chain, the start block was never confirmed and every head stayedNOT_VALIDATED(docs/pieces/hoodiel.md§3.3b; transcriptstestnet/hoodi/logs/hoodiel-fulu-r3-A.txtto-D.txt). The later refactor of the Fulu catch-up (piece hoodiel2) and the start-block confirmation for the Gloas genesis (piece hoodiel3) are not in that binary; each piece ran its own binary on a devnet before its merge (hoodiel2-fulu-r1, phases A to C,docs/pieces/hoodiel2.md§5.1;hoodiel3-gloas-r1,docs/pieces/hoodiel3.md§5.1). The records name no run of the merged code. TESTED. - PROVED (
docs/pieces/cpsync.md§24–§27): among others, that along a whole run from the anchor the pruning node's imports, head and signing decision are the reference's, in the regime without anINVALIDATEDpayload. The anchor itself is TRUSTED operator input.
Limits #
- Restarting on the same
--datadirresumes only the execution state of a Fulu catch-up (above): the directory is bound to its anchor (another anchor is refused) and stored blocks, envelopes and columns are not replayed; the node syncs them again from its peers. - A Fulu anchor on a chain whose Gloas fork is scheduled is not followed across the fork.
- On Hoodi and Sepolia this command has no execution catch-up: heads stay optimistic. Snap sync is the separate
specborn el-sync(Gloas anchors for--follow). - The node relays no gossip (
docs/pieces/cpsync.md§14.6); some peers disconnect it for that. - A peer that sends invalid data-column sidecars is scored by its peer id, across reconnects (piece colscore, Lead decision D-53):
peer N: invalid data-column sidecar (…): identity … score S. From score 2 it is asked for columns by root only after the others; at score 4 it is disconnected and not dialed or kept connected for 1 minute, doubling per further point up to 1 hour (peer N: disconnected (identity score S: invalid data-column sidecars), not dialed for … s). One point decays every 5 minutes; at most 1,024 peer ids are scored. Gloas gossip sidecars that arrive before their block wait in a queue and are checked at the block's import without scoring their sender (open item I-colscore-A,PROOF_LEDGER.md).specborn runhas no such scoring. - The record of optimistic payload statuses is pruned at every finalized epoch, and the entries of blocks the fork choice no longer holds are capped by
--max-optimistic-backlog(default 8,192). On Gloas, entries that a walk from a held block still reads are kept beyond the cap, so a long stretch of withheld payloads makes that part grow (docs/pieces/cpsync.md§19.7). - No weak-subjectivity period check (above).