From d047fb7008583210f73c5cd8231ae0b2f72a2ac3 Mon Sep 17 00:00:00 2001 From: Ayush Shukla Date: Sun, 26 Nov 2023 09:38:56 +0100 Subject: [PATCH] fix: capacity is already bits - 1 --- halo2-base/src/gates/flex_gate/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/halo2-base/src/gates/flex_gate/mod.rs b/halo2-base/src/gates/flex_gate/mod.rs index 57f8c05a..1be25c58 100644 --- a/halo2-base/src/gates/flex_gate/mod.rs +++ b/halo2-base/src/gates/flex_gate/mod.rs @@ -1280,7 +1280,7 @@ impl GateInstructions for GateChip { /// Assumes values of `bits` are boolean. /// * `bits`: slice of [QuantumCell]'s that contains bit representation in little-endian form fn bits_to_num(&self, ctx: &mut Context, bits: &[AssignedValue]) -> AssignedValue { - assert!((bits.len() as u32) < F::CAPACITY); + assert!((bits.len() as u32) <= F::CAPACITY); self.inner_product( ctx,