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

eth_call over http slow on windows #95

Open
markspanbroek opened this issue Nov 14, 2024 · 1 comment
Open

eth_call over http slow on windows #95

markspanbroek opened this issue Nov 14, 2024 · 1 comment

Comments

@markspanbroek
Copy link
Member

markspanbroek commented Nov 14, 2024

As observed in the integration tests of nim-codex, JSON-RPC calls to hardhat
using http (not websockets) are very slow. A single call to eth_call takes about 2-3 seconds.
This was also observed on fast machines. It seems to only occur on windows.

@markspanbroek markspanbroek changed the title eth_call json-rpc call over http slow on windows eth_call over http slow on windows Nov 14, 2024
@markspanbroek
Copy link
Member Author

I figured out what is causing this; apparently it takes windows 2-3 seconds to resolve "localhost" to "127.0.0.1" every time a JSON-RPC call is made over http 🤦. So you need to use "http://127.0.0.1:8545" instead of "http://localhost:8545" on windows. We should probably change the examples urls in nim-ethers to reflect this, and add a warning to the readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant