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

fix: wake future after buffering pong #4536

Merged
merged 1 commit into from
Sep 9, 2023

Conversation

Rjected
Copy link
Member

@Rjected Rjected commented Sep 9, 2023

This issue was uncovered in hive tests, where hive sends a single Ping after the eth handshake, and waits for a Pong response before sending any other requests over p2p. When this happens, we don't have any messages to send, so we never poll_flush the Pong out of the stream.

To fix this, we call the waker, so the Sink can be polled at least once after the Stream returns Poll::Pending.

@Rjected Rjected added C-bug An unexpected or incorrect behavior A-devp2p Related to the Ethereum P2P protocol A-networking Related to networking in general labels Sep 9, 2023
@Rjected Rjected requested a review from mattsse as a code owner September 9, 2023 02:18
@codecov
Copy link

codecov bot commented Sep 9, 2023

Codecov Report

Merging #4536 (9bc5066) into main (0fed707) will decrease coverage by 0.01%.
Report is 6 commits behind head on main.
The diff coverage is 0.00%.

Impacted file tree graph

Files Changed Coverage Δ
crates/net/eth-wire/src/p2pstream.rs 78.92% <0.00%> (-0.40%) ⬇️

... and 13 files with indirect coverage changes

Flag Coverage Δ
integration-tests 16.69% <0.00%> (-0.03%) ⬇️
unit-tests 64.00% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
reth binary 30.81% <ø> (ø)
blockchain tree 83.58% <ø> (ø)
pipeline 90.56% <ø> (ø)
storage (db) 75.32% <ø> (ø)
trie 94.84% <ø> (-0.04%) ⬇️
txpool 47.99% <ø> (-0.03%) ⬇️
networking 77.37% <0.00%> (-0.11%) ⬇️
rpc 57.43% <ø> (-0.01%) ⬇️
consensus 63.40% <ø> (ø)
revm 31.73% <ø> (ø)
payload builder 6.34% <ø> (ø)
primitives 86.53% <ø> (+0.04%) ⬆️

@mattsse mattsse added this pull request to the merge queue Sep 9, 2023
Merged via the queue into main with commit b151d6e Sep 9, 2023
@mattsse mattsse deleted the dan/fix-pong-response-on-quiet-network branch September 9, 2023 10:38
@mattsse mattsse added the M-changelog This change should be included in the changelog label Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-devp2p Related to the Ethereum P2P protocol A-networking Related to networking in general C-bug An unexpected or incorrect behavior M-changelog This change should be included in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants