From 9a5454011650b7df5d6b4a1d11719d8bad28c57c Mon Sep 17 00:00:00 2001 From: wborgeaud Date: Mon, 16 Aug 2021 11:08:26 +0200 Subject: [PATCH] Minor --- src/fri/commitment.rs | 1 - src/gadgets/arithmetic_extension.rs | 3 +++ src/gates/arithmetic.rs | 2 +- src/plonk/copy_constraint.rs | 1 - 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/fri/commitment.rs b/src/fri/commitment.rs index bd051e3d..7e7dab6e 100644 --- a/src/fri/commitment.rs +++ b/src/fri/commitment.rs @@ -288,7 +288,6 @@ mod tests { config: CircuitConfig { fri_config, num_routed_wires: 6, - zero_knowledge: true, ..CircuitConfig::large_config() }, degree_bits, diff --git a/src/gadgets/arithmetic_extension.rs b/src/gadgets/arithmetic_extension.rs index b7d7a39a..b11447df 100644 --- a/src/gadgets/arithmetic_extension.rs +++ b/src/gadgets/arithmetic_extension.rs @@ -13,6 +13,9 @@ use crate::plonk::circuit_builder::CircuitBuilder; use crate::util::bits_u64; impl, const D: usize> CircuitBuilder { + /// Finds the last available arithmetic gate with the given constants or add one if there aren't any. + /// Returns `(g,i)` such that there is an arithmetic gate with the given constants at index + /// `g` and the gate's `i`-th operation is available. fn find_arithmetic_gate(&mut self, const_0: F, const_1: F) -> (usize, usize) { let (gate, i) = self .free_arithmetic diff --git a/src/gates/arithmetic.rs b/src/gates/arithmetic.rs index 5b608519..c8f8f59c 100644 --- a/src/gates/arithmetic.rs +++ b/src/gates/arithmetic.rs @@ -108,7 +108,7 @@ impl, const D: usize> Gate for ArithmeticExtensionGate gate_index: usize, local_constants: &[F], ) -> Vec>> { - (0..4) + (0..NUM_ARITHMETIC_OPS) .map(|i| { let g: Box> = Box::new(ArithmeticExtensionGenerator { gate_index, diff --git a/src/plonk/copy_constraint.rs b/src/plonk/copy_constraint.rs index a04fc75b..a838ed37 100644 --- a/src/plonk/copy_constraint.rs +++ b/src/plonk/copy_constraint.rs @@ -1,7 +1,6 @@ use crate::iop::target::Target; /// A named copy constraint. -#[derive(Debug)] pub struct CopyConstraint { pub pair: (Target, Target), pub name: String,