This README is crate-local. Use ../../docs/fixture-generation.md for the primary operator workflow from the workspace root, and use this file for crate-specific notes such as Docker usage and binary-local behavior.
witness-generator-cli is the standalone binary for generating JSON fixtures consumed by ere-hosts.
It supports three data sources:
- EEST: generate fixtures from execution-spec test releases or a local EEST directory.
- RPC: generate fixtures from live RPC blocks and execution witnesses.
- Raw Input: generate fixtures from pre-collected JSON-RPC response files listed in
raw_input_parts.txt.
The current CLI surface is defined by clap; inspect it from the workspace root with:
cargo run -p witness-generator-cli -- --helpCommon examples:
# Generate fixtures from execution spec tests
cargo run -p witness-generator-cli --release -- tests --include Prague
# Generate fixtures from a specific EEST tag
cargo run -p witness-generator-cli --release -- tests --tag v0.1.0
# Generate fixtures from a local EEST folder
cargo run -p witness-generator-cli --release -- tests \
--eest-fixtures-path /path/to/local/eest/fixtures
# Generate fixtures from the last 5 RPC blocks
cargo run -p witness-generator-cli --release -- rpc \
--last-n-blocks 5 \
--rpc-url <RPC_URL>
# Listen for finalized blocks continuously
cargo run -p witness-generator-cli --release -- rpc \
--follow \
--rpc-url <RPC_URL>
# Generate fixtures from pre-collected raw inputs
cargo run -p witness-generator-cli --release -- raw-input \
--input-folder /path/to/raw/inputs
# Write fixtures to a custom folder
cargo run -p witness-generator-cli --release -- \
--output-folder my-fixtures \
tests --include PragueBuild the image from the workspace root:
docker build -f crates/witness-generator-cli/Dockerfile -t witness-generator-cli .Run it with an explicit output folder mounted from the host:
docker run --rm -v "$(pwd)/output:/app/output" witness-generator-cli \
--output-folder /app/output \
tests --include PragueThe Docker build context must be the repository root because the Dockerfile copies the full workspace.
--tagand--eest-fixtures-pathare mutually exclusive.--includeand--excludemay be repeated to narrow the selected cases.
--last-n-blocks,--block, and--followare mutually exclusive.--rpc-headervalues must usekey:valueorkey: value.--genesis <PATH>loads a geth-stylegenesis.jsonfor custom or devnet chain configs.- The CLI validates
eth_chainIdagainstgenesis.config.chainIdwhen--genesisis used.
--input-foldermust containchain_config.jsonandraw_input_parts.txt.- Each raw-input pair should resolve to
eth_block.jsonanddebug_executionWitness.json.
For programmatic use, prefer the witness-generator library directly instead of this CLI wrapper.
This crate inherits its license from the workspace. See the root Cargo.toml or LICENSE files.