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.
op-revm adds:
- Deposit transactions and the deposit transaction type
- L1 cost / blob fee accounting (
L1BlockInfo) - Operator fee handling (Isthmus / Jovian)
- OP-specific precompiles (BN254 pairing acceleration, etc.)
- OP-specific halt reasons and transaction errors
- Hardfork-aware spec selection (
OpSpecId)
This crate is the OP Stack's in-tree fork of revm's
op-revm. It was
migrated into the monorepo and is maintained here directly, evolving in
lock-step with the rest of the OP Stack Rust code. The generic revm framework
it builds on remains an external, pinned dependency (see
UPDATING-RETH.md).
default = ["std", "c-kzg", "secp256k1", "portable", "blst"]std— enablesstd-dependent features inrevm,alloy-primitives,serde_json, etc.serde— derivesserdeimpls and forwards torevm/serdeandalloy-primitives/serdeportable,c-kzg,secp256k1,blst,bn— pass-through feature gates to the correspondingrevmcryptographic backendsdev,memory_limit,optional_balance_check,optional_block_gas_limit,optional_eip3541,optional_eip3607,optional_no_base_fee,optional_fee_charge— debugging / testing knobs forwarded torevm
From rust/:
# Build
cargo build -p op-revm
# Tests
cargo nextest run -p op-revm --all-features
# no_std check (mirrors upstream's riscv32imac CI)
cargo build -p op-revm --target riscv32imac-unknown-none-elf --no-default-featuresThe no_std build is also exercised by just check-no-std and runs in CI on
every PR that touches rust/**.
MIT — see LICENSE.