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

fix tx_convert in witness #261

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bus-mapping/src/eth_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ pub struct GethExecTrace {

/// Truncate the memory in each step to the memory size before the step is
/// executed (and before the memory is expanded). This is required because geth
/// sets the memory in each step as the memroy before execution but after
/// sets the memory in each step as the memory before execution but after
/// expansion.
pub fn fix_geth_trace_memory_size(trace: &mut [GethExecStep]) {
let mut mem_sizes = vec![0; trace.len()];
Expand Down
13 changes: 7 additions & 6 deletions zkevm-circuits/src/evm_circuit/witness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ fn tx_convert(
tx: &bus_mapping::circuit_input_builder::Transaction,
ops_len: (usize, usize, usize),
) -> Transaction<Fp> {
let mut result: Transaction<Fp> = Transaction::<Fp> {
Transaction::<Fp> {
calls: vec![Call {
id: 1,
is_root: true,
Expand All @@ -414,12 +414,13 @@ fn tx_convert(
randomness,
),
}],
steps: tx
.steps()
.iter()
.map(|step| step_convert(step, ops_len))
.collect(),
..Default::default()
};
let _ = tx.steps().iter().map(|step| {
result.steps.push(step_convert(step, ops_len));
});
result
}
}

pub fn block_convert(
Expand Down