feat: benchmarks (#3)

* add benchmark

* chore: add complex circuit

* feat: enable parallel / asm

* bench: use pre-calculated matrices/constraints

* chore: bump ethers-rs

* chore: fmt

* feat: add benches for differently sized circuits (#6)

* feat: update bench circuit

* feat: add benches for many sizes

* fix: adjust bench parameters

* fix: remove sym

* chore: fmt

* fix: point to correct commit of groth16

* fix: update function names to upstream

* fix: update function names to upstream

Co-authored-by: Kobi Gurkan <kobigurk@gmail.com>
This commit is contained in:
Georgios Konstantopoulos
2021-09-08 21:52:17 +03:00
committed by GitHub
parent 11e6d04f3b
commit bb0f5429fc
22 changed files with 4013 additions and 15 deletions

View File

@@ -2,6 +2,7 @@
//!
//! Provides bindings to Circom's R1CS, for Groth16 Proof and Witness generation in Rust.
mod witness;
pub use witness::WitnessCalculator;
pub mod circom;
pub use circom::{CircomBuilder, CircomCircuit, CircomConfig, CircomReduction};

View File

@@ -361,7 +361,7 @@ mod tests {
use crate::witness::WitnessCalculator;
use crate::{circom::CircomReduction, CircomBuilder, CircomConfig};
use ark_groth16::{
create_proof_with_qap_and_matrices, create_random_proof_with_reduction as prove,
create_proof_with_reduction_and_matrices, create_random_proof_with_reduction as prove,
prepare_verifying_key, verify_proof,
};
use ark_std::rand::thread_rng;
@@ -881,7 +881,7 @@ mod tests {
let full_assignment = wtns
.calculate_witness_element::<Bn254, _>(inputs, false)
.unwrap();
let proof = create_proof_with_qap_and_matrices::<_, CircomReduction>(
let proof = create_proof_with_reduction_and_matrices::<_, CircomReduction>(
&params,
r,
s,