-
Notifications
You must be signed in to change notification settings - Fork 676
header not found
error when starting ganache forking with infura RPC endpoint
#615
Comments
My stack trace when seeing this error is different, as seen below:
I'm using ganache-core 2.11.2 through OpenZeppelin Test Environment, and am forking the mainnet with an Infura endpoint. Like you said @seesemichaelj, this is resolved by restarting ganache |
Similarish error - I've been trying to locate some kind of config file to see where "account 0xd0a8356c4889d2a9876c882a8bd9cc0ee7e4430b" comes from but have been unsuccessful so far.
|
Apologies for the delay, ran into some weirdness and wanted to collect it all rather than creating confusion. I received the original error above (header not found) when trying to run ganache-cli while forking from Cloudflare: Gave:
Retrying the same command provided the same error. I then uninstalled and reinstalled ganache-cli and got the same error with a different account address at the top. If I leave out the "-f ..." part I get the callback error which made me aware that I need to revert my node version. I'm currently in the process of figuring out nvm and will report back if this error persists from node 12. |
Unfortunately, I'm getting the same issue with nvm 12 when making an initial attempt and retrying:
And in all this I think I've combined two issues, the original "header" issue applicable to this thread and my new "nonce" issue above. So the "nonce" issue occurs when trying to fork mainnet. I'm glad to report the "header" issue is gone once running ganache from node 12:
|
Well both errors only occur when you are trying to fork a network, so glad that you're not hitting that code when you're not configured for forking haha The second try you post when forking provides the error:
Which sounds like an issue with the Cloudflare endpoint to some degree. I believe that error should be a brand new issue referring to cloudflare endpoint support since I can reproduce the I'd suggest using Infura Now the header not found error just coincidentally also showed up, which I do believe is separate from the cloudflare specific issue |
Thank you sir! Infura worked like a charm. And as to my silliness above, in my last post I kinda of didn't scroll right and so missed the "header" error part of the first attempt...and incorrectly concluded it was some new nonce error ;p So in summary: reverting to node 12 resolved all issues when not forking, and furthermore, forking from Infura resolved all forking issues. As you've pointed out, there appears to be an issue with Forking the Cloudflare ETH Endpoint. |
Do note that Infura has a 128 block limit before needing to purchase the data archive add-on; you can read more about the limit here: https://infura.io/docs/ethereum/add-ons/archiveData. Depending on what you're using forking for, you may run into issues with the data archival. Truffle Teams provides Sandboxes which are just cloud-hosted Ganache instances. Forking is available in Truffle Teams Sandboxes without the 128 block limit. Currently our free tier of Truffle Teams allows you to have 1 Sandbox, and you can currently choose forking in the free tier. Not sure if it'll always be available in the free tier, but it's free now! You can read more about Truffle Teams Sandboxes in our docs. You can sign up for a free Truffle Teams account at https://my.truffleteams.com (Truffle Teams does a lot more cool stuff too! Sandboxes is just one of them) |
Still exist when forking cloudflare, but not on infura. |
@dexcell This might be because cloudflare doesn't support archive state. |
@davidmurdoch I see thanks @seesemichaelj |
@dexcell That's correct! At the current time, you can use your free sandbox to fork with archival data. Check out our docs to see how to make a sandbox |
It's not clear what Ganache should do in these situations, but maybe this issue is one of better error reporting? I'll label this issue as such, since that's one path forward (i.e., augment the geth-provided error with additional detail on what's going wrong and possible ways to fix). In the meantime, if anyone has ideas for handling this problem more robustly, we're all ears! Thanks all. |
I'm not sure if this is specific to forking or infura, but periodically on v6.10.1 I receive the following error immediately on startup:
Restarting will fix the issue fairly quickly. I'm wondering if this is related to #579 🤔 (doubt it though)
Your Environment
The text was updated successfully, but these errors were encountered: