imotai / revm

Ethereum Virtual Machine written in rust that is fast and simple to use
https://bluealloy.github.io/revm/
MIT License
0 stars 0 forks source link

Move load account to JournaledState warm_preloaded_addresses #24

Open imotai opened 5 months ago

imotai commented 5 months ago

As JournaledState now has a warm_preloaded_addresses we dont need to preload accounts of coinbase and blockhash. revm/crates/revm/src/journaled_state.rs

Line 36 in 6df5d20

pub warm_preloaded_addresses: HashSet

, These lines should be replaced with journal_state.warm_preloaded_addresses.insert(). revm/crates/revm/src/handler/mainnet/pre_execution.rs

Lines 32 to 50 in 6df5d20

// load coinbase // 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, &[], &mut context.evm.inner.db, )?; }

// Load blockhash storage address // EIP-2935: Serve historical block hashes from state