This repository has been archived by the owner on Jan 11, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes consensus-shipyard/ipc#159
Replaces the use of the
WebSocketClient
in the Ethereum API facade with a newHybridClient
that wraps it and uses a normalHttpClient
as well as aWebSocketClient
under the hood. The former should be more resilient as it doesn't maintain a persistent connection with CometBFT, while the latter is managed by aHybridClientDriver
that reconnects if it encounters the"failed to send to internal channel"
error.With this solution the
ethapi
container should heal itself and doesn't need to be restarted. In the event of the CometBFT connection being dropped, the active WebSocket subscriptions from our own clients should get an error when they try to consume the data, resulting in those connections being closed, forcing them to re-subscribe.