Skip to content
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

rpc: Implement websockets with github.com/gorilla/websocket #401

Closed
wants to merge 129 commits into from
Closed

rpc: Implement websockets with github.com/gorilla/websocket #401

wants to merge 129 commits into from

Conversation

trinhdn2
Copy link

@trinhdn2 trinhdn2 commented Dec 4, 2023

This change makes package rpc use the github.com/gorilla/websocket package
for WebSockets instead of golang.org/x/net/websocket. The new library is more robust
and supports all WebSocket features including continuation frames.

There are new tests for two issues with the previously-used library:

  • TestWebsocketClientPing checks handling of Ping frames.
  • TestWebsocketLargeCall checks whether the request size limit is applied correctly.

DialWebsocket's handling of the default Origin header has changed. It used to set the
local machine's hostname as the origin, but that's weird and won't work with any
Internet-facing service. The new behavior is creating connections without an Origin
header unless one is provided explicitly.

This change also raises the request size limit for HTTP and WebSocket connections
to 5 MB. Quite a few people have reported issues where geth fails to deploy contracts
when they're too large, and retesteth needs a larger limit to upload the pre-state of large
tests.

References:

trinhdn97 and others added 30 commits June 16, 2023 14:30
@trinhdn2 trinhdn2 changed the title Implement websockets with github.com/gorilla/websocket rpc: Implement websockets with github.com/gorilla/websocket Dec 5, 2023
@tungng98 tungng98 deleted the branch BuildOnViction:upgrade-core-develop December 10, 2023 16:51
@tungng98 tungng98 closed this Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants