From 578c210ceb88d3c143ee2a013ad836d19285d9c1 Mon Sep 17 00:00:00 2001 From: Mason Liang Date: Mon, 25 Sep 2023 21:28:40 -0400 Subject: [PATCH] Use enough rows to allow tests to pass --- src/gadgets/byte_representation.rs | 2 +- src/gadgets/canonical_representation.rs | 2 +- src/gadgets/key_bit.rs | 2 +- src/tests.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gadgets/byte_representation.rs b/src/gadgets/byte_representation.rs index 20485787..4ce4a331 100644 --- a/src/gadgets/byte_representation.rs +++ b/src/gadgets/byte_representation.rs @@ -219,7 +219,7 @@ mod test { layouter.assign_region( || "", |mut region| { - for offset in 0..1024 { + for offset in 0..(8 * 256) { selector.enable(&mut region, offset); } byte_bit.assign(&mut region); diff --git a/src/gadgets/canonical_representation.rs b/src/gadgets/canonical_representation.rs index 98383cc9..7e2ae9b5 100644 --- a/src/gadgets/canonical_representation.rs +++ b/src/gadgets/canonical_representation.rs @@ -250,7 +250,7 @@ mod test { layouter.assign_region( || "", |mut region| { - for offset in 0..256 { + for offset in 0..(8 * 256) { selector.enable(&mut region, offset); } byte_bit.assign(&mut region); diff --git a/src/gadgets/key_bit.rs b/src/gadgets/key_bit.rs index cc2299d3..8891665d 100644 --- a/src/gadgets/key_bit.rs +++ b/src/gadgets/key_bit.rs @@ -191,7 +191,7 @@ mod test { layouter.assign_region( || "", |mut region| { - for offset in 0..32 { + for offset in 0..(8 * 256) { selector.enable(&mut region, offset); } diff --git a/src/tests.rs b/src/tests.rs index 5601076b..91855616 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -11,7 +11,7 @@ use halo2_proofs::{ }; use mpt_zktrie::state::{builder::HASH_SCHEME_DONE, witness::WitnessGenerator, ZktrieState}; -const N_ROWS: usize = 1024; +const N_ROWS: usize = 8 * 256 + 1; const STORAGE_ADDRESS: Address = Address::repeat_byte(1); fn initial_generator() -> WitnessGenerator {