You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You might need to run it several times but sometimes it succeeds (as it should) and sometimes it fails. To rerun it, re-run both commands again (to ensure anvil is at the right block level + so it's the same state):
I am encountering this behavior, too. I am forking from mainnet block 19922506 and replaying the first two transactions from the next block:
TX 0: 0xce3acf3eeebd6ff6ab7b574c1ef15057b09845254bab110c4afee0c898dfb8d5
TX 1: 0x6c9ec85db14f593dd2290c3be7d067e7e3cce7831d1a03db2004b5dd540180d5
With auto-impersonate active, I can send both transactions in sequence. Consistently, TX 0 completes and TX 1 reverts. This pattern happens using both eth_sendTransaction and eth_sendRawTransaction.
Both transactions confirm as expected when sent to a Hardhat node with similar options.
I tested several old nightly releases via foundryup -v back to Jan 2023 to observe the same behavior.
Component
Anvil
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (b174c3a 2024-02-09T00:16:22.953958126Z)
What command(s) is the bug in?
No response
Operating System
Linux
Describe the bug
Hi! I am experiencing inconsistent behaviour from anvil when simulating a transaction on an old block. There are 2 commands:
First set up anvil:
Then run eth_sendUnsignedTransaction:
You might need to run it several times but sometimes it succeeds (as it should) and sometimes it fails. To rerun it, re-run both commands again (to ensure anvil is at the right block level + so it's the same state):
Other times it fails:
In general, I'm getting a lot of inconsistent behaviour from anvil VS simulating using trace_call using Erigon:
This succeeds every single time I run it.
(Also the txn I'm replicating in this instance is: "0x2b023d65485c4bb68d781960c2196588d03b871dc9eb1c054f596b7ca6f7da56")
Anvil isn't just failing on this txn, it's failing on many txns across the entire history of the chain.
Thank you in advance!
The text was updated successfully, but these errors were encountered: