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 with hinted double scalar mul (use poseidon2) | and variants: 6707171, xor variants: 3370130781, total: 3376837952 | 76323964 * 3377 | 374G | 136s |
Proving efficiency: 300k Poseidon2 hashes/s on a single RTX 4090 card.