-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Hardhat fork error in v2.21.0 - "missing trie node" #388
Comments
Hi @DeFiFoFum, which service/node are you connecting to? |
Also got the same issue while trying forking with Fantom / Avalanche chains |
Related to #387 |
@DeFiFoFum and @RealJohnnyTime which node provider are you using when this problem occurs? Infura? Alchemy? Something else? |
I generally go down the list on ChainList.org until I find an RPC node which can support archive requests. I also work on multiple networks such as Ethereum, Binance Smart Chain, Polygon, Arbitrum and Linea primarily. Off the top of my head I don't remember exactly which ones were causing the issue, I just know that my workflow started failing after I upgraded above |
Based on our investigation, this problem is an internal server error originating from archive providers. To minimise the end-user effect, we've introduced an application-level retry specifically for when the We only retry once, so there is still a slim change that the internal error occurs consecutively and is returned to the user. We'll release a patch release including this change as soon as possible. Note: Once this issue is resolved on the archive provider's side, we'll remove the application-level retry. |
We've released EDR v0.3.8 with a fix for this issue. To upgrade to the latest EDR version immediately, you can remove your You can verify that you’re using the latest version of EDR by running the following command: |
wuban@wuban:~/hardhat$ npx hardhat node --hostname 0.0.0.0 --fork https://base-rpc.publicnode.com Error HH604: Error running JSON-RPC server: The response reported error HardhatError: HH604: Error running JSON-RPC server: The response reported error
wuban@wuban: |
Is forking only supposed to work with archive nodes? Getting the same error when trying to fork
|
got any solution? |
You can fork a non-archive node, but it will eventually stop working. The way forking works is that you start forking at some block Eventually, though, new blocks will be mined, You could argue that in that case we should always fetch the state from the |
Version of Hardhat
v2.21.0
What happened?
Issue
When I upgrade to v2.21.0 and then try to use the forking configuration below, I get the error:
ProviderError: The response reported error -32000: missing trie node. (optional data: None).
Fork Configuration
I use a helper function called
setupFork
which follows the forking documentation in the docs: https://hardhat.org/hardhat-network/docs/guides/forking-other-networks#pinning-a-blockHere is an example: https://github.com/DeFiFoFum/hardhat-template/blob/main/lib/evm/forkHelper.ts#L39
Minimal reproduction steps
Workaround: use
hardhat@2.14.0
To fix this issue, I downgraded to
hardhat@2.14.0
and pinned that version. Now the fork configuration works as expected.Reproduce
Install
hardhat@2.21.0
and then run thesetupFork
function I provided above.Search terms
trie node 2.21.0
The text was updated successfully, but these errors were encountered: