Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Apply WebSocketConfig to initial WS provider connection #2668

Merged
merged 2 commits into from
Nov 13, 2023

Conversation

svenski123
Copy link
Contributor

WsClient::connect_with_config() et al. ignores the passed in WebSocketConfig object on the initial connection.

On subsequent reconnections the WebSocketConfig object (as saved by the RequestManager) is correctly applied to the backend.

This is used to among other things increase the maximum allowable frame size (i.e. >16MB) or message size.

@svenski123 svenski123 force-pushed the 231107-fix-connect-with-config branch from 46f7fdc to 88fa4a9 Compare November 9, 2023 16:39
@svenski123
Copy link
Contributor Author

Rebased/force pushed on top of 0543e1c which addressed the failed clippy and fmt checks in other parts of the code unrelated to this PR.

@svenski123
Copy link
Contributor Author

I bumped the solc version from v0.8.22 to v0.8.23 in the test case in ethers-solc/src/compile/mod.rs.
This should take care of the failed tests.

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, ty

@@ -291,7 +310,7 @@ impl RequestManager {
reconnects: usize,
) -> Result<(Self, WsClient), WsClientError> {
let (backend, (instructions_tx, instructions_rx), channel_map) =
Self::connect_internal(conn.clone()).await?;
Self::connect_with_config_internal(conn.clone(), config.clone()).await?;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah I see, we didn't use the config for the connect

@mattsse mattsse merged commit eef8110 into gakonst:master Nov 13, 2023
18 of 19 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants