diff --git a/crates/interpreter/src/instructions/host_env.rs b/crates/interpreter/src/instructions/host_env.rs index 230bb39b37..7a77c7552d 100644 --- a/crates/interpreter/src/instructions/host_env.rs +++ b/crates/interpreter/src/instructions/host_env.rs @@ -13,7 +13,7 @@ pub fn chainid(interpreter: &mut Interpreter, host: &mut H) pub fn coinbase(interpreter: &mut Interpreter, host: &mut H) { gas!(interpreter, gas::BASE); - push_b256!(interpreter, host.env().block.coinbase.into_word()); + push_b256!(interpreter, host.env().block.beneficiary.into_word()); } pub fn timestamp(interpreter: &mut Interpreter, host: &mut H) { diff --git a/crates/primitives/src/env.rs b/crates/primitives/src/env.rs index 2f720af3e8..f30b3b2ba9 100644 --- a/crates/primitives/src/env.rs +++ b/crates/primitives/src/env.rs @@ -415,7 +415,7 @@ pub struct BlockEnv { /// Coinbase or miner or address that created and signed the block. /// /// This is the receiver address of all the gas spent in the block. - pub coinbase: Address, + pub beneficiary: Address, /// The timestamp of the block in seconds since the UNIX epoch. pub timestamp: U256, @@ -488,7 +488,7 @@ impl Default for BlockEnv { fn default() -> Self { Self { number: U256::ZERO, - coinbase: Address::ZERO, + beneficiary: Address::ZERO, timestamp: U256::from(1), gas_limit: U256::MAX, basefee: U256::ZERO, diff --git a/crates/revm/src/handler/mainnet/post_execution.rs b/crates/revm/src/handler/mainnet/post_execution.rs index 6d70b4fedf..331a51db1e 100644 --- a/crates/revm/src/handler/mainnet/post_execution.rs +++ b/crates/revm/src/handler/mainnet/post_execution.rs @@ -21,7 +21,7 @@ pub fn reward_beneficiary( context: &mut Context, gas: &Gas, ) -> Result<(), EVMError> { - let beneficiary = context.evm.env.block.coinbase; + let beneficiary = context.evm.env.block.beneficiary; let effective_gas_price = context.evm.env.effective_gas_price(); // transfer fee to coinbase/beneficiary. diff --git a/crates/revm/src/handler/mainnet/pre_execution.rs b/crates/revm/src/handler/mainnet/pre_execution.rs index 64b41e7045..bfad821f3d 100644 --- a/crates/revm/src/handler/mainnet/pre_execution.rs +++ b/crates/revm/src/handler/mainnet/pre_execution.rs @@ -33,7 +33,7 @@ pub fn load_accounts( // EIP-3651: Warm COINBASE. Starts the `COINBASE` address warm if SPEC::enabled(SHANGHAI) { context.evm.inner.journaled_state.initial_account_load( - context.evm.inner.env.block.coinbase, + context.evm.inner.env.block.beneficiary, &[], &mut context.evm.inner.db, )?;