fix(fault-proof): follow genesis-rooted catch-up chains to their tip#927
Merged
Conversation
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.
Contributor
|
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.
Supersedes #926.
#926 is a cross-repo PR from
celo-org:seolaoh/proposer-canonical-head-catchup-upstream, and CI on cross-repo PRs does not receive the required env/secrets. The source fork branch has also since been deleted. This PR re-opens the same change from a same-repo branch so CI can run with full secrets.What's preserved
seolaoh's original #926 commit is included unchanged:
fix(fault-proof): follow genesis-rooted catch-up chains to their tipWhat's added
test(fault-proof): cover canonical head selection across multiple catch-up chains— addsmultiple_catchup_chains_select_highest_tipto thecanonical_headunit tests. Repeated stall/recovery cycles can leave several genesis-rooted chains in the cache at once, andselect_canonical_headmust return the highest tip across all qualifying chains pooled together; the original five tests only cover a single alternative chain.chore(fault-proof): log catch-up chain head selection at debug level— adds atracing::debug!inProposerState::select_canonical_headwhen the override path selects the head, so operators can tell from logs that the proposer is following a catch-up chain outside the anchor subtree.Verification
cargo fmt --all -- --checkcargo check -p op-succinct-fp --libcargo test -p op-succinct-fp --lib— 52/52 pass, including all 6canonical_headtestscargo clippy --all-features --all-targets -- -D warnings -A incomplete-features— zero warningsCredit
Original PR by @seolaoh: #926. Equivalent change merged on Celo's side as celo-org#144 and soaked on their internal testnet.