Skip to content

kona-node: keep delegated heads when the delegate's current L1 is not on our L1 yet - #23990

Closed
joshklop wants to merge 1 commit into
developfrom
joshklop/kona-delegate-current-l1-soft-fail
Closed

joshklop wants to merge 1 commit into
developfrom
joshklop/kona-delegate-current-l1-soft-fail

Conversation

@joshklop

@joshklop joshklop commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Stack, in merge order: #23990 → #23883 → #23859.

kona light nodes (derivation delegation) reject a delegate's whole sync status when their own L1 provider doesn't have the delegate's current_l1 yet. On the staging devnets, the L1 endpoint is a consensus-aware proxyd whose consensus head moves back a few blocks when a lagging L1 backend rejoins. Verified safe and finalized heads are then thrown away in bursts. This is the kona-node side of #23989, which makes the same change in op-node.

After this change, the node sends the verified heads to the engine, leaves the published derivation origin unchanged, and increments kona_node_derivation_delegate_current_l1_not_found_total. A current_l1 hash mismatch or any other lookup error still rejects the status. A matching current_l1 is what proves the L1 blocks holding the batches are on our chain, so those cases stay strict.

API change: DelegateDerivationActor drops its L1Provider type parameter and takes AlloyChainProvider directly. That's its only instantiation, and it lets the not-found case match the typed AlloyChainProviderError::BlockNotFound rather than an opaque ChainProvider::Error. There are no users outside kona-node-service.

Reviews: rust-code-reviewer ran, and its suggestions are adopted:

  • concrete provider type
  • one warning site
  • typed error source
  • exact mockall call counts
  • rstest cases
  • tests that queue every L1 answer and check the mock transport is drained

Not done:

  • The new counter isn't asserted in a test.
  • A pre-existing gap: kona rejects a zero current_l1, while op-node treats it as "not reported". That's a separate follow-up.

🤖 Generated with Claude Code

… on our L1 yet

A kona light node checks the delegate's current_l1 against its own L1
provider. When that provider is a few blocks behind the delegate's (for
example a consensus-aware L1 proxyd whose head moves back while a lagging
backend rejoins), the block is not found and the whole sync status was
rejected, discarding safe and finalized heads that were already verified.

Treat a not-found current_l1 as a soft failure: send the verified heads to
the engine, leave the published derivation origin unchanged, and count it
in kona_node_derivation_delegate_current_l1_not_found_total. A current_l1
hash mismatch or any other lookup error still rejects the status. A
current_l1 that is the same block as a head's L1 origin needs no second
lookup and counts as verified.

The actor stays generic over its L1 ChainProvider. To tell a missing block
from a failed lookup, the provider's error must now implement the new
L1LookupError trait, which AlloyChainProviderError implements by matching
its BlockNotFound variant. TestChainProvider can now be told to fail
lookups of given block numbers, so the tests cover that case too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant