fix(fault-proof): follow genesis-rooted catch-up chains to their tip#926
Closed
seolaoh wants to merge 1 commit into
Closed
fix(fault-proof): follow genesis-rooted catch-up chains to their tip#926seolaoh wants to merge 1 commit into
seolaoh wants to merge 1 commit into
Conversation
3 tasks
After a long L2 finalized-head stall, the proposer can prune its cache down to the anchor game and rebuild the backlog as a genesis-rooted chain (parent = u32::MAX, since the contract reverts when a new game's parent is the current anchor). compute_canonical_head pinned the head to the root of that alternative chain instead of following it to the tip, so the canonical head could not advance and game creation stalled until the anchor caught up. Follow each qualifying alternative-chain root (genesis-rooted, or a lower parent index than the anchor head) to its highest-block tip. Extract the selection into ProposerState::select_canonical_head and cover it with unit tests.
01577eb to
37a9e03
Compare
4 tasks
KamiD
pushed a commit
to okx/op-succinct
that referenced
this pull request
Jun 11, 2026
Backport of upstream PR succinctlabs#926. After an L2 finalized-head stall plus bond claim window expiry, the proposer prunes its cache to the anchor and rebuilds the backlog as a fresh genesis-rooted chain (parent=u32::MAX). compute_canonical_head used to stop at such a chain's root instead of following it to its tip, pinning the head and stalling proposals. Extract the selection into a pure ProposerState::select_canonical_head method and add unit tests covering anchor-subtree, genesis-rooted catch-up, deep genesis chain, and earlier-lineage override cases. The tz-proposer shares ProposerState with the main proposer, so the fix benefits tz flows automatically.
KamiD
pushed a commit
to okx/op-succinct
that referenced
this pull request
Jun 11, 2026
…inctlabs#927 Upstream replaced succinctlabs#926 with succinctlabs#927, adding two increments on top of the same core selection logic: - Emit a tracing::debug! when the canonical head is chosen from a catch-up chain outside the anchor subtree, so operators can tell the proposer is recovering on a non-descendant lineage. - Cover the multi-chain case in a new unit test (multiple_catchup_chains_select_highest_tip): after repeated stall/recovery cycles, several genesis-rooted catch-up chains can sit in the cache, and the head must be the highest tip pooled across all of them, not the tip of the chain whose root sits highest.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
After a prolonged L2 finalized-head stall exceeding the bond claiming window, every tracked game can resolve & close and the latest one becomes the anchor, so the proposer prunes its cache down to just the anchor game. On L2 finalized-head stall recovery, it rebuilds the backlog as a fresh genesis-rooted chain — it uses
parent = u32::MAXfor these games because the contract reverts when a new game is initialized with the current anchor as its parent.compute_canonical_headtreated such an alternative chain's root as the head and never followed it to the tip: the override only considered games that branch off earlier than the anchor (genesis-rooted, or a lower parent index), which selects the chain's root but not its descendants. As a result the canonical head could not advance past the root, and game creation stalled until the anchor caught up — then the cycle repeated on the next chain.Observed in Celo internal testnet: after a ~12h L2 finalized-head stall, the proposer repeatedly stalled while creating the backlog, interleaved with
execution reverted(0x346119f7) on the attempts that tried to parent on the just-promoted anchor.Logs
Fix
Follow each qualifying alternative-chain root (genesis-rooted, or a lower parent index than the anchor head) to its highest-L2-block tip, instead of stopping at the root. The selection logic is extracted into
ProposerState::select_canonical_head, which is a pure function of the cached games and the anchor.Test plan
cargo test -p op-succinct-fp --lib— 5 newcanonical_headunit tests: no-anchor, anchor subtree, and genesis / earlier-lineage catch-up chains followed to their tipcargo clippy -p op-succinct-fp --lib --tests— cleanEquivalent to celo-org#144