diff --git a/bus-mapping/src/circuit_input_builder.rs b/bus-mapping/src/circuit_input_builder.rs index b2b5c20560..5d3c1b582f 100644 --- a/bus-mapping/src/circuit_input_builder.rs +++ b/bus-mapping/src/circuit_input_builder.rs @@ -346,7 +346,11 @@ impl CircuitInputBuilder { .transactions .iter() .fold(0, |acc, tx| acc + tx.input.len()); - let max_exp_steps = self.block.exp_events.len(); + let max_exp_steps = self + .block + .exp_events + .iter() + .fold(0usize, |acc, e| acc + e.steps.len()); // The `+ 2` is used to take into account the two extra empty copy rows needed // to satisfy the query at `Rotation(2)` performed inside of the // `rows[2].value == rows[0].value * r + rows[1].value` requirement in the RLC