-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
RPC calls to non-localhosts are slow #4658
Comments
this looks like interval that's being used for checking for tx receipt etc. https://github.com/foundry-rs/foundry/blob/master/common/src/provider.rs for localhost, we can assume that we can just Hit the node with lots of requests. I guess we can add a setting for this and also tune the defaults a bit. And we also should exempt 0.0.0.0 from this and treat it as local, basically any IP range that is local: https://doc.rust-lang.org/std/net/struct.Ipv4Addr.html#method.is_link_local |
I'd like to pick this up. I can see already some conditional logic that changes the behaviour from local to not local here. The How do you want me to proceed? |
ideally, we fix this in the |
Ok cool! Shall I open an issue on |
Closing—the upstream fix is now in foundry and rpc calls should not be slow anymore (quickly tested and seemed fast enough). |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (6c1eee9 2023-03-27T11:13:24.314347Z)
What command(s) is the bug in?
forge create
Operating System
macOS (Intel)
Describe the bug
I have
anvil
running on 0.0.0.0.I benchmark
forge create
Why the second invocation takes about 7 seconds to execute, providing 192.168.0.123 points to the same
anvil
service?Same story with
--rpc-url=http://anvil:8545
and127.0.0.1 anvil
in /etc/hosts.The text was updated successfully, but these errors were encountered: