Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

Commit c59c48e

Browse files
committed
fix: fix rebase issues
1 parent ed7ba42 commit c59c48e

File tree

5 files changed

+5
-13
lines changed

5 files changed

+5
-13
lines changed

zkevm-circuits/src/pi_circuit.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,6 @@ pub struct PiCircuitConfigArgs<F: Field> {
351351
pub keccak_table: KeccakTable,
352352
/// Challenges
353353
pub challenges: Challenges<Expression<F>>,
354-
/// Max number of l1 block hashes
355-
pub max_l1_block_hashes: usize,
356354
}
357355

358356
impl<F: Field> SubCircuitConfig<F> for PiCircuitConfig<F> {
@@ -366,7 +364,6 @@ impl<F: Field> SubCircuitConfig<F> for PiCircuitConfig<F> {
366364
tx_table,
367365
keccak_table,
368366
challenges,
369-
max_l1_block_hashes,
370367
}: Self::ConfigArgs,
371368
) -> Self {
372369
let constant = meta.fixed_column();
@@ -735,7 +732,6 @@ impl<F: Field> SubCircuitConfig<F> for PiCircuitConfig<F> {
735732
q_block_context,
736733
l1_block_hashes_count,
737734
num_all_l1_block_hashes,
738-
max_l1_block_hashes,
739735
q_l1_block_hashes
740736
}
741737
}
@@ -961,7 +957,7 @@ impl<F: Field> PiCircuitConfig<F> {
961957
///////// assign l1 block hashes bytes ///////
962958
//////////////////////////////////////////////
963959
let q_l1_block_hashes_start_row = offset;
964-
let q_l1_block_hashes_end_row = q_l1_block_hashes_start_row + KECCAK_DIGEST_SIZE * self.max_l1_block_hashes;
960+
let q_l1_block_hashes_end_row = q_l1_block_hashes_start_row + KECCAK_DIGEST_SIZE * public_data.max_l1_block_hashes;
965961
let num_l1_block_hashes = public_data.get_num_all_l1_block_hashes();
966962
let cum_l1_block_hashes = public_data.cum_l1_block_hashes.clone();
967963
let dummy_l1_block_hash = get_dummy_l1_block_hash();
@@ -972,7 +968,7 @@ impl<F: Field> PiCircuitConfig<F> {
972968
for (i, l1_block_hash) in cum_l1_block_hashes
973969
.into_iter()
974970
.chain(
975-
(0..self.max_l1_block_hashes - num_l1_block_hashes)
971+
(0..public_data.max_l1_block_hashes - num_l1_block_hashes)
976972
.into_iter()
977973
.map(|_| dummy_l1_block_hash),
978974
)
@@ -993,7 +989,7 @@ impl<F: Field> PiCircuitConfig<F> {
993989
)?;
994990

995991

996-
if i == self.max_l1_block_hashes - 1 {
992+
if i == public_data.max_l1_block_hashes - 1 {
997993
l1_block_hashes_bytes_rlc = Some(cells[RPI_RLC_ACC_CELL_IDX].clone());
998994
l1_block_hashes_bytes_length = Some(cells[RPI_LENGTH_ACC_CELL_IDX].clone());
999995
}

zkevm-circuits/src/pi_circuit/dev.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ impl<F: Field, const MAX_TXS: usize, const MAX_CALLDATA: usize, const MAX_INNER_
2525
max_txs: MAX_TXS,
2626
max_calldata: MAX_CALLDATA,
2727
max_inner_blocks: MAX_INNER_BLOCKS,
28-
max_l1_block_hashes: MAX_L1_BLOCK_HASHES,
2928
chain_id: 0,
3029
start_l1_queue_index: 0,
3130
transactions: vec![],
@@ -37,6 +36,7 @@ impl<F: Field, const MAX_TXS: usize, const MAX_CALLDATA: usize, const MAX_INNER_
3736
last_applied_l1_block: 0,
3837
l1_block_range_hash: H256::zero(),
3938
cum_l1_block_hashes: vec![],
39+
max_l1_block_hashes: MAX_L1_BLOCK_HASHES,
4040
},
4141
connections: Default::default(),
4242
tx_value_cells: Default::default(),
@@ -105,7 +105,6 @@ impl<F: Field, const MAX_TXS: usize, const MAX_CALLDATA: usize, const MAX_INNER_
105105
keccak_table,
106106
tx_table,
107107
challenges: challenge_exprs,
108-
max_l1_block_hashes: MAX_L1_BLOCK_HASHES,
109108
},
110109
),
111110
challenges,

zkevm-circuits/src/super_circuit.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ impl SubCircuitConfig<Fr> for SuperCircuitConfig<Fr> {
234234
keccak_table: keccak_table.clone(),
235235
tx_table: tx_table.clone(),
236236
challenges: challenges_expr.clone(),
237-
max_l1_block_hashes: 10,
238237
},
239238
);
240239
log_circuit_info(meta, "pi circuit");

zkevm-circuits/src/super_circuit/test.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ use std::env::set_var;
2121

2222
use crate::witness::block_apply_mpt_state;
2323

24-
#[cfg(feature = "scroll")]
25-
use crate::witness::block_apply_l1_block_hashes;
2624
#[cfg(feature = "scroll")]
2725
use eth_types::l2_types::BlockTrace;
2826
#[cfg(feature = "scroll")]

zkevm-circuits/src/witness.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
mod block;
66
pub use block::{
7-
block_apply_mpt_state, block_apply_l1_block_hashes, block_convert, block_convert_with_l1_queue_index,
7+
block_apply_mpt_state, block_convert, block_convert_with_l1_queue_index,
88
block_mocking_apply_mpt, Block, BlockContext, BlockContexts,
99
};
1010

0 commit comments

Comments
 (0)