baseFeePerGas of the first mined block after anvil_reset equals block before anvil_reset #6640
Closed
1 of 2 tasks
Labels
T-bug
Type: bug
Component
Anvil
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (eb2141c 2023-12-20T00:44:21.180725100Z)
What command(s) is the bug in?
No response
Operating System
Windows
Describe the bug
After any "anvil_reset" rpc call, the first block that gets mined doesn't use the EIP1559 formula for the baseFeePerGas, but instead uses the last block baseFeePerGas value before anvil_reset.
The next blocks use the EIP1559 formula.
This causes not enough balance issues when mining transactions expecting the EIP1559 formula to be used for the first block after every anvil_reset
Here is an example on ethereum mainnet
anvil started with command: .\anvil.exe --fork-url "https://rpc.flashbots.net" --no-mining
eth mainnet
The text was updated successfully, but these errors were encountered: