diff --git a/src/gadgets/arithmetic.rs b/src/gadgets/arithmetic.rs index 1e5e6001..7afa9319 100644 --- a/src/gadgets/arithmetic.rs +++ b/src/gadgets/arithmetic.rs @@ -196,7 +196,7 @@ impl, const D: usize> CircuitBuilder { let one = self.one(); let mut product = one; - for &bit in exponent_bits { + for bit in exponent_bits { let multiplicand = self.select(*bit.borrow(), one, current); product = self.mul(product, multiplicand); current = self.mul(current, current); diff --git a/src/gates/gmimc.rs b/src/gates/gmimc.rs index b4fa6345..a7651a2a 100644 --- a/src/gates/gmimc.rs +++ b/src/gates/gmimc.rs @@ -119,11 +119,6 @@ impl, const D: usize, const R: usize> Gate for GMiMCGate< let swap = vars.local_wires[Self::WIRE_SWAP]; constraints.push(swap * (swap - F::ONE)); - let old_index_acc = vars.local_wires[Self::WIRE_INDEX_ACCUMULATOR_OLD]; - let new_index_acc = vars.local_wires[Self::WIRE_INDEX_ACCUMULATOR_NEW]; - let computed_new_index_acc = F::TWO * old_index_acc + swap; - constraints.push(computed_new_index_acc - new_index_acc); - let mut state = Vec::with_capacity(12); for i in 0..4 { let a = vars.local_wires[i]; @@ -240,7 +235,7 @@ impl, const D: usize, const R: usize> Gate for GMiMCGate< } fn num_constraints(&self) -> usize { - R + W + 2 + R + W + 1 } }