Duty sync gate reports Synced while the node is far behind, so it attests and proposes on a stale head
Maintainer thường phản hồi trong vòng 1 ngày
@dicethedev đang làm issue này rồi.
Từ ngày 14/9/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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)
- Ngôn ngữ chính
- Rust
- Star
- 82
- Fork
- 29
- Merge trung bình
- 2 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 14
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của lambdaclass/ethlambda
-
Handle malformed DB dataĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
lambdaclass/ethlambda#529 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Document architectural choicesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
lambdaclass/ethlambda#521 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
lambdaclass/ethlambda#609 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
lambdaclass/ethlambda#602 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
refactor(blockchain): return block-building phase timings instead of deltaing histogram sumsĐang mởperformance
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
lambdaclass/ethlambda#599 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của lambdaclass/ethlambda
Issue tương tự
-
ai_p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
ClickHouse/ClickHouse#123351 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
github/copilot-sdk#2804 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
lance-format/lance#9655 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug language::rust router
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Hexagon lifting issuesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Vector35/binaryninja-api#8621 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày