Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
enable unittest for challenge aggregation circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
hero78119 committed Mar 18, 2024
1 parent ac68a13 commit 847292b
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions zkevm-circuits/src/root_circuit/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ use crate::{
table::{
self, rw_table::get_rwtable_cols_commitment, AccountFieldTag, LookupTable, TxLogFieldTag,
},
util::{self},
witness::{Rw, RwRow},
witness::Rw,
};
use bus_mapping::circuit_input_builder::FixedCParams;
use eth_types::{address, Address, Field, U256};
Expand All @@ -32,7 +31,6 @@ use itertools::Itertools;
use rand::rngs::OsRng;
use snark_verifier::util::transcript::Transcript;
use table::RwTable;
use util::word::WordLoHi;

struct RwTableCircuit<'a> {
rws: &'a [Rw],
Expand Down Expand Up @@ -100,32 +98,14 @@ impl<'a, F: Field> Circuit<F> for RwTableCircuit<'a> {
self.prev_chunk_last_rw,
);
config.enable.enable(&mut region, 0)?;
// avoid empty column cause commitment value as identity point
// assign rwtable.id=1 to make dummy gate work
config.rw_table.assign(
&mut region,
0,
&RwRow {
rw_counter: Value::known(F::ONE),
is_write: Value::known(F::ONE),
tag: Value::known(F::ONE),
id: Value::known(F::ONE),
address: Value::known(F::ONE),
field_tag: Value::known(F::ONE),
storage_key: WordLoHi::new([F::ONE, F::ONE]).into_value(),
value: WordLoHi::new([F::ONE, F::ONE]).into_value(),
value_prev: WordLoHi::new([F::ONE, F::ONE]).into_value(),
init_val: WordLoHi::new([F::ONE, F::ONE]).into_value(),
},
)
Ok(())
},
)?;
Ok(())
}
}

#[test]
#[ignore]
fn test_user_challenge_aggregation() {
let num_challenges = 1;
let k = 12;
Expand Down

0 comments on commit 847292b

Please sign in to comment.