fix(ol): select valid canonical epoch commitments#1806
Conversation
|
Commit: 1024c50 SP1 Execution Results
|
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #1806 +/- ##
==========================================
- Coverage 78.95% 78.88% -0.07%
==========================================
Files 655 655
Lines 71268 71328 +60
==========================================
- Hits 56268 56266 -2
- Misses 15000 15062 +62
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6d525a8d43
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
The checkpoint DA/preseal state-root mismatch fix belongs to STR-3412, which Bibek is already tracking separately. I’m going to remove that part from this PR so #1806 stays focused on valid canonical epoch commitment selection. |
Summary
This PR fixes OL canonical block and epoch commitment selection so callers prefer terminal blocks with
BlockStatus::Validinstead of blindly taking the first stored commitment.It also includes the previously validated checkpoint DA/inbox-index fixes needed for the real bridge e2e path.
Bug Context
During the real bridge e2e run with staging-v2-like SP1 proving, the bridge deposit path succeeded, but the EE update path previously failed because the OL tracker/checkpoint prover could resolve an epoch terminal block from an invalid fork. That produced failures like
No OL state found for terminal block ...even though the valid canonical block at the same slot existed.The root cause is that epoch summaries/commitments can contain multiple candidates for the same epoch/slot, and the old lookup path selected the first stored entry. The first entry is not guaranteed to be valid.
Fix
BlockStatus::Validin OL canonical block lookup.Verification
cargo fmt --checkcargo check -F sequencer -F strata/sp1 -F debug-utils -F test-mode -F debug-asm --bin strata --bin alpen-client --bin strata-dbtooltest_real_bridge_deposit_withdrawpassed in datadirfunctional-tests/_dd/12-1-tbtyw. Deposits credited OL/EE, SAU landed, and withdrawal settled on regtest.