Repository navigation
Conversation
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`.
|
Compared the SP1 proving cost of this PR with The cost is the SP1 gas estimate from Ere 0.19.5's
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 The 11 heaviest Edit: PR in evm2 reg |
…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>
|
alloy-rs/evm2#963 was merged, which makes EIP-7702 authority recovery use the installed reth v2.9.0 pins evm2 at |
This PR updates reth to v2.9.0, which replaces revm with evm2.
Without
std, reth v2.9.0'sConfigureEvm::executor()returns an executor that rejects every block, so our guests would compile and then fail on every block.stateless_validationnow runs the block throughEthEvmConfig.executor_factoryitself, like reth'sBasicBlockExecutordoes, and takes anEthEvmConfiginstead of a genericConfigureEvm.This PR also:
WitnessDatabase, the zkVM crypto provider and the EF tests to evm2.StatelessInputbehind a defaultserdefeature, sinceevm2/serdepulls instdthroughark-serialize.[patch.crates-io]for reth-core into the workspace and the guests, and pinsalloy-trieto 0.9.8, since 0.9.9 breaksreth-trie-common.KNOWN_FAILURESthat 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.