Skip to content

Commit

Permalink
fix: fix rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lastminutedev committed Nov 20, 2023
1 parent ed7ba42 commit c59c48e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 13 deletions.
10 changes: 3 additions & 7 deletions zkevm-circuits/src/pi_circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,6 @@ pub struct PiCircuitConfigArgs<F: Field> {
pub keccak_table: KeccakTable,
/// Challenges
pub challenges: Challenges<Expression<F>>,
/// Max number of l1 block hashes
pub max_l1_block_hashes: usize,
}

impl<F: Field> SubCircuitConfig<F> for PiCircuitConfig<F> {
Expand All @@ -366,7 +364,6 @@ impl<F: Field> SubCircuitConfig<F> for PiCircuitConfig<F> {
tx_table,
keccak_table,
challenges,
max_l1_block_hashes,
}: Self::ConfigArgs,
) -> Self {
let constant = meta.fixed_column();
Expand Down Expand Up @@ -735,7 +732,6 @@ impl<F: Field> SubCircuitConfig<F> for PiCircuitConfig<F> {
q_block_context,
l1_block_hashes_count,
num_all_l1_block_hashes,
max_l1_block_hashes,
q_l1_block_hashes
}
}
Expand Down Expand Up @@ -961,7 +957,7 @@ impl<F: Field> PiCircuitConfig<F> {
///////// assign l1 block hashes bytes ///////
//////////////////////////////////////////////
let q_l1_block_hashes_start_row = offset;
let q_l1_block_hashes_end_row = q_l1_block_hashes_start_row + KECCAK_DIGEST_SIZE * self.max_l1_block_hashes;
let q_l1_block_hashes_end_row = q_l1_block_hashes_start_row + KECCAK_DIGEST_SIZE * public_data.max_l1_block_hashes;
let num_l1_block_hashes = public_data.get_num_all_l1_block_hashes();
let cum_l1_block_hashes = public_data.cum_l1_block_hashes.clone();
let dummy_l1_block_hash = get_dummy_l1_block_hash();
Expand All @@ -972,7 +968,7 @@ impl<F: Field> PiCircuitConfig<F> {
for (i, l1_block_hash) in cum_l1_block_hashes
.into_iter()
.chain(
(0..self.max_l1_block_hashes - num_l1_block_hashes)
(0..public_data.max_l1_block_hashes - num_l1_block_hashes)
.into_iter()
.map(|_| dummy_l1_block_hash),
)
Expand All @@ -993,7 +989,7 @@ impl<F: Field> PiCircuitConfig<F> {
)?;


if i == self.max_l1_block_hashes - 1 {
if i == public_data.max_l1_block_hashes - 1 {
l1_block_hashes_bytes_rlc = Some(cells[RPI_RLC_ACC_CELL_IDX].clone());
l1_block_hashes_bytes_length = Some(cells[RPI_LENGTH_ACC_CELL_IDX].clone());
}
Expand Down
3 changes: 1 addition & 2 deletions zkevm-circuits/src/pi_circuit/dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ impl<F: Field, const MAX_TXS: usize, const MAX_CALLDATA: usize, const MAX_INNER_
max_txs: MAX_TXS,
max_calldata: MAX_CALLDATA,
max_inner_blocks: MAX_INNER_BLOCKS,
max_l1_block_hashes: MAX_L1_BLOCK_HASHES,
chain_id: 0,
start_l1_queue_index: 0,
transactions: vec![],
Expand All @@ -37,6 +36,7 @@ impl<F: Field, const MAX_TXS: usize, const MAX_CALLDATA: usize, const MAX_INNER_
last_applied_l1_block: 0,
l1_block_range_hash: H256::zero(),
cum_l1_block_hashes: vec![],
max_l1_block_hashes: MAX_L1_BLOCK_HASHES,
},
connections: Default::default(),
tx_value_cells: Default::default(),
Expand Down Expand Up @@ -105,7 +105,6 @@ impl<F: Field, const MAX_TXS: usize, const MAX_CALLDATA: usize, const MAX_INNER_
keccak_table,
tx_table,
challenges: challenge_exprs,
max_l1_block_hashes: MAX_L1_BLOCK_HASHES,
},
),
challenges,
Expand Down
1 change: 0 additions & 1 deletion zkevm-circuits/src/super_circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ impl SubCircuitConfig<Fr> for SuperCircuitConfig<Fr> {
keccak_table: keccak_table.clone(),
tx_table: tx_table.clone(),
challenges: challenges_expr.clone(),
max_l1_block_hashes: 10,
},
);
log_circuit_info(meta, "pi circuit");
Expand Down
2 changes: 0 additions & 2 deletions zkevm-circuits/src/super_circuit/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ use std::env::set_var;

use crate::witness::block_apply_mpt_state;

#[cfg(feature = "scroll")]
use crate::witness::block_apply_l1_block_hashes;
#[cfg(feature = "scroll")]
use eth_types::l2_types::BlockTrace;
#[cfg(feature = "scroll")]
Expand Down
2 changes: 1 addition & 1 deletion zkevm-circuits/src/witness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
mod block;
pub use block::{
block_apply_mpt_state, block_apply_l1_block_hashes, block_convert, block_convert_with_l1_queue_index,
block_apply_mpt_state, block_convert, block_convert_with_l1_queue_index,
block_mocking_apply_mpt, Block, BlockContext, BlockContexts,
};

Expand Down

0 comments on commit c59c48e

Please sign in to comment.