You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
niran
changed the title
Tolerate transient next L1 origin lookup failures
CHAIN-4513: Tolerate transient next L1 origin lookup failures
May 28, 2026
niran
changed the title
CHAIN-4513: Tolerate transient next L1 origin lookup failures
fix(consensus): tolerate transient next L1 origin lookup failures
May 28, 2026
The change converts try_fetch_next_origin from a fallible method to an infallible one that swallows L1 provider errors with a warning log. This makes the next-origin lookup best-effort in all code paths (both normal and recovery mode), allowing the sequencer to reuse the current L1 origin while within drift and only returning NotEnoughData once drift is exceeded.
No blocking issues found. The logic is correct, boundary conditions are handled properly, and the tests cover the key scenarios (fetch failure within drift, fetch failure past drift, recovery mode with fetch failure).
Notes (non-blocking)
Recovery mode gains a parent_hash continuity check it did not have before. The old recovery path set self.next directly from get_block_by_number without verifying parent_hash == current.hash. The new path goes through try_fetch_next_origin which performs this check (line 185). This is a correctness improvement (it prevents accepting a next origin that does not chain to the current one) but it is a subtle behavioral change worth being aware of.
Error type flattening at drift boundary. When past sequencer drift and the next fetch fails, the caller receives NotEnoughData rather than the underlying Provider error. This is fine for the current retry-oriented callers but means operator logs need to look at the warn from try_fetch_next_origin (not the returned error) to diagnose L1 connectivity issues.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NotEnoughDataonce the drift window is exhausted.Testing
cargo test -p base-consensus-node actors::sequencer::origin_selector --libcargo clippy -p base-consensus-node --lib -- -D warningscargo +nightly fmt --package base-consensus-nodeChange Management
type=routine
risk=low
impact=sev5