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

Commit a8c59b2

Browse files
committed
Update logs and fix lint.
1 parent ba30d14 commit a8c59b2

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aggregator/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ zkevm-circuits = { path = "../zkevm-circuits" }
1313
ark-std = "0.3.0"
1414
env_logger = "0.10.0"
1515
ethers-core = "0.17.0"
16+
hex = "0.4.3"
1617
log = "0.4"
1718
itertools = "0.10.3"
1819
serde = { version = "1.0", features = ["derive"] }

aggregator/src/chunk.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ impl ChunkHash {
3636
// <https://github.com/scroll-tech/zkevm-circuits/blob/25dd32aa316ec842ffe79bb8efe9f05f86edc33e/bus-mapping/src/circuit_input_builder.rs#L690>
3737

3838
let mut total_l1_popped = block.start_l1_queue_index;
39-
log::debug!(
40-
"ChunkHash::from_witness_block: start_l1_queue_index = {}",
41-
total_l1_popped
42-
);
39+
log::debug!("chunk-hash: start_l1_queue_index = {}", total_l1_popped);
4340
let data_bytes = iter::empty()
4441
// .chain(block_headers.iter().flat_map(|(&block_num, block)| {
4542
.chain(block.context.ctxs.iter().flat_map(|(b_num, b_ctx)| {
@@ -60,7 +57,7 @@ impl ChunkHash {
6057

6158
let num_txs = (num_l2_txs + num_l1_msgs) as u16;
6259
log::debug!(
63-
"ChunkHash::from_witness_block: [block {}] total_l1_popped = {}, num_l1_msgs = {}, num_l2_txs = {}, num_txs = {}",
60+
"chunk-hash: [block {}] total_l1_popped = {}, num_l1_msgs = {}, num_l2_txs = {}, num_txs = {}",
6461
b_num,
6562
total_l1_popped,
6663
num_l1_msgs,
@@ -80,7 +77,11 @@ impl ChunkHash {
8077
.chain(block.txs.iter().flat_map(|tx| tx.hash.to_fixed_bytes()))
8178
.collect::<Vec<u8>>();
8279

83-
let data_hash = H256(keccak256(&data_bytes));
80+
let data_hash = H256(keccak256(data_bytes));
81+
log::debug!(
82+
"chunk-hash: data hash = {}",
83+
hex::encode(data_hash.to_fixed_bytes())
84+
);
8485

8586
let post_state_root = block
8687
.context

zkevm-circuits/src/pi_circuit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ impl PublicData {
196196

197197
fn get_pi(&self) -> H256 {
198198
let data_hash = H256(keccak256(self.data_bytes()));
199-
log::debug!("data hash: {}", hex::encode(&data_hash.to_fixed_bytes()));
199+
log::debug!("data hash: {}", hex::encode(data_hash.to_fixed_bytes()));
200200

201201
let pi_bytes = self.pi_bytes(data_hash);
202202
let pi_hash = keccak256(pi_bytes);

0 commit comments

Comments
 (0)