Duty sync gate reports Synced while the node is far behind, so it attests and proposes on a stale head
@dicethedev ya está trabajando en esto.
Desde el 14/9/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Summary
A node that is far behind the chain reports Synced, not Syncing, so duties_allowed() returns true and it attests and proposes on a head that can be hundreds of slots old. The misread persists for the entire catch-up, not just a tick or two.
Why it happens
BlockChainServer::update_sync_status (crates/blockchain/src/lib.rs:1260) derives the "freshest block the network knows about" from the node's own imported chain:
let max_seen_slot = self
.store
.max_live_chain_slot()
.expect("max live chain slot exists")
.unwrap_or(head_slot);
max_live_chain_slot scans the LiveChain table, and insert_pending_block (crates/storage/src/store.rs:1134) deliberately skips LiveChain, so gossip blocks whose parents are still missing never raise it. While the node backfills, max_seen_slot rises only in lockstep with head_slot.
SyncStatusTracker::update (crates/blockchain/src/sync_status.rs:98) then hits the network-stall escape hatch:
if network_lag > NETWORK_STALL_THRESHOLD { // 8
self.syncing = false; // "the network stalled, keep validating"
}
With a gap of, say, 550 slots, network_lag = 550 > 8, so the node declares itself Synced. The escape hatch exists so validators keep working through a genuine network-wide stall, but it cannot distinguish "the network is stalled" from "I am far behind and have imported nothing recent" — both look like a large current_slot - max_seen_slot.
sync_status_treats_stale_known_blocks_as_network_stall pins exactly this: update(100, 0, 0) == Synced.
Why now
This is pre-existing, not a regression: before #554 a node restarted without --checkpoint-sync-url clobbered its DB with a genesis anchor and hit the same misread from slot 0.
What changed is that #554 makes resume-from-a-stale-DB a supported recovery path and documents it as the safe option when no checkpoint URL is available (docs/checkpoint_sync.md, "Restarts and Existing State"). So the sharp edge is now something operators are steered into rather than something that only happened when they had already lost their chain.
Impact
For the duration of a backfill, the node:
- produces attestations for a head hundreds of slots behind the canonical one
- proposes blocks on that old head if it holds a proposer slot
Both are wasted at best, and add fork-choice noise the rest of the network has to absorb.
Possible directions
Not a recommendation, just the shape of the options:
- Track peers' advertised heads (
Statusreq-resp already carries them) and use that asmax_seen_slot, instead of the node's own imported chain. Makes "the network is ahead of me" distinguishable from "the network is stalled". - Let pending blocks raise the freshest-known slot without entering
LiveChain, e.g. a separate high-water mark updated ininsert_pending_block. - Bound the network-stall escape hatch: above some much larger lag, treat it as local rather than network-wide, since a real network-wide stall does not usually run for hundreds of slots while gossip keeps arriving.
Workaround
Pass --checkpoint-sync-url when a node is known to be far behind. It skips the backfill entirely, so the gate never misreads.
References
- #554 (resume from existing DB without a checkpoint URL) — documents the caveat
crates/blockchain/src/sync_status.rscrates/blockchain/src/lib.rs:1260(update_sync_status)crates/storage/src/store.rs:1134(insert_pending_block),:984(max_live_chain_slot)
- Lenguaje dominante
- Rust
- Estrellas
- 82
- Forks
- 28
- Merge medio
- 1 d 20 h
- PR fusionados (30 d)
- 20
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de lambdaclass/ethlambda
-
Handle malformed DB data Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
lambdaclass/ethlambda#529 · 4 comentarios ·
-
Document architectural choices Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
lambdaclass/ethlambda#521 · 2 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
lambdaclass/ethlambda#609 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
lambdaclass/ethlambda#602 ·
-
refactor(blockchain): return block-building phase timings instead of deltaing histogram sums Abiertoperformance
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
lambdaclass/ethlambda#599 · 1 comentario ·
Todos los issues de lambdaclass/ethlambda
Issues similares
-
bug github_actions
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
registrystack/registry-stack#1393 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
rocky-data/rocky#2181 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. Abiertobot:ai-assisted component:indexer QA-roadmap status:untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
midnightntwrk/midnight-indexer#1557 ·