-
Notifications
You must be signed in to change notification settings - Fork 81
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
Read call on forked chain times out #315
Comments
Seems like the same issue as #338 - @hamdiallam @jakim929 should we combine these or are they different? |
ahh yea same issue! I'll close mine in favor of this |
Anvil is making lots (~2000) of Just tested that it fails by using anvil directly in fork mode, so the issue probably isn’t the supersim layer either. This is hard to fix just based on how local node forking works. Even if we proxy directly to the RPC instead of running the evm execution locally, we would have to "refork" otherwise the local state will be outdated on later calls/writes. I think this is a hard to solve problem in a generalizable way - I remember @roninjin10 had the idea of doing symbolic execution on the EVM for https://tevm.sh/ which would help with the average (not worst case) scenario by allowing parallelized fetches for storage instead of the "waterfall" type of way it currently happens. Something like this will likely need to be built into the local node implementation directly (anvil) |
For practical advice to workaround this: You do batches of balanceOf calls to the contracts so anvil caches all this storage first |
@jakim929 thanks for looking into this! 🙏 Our usecase is to use fork mode for FE e2e. Is your suggestion for us to make underlying calls to all the contracts first for caching or is some other kind of Supersim abstraction possible? |
@eyezick if you can proceed with the approach mentioned by @roninjin10 that is the fastest way to get this done. I'm giving some thought to how we may be able to add supersim abstractions to help but @jakim929 is right this is not an easily generalizable solution (though I think the FE e2e testing problem is an important and common one!). I don't have a timeline on a fix but will update here when there's more progress. |
Environment information
Foundry version.
forge 0.3.0 (5a8bd89 2024-12-20T08:45:53.204298000Z)
Describe the bug
Large read calls on forked OP Mainnet time out consistently. Simpler calls to the same contract return data successfully.
Steps to reproduce
SUPERSIM_RPC_URL_OP=https://....
detected rpc override name=op
Comments
I was able further to repro this on our web app, where the same call hangs indefinitely. Wanted to note that the private RPC var I'm using is the same that we use on our web app so it already handles these size calls in dev/production so it should be able to handle them when used with supersim.
Ref link for function
The text was updated successfully, but these errors were encountered: