Skip to content

Commit

Permalink
fix(test): zkevm-keccak test should have `first_pass = SKIP_FIRST_PAS…
Browse files Browse the repository at this point in the history
…S` (#96)

Currently with `first_pass = true`, it skips the first pass, but when
feature "halo2-axiom" is used, there is only one pass of `synthesize` so
the whole thing gets skipped. Mea culpa!
  • Loading branch information
jonathanpwang authored Jul 20, 2023
1 parent 4060f2a commit 70c5cc0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hashes/zkevm-keccak/src/keccak_packed_multi/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use crate::halo2_proofs::{
Blake2bRead, Blake2bWrite, Challenge255, TranscriptReadBuffer, TranscriptWriterBuffer,
},
};
use halo2_base::SKIP_FIRST_PASS;
use rand_core::OsRng;

/// KeccakCircuit
Expand Down Expand Up @@ -52,7 +53,7 @@ impl<F: Field> Circuit<F> for KeccakCircuit<F> {
) -> Result<(), Error> {
config.load_aux_tables(&mut layouter)?;
let mut challenge = layouter.get_challenge(config.challenge);
let mut first_pass = true;
let mut first_pass = SKIP_FIRST_PASS;
layouter.assign_region(
|| "keccak circuit",
|mut region| {
Expand All @@ -75,6 +76,7 @@ impl<F: Field> Circuit<F> for KeccakCircuit<F> {
challenge,
squeeze_digests,
);
println!("finished keccak circuit");
Ok(())
},
)?;
Expand Down Expand Up @@ -119,6 +121,7 @@ fn packed_multi_keccak_simple() {
verify::<Fr>(k, inputs, true);
}

/// Cmdline: KECCAK_DEGREE=14 RUST_LOG=info cargo test -- --nocapture packed_multi_keccak_prover
#[test]
fn packed_multi_keccak_prover() {
let _ = env_logger::builder().is_test(true).try_init();
Expand Down

0 comments on commit 70c5cc0

Please sign in to comment.