-
Notifications
You must be signed in to change notification settings - Fork 22
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
[network] grpc client passing timeout context #324
Conversation
33a90b4
to
58420af
Compare
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## dev #324 +/- ##
==========================================
- Coverage 47.50% 47.46% -0.05%
==========================================
Files 135 135
Lines 20444 20468 +24
==========================================
+ Hits 9712 9715 +3
- Misses 9898 9923 +25
+ Partials 834 830 -4
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see this PR.
Only a little suggestion here.
By the way, do we get any manual tests to distinguish the current fix from elder version?
@0xcb9ff9 The working commit is 4d60cdc, right? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
yes, dogechain-testenv is a general test environment |
e3abdee
to
c09b694
Compare
c09b694
to
97ecb36
Compare
Description
PR #323
Two questions
When node A is getting blocks from node B, if node B is forced to shut down (or when the network connection is disconnected),
GetBlocks
will never expire, causing node A to block synchronously. Although difficult to reproduce, the problem does exist.PeerConnInfo.protocolClient
saves the grpc client, but the timeout period can't be set in the libp2p stream. libp2p stream leaks if peer disconnectsThis PR removes grpc client saving, passing timeout context, enforcing timeouts in libp2p streams
Changes include
Checklist
Testing