The consume direct Command¶
The direct method provides the fastest way to test EVM functionality by executing tests directly through a client's dedicated test interface (e.g. statetest or blocktest).
uv run consume direct --bin=<evm-binary> [OPTIONS]
--bin EVM_BIN: Path to an evm executable that can processStateTestFixtureand/orBlockTestFixtureformats.--traces: Collect execution traces from the evm executable.
Limited Client Support
Currently, only the following clients can be used with consume direct:
- go-ethereum
statetestandblocktest - Nethermind
nethtest - evmone
evmone-statetestandevmone-blockchaintest
Advantages¶
- Speed: Fastest test execution method.
- Simplicity: No container or network overhead.
- Debugging: Easy access to traces and logs.
Limitations¶
- Limited client support: Only go-ethereum, Nethermind and evmone
- Module scope: Tests EVM, respectively block import, in isolation, not full client behavior.
- Interface dependency: Requires client-specific test interfaces.
Example Usage¶
Only run state tests (by using a mark filter, -m) from a local fixtures folder with go-ethereum:
uv run consume direct --input ./fixtures -m state_test --bin=evm
or Nethermind:
uv run consume direct --input ./fixtures -m state_test --bin=nethtest
or evmone:
uv run consume direct --input ./fixtures --bin=evmone-statetest --bin=evmone-blockchaintest
Run fixtures in the blockchain test format for the Prague fork:
uv run consume direct --input ./fixtures -m "blockchain_test and Prague" --bin=evm
Test selection via a regular expression match on collected fixture IDs:
uv run consume direct --input ./fixtures --sim.limit ".*push0.*"
Test selection via pytest keyword expression match:
uv run consume direct --input ./fixtures -k "eip3855 or Prague"
Use --collect-only -q to get a list of available test fixture IDs:
uv run consume direct --input ./fixtures -k "eip3855 or Prague" --collect-only -q