Repository navigation
kona-engine: wait for EL sync instead of resetting on a missing consolidation block - #24006
einar-oplabs wants to merge 1 commit into
Conversation
60e90ee to
a3be2c0
Compare
72cd709 to
6193b6a
Compare
6193b6a to
ee7955c
Compare
a3be2c0 to
f8b9000
Compare
3c2d3be to
e2a4306
Compare
1e1db47 to
4e2aeb9
Compare
|
This isn't directly related to delegated derivation. Maybe we should take a step back and design the el sync handling a bit more. |
e2a4306 to
9ad3406
Compare
4e2aeb9 to
aaee7e6
Compare
|
🤖 Claude, for @joshklop: (Posted as a conversation comment because Josh has an unsubmitted review on this PR.) Review of 1. Bug: this lets a Finalize run ahead of the waiting consolidation, although Finalize normally runs after Consolidate. In derivation mode Finalize looks blocks up by number, and Scenario: the EL datadir is wiped, the safe head is S, and consolidating S+1 waits. L1 finalizes some n ≤ S. The Finalize passes the 2. Consider an EL that rolled back after an unclean shutdown, to a head L below the derived block's parent, and can't fetch the unsafe head (EL p2p off, which is common for sequencers and isolated replicas). It answers This can't tell an idle EL from a healthy one downloading headers. op-geth reports 4. [nit] This replacement is dead code. Only Consolidate returns [nit] |
aaee7e6 to
5f85a12
Compare
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
…lidation block Kona-node resets whenever derived attributes name a block the EL lacks below the unsafe head, so after an EL datadir wipe it re-derives from genesis in a loop and finalization stays at genesis. While the EL answers `SYNCING`, the task now waits (new `Wait` severity): it is parked with its own 2s retry deadline, tasks of other kinds (imports, builds, finalizations) keep running, and nothing resets, so the finalization queue survives. Each retry looks the block up again; every 30s it also reads the EL's sync progress and resends the unchanged forkchoice, so an EL that reached the unsafe head is consolidated, and a `VALID` answer records the EL as synced. An EL idle at the derived block's parent, reporting no sync, gets the block built from the attributes instead. Progress, or its absence, is logged every 5 minutes; the engine resets once progress and latest block stop moving for 24 h (`--l2.el-sync-stall-timeout`), as neither op-geth nor op-reth reports progress while downloading headers. Failed lookups and probes are Temporary. The delegated path is #23900. Part of #23931. BREAKING CHANGE: `EngineTaskErrorSeverity::Wait`; `ConsolidateTaskError::{MissingUnsafeL2BlockDuringElSync, MissingUnsafeL2BlockProbeFailed}`; `Engine::drain` takes a `DrainScope`; `EngineConfig` gains `el_sync_stall_timeout` (default `DEFAULT_EL_SYNC_STALL_TIMEOUT`); `ConsolidateTask::new` is non-const and takes the stall timeout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5f85a12 to
51be765
Compare
Why
Kona-node resets whenever derived attributes name a block the EL lacks below the unsafe head, so after an EL datadir wipe it re-derives from genesis in a loop and finalization stays at genesis.
What
SYNCINGthe task waits (newWaitseverity): it is parked with a 2s retry, other task kinds keep running, and nothing resets, so the finalization queue survives.--l2.el-sync-stall-timeout), as neither op-geth nor op-reth reports progress while downloading headers; progress is logged every 5 minutes.Breakdown
Closes
Part of #24100; the datadir-wipe cell that checks this lives in #23440. Targets
developdirectly. This PR is independent of the delegated-derivation stack (#23947 → #24004 → #24005 → #24007 → #24065) and was taken out of it.AI Reviews
BREAKING CHANGE:
EngineTaskErrorSeverity::Wait;ConsolidateTaskError::{MissingUnsafeL2BlockDuringElSync, MissingUnsafeL2BlockProbeFailed};Engine::draintakes aDrainScope;EngineConfiggainsel_sync_stall_timeout;ConsolidateTask::newis non-const and takes the stall timeout.🤖 Generated with Claude Code