ZK engine benchmarks

Design document, published from the repository at docs/zk/BENCHMARKS.md.

Generated by packages/zk-noir/src/bench.test.ts (QUANTLAYER_BENCH=1) on 2026-11-13. Raw data: benchmarks.json. Re-run on your target hardware before capacity planning.

  • Toolchain: Noir 1.0.0, Barretenberg 6.0.0, UltraHonk-BN254 (evm target: ZK, Keccak)
  • Machine: Apple M2, 8 cores, 16 GiB, darwin 27.0.0, Node v26.13.1
  • Method: median of 5 witness / 3 proving / 10 verification runs, 4 prover threads, after one warm-up proof. Peak memory is the resident set of the whole process tree during proving.

All circuits use depth-20 trees and compile to 2^16-gate UltraHonk circuits (dominated by 22–23 circomlib-Poseidon hashes). Proofs are 8,768 bytes.

Proving (Node, off-chain)

Circuitlog₂ gatesWitness (ms)Prove native (ms)Prove WASM (ms)Verify native (ms)Verify WASM (ms)Peak RSS native (MiB)Peak RSS WASM (MiB)
membership161126908762.29.7681702
credential-ownership161137079082.26.9672812
credential-validity161147198962.26.2721664
balance-threshold161137249072.26.9717697
nullifier-uniqueness161177259182.26.9717775
eligibility161177269192.26.7725744

First proof after start-up (CRS load, key construction): native 895 ms, WASM 1,412 ms.

On-chain (EVM, Cancun; gas includes the 21 000 base and calldata)

CircuitHonk verify gasQuantLayerProofVerifier.verifyProof gasVerifier runtime (bytes)Linked libraries (bytes)
membership2,610,1452,657,03818,03214,261
credential-ownership2,600,3822,634,33218,09614,261
credential-validity2,602,0312,636,43218,09414,261
balance-threshold2,603,6912,638,21818,09614,261
nullifier-uniqueness2,604,4232,659,65918,09414,261
eligibility2,607,4252,663,23918,09514,261

verifyProof adds the binding checks (field range, context, root registry, freshness, scope) and the two SSTOREs that consume the context and nullifier on top of the Honk verification.