Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move load account to JournaledState warm_preloaded_addresses #1484

Closed
rakita opened this issue Jun 3, 2024 · 0 comments · Fixed by #1584
Closed

Move load account to JournaledState warm_preloaded_addresses #1484

rakita opened this issue Jun 3, 2024 · 0 comments · Fixed by #1584
Labels
feature New feature or lib ability refactor Refactor of the code

Comments

@rakita
Copy link
Member

rakita commented Jun 3, 2024

As JournaledState now has a warm_preloaded_addresses we dont need to preload accounts of coinbase and blockhash.

pub warm_preloaded_addresses: HashSet<Address>,

These lines should be replaced with journal_state.warm_preloaded_addresses.insert().

// 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
if SPEC::enabled(PRAGUE) {
context.evm.inner.journaled_state.initial_account_load(
BLOCKHASH_STORAGE_ADDRESS,
&[],
&mut context.evm.inner.db,
)?;
}

@rakita rakita added feature New feature or lib ability refactor Refactor of the code labels Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or lib ability refactor Refactor of the code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant