diff --git a/zkevm-circuits/src/evm_circuit.rs b/zkevm-circuits/src/evm_circuit.rs index 9c3a81e0f8..298c3b33f6 100644 --- a/zkevm-circuits/src/evm_circuit.rs +++ b/zkevm-circuits/src/evm_circuit.rs @@ -532,19 +532,15 @@ impl Circuit for EvmCircuit { { // when enable feature "dual-bytecode", get two sets of bytecodes here. let (first_bytecodes, second_bytecodes) = block.get_bytecodes_for_dual_sub_circuits(); - if !first_bytecodes.is_empty() { - // assign first bytecode_table - config - .bytecode_table - .dev_load(&mut layouter, first_bytecodes, &challenges)?; - } - - if !second_bytecodes.is_empty() { - // assign second bytecode_table - config - .bytecode_table1 - .dev_load(&mut layouter, second_bytecodes, &challenges)?; - } + // assign first bytecode_table + config + .bytecode_table + .dev_load(&mut layouter, first_bytecodes, &challenges)?; + + // assign second bytecode_table + config + .bytecode_table1 + .dev_load(&mut layouter, second_bytecodes, &challenges)?; } #[cfg(not(feature = "dual-bytecode"))] diff --git a/zkevm-circuits/src/evm_circuit/execution/extcodecopy.rs b/zkevm-circuits/src/evm_circuit/execution/extcodecopy.rs index ca7e4115c8..8e512a1cf0 100644 --- a/zkevm-circuits/src/evm_circuit/execution/extcodecopy.rs +++ b/zkevm-circuits/src/evm_circuit/execution/extcodecopy.rs @@ -44,7 +44,6 @@ pub(crate) struct ExtcodecopyGadget { copy_rwc_inc: Cell, memory_expansion: MemoryExpansionGadget, memory_copier_gas: MemoryCopierGasGadget, - is_first_bytecode_table: Cell, } impl ExecutionGadget for ExtcodecopyGadget { @@ -54,7 +53,6 @@ impl ExecutionGadget for ExtcodecopyGadget { fn configure(cb: &mut EVMConstraintBuilder) -> Self { let opcode = cb.query_cell(); - let is_first_bytecode_table = cb.query_bool(); let external_address_word = cb.query_word_rlc(); let external_address = @@ -67,11 +65,6 @@ impl ExecutionGadget for ExtcodecopyGadget { let not_exists = IsZeroGadget::construct(cb, code_hash.clone().expr()); let exists = not::expr(not_exists.expr()); - // the reason why not use `same_context.is_first_sub_bytecode` to construct `code_len_gadget` includes - // 1: `same_context` requires rw_counter_offset info, which depends on `code_offset` info, the latter relies on - // `code_len` of `code_len_gadget` - // 2: `same_context.is_first_sub_bytecode` returns current call bytecode info, in extcodecopy, code_hash is not - // necessary current call code hash. let code_len_gadget = cb.condition(exists.expr(), |cb| { BytecodeLengthGadget::construct(cb, code_hash.clone()) }); @@ -174,7 +167,6 @@ impl ExecutionGadget for ExtcodecopyGadget { copy_rwc_inc, memory_expansion, memory_copier_gas, - is_first_bytecode_table, } } @@ -248,11 +240,6 @@ impl ExecutionGadget for ExtcodecopyGadget { memory_expansion_gas_cost, )?; - self.is_first_bytecode_table.assign( - region, - offset, - Value::known(F::from(block.is_first_bytecode_circuit(&code_hash))), - )?; Ok(()) } }