Building & Testing
Guillotine Mini separates fast native checks from the full ethereum/tests and execution-spec-tests validation suites so day-to-day iteration stays under a second.
Dependency layout
build.zig.zon resolves voltaire (and its alias guillotine_primitives) from the sibling checkout ../voltaire, pinned to the exact commit recorded in native-dependencies.json:
# Layout expected on disk:
parent/
├── guillotine-mini/
└── voltaire/ # checked out at native-dependencies.json revisionFast checks (no submodules required)
zig build test-trace # Deterministic EIP-3155 native trace regression
zig build native # Static archive zig-out/lib/libguillotine_mini.a
zig build wasm # WASI Preview 1 reactor zig-out/bin/guillotine_mini.wasm
zig build test-wasm # Node 22+ WASM execution, revert, log, SHA256, BN254, BLS12-381 testsUnit tests
zig build unit # Core EVM + client module unit tests
zig build test # unit + execution-specs state tests + nethermind-diffNote on zig build unit: the core EVM tests in src/ pass without external fixtures. Five tests in client/trie/fixtures.zig read JSON fixtures from the optional ethereum-tests/ submodule, and the two runner tests in client/main.zig read genesis JSON from execution-specs/. They report FileNotFound unless those submodules are initialized.
Ethereum specification tests (execution-specs)
One-time fixture setup
git submodule update --init execution-specs
uv --version # uv manages the Python virtualenv for fixture generationFixture generation (uv run ... fill) requires Python 3.11 or later.
Running spec suites
# Run all GeneralStateTests
zig build specs
# Run blockchain tests
zig build specs-blockchain
# Include consensus-layer Engine API tests (off by default)
INCLUDE_ENGINE_TESTS=1 zig build specs
# Filter by fork, EIP, opcode, or test name
TEST_FILTER="push0" zig build specs
TEST_FILTER="transientStorage" zig build specs
TEST_FILTER="Osaka" zig build specsGranular per-fork and per-EIP targets
build.zig generates dedicated steps for each hardfork and EIP slice (for example specs-shanghai-push0, specs-cancun-tstore-basic, specs-cancun-mcopy, specs-byzantium-modexp). The runner matches TEST_FILTER as a plain, case-sensitive substring, so the Berlin, Frontier, Prague, and Osaka sub-steps, whose filters use regex syntax, select zero tests. List all targets with:
zig build --helpDebugging a spec divergence
When a spec test fails, the runner automatically:
- Captures an EIP-3155 trace from Guillotine Mini.
- Captures a reference trace from Python
ethereum-spec-evm. - Runs
TraceDiff.compare()and prints the first step wherepc,op,gas, orstackdiverged.
To isolate a single failing test with full diagnostic output:
TEST_SEQUENTIAL=1 TEST_FILTER="exact_test_name" zig build specsOr use the TypeScript isolation helper in scripts/:
bun scripts/isolate-test.ts "exact_test_name"Performance benchmarks (incremental via Smithers)
Every core EVM module, Zig client subsystem, WASI WASM reactor, C-FFI bridge, and TypeScript/client-ts package has an incremental benchmark target declared in per-module PACKAGE.ts files. Benchmarks run with exclusive: true (to avoid CPU contention), so wildcard smthrs ci '//...' omits them; select them explicitly or with --include-exclusive. They emit JSON metrics via BENCH_JSON_OUT:
# Preview which tests & benchmarks are affected by your current diff
smthrs affected test '//...' --include-exclusive --list
# Run ONLY affected benchmarks (skips unchanged modules automatically)
smthrs affected test '//...' --include-exclusive --verbose
# Run a single module benchmark
smthrs test //:bench_opcodes --verbose
smthrs test //client/trie:bench --verbose
smthrs test //client-ts/db:bench --verbose
# Aggregate all JSON benchmark artifacts into a single table (or diff against a baseline)
smthrs run //:bench_summary
bun scripts/bench-summary.ts --save /tmp/baseline.json
bun scripts/bench-summary.ts --baseline /tmp/baseline.json