From e4be4d03736fcd9f80848b4db131181b8b5d1b00 Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Wed, 31 Jan 2024 17:48:33 +0800 Subject: [PATCH] make sure invalid tx gadget is configured if we can enter ExecutionState::InvalidTx --- zkevm-circuits/src/evm_circuit/execution.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zkevm-circuits/src/evm_circuit/execution.rs b/zkevm-circuits/src/evm_circuit/execution.rs index 0b55c798f1..87595ef6af 100644 --- a/zkevm-circuits/src/evm_circuit/execution.rs +++ b/zkevm-circuits/src/evm_circuit/execution.rs @@ -1277,9 +1277,10 @@ impl ExecutionConfig { ExecutionState::EndTx => assign_exec_step!(self.end_tx_gadget), ExecutionState::EndBlock => assign_exec_step!(self.end_block_gadget), ExecutionState::InvalidTx => { - if let Some(invalid_tx) = &self.invalid_tx { - assign_exec_step!(invalid_tx) - } + assign_exec_step!(self + .invalid_tx + .as_deref() + .expect("invalid tx gadget must exist")) } // opcode ExecutionState::ADD_SUB => assign_exec_step!(self.add_sub_gadget),