Skip to content

fix(fault-proof): follow genesis-rooted catch-up chains to their tip#927

Merged
fakedev9999 merged 3 commits into
mainfrom
fakedev9999/pr-926-canonical-head-catchup
Jun 12, 2026
Merged

fix(fault-proof): follow genesis-rooted catch-up chains to their tip#927
fakedev9999 merged 3 commits into
mainfrom
fakedev9999/pr-926-canonical-head-catchup

Conversation

@fakedev9999

Copy link
Copy Markdown
Member

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 tip

What's added

  • test(fault-proof): cover canonical head selection across multiple catch-up chains — adds multiple_catchup_chains_select_highest_tip to the canonical_head unit tests. Repeated stall/recovery cycles can leave several genesis-rooted chains in the cache at once, and select_canonical_head must 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 a tracing::debug! in ProposerState::select_canonical_head when 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 -- --check
  • cargo check -p op-succinct-fp --lib
  • cargo test -p op-succinct-fp --lib — 52/52 pass, including all 6 canonical_head tests
  • cargo clippy --all-features --all-targets -- -D warnings -A incomplete-features — zero warnings

Credit

Original PR by @seolaoh: #926. Equivalent change merged on Celo's side as celo-org#144 and soaked on their internal testnet.

seolaoh and others added 3 commits June 9, 2026 20:48
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.
@github-actions

Copy link
Copy Markdown
Contributor
Metric Value
Batch Start 19,112,251
Batch End 19,112,256
Witness Generation (seconds) 0
Execution Duration (seconds) 62
Total Instruction Count 1,057,996,889
Oracle Verify Cycles 115,035,957
Derivation Cycles 820,292,094
Block Execution Cycles 6,695,768
Blob Verification Cycles 30,707,077
Total SP1 Gas 1,423,442,927
Number of Blocks 5
Number of Transactions 5
Ethereum Gas Used 242,374
Cycles per Block 211,599,377
Cycles per Transaction 211,599,377
Transactions per Block 1
Gas Used per Block 48,474
Gas Used per Transaction 48,474
BN Pair Cycles 0
BN Add Cycles 0
BN Mul Cycles 0
KZG Eval Cycles 0
EC Recover Cycles 0
P256 Verify Cycles 0

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.
@fakedev9999 fakedev9999 merged commit 320e8f3 into main Jun 12, 2026
38 checks passed
@fakedev9999 fakedev9999 deleted the fakedev9999/pr-926-canonical-head-catchup branch June 12, 2026 00:23
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.

2 participants