Skip to content

Update reth to v2.9.0 - #59

Draft
jsign wants to merge 2 commits into
paradigmxyz:mainfrom
jsign:chore/reth-v2.9.0
Draft

jsign wants to merge 2 commits into
paradigmxyz:mainfrom
jsign:chore/reth-v2.9.0

Conversation

@jsign

@jsign jsign commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

This PR updates reth to v2.9.0, which replaces revm with evm2.

Without std, reth v2.9.0's ConfigureEvm::executor() returns an executor that rejects every block, so our guests would compile and then fail on every block. stateless_validation now runs the block through EthEvmConfig.executor_factory itself, like reth's BasicBlockExecutor does, and takes an EthEvmConfig instead of a generic ConfigureEvm.

This PR also:

  • Ports WitnessDatabase, the zkVM crypto provider and the EF tests to evm2.
  • Moves StatelessInput behind a default serde feature, since evm2/serde pulls in std through ark-serialize.
  • Copies reth's [patch.crates-io] for reth-core into the workspace and the guests, and pins alloy-trie to 0.9.8, since 0.9.9 breaks reth-trie-common.
  • Removes the KNOWN_FAILURES that now pass (11 of the 22 fixtures per format) and updates the reasons for the rest.

The ZisK and OpenVM guests don't build yet. evm2 needs Rust 1.96, and the Ere 0.19.5 images build ZisK with rustc 1.94.0-dev and OpenVM with 1.94.1-dev. SP1 builds fine. ZisK v1.4.0-alpha ships a rustc 1.99.0 toolchain and eth-act/ere#470 updates Ere to it, but OpenVM still needs a newer toolchain in Ere.

So prob worth keeping this as a draft for a bit.

jsign added 2 commits October 30, 2026 18:22
reth v2.9.0 replaces revm with evm2. Without `std`, its `ConfigureEvm::executor()` returns an executor that rejects every block, so stateless validation now drives `EthEvmConfig.executor_factory` directly and takes an `EthEvmConfig` instead of a generic `ConfigureEvm`.
@jsign

jsign commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

Compared the SP1 proving cost of this PR with reth-guest-v0.1.0-rc.6, which is built from main, on the 30M blocks of tests-zkevm-benchmark@v21.0.5. (Remember Zisk and OpenVM require a later release bc of Rust compiler requirements in toolchain).

The cost is the SP1 gas estimate from Ere 0.19.5's execute_estimated_cost, measured on the last block of each test. Both guests return the expected output on all 1,192 blocks.

Benchmarks Blocks Change in total cost Change for the typical block
instruction 819 -14.0% -5.8%
precompile 220 -0.2% -0.2%
block access lists 22 -2.6% -2.6%
scenario 131 +43.0% -3.6%
all 1,192 -2.6% -3.8%
all without test_auth_transaction 1,176 -3.3% -4.1%

Most blocks get a bit cheaper with evm2, and the instruction benchmarks get 14% cheaper. Precompiles barely move, since both guests use the same zkVM crypto.

The scenario total goes up because of the 16 test_auth_transaction blocks, which cost about 8.6x as much. evm2's recover_authority calls ecrecover_bytes, which uses the secp256k1 backend picked at compile time (k256 in our guests) instead of the installed Crypto, so EIP-7702 authority recovery runs in software inside the zkVM. A few other benchmarks also cost more than 1.2x: TLOAD, TSTORE, LOG, warm EXTCODECOPY, SELFBALANCE and the identity precompile.

The 11 heaviest test_modexp blocks didn't finish in time. The other 111 modexp blocks moved +0.1%, so I don't expect them to change much. ZisK and OpenVM aren't included since they don't build yet.

Edit: PR in evm2 reg scenario case alloy-rs/evm2#963

DaniPopes added a commit to alloy-rs/evm2 that referenced this pull request Nov 9, 2026
…o provider (#963)

This PR makes EIP-7702 authority recovery use the crypto provider, like
the ecrecover precompile: the installed `Crypto` provider, or the
default one when none is installed.

I found this while comparing the SP1 proving cost of evm2 against reth's
guest on the zkevm benchmark blocks
([comment](paradigmxyz/stateless#59 (comment))).
The 16 test_auth_transaction blocks cost about 8.6x as much, since
recover_authority() called ecrecover_bytes(), which uses the secp256k1
backend picked at compile time (k256 in our guests). So authority
recovery ran in software inside the zkVM, without using the guest's
provider.

#692 and #707 also argued that a custom provider could change which
authorizations are valid. I don't think that's a problem, since the
provider already decides the ecrecover precompile, and the y-parity and
low-s checks still run outside of it. With the default provider the
result is the same as before.

cc @figtracer

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
@jsign

jsign commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

alloy-rs/evm2#963 was merged, which makes EIP-7702 authority recovery use the installed Crypto provider. That fixes the test_auth_transaction regression from my comment above.

reth v2.9.0 pins evm2 at f93318f, and reth main (evm2 37fb326) doesn't include #963 yet either. Instead of patching evm2 here, let's wait for a reth release that includes it and update this PR then.

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.

1 participant