Skip to content

fix(deps): pin reth to morph-l2/reth v2.5.2-morph.1 for the trie seek-boundary fix - #228

Merged
panos-xyz merged 4 commits into
mainfrom
fix/reth-trie-seek-boundary
Nov 6, 2026
Merged

panos-xyz merged 4 commits into
mainfrom
fix/reth-trie-seek-boundary

Conversation

@panos-xyz

@panos-xyz panos-xyz commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Pin all reth crates to the morph-l2/reth fork tag v2.5.2-morph.1: upstream v2.5.2 plus a cherry-pick of paradigmxyz/reth@8572c88fe0 (paradigmxyz/reth#28264, fix(trie): tighten iterator seek boundary).
  • Add the upstream regression test to morph-proofs, so CI fails if the pinned reth-trie ever regresses.
  • Allow the fork as a git source in deny.toml.
  • Resolve the cargo-deny advisories that started failing the Deny check: eight crates move to patched releases (lockfile only), and the two with no compatible fix are ignored with a reason.
  • Bump the workspace version to 1.4.1, so this ships as the v1.4.1 hotfix.
  • Raise the E2E job timeout from 15 to 30 minutes.

Why

reth v1.3.5 through v2.9.0 can compute an incorrect incremental state root in the serial StateRoot. morph-reth uses that path in the engine's serial fallback, the payload builder, the pre-Jade state-root job and morph-proofs.

Why a fork instead of upgrading to v2.10.0

v2.10.0 is the first upstream release with the fix, but v2.5.2 → v2.10.0 spans 807 commits. It includes the revm → evm2 switch (v2.9.0, which means porting morph-revm / morph-evm), trie API removals (ComputedTrieData, used by morph-proofs-exex), an MSRV bump to 1.96, reth-codecs 0.6 → 0.8, and several default changes (persistence threshold 7 → 50, state masking on). That upgrade needs its own plan; this PR is the minimal fix.

What changed

  • Cargo.toml: the 59 reth-* entries move from paradigmxyz/reth tag v2.5.2 to morph-l2/reth tag v2.5.2-morph.1. The workspace version goes from 1.4.0 to 1.4.1.
  • Cargo.lock:
    • The 105 reth packages change only their source and stay at 2.5.2.
    • The 16 workspace crates move to 1.4.1.
    • The eight advisory bumps listed below. Nothing else moves.
  • The fork tag is exactly one commit ahead of upstream v2.5.2 and touches only crates/trie/trie/src/node_iter.rs (compare). The production change is identical to upstream; the cherry-picked test only needed B256 added to its imports.
  • .github/workflows/test.yml: with a cold cache the E2E build takes about 12 minutes. On the first run of this PR all 146 E2E tests passed, but the job hit the 15-minute limit while saving the cache. nextest's per-test slow-timeout still bounds each test.

cargo-deny advisories

These advisories were published after the last Deny run on main, so they are not specific to this PR. Each bump is a semver-compatible, lockfile-only update:

Crate Change Advisory
libz-sys 1.1.28 → 1.1.31 RUSTSEC-2026-0418
rustls-webpki 0.103.15 → 0.103.16 RUSTSEC-2026-0382
webpki-roots 1.0.7 → 1.0.11 RUSTSEC-2026-0381
webpki-root-certs 1.0.7 → 1.0.11 RUSTSEC-2026-0383
zstd 0.13.3 → 0.13.4 RUSTSEC-2026-0391
zstd-safe 7.2.4 → 7.4.0 RUSTSEC-2026-0398, RUSTSEC-2026-0403
zstd-sys 2.0.16 → 2.1.2 (still bundles zstd 1.5.7) RUSTSEC-2026-0410
tokio 1.52.3 → 1.53.3 RUSTSEC-2026-0386

Ignored in deny.toml, because no compatible fix exists:

  • RUSTSEC-2026-0387 (crypto-bigint 0.5): it comes in through elliptic-curve 0.13 (k256/p256/ecdsa, via alloy and reth). The fix is only in 0.7.6+, which needs the elliptic-curve 0.14 major upgrade upstream.
  • RUSTSEC-2026-0441 (pin-utils, unmaintained): it is reached only through wasmtimer, a wasm32-only dependency of alloy, so it is not built for our targets.

Testing

  • CI on b534ca6 (the reth pin and the new test):
    • Build, Clippy, Rustfmt and Doc Tests passed.
    • Run Tests passed (986 tests, including incremental_root_includes_leaf_before_deeper_stored_branch).
    • E2E: all 146 tests passed before the job hit the 15-minute limit.
  • cargo deny --all-features check all was run locally. The advisories above are no longer reported, and both ignores are matched.
    • The local cargo-deny is 0.18.8. It also reports two older unsound advisories on transitive crates (anyhow, RUSTSEC-2026-0190; lru, RUSTSEC-2026-0253).
    • CI's cargo-deny 0.20.2 does not fail on those two, and this PR does not change them.
  • The advisory commit's lockfile was checked with cargo metadata --locked. Its new checksums match the crates.io index, and it changes no other package.
  • Nothing was compiled locally (the workstation's application allowlist blocks local builds), so compile and test results come from CI.

Rollout

  • No database or config change. A rolling restart is enough, and rollback is swapping the binary back.
  • Before rolling out, run a Hoodi follower on this build with --engine.state-root-fallback (forces the serial path on every block), plus a layer1-mode validator.
  • Switch back to an upstream tag (v2.10.0 or later) at the next reth upgrade.

…-boundary fix

reth v1.3.5 through v2.9.0 can skip a hashed leaf inserted between a seek prefix and a deeper stored branch when the serial StateRoot computes an incremental root (paradigmxyz/reth#28264). morph-reth reaches that path in the engine's serial fallback, the payload builder, the pre-Jade state-root job and morph-proofs.

Upstream first ships the fix in v2.10.0, which also replaces revm with evm2, so pin to the morph-l2/reth fork tag v2.5.2-morph.1 instead: upstream v2.5.2 plus a cherry-pick of 8572c88fe0. Cargo.lock only changes the source of the 105 reth crates; versions are unchanged and there is no database change.

Add the upstream regression test to morph-proofs so CI fails if the pinned reth-trie regresses, and allow the fork in deny.toml.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

Claude Code Review is paused for this repository because its GitHub organization is not linked to your Claude organization.

To turn it back on, one person needs both roles: owner of the GitHub organization (or the account owner, for a personal repository) and admin or owner of your Claude organization. If that is not you, pass this on to someone who is.

Open Organization settings, Git providers and click Link next to the GitHub organization's name. If it is not listed, click Enable GitHub integration or Connect your GitHub first, whichever the page shows.

New pull requests are then reviewed as before. To get a review on one that is already open, someone with write access can comment @claude review.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 33 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4d53e845-3fa9-486d-a63f-92235a90cfc6
Commits

Reviewing files that changed from the base of the PR and between b534ca6 and 8f832c5.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 3

  • .github/workflows/test.yml
  • Cargo.toml
  • deny.toml

No actionable comments were generated in the recent review.

Walkthrough

The listed Reth Git dependencies and the source allowlist now use the Morph Reth repository. A new proof test compares an incremental state root with a full rebuild after inserting a storage slot.

Changes: Reth dependency and proof changes

Layer / File(s) Summary
Reth dependency source update
Cargo.toml, deny.toml
The listed Reth Git dependencies now use morph-l2/reth at tag v2.5.2-morph.1. The source allowlist now permits that repository. Registry dependencies remain unchanged.
Incremental state-root test
crates/proofs/src/proof.rs
A new test constructs storage states and compares an incremental root after inserting slot 0x10, 0x00 with a full rebuild. It also checks that the rebuilt root differs from the old root.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: dylancai9, freefu-sec

Merge Risk: Minimal · previous review b534c

No concrete merge-blocking issue is identified in the dependency-source update or regression test. Merge readiness remains subject to normal compilation and test checks.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the reth dependency pin and the trie seek-boundary fix.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (2 skipped: 2 unsupported.)

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0f82cdc0-7af6-4664-b660-22bd1f1446ce
Commits

Reviewing files that changed from the base of the PR and between 270513b and b534ca6.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 3

  • Cargo.toml
  • crates/proofs/src/proof.rs
  • deny.toml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Bump the affected crates to patched, semver-compatible releases
(lockfile only):

- libz-sys 1.1.28 -> 1.1.31 (RUSTSEC-2026-0418)
- rustls-webpki 0.103.15 -> 0.103.16 (RUSTSEC-2026-0382)
- webpki-roots 1.0.7 -> 1.0.11 (RUSTSEC-2026-0381)
- webpki-root-certs 1.0.7 -> 1.0.11 (RUSTSEC-2026-0383)
- zstd 0.13.3 -> 0.13.4 (RUSTSEC-2026-0391)
- zstd-safe 7.2.4 -> 7.4.0 (RUSTSEC-2026-0398, RUSTSEC-2026-0403)
- zstd-sys 2.0.16 -> 2.1.2 (RUSTSEC-2026-0410)
- tokio 1.52.3 -> 1.53.3 (RUSTSEC-2026-0386)

Ignore the two advisories that have no compatible fix:

- RUSTSEC-2026-0387 (crypto-bigint 0.5): fixed only in 0.7.6+, which
  needs the elliptic-curve 0.14 major upgrade in alloy and reth.
- RUSTSEC-2026-0441 (pin-utils, unmaintained): reached only through
  wasmtimer, a wasm32-only dependency of alloy.
With a cold cache, for example after a dependency source change, the
build takes about 12 minutes before the E2E tests start. The job then
hit the 15-minute limit while saving the cache, even though all 146
tests had passed. nextest's slow-timeout still bounds each test.
@panos-xyz
panos-xyz requested a review from dylanCai9 November 6, 2026 03:15
@panos-xyz
panos-xyz merged commit 682f74e into main Nov 6, 2026
14 checks passed
@panos-xyz
panos-xyz deleted the fix/reth-trie-seek-boundary branch November 6, 2026 07:02
panos-xyz added a commit that referenced this pull request Nov 11, 2026
Cargo.toml: keep main's morph-l2/reth v2.5.2-morph.1 pin (from #228) and
re-apply this branch's addition of the reth-network dependency on top of
it. The branch was based on the older paradigmxyz/reth reference, so its
conflict side would have reverted the pin.
panos-xyz added a commit that referenced this pull request Nov 11, 2026
Cargo.toml: keep main's morph-l2/reth v2.5.2-morph.1 pin and re-apply this
branch's SP1 requirement on top of it -- reth-evm and reth-revm stay
default-features = false. The branch's conflict side was based on the older
paradigmxyz/reth reference and would have reverted the pin from #228.
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.

3 participants