Skip to content

Comments

feat(op-reth): port historical proofs from op-rs/op-reth#19191

Merged
sebastianst merged 162 commits intotheo/pull-reth-2from
theo/port-historical-proofs
Feb 18, 2026
Merged

feat(op-reth): port historical proofs from op-rs/op-reth#19191
sebastianst merged 162 commits intotheo/pull-reth-2from
theo/port-historical-proofs

Conversation

@theochap
Copy link
Member

@theochap theochap commented Feb 13, 2026

Note

Rebased on #19194

How did I port the changes?

I cloned op-rs/op-reth's stable branch. I filtered all the commits from last year that were not from paradigmxyz/reth. I squashed all the commits from paradigmxyz to the nearest op-rs/op-reth commit and then I applied the op-rs/op-reth commits on top of rust/op-reth/crates.

Follow-ups

  • Port binary diff
  • Merge all the rust integration tests using the devstack into a tests folder at the rust root (ie kona + op-rs/op-reth). Add that to CI
  • Docs

Summary

  • Ports 161 commits from op-rs/op-reth implementing historical proofs support
  • Adds two new crates: reth-optimism-exex (execution extensions) and reth-optimism-trie (trie node storage for serving proofs)
  • Fixes compilation against the unified workspace (bincode v2 API, reth API changes)

Changes

  • New crates: op-reth/crates/exex/ and op-reth/crates/trie/
  • Modified crates: op-reth/crates/node/, op-reth/crates/rpc/, op-reth/crates/evm/, op-reth/crates/consensus/, and others
  • Workspace: Added new members and dependencies to rust/Cargo.toml
  • All commits preserve original authorship and reference op-rs/op-reth#<PR> for traceability

Test plan

  • Workspace compiles with cargo check --workspace
  • Run full test suite with cargo nextest run --workspace
  • Verify e2e tests pass

🤖 Generated with Claude Code

@wiz-inc-a178a98b5d
Copy link

wiz-inc-a178a98b5d bot commented Feb 13, 2026

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities 2 High 13 Medium 3 Low
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total 2 High 13 Medium 3 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mholt/archiver v3.1.1+incompatible // indirect

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

High Vulnerability Finding

The following vulnerabilities impact github.com/mholt/archiver versions <3.3.2: CVE-2019-10743, CVE-2024-0406, CVE-2025-3445.

These can be remediated by updating to version 3.3.2 or higher.

To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).

To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

Suggested change
github.com/mholt/archiver v3.1.1+incompatible // indirect
github.com/mholt/archiver v3.3.2 // indirect

github.com/prometheus/procfs v0.15.1 // indirect
github.com/protolambda/ctxlock v0.1.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/quic-go v0.46.0 // indirect

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

High Vulnerability Finding

The following vulnerabilities impact github.com/quic-go/quic-go versions <0.57.0: CVE-2024-53259, CVE-2025-59530, CVE-2025-64702.

These can be remediated by updating to version 0.57.0 or higher.

To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).

To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

Suggested change
github.com/quic-go/quic-go v0.46.0 // indirect
github.com/quic-go/quic-go v0.57.0 // indirect

@theochap theochap force-pushed the theo/port-historical-proofs branch 3 times, most recently from f698e5f to 7f5aaa0 Compare February 13, 2026 21:25
@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.4%. Comparing base (75071b9) to head (6e38c14).
⚠️ Report is 6 commits behind head on develop.

❗ There is a different number of reports uploaded between BASE (75071b9) and HEAD (6e38c14). Click for more details.

HEAD has 12 uploads less than BASE
Flag BASE (75071b9) HEAD (6e38c14)
contracts-bedrock-tests 12 0
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #19191     +/-   ##
==========================================
- Coverage     75.9%    66.4%   -9.6%     
==========================================
  Files          189       55    -134     
  Lines        10960     4030   -6930     
==========================================
- Hits          8328     2677   -5651     
+ Misses        2488     1209   -1279     
  Partials       144      144             
Flag Coverage Δ
cannon-go-tests-64 66.4% <ø> (ø)
contracts-bedrock-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.
see 134 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@theochap theochap force-pushed the theo/port-historical-proofs branch 10 times, most recently from e878a72 to 6e38c14 Compare February 17, 2026 16:24
@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.4%. Comparing base (75071b9) to head (6e38c14).
⚠️ Report is 6 commits behind head on develop.

❗ There is a different number of reports uploaded between BASE (75071b9) and HEAD (6e38c14). Click for more details.

HEAD has 12 uploads less than BASE
Flag BASE (75071b9) HEAD (6e38c14)
contracts-bedrock-tests 12 0
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #19191     +/-   ##
==========================================
- Coverage     75.9%    66.4%   -9.6%     
==========================================
  Files          189       55    -134     
  Lines        10960     4030   -6930     
==========================================
- Hits          8328     2677   -5651     
+ Misses        2488     1209   -1279     
  Partials       144      144             
Flag Coverage Δ
cannon-go-tests-64 66.4% <ø> (ø)
contracts-bedrock-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.
see 134 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

❌ Patch coverage is 74.30854% with 1254 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.1%. Comparing base (01441f2) to head (b664c90).
⚠️ Report is 163 commits behind head on theo/pull-reth-2.

Files with missing lines Patch % Lines
rust/op-reth/crates/trie/src/in_memory.rs 66.2% 186 Missing ⚠️
rust/op-reth/crates/trie/src/proof.rs 7.7% 179 Missing ⚠️
rust/op-reth/crates/rpc/src/debug.rs 0.0% 141 Missing ⚠️
rust/op-reth/crates/exex/src/lib.rs 79.3% 127 Missing ⚠️
rust/op-reth/crates/trie/src/provider.rs 16.2% 98 Missing ⚠️
rust/op-reth/crates/trie/src/metrics.rs 67.9% 97 Missing ⚠️
...p-reth/crates/cli/src/commands/op_proofs/unwind.rs 0.0% 43 Missing ⚠️
rust/op-reth/crates/node/src/proof_history.rs 0.0% 43 Missing ⚠️
rust/op-reth/crates/rpc/src/metrics.rs 0.0% 38 Missing ⚠️
rust/op-reth/crates/trie/src/initialize.rs 94.8% 38 Missing ⚠️
... and 19 more
Additional details and impacted files
@@                 Coverage Diff                  @@
##           theo/pull-reth-2   #19191      +/-   ##
====================================================
+ Coverage              75.5%    76.1%    +0.6%     
====================================================
  Files                   503      722     +219     
  Lines                 60373    78676   +18303     
====================================================
+ Hits                  45614    59923   +14309     
- Misses                14759    18609    +3850     
- Partials                  0      144     +144     
Flag Coverage Δ
cannon-go-tests-64 66.4% <ø> (?)
contracts-bedrock-tests 81.5% <ø> (?)
unit 76.1% <74.3%> (+0.6%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
rust/op-reth/crates/node/src/args.rs 100.0% <100.0%> (ø)
rust/op-reth/crates/rpc/src/eth/mod.rs 34.3% <ø> (ø)
...st/op-reth/crates/trie/src/db/models/change_set.rs 100.0% <100.0%> (ø)
rust/op-reth/crates/trie/src/db/store.rs 94.8% <ø> (ø)
rust/op-reth/crates/trie/src/error.rs 100.0% <100.0%> (ø)
rust/op-reth/crates/trie/src/prune/metrics.rs 100.0% <100.0%> (ø)
rust/op-reth/crates/cli/src/commands/mod.rs 0.0% <0.0%> (ø)
rust/op-reth/crates/trie/src/db/models/block.rs 96.7% <96.7%> (ø)
rust/op-reth/crates/cli/src/app.rs 0.0% <0.0%> (ø)
rust/op-reth/crates/trie/src/prune/error.rs 93.5% <93.5%> (ø)
... and 25 more

... and 196 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@theochap theochap force-pushed the theo/port-historical-proofs branch from 6e38c14 to ae066cc Compare February 17, 2026 17:29
@@ -907,23 +907,23 @@ jobs:
just build-<<parameters.target>>

# Kona Build Benchmarks
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rust build benchmarks

@theochap theochap changed the base branch from develop to theo/pull-reth-2 February 17, 2026 17:51
emhane and others added 8 commits February 17, 2026 15:43
…e` (op-rs/op-reth#204)

- Adds new crates `reth-optimism-exex` and `reth_optimism_trie`
- Moves `reth_exex::external_proofs` -> `reth_optimism_exex`
- Moves `reth_exex::external_proofs::storage` -> `reth_optimism_trie`
Seems like when `reth-optimism-trie` depends on `reth-db-api`
indirectly, the doctest crate couldn’t resolve `reth_db_api::…` and
failing.

Closes op-rs/op-reth#233

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
This PR separates storage and account cursors which makes sense because
these two cursors may have very different seek/next implementations. In
the case of in-memory, a single cursor impl can still handle both, but
for MDBX, it makes sense to implement separate cursors.

Closes op-rs/op-reth#236

---------

Co-authored-by: Arun Dhyani <dhyaniarun7@gmail.com>
Based on op-rs/op-reth#203 ,
op-rs/op-reth#204

This PR implements `StateProvider` given a `OpProofsStorage` instance.
It reads most data from the external database, but falls back on the
latest provider for block hashes and code by hash similar to the
existing historical provider in Reth.

This is an important part to implementing live syncing since we're
running the sync process on the DB being created.

In the Reth implementation, `proof.rs` is contained in `trie/db`, so I
think it makes sense to go in our DB crate. The `provider.rs` is in the
`reth-provider` crate, but I don't think a separate provider crate helps
us here, so I think we should also include that in the trie crate as
well.

---------

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
Based on op-rs/op-reth#229

Adds tests to ensure that storing TrieUpdates that include deletions
actually deletes the nodes at that block height, and that updates take
precedence over deletions (same as `write_trie_updates` in Reth).

Closes op-rs/op-reth#238
…p-reth#198)

Based on op-rs/op-reth#197

This PR implements the live state collector on top of the
`OpProofsStateProvider` created in the previous PR. This sync process
tries to re-execute all blocks from the current block of the external
database to tip.

---------

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
…#222)

Closes op-rs/op-reth#164

---------

Co-authored-by: Arun Dhyani <dhyaniarun7@gmail.com>
dhyaniarun1993 and others added 18 commits February 17, 2026 15:43
Ref op-rs/op-reth#611

Uses getters instead of direct field access for trie updates to remove
redundant diff with upstream
Closes op-rs/op-reth#621

This PR updates the workspace configuration to use reth as a git
dependency instead of a local crate, including necessary fixes for the
compiler, CI workflows, and test configurations.

---------

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
Lint fix. Clippy is catching since yesterday's new nightly release.
op-rs/op-reth#632)

Ref op-rs/op-reth#631

- Changes nested database tx type to owned type as has no need to be ref
- Uses `AsyncFnOnce`(new in Rust 1.85) instead of generic future return
type
…/op-reth#635)

Ref op-rs/op-reth#631

- Removes `safe_fn` closure as arg from `initialize` by making
`initialize` a method of `InitializationJob`
- Moves save functions out of `InitializationJob` into impls of trait
method of new trait `InitTable::save_entries`
- Uses `size_hint` to avoid cost of heap re-allocations
- Removes redundant clone
This PR improves the robustness of the OP-Reth Proofs ExEx by process
notifications asynchronously(to avoid WAL backpressure) when the gap
between proof storage and the tip is big. This change ensures that
notification pipeline is able to keep up and gracefully handle the gap.

Closes op-rs/op-reth#597

---------

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
Closes: op-rs/op-reth#634

Blocked on: op-rs/op-reth#637

---------

Co-authored-by: Himess <semihcvlk53@gmail.com>
Closes op-rs/op-reth#641

---------

Co-authored-by: Himess <semihcvlk53@gmail.com>
Fixes lint `clippy::redundant_type_annotations`
op-rs/op-reth#644)

Closes op-rs/op-reth#631

- Puts off assigning variables until right when needed
- Optimizes away redundant clone of entries on batch insertion
- Updates symbol name to better show initialising is a batching
algorithm
…eth#640)

Closes op-rs/op-reth#612

---------

Co-authored-by: Arun Dhyani <dhyaniarun7@gmail.com>
…h#650)

This PR added support to run op-reth in sequencer and op-reth(with
proof) in validator for the e2e test.

Note: In this setup pruning test isn't supported(at this moment) since
this test is falling outside the proof window of reth.

---------

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Closes op-rs/op-reth#528

---------

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Sadiqur Rahman <sadiqurr8@gmail.com>
Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
Co-authored-by: Himess <95512809+Himess@users.noreply.github.com>
Co-authored-by: Himess <semihcvlk53@gmail.com>
Co-authored-by: jagroot <4516586+itschaindev@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Julian Meyer <julianmeyer2000@gmail.com>
@theochap theochap force-pushed the theo/port-historical-proofs branch from ae066cc to 222bf72 Compare February 17, 2026 20:43
Copy link
Member

@sebastianst sebastianst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diffed against reformatted latest https://github.com/op-rs/op-reth/tree/stable and changes are minor clippy etc. So LGTM. Will merge tomorrow morning.

@sebastianst sebastianst added the M-do-not-merge Meta: Do not merge label Feb 17, 2026
@theochap theochap force-pushed the theo/port-historical-proofs branch 4 times, most recently from 7d91c4c to f7bc813 Compare February 17, 2026 22:29
@theochap theochap force-pushed the theo/port-historical-proofs branch from b56a5af to b664c90 Compare February 18, 2026 01:18
@sebastianst sebastianst merged commit 39ec1d9 into theo/pull-reth-2 Feb 18, 2026
118 checks passed
@sebastianst sebastianst deleted the theo/port-historical-proofs branch February 18, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

M-do-not-merge Meta: Do not merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.