op-revm is the Optimism variant of revm —
the OP Stack’s modifications to the Ethereum Virtual Machine, packaged as a
custom EVM built on top of the upstream revm framework.
Features
op-revm extends revm with everything the OP Stack needs on top of vanilla
Ethereum execution:
- Deposit transactions — the L1-to-L2 deposit transaction type and its execution semantics.
- L1 cost accounting —
L1BlockInfoand per-transaction L1 fee / blob fee calculation. - Operator fees — operator fee handling introduced in Isthmus and refined in Jovian.
- OP-specific precompiles — including accelerated BN254 pairing.
- OP halt reasons & transaction errors — OP Stack–specific execution failure modes.
- Hardfork-aware spec selection —
OpSpecIdselects the right behavior for each OP Stack hardfork (Bedrock, Regolith, Canyon, Ecotone, Fjord, Granite, Holocene, Isthmus, Jovian, …).
Provenance
op-revm is vendored from upstream
bluealloy/revm’s crates/op-revm
and imported into the monorepo so it can evolve in lock-step with the rest of
the OP Stack Rust code. The upstream release history lives in the
revm releases.
Crate features
The crate exposes the usualrevm feature knobs, forwarded through to the
underlying revm crate:
default = ["std", "c-kzg", "secp256k1", "portable", "blst"]std— enablesstd-dependent code paths inrevm,alloy-primitives,serde_json, etc.serde— derivesserdeimpls and forwards torevm/serdeandalloy-primitives/serde.portable,c-kzg,secp256k1,blst,bn— pass-through feature gates for the cryptographic backends.dev,memory_limit,optional_balance_check,optional_block_gas_limit,optional_eip3541,optional_eip3607,optional_no_base_fee,optional_fee_charge— debugging and testing knobs forwarded torevm.
op-revm supports no_std builds: disabling default features (or building
with --no-default-features) produces a crate suitable for fault-proof and
zkVM targets such as riscv32imac-unknown-none-elf.
Building & testing
From therust/ workspace root:
no_std build is also exercised by just check-no-std and runs in CI on
every PR that touches rust/**.
Using op-revm
op-revm is the EVM used by op-reth for OP Stack block
execution, and by Kona inside the fault-proof
program and rollup node. Most users will consume it transitively through one
of those components rather than depending on it directly; depend on op-revm
directly only when building a custom OP Stack execution environment (for
example, an alternate client or a zkVM proof backend).
License
op-revm is licensed under the MIT License — see
rust/op-revm/LICENSE.