Statistics

Test coverage

Tests have been added for the new SDK functionality in generate-proof-noir and verify-proof-noir:

Test coverage

In addition, we've added tests for the Noir circuit in packages/circuits-noir, both in TypeScript and directly in Noir itself. There is, as far as we know, no test coverage tool for a Noir circuit, which is why it is not included in the table.

Benchmarks

For benchmarking we cloned the existing Semaphore benchmarking repo and updated the browser and node benchmarks accordingly. Those benchmark the Semaphore-Noir SDK functionality (generateNoirProof and verifyNoirProof). The repo also contains the gas estimates in a static json file.

Additionally, we have benchmarked the gate count directly on the Noir circuit with bb gates.

To get more precise insights on the Noir side, we plan to add benchmarking for witness generation, proving and verifying for the circuit, separately from the SDK.

Machine details: MacBook Pro, Intel Core i7 (6-core, 2.6 GHz), 32 GB RAM.

Node Benchmarks

Version details:

  • @aztec/bb.js 0.82.2
  • @noir-lang/noir_js 1.0.0-beta.3
  • @noir-lang/noir_wasm 1.0.0-beta.3

Proof Generation

FunctionAvg Time for 10 runs (ms)
Generate Proof 1 Member [Max tree depth 1]1710.65
Generate Proof 100 Members [Max tree depth 7]2311.87
Generate Proof 500 Members [Max tree depth 9]2398.87
Generate Proof 1000 Members [Max tree depth 10]2600.24
Generate Proof 2000 Members [Max tree depth 11]3004.17

Proof Verification

FunctionAvg Time for 10 runs (ms)
Verify Proof 1 Member [Max tree depth 1]974.98
Verify Proof 100 Members [Max tree depth 7]1359.02
Verify Proof 500 Members [Max tree depth 9]1490.25
Verify Proof 1000 Members [Max tree depth 10]1527.17
Verify Proof 2000 Members [Max tree depth 11]1898.70

Browser Benchmarks

Proof Generation

FunctionAvg Time for 10 runs (ms)
Generate Proof 1 Member [Max tree depth 1]978.54
Generate Proof 100 Members [Max tree depth 7]1543.11
Generate Proof 500 Members [Max tree depth 9]1717.46
Generate Proof 1000 Members [Max tree depth 10]1843.71
Generate Proof 2000 Members [Max tree depth 11]2120.75

Gas estimates

FunctionGas Usage
SemaphoreNoir.verifyProof 1 Member [Max tree depth 1]1994403
SemaphoreNoir.verifyProof 100 Members [Max tree depth 7]2026201
SemaphoreNoir.verifyProof 500 Members [Max tree depth 9]2026057
SemaphoreNoir.verifyProof 1000 Members [Max tree depth 10]2026129
SemaphoreNoir.verifyProof 2000 Members [Max tree depth 11]2026117
FunctionGas Usage
SemaphoreNoir.validateProof 1 Member [Max tree depth 1]2135365
SemaphoreNoir.validateProof 100 Members [Max tree depth 7]2167151
SemaphoreNoir.validateProof 500 Members [Max tree depth 9]2167007
SemaphoreNoir.validateProof 1000 Members [Max tree depth 10]2167079
SemaphoreNoir.validateProof 2000 Members [Max tree depth 11]2167067

Gate Count

Version details:

  • nargo version = 1.0.0-beta.3
  • bb 0.82.2
MAX_DEPTHacir_opcodescircuit_size
128227756
231498696
334769636
4380310576
5413011516
6445712456
7478413397
8511114336
9543815276
10576516217
11609217157
12641918096
13674619037
14707319977
15740020917
16772721857
17805422797
18838123737
19870824678
20903525617
21936226557
22968927498
231001628438
241034329377
251067030318
261099731258
271132432198
281165133138
291197834078
301230535018
311263235959
321295936898