status-go
status-go copied to clipboard
Implement rate limiting for ethereum client used in status-go
Problem
Infura implements back pressure and returns 429 Too many requests when client reaches certain amount of rps (?). Currently we are using naive implementation that won't consider any kind of such feedback.
Implementation
Implement rate-limited client on top of ethereum.rpc.Client that will discard requests above configured rps. It must be easily consumable to ethereum.ethclient.Client.
For rate-limiting itself we can use any bucket rate limited algorithm.
Also we should swtich infura urls to newer per project URLs (https://blog.infura.io/infura-dashboard-transition-update-c670945a922a) . they provide faster response and request that use them are prioritized during high network traffic.
i tried to use them and client definitely more reliable with them
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.