foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
7.93k stars 1.61k forks source link

`vm.createSelectFork` should set warm coinbase(EIP-3651) #5513

Open y1cunhui opened 11 months ago

y1cunhui commented 11 months ago

Component

Forge

Have you ensured that all of these are up to date?

What version of Foundry are you on?

forge 0.2.0 (8e365be 2023-07-18T00:28:12.648082999Z)

What command(s) is the bug in?

No response

Operating System

Linux

Describe the bug

As EIP-3651, which is applied in Shanghai upgrade, the block.coinbase address should be warm in this block. When using the cheatcode createSelectFork, user expect the behaviour to be identical to execute the tx at the top of the specific block. This will have a little effect on gas calculation.

zerosnacks commented 3 weeks ago

Good point! I don't think we currently handle this specific edge case