Z

ZEVM Backpressure Audit Report

evmts/zevm · main @ 75cd1c3c · 2026-11-27 13:59:23 UTC
Controlled Sandbox Smithers Factory Docs
Execution Provenance: Controlled Sandbox

Executed inside a Smithers Cloud / GitHub Actions trunk sandbox on exact target SHA. Trunk cache write allowed on main only. Gate authoritative.

Cache: read+write (main trunk environment only)
Gate authority: authoritative
Provenance: Verify CI run
Overall A-
Mean across 7 audit categories

Cancun GeneralStateTests Floor

99.0%
19,527 / 19,732 post states

Prague GeneralStateTests Floor

98.7%
17,767 / 17,992 post states

Qualification Map Coverage

100%
21 / 21 contract assertions covered

Pinned Native Siblings

Zig 0.15.2
Canonical deterministic pins in native-dependencies.json
voltaire 93c4e67d guillotine-mini 2264d998

Top Score Opportunities

Ranked by largest projected Lighthouse point gain
+6 pts
zig-assertion-density safety
0.35 → target 20
+5 pts
line-length style
false → target true
+3 pts
subsystem-size footprint · src/(root)
938126 → target 80000
+3 pts
file-lines footprint · src/node/runtime.zig
5341 → target 500
+3 pts
file-lines footprint · src/rpc/dispatch_wiring.zig
4900 → target 500
+3 pts
file-lines footprint · src/rpc/handlers/simulation.zig
3094 → target 500
+3 pts
file-lines footprint · src/block_builder.zig
2990 → target 500
+3 pts
file-lines footprint · src/transaction_encoding.zig
1658 → target 500
+3 pts
file-lines footprint · src/rpc/server.zig
1500 → target 500
+3 pts
file-lines footprint · src/rpc/handlers/eth_read.zig
1324 → target 500
+1 pts
function-length style · src/rpc/dispatch_wiring.zig
599 → target 70
+1 pts
function-length style · src/tx_processor.zig
350 → target 70
+1 pts
function-length style · src/node/runtime.zig
315 → target 70
+1 pts
function-length style · src/block_builder.zig
305 → target 70
+1 pts
function-length style · src/rpc/handlers/simulation.zig
249 → target 70

Detailed Audits

Safety & TigerStyle

Execution-client crash freedom, explicit error handling, and assertion density across Zig and npm JS wrappers.
93 · A

Never use @panic or unreachable in production src/**/*.zig; validate inputs and return typed errors.

weight 2 · check
ItemObservedDiagnostic
src/beacon_api.zig pass
src/blob_fee.zig pass
src/blob_kzg.zig pass
src/block_builder.zig pass
src/browser.zig pass
src/c_bindings.zig pass
src/chain_import.zig pass
src/checkpoint.zig pass
src/cli.zig pass
src/config.zig pass
src/consensus_sync.zig pass
src/consensus_verifier.zig pass
src/console_log.zig pass
src/database/accounts.zig pass
src/database/contracts.zig pass

Showing top entries (48 more omitted for brevity).

Replace std.debug.print in production src/**/*.zig modules with structured logging via src/log.zig.

weight 1 · check
ItemObservedDiagnostic
src/beacon_api.zig pass
src/blob_fee.zig pass
src/blob_kzg.zig pass
src/block_builder.zig pass
src/browser.zig pass
src/c_bindings.zig pass
src/chain_import.zig pass
src/checkpoint.zig pass
src/cli.zig pass
src/config.zig pass
src/consensus_sync.zig pass
src/consensus_verifier.zig pass
src/console_log.zig pass
src/database/accounts.zig pass
src/database/contracts.zig pass

Showing top entries (48 more omitted for brevity).

Never swallow errors with empty catch {} or leave error.NotImplemented stubs in production src/**/*.zig.

weight 2 · check
ItemObservedDiagnostic
src/beacon_api.zig pass
src/blob_fee.zig pass
src/blob_kzg.zig pass
src/block_builder.zig pass
src/browser.zig pass
src/c_bindings.zig pass
src/chain_import.zig pass
src/checkpoint.zig pass
src/cli.zig pass
src/config.zig pass
src/consensus_sync.zig pass
src/consensus_verifier.zig pass
src/console_log.zig pass
src/database/accounts.zig pass
src/database/contracts.zig pass

Showing top entries (48 more omitted for brevity).

51 Zig assertion density 0.3 target 20

Add invariant assertions to production Zig execution, RPC, and consensus paths toward TigerStyle density.

weight 1 · count

Keep every JavaScript file under npm/zevm/src/ syntactically valid under `node --check`.

weight 1 · check
ItemObservedDiagnostic
npm/zevm/src/browser.js pass
npm/zevm/src/index.js pass

Style & Limits

CLAUDE.md Zig style rules, TigerStyle structural bounds (70-line functions, 120-char lines), and canonical formatting.
84 · B+

Keep every Zig file under src/ formatted with `zig fmt`.

weight 2 · check
ItemObservedDiagnostic
src/beacon_api.zig pass
src/beacon_api_test.zig pass
src/blob_fee.zig pass
src/blob_kzg.zig pass
src/block_builder.zig pass
src/block_builder_test.zig pass
src/browser.zig pass
src/c_bindings.zig pass
src/chain_import.zig pass
src/chain_import_test.zig pass
src/checkpoint.zig pass
src/checkpoint_test.zig pass
src/cli.zig pass
src/cli_test.zig pass
src/config.zig pass

Showing top entries (100 more omitted for brevity).

Follow CLAUDE.md Zig style: use fully qualified imported symbol paths inline instead of private top-level `const Foo = bar.Foo` aliases.

weight 1.5 · check
ItemObservedDiagnostic
src/beacon_api.zig pass
src/blob_fee.zig pass
src/blob_kzg.zig pass
src/block_builder.zig pass
src/browser.zig pass
src/c_bindings.zig pass
src/chain_import.zig pass
src/checkpoint.zig pass
src/cli.zig pass
src/config.zig pass
src/consensus_sync.zig pass
src/consensus_verifier.zig pass
src/console_log.zig pass
src/database/accounts.zig pass
src/database/contracts.zig pass

Showing top entries (48 more omitted for brevity).

57 Function length 172 target 70

Keep every production Zig runtime function at or below 70 lines (TigerStyle limit); decompose large RPC/block handlers.

weight 2 · count
ItemObservedDiagnostic
src/rpc/dispatch_wiring.zig 599 dispatchLocked() is 599 lines (TigerStyle limit 70)
src/tx_processor.zig 350 processTransactionWithOptions() is 350 lines (TigerStyle limit 70)
src/node/runtime.zig 315 init() is 315 lines (TigerStyle limit 70)
src/block_builder.zig 305 buildBlockWithOptions() is 305 lines (TigerStyle limit 70)
src/rpc/handlers/simulation.zig 249 simulateBlock() is 249 lines (TigerStyle limit 70)
src/consensus_verifier.zig 172 verifyUpdate() is 172 lines (TigerStyle limit 70)
src/rpc/handlers/tx_submission.zig 160 handleSendRawTransaction() is 160 lines (TigerStyle limit 70)
src/main.zig 139 main() is 139 lines (TigerStyle limit 70)
src/rpc/block_queries.zig 114 txResponseFromDecoded() is 114 lines (TigerStyle limit 70)
src/rpc/dispatcher.zig 102 dispatch() is 102 lines (TigerStyle limit 70)
src/eof.zig 96 validateSection() is 96 lines (TigerStyle limit 70)
src/rpc/server.zig 92 handleRequest() is 92 lines (TigerStyle limit 70)
src/txpool.zig 90 insert() is 90 lines (TigerStyle limit 70)
src/cli.zig 84 parse() is 84 lines (TigerStyle limit 70)
src/evm_backend.zig 79 executeGuillotineMini() is 79 lines (TigerStyle limit 70)
src/mpt_proof.zig 78 buildNode() is 78 lines (TigerStyle limit 70)
src/mining_coordinator.zig 76 mineBlockWithOptions() is 76 lines (TigerStyle limit 70)
src/rpc/handlers/block_query_handlers.zig 71 internalTxToRpc() is 71 lines (TigerStyle limit 70)
src/log_index.zig 65
src/rpc/trusted_fork_handlers.zig 64
src/config.zig 63
src/c_bindings.zig 61
src/release_metadata.zig 61
src/rpc/handlers/eth_read.zig 60
src/chain_import.zig 59
src/consensus_sync.zig 57
src/execution_fixture_rpc.zig 57
src/genesis_alloc.zig 55
src/beacon_api.zig 52
src/checkpoint.zig 49
src/transaction_encoding.zig 49
src/genesis.zig 48
src/light_proof.zig 48

Showing top entries (25 more omitted for brevity).

63 Line length 40/63 pass target 100% pass

Keep production Zig lines at or below 120 characters (TigerStyle limit).

weight 1 · check
ItemObservedDiagnostic
src/block_builder.zig fail line 305: 122 chars (limit 120)
src/config.zig fail line 477: 122 chars (limit 120)
src/consensus_sync.zig fail line 194: 121 chars (limit 120)
src/exex.zig fail line 298: 125 chars (limit 120)
src/genesis.zig fail line 64: 157 chars (limit 120)
src/light_default_checkpoints.zig fail line 7: 121 chars (limit 120)
src/light_proof.zig fail line 150: 132 chars (limit 120)
src/main.zig fail line 77: 123 chars (limit 120)
src/mining_coordinator.zig fail line 21: 124 chars (limit 120)
src/node/runtime.zig fail line 306: 137 chars (limit 120)
src/rebase_fork.zig fail line 108: 126 chars (limit 120)
src/rpc/block_queries.zig fail line 313: 122 chars (limit 120)
src/rpc/dispatch_wiring.zig fail line 107: 134 chars (limit 120)
src/rpc/dispatcher.zig fail line 8: 138 chars (limit 120)
src/rpc/handlers/block_query_handlers.zig fail line 201: 147 chars (limit 120)
src/rpc/handlers/eth_config.zig fail line 63: 134 chars (limit 120)
src/rpc/handlers/eth_read.zig fail line 233: 128 chars (limit 120)
src/rpc/handlers/simulation.zig fail line 292: 126 chars (limit 120)
src/rpc/handlers/tx_submission.zig fail line 65: 130 chars (limit 120)
src/rpc/handlers/txpool.zig fail line 151: 121 chars (limit 120)
src/rpc/server.zig fail line 99: 122 chars (limit 120)
src/transaction_encoding.zig fail line 67: 129 chars (limit 120)
src/tx_processor.zig fail line 127: 147 chars (limit 120)
src/beacon_api.zig pass
src/blob_fee.zig pass
src/blob_kzg.zig pass
src/browser.zig pass
src/c_bindings.zig pass
src/chain_import.zig pass
src/checkpoint.zig pass
src/cli.zig pass
src/consensus_verifier.zig pass
src/console_log.zig pass
src/database/accounts.zig pass
src/database/contracts.zig pass
src/database/database.zig pass
src/database/root.zig pass
src/difficulty.zig pass

Showing top entries (25 more omitted for brevity).

Resolve TODO, FIXME, XXX, and HACK markers in production src/**/*.zig instead of leaving deferred work.

weight 1 · check
ItemObservedDiagnostic
src/beacon_api.zig pass
src/blob_fee.zig pass
src/blob_kzg.zig pass
src/block_builder.zig pass
src/browser.zig pass
src/c_bindings.zig pass
src/chain_import.zig pass
src/checkpoint.zig pass
src/cli.zig pass
src/config.zig pass
src/consensus_sync.zig pass
src/consensus_verifier.zig pass
src/console_log.zig pass
src/database/accounts.zig pass
src/database/contracts.zig pass

Showing top entries (48 more omitted for brevity).

Footprint & Modularity

Source file and subsystem modularity limits to keep the execution client auditable.
34 · F
44 File lines 1324 target 500

Keep production Zig files focused and under 500 lines; split monolithic modules like src/block_builder.zig and src/rpc/.

weight 2 · count
ItemObservedDiagnostic
src/node/runtime.zig 5341
src/rpc/dispatch_wiring.zig 4900
src/rpc/handlers/simulation.zig 3094
src/block_builder.zig 2990
src/transaction_encoding.zig 1658
src/rpc/server.zig 1500
src/rpc/handlers/eth_read.zig 1324
src/rpc/handlers/block_query_handlers.zig 1241
src/config.zig 1175
src/exex.zig 1051
src/txpool.zig 1018
src/rpc/block_queries.zig 1003
src/beacon_api.zig 983
src/consensus_verifier.zig 950
src/tx_processor.zig 914
src/mining_coordinator.zig 904
src/rebase_fork.zig 853
src/release_metadata.zig 806
src/light_proof.zig 793
src/consensus_sync.zig 764
src/chain_import.zig 725
src/c_bindings.zig 697
src/eof.zig 687
src/genesis.zig 661
src/rpc/handlers/tx_submission.zig 620
src/mpt_proof.zig 568
src/log.zig 508
src/execution_fixture_rpc.zig 488
src/rpc/handlers/txpool.zig 462
src/blob_fee.zig 434
src/genesis_alloc.zig 403
src/log_index.zig 394
src/rpc/handlers/debug_raw.zig 393
src/rpc/handlers/eth_config.zig 366
src/hardfork_schedule.zig 353
src/rpc/dispatcher.zig 353
src/cli.zig 323
src/host_adapter.zig 313
src/evm_backend.zig 311
src/rpc/trusted_fork_handlers.zig 302
src/rpc/dev_runtime.zig 286
src/main.zig 277

Showing top entries (21 more omitted for brevity).

13 Subsystem size 916.1 kB target 78.1 kB

Keep each src/ subsystem modular and well-bounded in source footprint.

weight 1 · size
ItemObservedDiagnostic
src/(root) 916.1 kB
src/rpc 635.4 kB
src/node 232.0 kB
src/database 14.5 kB

Verification & Fuzzing

Native Zig fuzz targets, Lean 4 consensus/execution proofs, and module test coverage.
93 · A

Close every `sorry` and unproved `axiom` in spec/lean/**/*.lean formal proofs.

weight 2 · check
ItemObservedDiagnostic
spec/lean/ZevmSpec.lean pass
spec/lean/ZevmSpec/ConsensusMath.lean pass
spec/lean/ZevmSpec/Evm.lean pass
spec/lean/ZevmSpec/Main.lean pass
spec/lean/ZevmSpec/RlpTx.lean pass

Expand Lean 4 theorem and lemma coverage in spec/lean/ for block validation, consensus, and state transitions.

weight 1 · count

Expand native `std.testing.fuzz` target coverage across RPC, Engine API, consensus, MPT, and C ABI boundaries.

weight 1.5 · count

Ensure every production src/**/*.zig module has inline `test` blocks or a dedicated sibling `*_test.zig`.

weight 1.5 · count

Documentation

Astro/Starlight docs mirror parity (`tools/docs_mirror.mjs`) and markdown link integrity.
100 · A+

Keep docs/ and docs/src/content/docs/ synchronized by running `node tools/docs_mirror.mjs --write` after editing docs.

weight 2 · check
ItemObservedDiagnostic
docs/src/content/docs pass

Fix broken local paths and machine-specific links in root Markdown files and docs/.

weight 1.5 · check
ItemObservedDiagnostic
AGENTS.md pass
CHANGELOG.md pass
CLAUDE.md pass
CONTRIBUTING.md pass
README.md pass
REVIEWS.md pass
docs/concepts/architecture-and-upstream-ownership.mdx pass
docs/concepts/light-mode.mdx pass
docs/concepts/method-support-by-mode.mdx pass
docs/concepts/runtime-modes.mdx pass
docs/concepts/state-fork-and-snapshots.mdx pass
docs/concepts/trusted-mode.mdx pass
docs/index.mdx pass
docs/quickstart/forked-dev-node.mdx pass
docs/quickstart/installation.mdx pass

Showing top entries (44 more omitted for brevity).

Ethereum Conformance

Pinned Voltaire and Guillotine Mini provenance, release qualification coverage, Cancun/Prague GeneralStateTests floors, and npm release version parity.
93 · A

Keep native-dependencies.json pinned to pushed 40-hex commit SHAs for evmts/voltaire and evmts/guillotine-mini.

weight 2 · check
ItemObservedDiagnostic
voltaire pass
guillotine-mini pass

Keep every release qualification assertion in docs/specs/qualification/assertion-map.json covered.

weight 2 · count
87 Cancun state floor 99 target 100

Raise the Cancun GeneralStateTests pass floor in tools/latest_fork_state_baseline.json toward 100%.

weight 1.5 · count
86 Prague state floor 98.7 target 100

Raise the Prague GeneralStateTests pass floor in tools/latest_fork_state_baseline.json toward 100%.

weight 1.5 · count

Keep package versions, platform optionalDependencies, build.zig.zon, and native ZEVM_VERSION aligned (npm run verify:release).

weight 1.5 · check
ItemObservedDiagnostic
npm/zevm pass

Smithers Factory & Trust

Coding factory projection, 3-audience personalized home, shared cache trust isolation, Obsidian wiki, llms.txt index, and one-time sandbox auth.
100 · A+

Declare Smithers Cloud repository workflow triggers in .smithers/FACTORY.ts so factory.json emits apiVersion 1 and contributes.triggers.

weight 2 · check
ItemObservedDiagnostic
.smithers/factory.json pass

Enforce policy.approvals approve=person and merge=person in .smithers/FACTORY.ts.

weight 2 · check
ItemObservedDiagnostic
.smithers/factory.json pass

Protect consensus, ABI, native pins, build, and factory paths in github.protectedPaths.

weight 1.5 · check
ItemObservedDiagnostic
.smithers/factory.json pass

Declare maintainer, contributor, and everyone sections in .smithers/HOME.mjs (projected to .smithers/home.json) without markdown blocks so smithers.sh renders pre-clone.

weight 1.5 · check
ItemObservedDiagnostic
.smithers/home.json pass

Declare docs pointing to https://zevm.sh/docs/llms.txt in .smithers/HOME.mjs.

weight 1 · check
ItemObservedDiagnostic
.smithers/home.json pass

Isolate untrusted PR execution from trunk cache writes using split SMITHERS_CACHE_READ_TOKEN and main-only SMITHERS_CACHE_WRITE_TOKEN.

weight 2 · check
ItemObservedDiagnostic
.smithers/WORKSPACE.ts pass

Keep .smithers/wiki/ wikilinks, frontmatter, mythical history, and code citations valid (node tools/wiki_sync.mjs --check).

weight 1.5 · check
ItemObservedDiagnostic
.smithers/wiki pass

Keep docs/public/llms.txt synchronized with docs/ (node tools/generate_llms_txt.mjs --check).

weight 1 · check
ItemObservedDiagnostic
docs/public/llms.txt pass

Maintain .smithers/merge.json and tools/sandbox_auth.mjs for one-time-use sandbox agent authentication.

weight 1 · check
ItemObservedDiagnostic
.smithers/merge.json pass