Skip to content

Cherry-pick: node: relax websocket connection header check (#21646)#1698

Merged
mergify[bot] merged 1 commit intomasterfrom
jcortejoso/cherrypick-websocket-21646
Sep 22, 2021
Merged

Cherry-pick: node: relax websocket connection header check (#21646)#1698
mergify[bot] merged 1 commit intomasterfrom
jcortejoso/cherrypick-websocket-21646

Conversation

@jcortejoso
Copy link
Copy Markdown
Member

@jcortejoso jcortejoso commented Sep 22, 2021

Description

Cherry-picking from go-ethereum this PR.
The fix from the PR is needed for Kong and the GCP LB to be able to redirect the websocket properly.

Tested

Tested in baklava forno env with and without Kong as proxy:

╰─ wscat -c wss://baklava-forno-k8s.celo-testnet.org/ws
Connected (press CTRL+C to quit)
> {"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}
< {"jsonrpc":"2.0","id":1,"result":"0x768513"}
╰─ geth attach wss://baklava-forno-k8s.celo-testnet.org/ws
Welcome to the Geth JavaScript console!

instance: celo/v1.4.0-unstable/linux-amd64/go1.16.8
at block: 7767331 (Wed Sep 22 2021 10:01:28 GMT+0200 (CEST))
 modules: eth:1.0 net:1.0 rpc:1.0 web3:1.0

To exit, press ctrl-d
>

Related issues

Backwards compatibility

This celo-monorepo PR needs to be merged/used to deploy new celo-blockchain versions to Forno due to this issue (this endpoint change is already on master).

This makes it accept the "upgrade,keep-alive" header value, which
apparently is a thing.
@jcortejoso jcortejoso requested a review from a team as a code owner September 22, 2021 08:05
@jcortejoso jcortejoso requested review from kevjue and piersy and removed request for a team September 22, 2021 08:05
@piersy
Copy link
Copy Markdown
Contributor

piersy commented Sep 22, 2021

Coverage from tests in ./e2e_test/... for ./consensus/istanbul/... at commit 5c52d42

coverage:  39.6% of statements across all listed packages
coverage:  50.1% of statements in consensus/istanbul
coverage:  38.0% of statements in consensus/istanbul/backend
coverage:   0.0% of statements in consensus/istanbul/backend/backendtest
coverage:  43.3% of statements in consensus/istanbul/backend/internal/db
coverage:  24.1% of statements in consensus/istanbul/backend/internal/enodes
coverage:  22.6% of statements in consensus/istanbul/backend/internal/replica
coverage:  58.4% of statements in consensus/istanbul/core
coverage:   0.0% of statements in consensus/istanbul/proxy
coverage:  58.1% of statements in consensus/istanbul/uptime
coverage: 100.0% of statements in consensus/istanbul/uptime/store
coverage:  46.1% of statements in consensus/istanbul/validator
coverage:  79.2% of statements in consensus/istanbul/validator/random

@jcortejoso jcortejoso changed the title Cherry-pich: node: relax websocket connection header check (#21646) Cherry-pick: node: relax websocket connection header check (#21646) Sep 22, 2021
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 22, 2021

Codecov Report

Merging #1698 (5c52d42) into master (46dac57) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1698      +/-   ##
==========================================
- Coverage   56.09%   56.08%   -0.01%     
==========================================
  Files         606      606              
  Lines       80269    80269              
==========================================
- Hits        45030    45022       -8     
- Misses      31703    31717      +14     
+ Partials     3536     3530       -6     
Impacted Files Coverage Δ
node/rpcstack.go 83.69% <100.00%> (ø)
p2p/discover/v4_udp.go 76.11% <0.00%> (-4.23%) ⬇️
miner/block.go 48.79% <0.00%> (-2.41%) ⬇️
les/serverpool.go 88.78% <0.00%> (-1.87%) ⬇️
miner/worker.go 56.56% <0.00%> (-1.52%) ⬇️
trie/proof.go 75.28% <0.00%> (-1.50%) ⬇️
p2p/simulations/http.go 70.10% <0.00%> (-0.55%) ⬇️
p2p/discover/v5_udp.go 72.85% <0.00%> (-0.47%) ⬇️
p2p/server.go 65.97% <0.00%> (-0.33%) ⬇️
eth/downloader/downloader.go 76.77% <0.00%> (+0.28%) ⬆️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 26cba2a...5c52d42. Read the comment docs.

Copy link
Copy Markdown
Contributor

@gastonponti gastonponti left a comment

Choose a reason for hiding this comment

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

LGTM

@mergify mergify Bot merged commit 5aa1d94 into master Sep 22, 2021
@mergify mergify Bot deleted the jcortejoso/cherrypick-websocket-21646 branch September 22, 2021 16:06
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.

Websocket connectivity not working as expected

4 participants