-
Notifications
You must be signed in to change notification settings - Fork 4
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
Improve websockets reconnects #170
Improve websockets reconnects #170
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have the bandwidth to do this PR justice. Looks good, although not sure why we need such a complicated solution. Sorry you're not getting enough appreciation for your work. I'll go ahead and approve...
Yeah this PR is big and just look complex because of the number of third-part traits and adapters I had to implement:
Our RPC client had to implement all those traits, this ended up bloating the code, besides that the actual reconnect logic is in the |
Description
This PR implements a more robust reconnect strategy for Websocket connections, also replaces the default ethere's WS provider by jsonrpsee, which is the RPC Client used by Subxt and Substrate, this also allows Astar connector to use the same websocket connection both for ethereum and substrate calls.
Adapters
Most of the code on this PR are adapters that allow us to use the same client for Ethereum and Substrate interchangeably.
Reconnect Strategy:
Type of change
Code review prechecks: