From b74e467e1047d0ac854bbc35f603a83e94fc13b8 Mon Sep 17 00:00:00 2001 From: Yash Atreya <44857776+yash-atreya@users.noreply.github.com> Date: Thu, 24 Oct 2024 19:11:53 +0530 Subject: [PATCH] fix(`evm`): set blob_excess_gas_and_price (#9186) --- crates/evm/core/src/backend/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/evm/core/src/backend/mod.rs b/crates/evm/core/src/backend/mod.rs index 510cb9bbaeb1..b08d5fd44b60 100644 --- a/crates/evm/core/src/backend/mod.rs +++ b/crates/evm/core/src/backend/mod.rs @@ -19,8 +19,8 @@ use revm::{ inspectors::NoOpInspector, precompile::{PrecompileSpecId, Precompiles}, primitives::{ - Account, AccountInfo, Bytecode, Env, EnvWithHandlerCfg, EvmState, EvmStorageSlot, - HashMap as Map, Log, ResultAndState, SpecId, KECCAK_EMPTY, + Account, AccountInfo, BlobExcessGasAndPrice, Bytecode, Env, EnvWithHandlerCfg, EvmState, + EvmStorageSlot, HashMap as Map, Log, ResultAndState, SpecId, KECCAK_EMPTY, }, Database, DatabaseCommit, JournaledState, }; @@ -1916,6 +1916,8 @@ fn update_env_block(env: &mut Env, block: &Block) { env.block.basefee = U256::from(block.header.base_fee_per_gas.unwrap_or_default()); env.block.gas_limit = U256::from(block.header.gas_limit); env.block.number = U256::from(block.header.number); + env.block.blob_excess_gas_and_price = + block.header.excess_blob_gas.map(BlobExcessGasAndPrice::new); } /// Executes the given transaction and commits state changes to the database _and_ the journaled