This repository implements the bitvm2-gc construction, with both Groth16 verifier and DV-SNARK verifier.
Commit Reference
The garbled-snark-verifier is originally modified
from garbled-snark-verifier:5a2cd4.
To switch between hash functions in the guest program, modify the default feature in verifiable-circuit/Cargo.toml:
Blake3
default = ["blake3"]Poseidon2
default = ["poseidon2"]SHA2 Precompile
default = ["sha2"]AES
default = ["aes"]Run:
cd verifiable-circuit-host
cargo run -rFor the detailed bitvm2-gc with dv-snark scheme design, please refer to the BitVM2-GC with DV-SNARK.
Run:
cd verifiable-circuit-host
cargo run -r --bin dv-snarkServer configuration: 32 core, 480G RAM
| Program | Gates | Cycles | Peak memory | Garbling(s) | Spliting(s) | Single Execution(s) |
|---|---|---|---|---|---|---|
| deserialize_compressed_g2_circuit | and variants: 122185357, xor variants: 350864003, not: 550724, total:473600084 | 4268330910 * 68 | 51G | 33s | 480M/(IOPS) = 188 | 178 |
| groth16_verifier_circuit | and variants: 2718558275, xor variants: 7617087185, not: 62381441, total: 10398026901 | |||||
| dv_snark (use poseidon2) | and variants: 8796030, xor variants: 2365188084, total: 2373984114 | 296796620 * 2374 | 292G | 70s |
Proving efficiency: 300k Poseidon2 hashes/s on a single RTX 4090 card.