This guide explains when fixture generation is needed and how to produce fixtures for ere-hosts. For Docker usage and binary-local behavior, see Witness Generator CLI notes.
ere-hosts stateless-validator accepts two fixture formats:
- Direct EEST
blockchain_testsfixtures: EEST JSON files whose executable blocks includestatelessInputBytesandstatelessOutputBytes. - Legacy generated fixtures: repo-native JSON files with a top-level
stateless_inputfield.
If you already have EEST blockchain_tests fixtures with stateless bytes, you usually do not need to run witness-generator-cli. Point ere-hosts at the EEST fixture checkout or archive root with --input-folder.
Use witness-generator-cli when you need legacy generated fixtures:
- You want fixtures from live RPC blocks.
- You have pre-collected raw JSON-RPC inputs.
- You want to convert EEST cases into the legacy generated fixture shape.
- You need
ere-hoststo run the selected execution client's legacy host conversion path instead of passing EEST stateless bytes directly to the guest.
For the exact schemas accepted by ere-hosts, see Benchmark Execution Inputs.
Direct EEST fixtures are consumed as input, not generated by this repository. Prefer this path when the EEST blockchain_tests files already include canonical stateless input and output bytes.
cargo run -p ere-hosts --release -- --zkvms sp1 \
stateless-validator --execution-client reth \
--input-folder /path/to/execution-specs/fixturesWhen the input folder contains a blockchain_tests/ subdirectory, ere-hosts uses only that subtree for stateless-validator inputs.
witness-generator-cli writes legacy generated fixtures as JSON files. By default it writes them to zkevm-fixtures-input/; override that with -o, --output-folder <PATH>.
Inspect the current CLI surface from the repo root:
cargo run -p witness-generator-cli -- --helpUse witness-generator-cli tests only when you need to convert EEST cases into the legacy generated fixture shape.
cargo run -p witness-generator-cli --release -- tests --include 10M --include PragueUse a specific benchmark release tag:
cargo run -p witness-generator-cli --release -- tests --tag tests-benchmark@v0.0.9Use a local EEST fixture directory instead of downloading a release:
cargo run -p witness-generator-cli --release -- tests \
--eest-fixtures-path /path/to/local/eest/fixtures \
--include PragueNotes:
--tagand--eest-fixtures-pathare mutually exclusive.--includeand--excludemay be repeated to narrow the generated set.- EEST generation runs matching tests in parallel. Lower
RAYON_NUM_THREADSif fixture generation is memory constrained. - EEST cases that fail before producing an executable block witness are logged and skipped. The generated count reflects fixtures written to disk.
Generate fixtures from the latest N blocks:
cargo run -p witness-generator-cli --release -- rpc \
--last-n-blocks 2 \
--rpc-url <RPC_URL>Generate a specific block:
cargo run -p witness-generator-cli --release -- rpc \
--block 20000000 \
--rpc-url <RPC_URL>Follow finalized blocks continuously:
cargo run -p witness-generator-cli --release -- rpc \
--follow \
--rpc-url <RPC_URL>Use custom headers:
cargo run -p witness-generator-cli --release -- rpc \
--last-n-blocks 2 \
--rpc-url <RPC_URL> \
--rpc-header "Authorization:Bearer <TOKEN>" \
--rpc-header "X-Trace-Id:bench-run-01"Use a custom or devnet genesis file when the RPC chain ID is not baked into the Reth chain config set:
cargo run -p witness-generator-cli --release -- rpc \
--last-n-blocks 2 \
--rpc-url <RPC_URL> \
--genesis /path/to/genesis.jsonNotes:
--last-n-blocks,--block, and--followare mutually exclusive.--rpc-headervalues must usekey:valueorkey: value.--genesisexpects a geth-stylegenesis.jsonand the CLI will fail fast ifeth_chainIddoes not matchgenesis.config.chainId.
Generate fixtures from a folder containing chain_config.json and raw_input_parts.txt:
cargo run -p witness-generator-cli --release -- raw-input \
--input-folder /path/to/raw-inputsEach raw-input pair should resolve to eth_block.json and debug_executionWitness.json.
- Legacy generated fixtures are JSON files written to
zkevm-fixtures-input/unless--output-folderis set. - The CLI creates the output directory if it does not already exist.
- The generated fixture set can be reused across multiple benchmark runs.
cargo runfrom the repo root must include-p witness-generator-cli; the workspace has multiple binaries.--last-n-blocks 0is rejected.- Unsupported RPC chain IDs require
--genesis. - Header formatting errors must be fixed to
key:value. - RPC, GitHub, or EEST download failures may be environmental rather than code regressions.