-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Max Rate Limit Reached error thrown by Etherscan #926
Comments
Can you try using your own API key for etherscan? const provider = ethers.getDefaultProvider('homestead', { etherscan: 'apikey' }); Related issue #799 |
I’ve noticed this starting today as well. It looks like Etherscan may have dialed up their throttling for the ethers default API key. I’ll get in touch with them and look into this. It may need to be removed from the default provider for now. Thanks! |
It's that damn I'm not sure I understand why it constantly needs to be polled in the background? Is this how events are monitored? |
Yes, this is how events are monitored. :) The only time we need to check for new events, or transactions have been mined is when the block changes, so it is the most efficient way. Otherwise you’d really hit your limit hard if you kept polling for each event instead (not to mention it would be harder on the node). It is only called if you have events though, in which case it is required. |
So, theoretically, if I'm monitoring for an event that I know occurs within a controlled set of time, I could turn this off, and then back on, when I'm expecting an event to occur. Would unsubscribing the eventListener control this? |
If you unsubscribe the event is removed. If there are no events, the polling stops. :) You can also use Do you have a lot of events? Or making a lot of calls? You shouldn’t be encountering such a high level of throttling... |
I do not have a lot of events, nor am I making a bunch of calls. The issue was exactly as you described: 1 "ping" every 4 seconds. At this point, that's the majority of my network traffic (I'm un-launched and still in testing on Rinkeby). Since my particular application doesn't need to listen for events happening outside of its control, I've implemented a removal of listener functionality during time of no activity. |
I've added retry logic (with exponential back-off) to the Etherscan provider in v5.0.6, so I suspect this should be addressed? Please try it out and let me know. |
I think this should be addressed now with the new retry logic. If you continue having issues though, please re-open. Thanks! :) |
After upgrading to v5 ether balance checks and json rpc calls end up with the following error (This was not shown in v4) :
Rate limit reached for this call:
https://api.etherscan.io/api?module=proxy&action=eth_blockNumber&apikey=9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB
The text was updated successfully, but these errors were encountered: