Closed fvictorio closed 2 weeks ago
Latest commit: 1ad1973595c53e57cffd7570f0444d68b6c36b80
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
hardhat | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 18, 2024 9:22am |
Fixes https://github.com/NomicFoundation/edr/issues/447.
We don't have hardfork activation histories for optimism and arbitrum. This means that if you fork one of those networks and immediately make a call, you'll get a "No known hardfork for execution on historical block..." error, because those calls are executed in the forked block, which uses the remote hardfork.
A scenario that doesn't work and is easier to understand is a call executed in a block before the forked block, for the same reason, but this is rarely done.
You might be wondering "why aren't more people complaining about this? Surely there are many users forking optimism and arbitrum", and I think the answer is that normally you send a transaction before making a call, which mines a new block and then the subsequent calls use the local, known hardfork.
The "histories" are used are obviously wrong. This basically says "use Shanghai for these chains". Finding the proper hardfork block numbers for L2s is hard, and even if you can do it there are extra problems: 1) those hardforks might not map 1-1 with ethereum mainnet hardforks, and 2) the hardforks might be specified using timestamps instead of block numbers, which makes this even harder.
So I did the lazy, conservative thing and set Shanghai to block 0 for the four chains.