-
-
Notifications
You must be signed in to change notification settings - Fork 838
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
Calling net_listening
on RPCs yields 400's and other http errors on Network tab
#2540
Comments
I wonder if |
Good thinking. The funny thing I found is that Perhaps we could add the name of the function to be called as a parameter on the fallback transport, eth_blockNumber probably doesn't cost much computing tough and it's probably cached on the RPCs |
Another weird behaviour I see, for instance, with "nodies" public RPC
From my understanding it basically means sometimes they're fine with taking requests from public ( it's a public node, so that should be the case ), but sometimes they seem to be overloaded ( 503 ) and sometimes they probably just open for their own domain. Because 503 (I guess any 5xx ) errors generate a lot of "error activity" on the "Console" from browsers, I believe we could consider giving a "cool down" period and exclude the RPC from the ranking algorithm to avoid flooding the console and burying some actual application errors. |
To start with, could we make the function used to For instance, I don't mind using |
I created a PR with rankMethod as a parameter. Would really appreciate if you could give me a help with the tests / getting the PR approved. I understand ideally, we would want a better default, but in the meanwhile, it would be great to add this option. |
@jxom any thoughts on this? would really appreciate some help with the PR. Thank You |
Check existing issues
Viem Version
2.16.1
Current Behavior
I have been using the fallback transport, and I noticed it does calls the
net_listening
function on RPCs.What I have been observing is that some public RPCs don't implement, most of the time still they reply with 200 OK but sometimes they also respond with a weird 400.
I wonder if instead of net_listening we should change the method to be
eth_blockNumber
as it's unlikely an RPC won't implement that function and the response time from my location seems to be exactly the same, for instance for flashbots it's around 200ms.Expected Behavior
No response
Steps To Reproduce
Turn
rank
on the fallback transportLink to Minimal Reproducible Example
https://stackblitz.com/edit/viem-getting-started?file=index.ts
Anything else?
for instance:
The text was updated successfully, but these errors were encountered: