Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Mason Liang committed Nov 27, 2023
1 parent eab825e commit 9b25f44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/gadgets/poseidon.rs
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -19,6 +22,7 @@ pub trait PoseidonLookup {
}
}

#[cfg(any(test, feature = "bench"))]
#[derive(Clone, Copy)]
pub struct PoseidonTable {
q_enable: FixedColumn,
Expand All @@ -30,6 +34,7 @@ pub struct PoseidonTable {
head_mark: AdviceColumn,
}

#[cfg(any(test, feature = "bench"))]
impl PoseidonTable {
pub fn configure<F: FieldExt>(cs: &mut ConstraintSystem<F>) -> Self {
let [hash, left, right, control, domain_spec, head_mark] =
Expand Down Expand Up @@ -77,6 +82,7 @@ impl PoseidonTable {
}
}

#[cfg(any(test, feature = "bench"))]
impl PoseidonLookup for PoseidonTable {
fn lookup_columns(&self) -> (FixedColumn, [AdviceColumn; 6]) {
(
Expand Down
2 changes: 0 additions & 2 deletions src/mpt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 9b25f44

Please sign in to comment.