Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the fallback anvil fork URL to use Cloudflare like viem does #175

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

niran
Copy link
Contributor

@niran niran commented Dec 16, 2023

Without this change, running the tests on a fresh checkout results in many failed tests with the following error repeated in the output:

Error: Anvil exited: thread 'main' panicked at /home/runner/work/foundry/foundry/crates/anvil/src/eth/backend/mem/mod.rs:238:39:
Failed to create genesis: GetAccount(0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266, (code: -32000, message: missing trie node 6be1147a8f956737d61a31ba05c807d2820b1559f30ca027abcc2dd5badbc544 (path ) state 0x6be1147a8f956737d61a31ba05c807d2820b1559f30ca027abcc2dd5badbc544 is not available, data: None)

Setting VITE_ANVIL_FORK_URL to point to an RPC from an Infura account resolves the issue, presumably because the current default, https://ethereum.publicnode.com is probably not an archive node. viem itself falls back to using a Cloudflare node, which also seems to solve the issue.

This pull request falls back to Cloudflare like viem does.

Copy link

vercel bot commented Dec 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
op-viem-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 16, 2023 10:42pm

@wbnns
Copy link
Member

wbnns commented Dec 17, 2023

@niran

Thanks, queueing up this one too for the team to take a look. 🤝

@wbnns wbnns added the state: backlog This is pending further review label Dec 17, 2023
@zencephalon
Copy link
Collaborator

@niran Thanks for this contribution!

@zencephalon zencephalon merged commit 882f106 into base-org:main Jan 3, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: backlog This is pending further review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants