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-21. 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)
membership161157358582.4106891,040
credential-ownership161168258992.36.77501,103
credential-validity161177879082.46.47421,168
balance-threshold161177069072.26.67461,159
nullifier-uniqueness161187259312.26.58061,241
eligibility161187219222.26.37841,326

First proof after start-up (CRS load, key construction): native 937 ms, WASM 1,365 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,0372,666,86718,03214,261
credential-ownership2,600,6102,641,49718,09614,261
credential-validity2,602,1392,643,49118,09314,261
balance-threshold2,603,5112,644,98518,09614,261
nullifier-uniqueness2,604,2552,669,44418,09414,261
eligibility2,607,5572,673,33118,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.