diff --git a/cairo_zero/kakarot/interpreter.cairo b/cairo_zero/kakarot/interpreter.cairo index c9e1da377..a1b2f8b8e 100644 --- a/cairo_zero/kakarot/interpreter.cairo +++ b/cairo_zero/kakarot/interpreter.cairo @@ -907,14 +907,6 @@ namespace Interpreter { let memory = Memory.init(); let state = State.init(); - // Cache the coinbase, precompiles, caller, and target, making them warm - with state { - let coinbase = State.get_account(env.coinbase); - State.cache_precompiles(); - State.get_account(address.evm); - let access_list_cost = State.cache_access_list(access_list_len, access_list); - } - let intrinsic_gas = intrinsic_gas + access_list_cost; let evm = EVM.init(message, gas_limit - intrinsic_gas); @@ -925,6 +917,14 @@ namespace Interpreter { return (evm, stack, memory, state, 0, 0); } + // Cache the coinbase, precompiles, caller, and target, making them warm + with state { + let coinbase = State.get_account(env.coinbase); + State.cache_precompiles(); + State.get_account(address.evm); + let access_list_cost = State.cache_access_list(access_list_len, access_list); + } + tempvar is_initcode_invalid = is_deploy_tx * is_nn( bytecode_len - (2 * Constants.MAX_CODE_SIZE + 1) );