diff --git a/src/gadgets/poseidon.rs b/src/gadgets/poseidon.rs index df9fbcb..e41661d 100644 --- a/src/gadgets/poseidon.rs +++ b/src/gadgets/poseidon.rs @@ -1,10 +1,13 @@ use crate::constraint_builder::{AdviceColumn, FixedColumn}; use halo2_proofs::plonk::{Advice, Column, Fixed}; +#[cfg(any(test, feature = "bench"))] use halo2_proofs::{ arithmetic::FieldExt, circuit::Region, halo2curves::bn256::Fr, plonk::ConstraintSystem, }; +#[cfg(any(test, feature = "bench"))] use hash_circuit::hash::Hashable; +#[cfg(any(test, feature = "bench"))] const MAX_POSEIDON_ROWS: usize = 200; /// Lookup represent the poseidon table in zkevm circuit @@ -19,6 +22,7 @@ pub trait PoseidonLookup { } } +#[cfg(any(test, feature = "bench"))] #[derive(Clone, Copy)] pub struct PoseidonTable { q_enable: FixedColumn, @@ -30,6 +34,7 @@ pub struct PoseidonTable { head_mark: AdviceColumn, } +#[cfg(any(test, feature = "bench"))] impl PoseidonTable { pub fn configure(cs: &mut ConstraintSystem) -> Self { let [hash, left, right, control, domain_spec, head_mark] = @@ -77,6 +82,7 @@ impl PoseidonTable { } } +#[cfg(any(test, feature = "bench"))] impl PoseidonLookup for PoseidonTable { fn lookup_columns(&self) -> (FixedColumn, [AdviceColumn; 6]) { ( diff --git a/src/mpt.rs b/src/mpt.rs index b427a96..12ce206 100644 --- a/src/mpt.rs +++ b/src/mpt.rs @@ -118,8 +118,6 @@ impl MptCircuitConfig { proofs: &[Proof], n_rows: usize, ) -> Result<(), Error> { - // std::thread::sleep(std::time::Duration::from_millis(1000)); - let randomness = self.rlc_randomness.value(layouter); let (u32s, u64s, u128s, frs) = byte_representations(proofs);