Repository navigation
Description
Summary
The boot-time enumeration snapshots pin every eth_call to the exact head block number returned by HeadSource::head(). Behind a load-balanced RPC whose upstreams lag the head it reports, those calls fail almost every time. Boot then burns the whole 600s BootRetry budget (#2160), exits, and systemd restarts it. The node only gets through when one attempt happens to land on an upstream that is caught up.
Affected snapshots:
slash_watcher::bootstrap: "slash enumeration snapshot" (crates/node/src/slash_watcher.rs:303) readshead.head(), then callsoperatorSlashCount/operatorSlashIdAt/getSlashRecord/pausedTotalwith.block(BlockId::number(snapshot_block))blacklist_watcher: the boot enumeration takes itsatfrom the shared head (blacklist_watcher.rs:219-226), and all reads use.block(BlockId::Number(at.into()))(:235-318)
Observed
Fleet: 7 nodes on arbitrum-sepolia, dRPC (lb.drpc.live), decdn main @ ce98e34 (includes #2160).
Every boot attempt fails with:
boot chain read failed; retrying after backoff read="slash enumeration snapshot" attempt=9 backoff_secs=60
error: enumerate operator slashes from CapacityBond at 0x65a9…E353: operatorSlashCount(0xa43d…fdCe):
server returned an error response: error code 1: no available upstreams to process a request.
Cause - upstream-803 - Upstream height 312686614 is less than 312686771;
upstream-798 - Upstream height 312686752 is less than 312686771;
upstream-796 - Upstream lower height of type STATE cannot be predicted
After 15 attempts:
node run failed: bootstrap the slash-detection watcher: slash enumeration snapshot: gave up after 15 attempts in 545s; the shared boot chain-read budget of 600s is spent
Probe from a fleet host against the same endpoint. eth_blockNumber is followed by eth_getBalance(CapacityBond, <block>):
| block tag | result |
|---|---|
exact eth_blockNumber value |
6/6 fail, no available upstreams … Upstream height X is less than Y |
latest |
6/6 ok |
| head − 500 | 6/6 ok |
Sweeping head − N showed the lag moving between roughly 40 and 200 blocks (~10–50s on Arbitrum):
head=312689719 -10:FAIL -40:FAIL -80:FAIL -120:FAIL -160:FAIL -200:ok -300:ok
head=312689741 -10:FAIL -40:FAIL -80:ok -120:ok -160:ok -200:ok -300:ok
head=312689762 -10:FAIL -40:ok -80:ok -120:ok -160:ok -200:ok -300:ok
The public sepolia-rollup.arbitrum.io/rpc passes 6/6 at its exact head, so this is specific to load balancers that report the freshest upstream's head. That is also the most common kind of hosted RPC. On this fleet the error rate went from 0–3/h to 10–380/h per node starting ~12:00 UTC 2026-09-25 and had not recovered 9h later. After a redeploy, 3/7 nodes had booted within ~25 min. Several needed two full 600s budgets.
Once running, nodes tolerate the same errors: the watchers back off and retry (#2161/#2163). Only boot is fragile.
Why pinning to the exact head fails
HeadSource::head() documents "at or before the true head", which holds. But "the head the RPC reported" is not "a block every upstream behind that RPC can serve". A pinned eth_call needs state at that block, and a balancer routes it to any upstream. Upstreams that haven't reached it reject it. latest succeeds because each upstream resolves it locally.
Suggested fix
Snapshot at head − margin instead of head, for both the slash and blacklist enumerations (and any future pinned boot snapshot):
- Soundness is unchanged. The tail cursor is already seeded from the snapshot block (
slash_cursor_start(snapshot_block)/CursorStart::Seeded). The poller then replays(snapshot, head], and re-applying events is already a deduped no-op ("overlap is safe but a gap is not"). - A small constant (for example 64–256 blocks, possibly a config knob next to
blockchain.get_logs_max_block_span) would have made every probe above pass. On L1 a few blocks is enough. Arbitrum's ~250ms blocks need more. - Alternatively, retry within the same attempt at progressively older blocks when the error says
Upstream height … is less than …. That is more complex and provider-specific, so the fixed margin seems preferable.
Note that both snapshots re-read head on every BootRetry attempt. Under steady lag, each retry targets a fresh head that the lagging upstreams have not reached either, so retrying alone cannot converge. A margin fixes that too.
Related: #2159 / #2160 (boot reads fatal → retried), #2161 / #2163 (getLogs window retry).
Activity