-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
Create RPC service #4990
Comments
Instead of having the service take We could also keep things simple and make this change in #4992, whichever makes the most sense. |
Leaving more notes for myself: Currently both the fetch and Infura middleware implement retry logic. We need the service to contain this logic instead. This is different from a standard service object because some errors are retriable while others are not. This means that the RPC service needs to use a different error filter policy other than |
Create an RPC service that can be used by the NetworkController to make RPC requests. This service would be responsible for intelligently retrying failed requests, and for avoid undue network load using exponential backoff, jitter, and circuit breaker patterns. This would be in accordance with the External API Integrations ADR: https://github.com/MetaMask/decisions/blob/main/decisions/core/0002-external-api-integrations.md
This would live alongside the NetworkController, not within it. It would be a separate package export. Whether it's in its own package or not can be a decision for the author, that is less important.
The text was updated successfully, but these errors were encountered: