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

Commit 3e92b93

Browse files
committed
chores: code clean up
1 parent 2fb87b0 commit 3e92b93

File tree

6 files changed

+16
-38
lines changed

6 files changed

+16
-38
lines changed

bus-mapping/src/circuit_input_builder/block.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use std::collections::HashMap;
1717
pub struct BlockContext {
1818
/// Used to track the global counter in every operation in the block.
1919
/// Contains the next available value.
20-
pub rwc: RWCounter,
20+
pub(crate) rwc: RWCounter,
2121
/// Map call_id to (tx_index, call_index) (where tx_index is the index used
2222
/// in Block.txs and call_index is the index used in Transaction.
2323
/// calls).

circuit-benchmarks/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ serde = { version = "1.0", features = ["derive"] }
2323
serde_json = "1.0"
2424

2525
[features]
26-
default = ["benches"]
26+
default = []
2727
benches = []

circuit-benchmarks/src/exp_circuit.rs

+10-11
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,16 @@ mod tests {
138138
)
139139
.unwrap();
140140
let block: GethData = test_ctx.into();
141-
// let mut builder = BlockData::new_from_geth_data_with_params(
142-
// block.clone(),
143-
// FixedCParams {
144-
// max_rws: 1 << (degree - 1),
145-
// ..Default::default()
146-
// },
147-
// )
148-
let builder = BlockData::new_from_geth_data(block.clone())
149-
.new_circuit_input_builder()
150-
.handle_block(&block.eth_block, &block.geth_traces)
151-
.unwrap();
141+
let builder = BlockData::new_from_geth_data_with_params(
142+
block.clone(),
143+
FixedCParams {
144+
max_rws: 1 << (degree - 1),
145+
..Default::default()
146+
},
147+
)
148+
.new_circuit_input_builder()
149+
.handle_block(&block.eth_block, &block.geth_traces)
150+
.unwrap();
152151
let block = block_convert(&builder).unwrap();
153152
let chunk = chunk_convert(&block, &builder).unwrap().remove(0);
154153
(block, chunk)

zkevm-circuits/src/evm_circuit/execution.rs

-4
Original file line numberDiff line numberDiff line change
@@ -1180,10 +1180,6 @@ impl<F: Field> ExecutionConfig<F> {
11801180
.chain(std::iter::once((&dummy_tx, &cur_chunk_last_call, padding)))
11811181
.peekable();
11821182

1183-
tx_call_steps
1184-
.clone()
1185-
.for_each(|step| println!("assigned_step step {:?}", step.2));
1186-
11871183
let evm_rows = chunk.fixed_param.max_evm_rows;
11881184

11891185
let mut assign_padding_or_step = |cur_tx_call_step: TxCallStep,

zkevm-circuits/src/evm_circuit/execution/begin_chunk.rs

+1-18
Original file line numberDiff line numberDiff line change
@@ -55,22 +55,5 @@ impl<F: Field> ExecutionGadget<F> for BeginChunkGadget<F> {
5555

5656
#[cfg(test)]
5757
mod test {
58-
use crate::test_util::CircuitTestBuilder;
59-
use eth_types::bytecode;
60-
use mock::TestContext;
61-
62-
fn test_ok(bytecode: bytecode::Bytecode) {
63-
CircuitTestBuilder::new_from_test_ctx(
64-
TestContext::<2, 1>::simple_ctx_with_bytecode(bytecode).unwrap(),
65-
)
66-
.run()
67-
}
68-
69-
#[test]
70-
fn begin_chunk_test() {
71-
let bytecode = bytecode! {
72-
STOP
73-
};
74-
test_ok(bytecode);
75-
}
58+
// begin_chunk unittest covered by end_chunk
7659
}

zkevm-circuits/src/state_circuit.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,9 @@ impl<F: Field> StateCircuitConfig<F> {
304304
assert_eq!(state_root, old_root);
305305
state_root = new_root;
306306
}
307-
// if matches!(row.tag(), Target::CallContext) && !row.is_write() {
308-
// assert_eq!(row.value_assignment(), 0.into(), "{:?}", row);
309-
// }
307+
if matches!(row.tag(), Target::CallContext) && !row.is_write() {
308+
assert_eq!(row.value_assignment(), 0.into(), "{:?}", row);
309+
}
310310
}
311311
}
312312

0 commit comments

Comments
 (0)