diff --git a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs index aadc8430aa..0b8464ed21 100644 --- a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs @@ -173,9 +173,7 @@ impl ExecutionGadget for EndTxGadget { ); cb.require_step_state_transition(StepStateTransition { - rw_counter: Delta( - 10.expr() - is_first_tx.expr() + coinbase_reward.rw_delta(), - ), + rw_counter: Delta(10.expr() - is_first_tx.expr() + coinbase_reward.rw_delta()), ..StepStateTransition::any() }); }, @@ -185,9 +183,7 @@ impl ExecutionGadget for EndTxGadget { cb.next.execution_state_selector([ExecutionState::EndBlock]), |cb| { cb.require_step_state_transition(StepStateTransition { - rw_counter: Delta( - 9.expr() - is_first_tx.expr() + coinbase_reward.rw_delta(), - ), + rw_counter: Delta(9.expr() - is_first_tx.expr() + coinbase_reward.rw_delta()), // We propagate call_id so that EndBlock can get the last tx_id // in order to count processed txs. call_id: Same, diff --git a/zkevm-circuits/src/evm_circuit/util/common_gadget.rs b/zkevm-circuits/src/evm_circuit/util/common_gadget.rs index fbb1260605..0b695b0f94 100644 --- a/zkevm-circuits/src/evm_circuit/util/common_gadget.rs +++ b/zkevm-circuits/src/evm_circuit/util/common_gadget.rs @@ -428,7 +428,6 @@ impl TransferToGadget { Ok(()) } - pub(crate) fn rw_delta(&self) -> Expression { // +1 Write Account (receiver) CodeHash (account creation via code_hash update) or::expr([