Move all RPC calls to single client that chooses WS/HTTP - #224
Open
peterbroadhurst wants to merge 1 commit into
Open
Move all RPC calls to single client that chooses WS/HTTP#224peterbroadhurst wants to merge 1 commit into
peterbroadhurst wants to merge 1 commit into
Conversation
peterbroadhurst
force-pushed
the
ws-only-listener
branch
3 times, most recently
from
August 31, 2026 00:47
882ea5f to
5cfacb3
Compare
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
peterbroadhurst
force-pushed
the
ws-only-listener
branch
from
August 31, 2026 01:31
5cfacb3 to
07fe72d
Compare
peterbroadhurst
marked this pull request as ready for review
August 31, 2026 02:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
EVMConnect has both a HTTP and a WebSocket configuration.
When a WebSocket configuration exists, the block listener connects the WebSocket and then begins to use it.
However, the rest of the listener code continues to use the HTTP connection - meaning we end up with a split where detection of blocks is pinned to a sticky connection over a WebSocket, but the remaining calls happen over HTTP relying on sticky-session HTTP load balancing for calls that require server-side context like
eth_newFilter/eth_getFilterChanges.This PR introduces a common RPC layer that all aspects of the connector use, which then perform RPC method based selection of whether to send requests down a WebSocket or HTTP connection.
A mix still has benefits:
eth_sendRawTransactioneth_callcan use multiple backend nodesdebug_traceTransactioncan be moved off of the WebSocketHowever, the mix previously used was not ideal.
So the approach here is to have a mode switch that supports:
wseverything is pushed down the WebSocket once estsablishedhttpeverything is pushed down HTTP - only use of WebSocket is subscriptions (shoulder taps for new blocks)autoa new split that is documented in detail in this PR - the new defaultlegacyas close as possible to the existing split, with two differences documented in the code