From 45da024aef5ffa79a9886adca4f3e2bdb76f33d1 Mon Sep 17 00:00:00 2001 From: Daniel Lubarov Date: Sun, 28 Feb 2021 21:43:10 -0800 Subject: [PATCH] Minor --- src/gates/gmimc.rs | 7 +------ src/main.rs | 11 ++++++----- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/gates/gmimc.rs b/src/gates/gmimc.rs index cecc4b5e..76611958 100644 --- a/src/gates/gmimc.rs +++ b/src/gates/gmimc.rs @@ -97,12 +97,7 @@ impl DeterministicGate for GMiMCGat .map(|(i, out)| (GateOutputLocation::NextWire(Self::wire_output(i)), out)) .collect(); - // A degree of 9 is reasonable for most circuits, and it means that we only need wires for - // every other addition buffer state. - println!("before"); - let out = OutputGraph { outputs }.shrink_degree(9); - println!("after"); - out + OutputGraph { outputs } } fn additional_constraints(&self, _config: CircuitConfig) -> Vec> { diff --git a/src/main.rs b/src/main.rs index 517aa742..8ab93cb1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,7 +31,7 @@ mod wire; mod witness; // 12 wire polys, 3 Z polys, 4 parts of quotient poly. -const PROVER_POLYS: usize = 101 + 3 + 4; // TODO: Check +const PROVER_POLYS: usize = 64 + 3 + (9 + 1); // TODO: Check fn main() { let overall_start = Instant::now(); @@ -55,16 +55,17 @@ fn bench_gmimc() { constants[i] = F::from_canonical_u64(GMIMC_CONSTANTS[i]); } - let threads = 12; - let hashes_per_poly = 1 << (13 + 3); - let threads = (0..threads).map(|_i| { + const THREADS: usize = 12; + const LDE_BITS: i32 = 4; + let hashes_per_poly = 1 << (13 + LDE_BITS); + let threads = (0..THREADS).map(|_i| { thread::spawn(move || { let mut x = [F::ZERO; 12]; for i in 0..12 { x[i] = F::from_canonical_u64((i as u64) * 123456 + 789); } - let hashes_per_thread = hashes_per_poly * PROVER_POLYS / threads; + let hashes_per_thread = hashes_per_poly * PROVER_POLYS / THREADS; let start = Instant::now(); for _ in 0..hashes_per_thread { x = gmimc::gmimc_permute_array::<_, 12, GMIMC_ROUNDS>(x, GMIMC_CONSTANTS);