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 overflow in awaiting_pong_timer... with too many peers #2245

Merged

Conversation

TheBlueMatt
Copy link
Collaborator

If we have more than
127 / MAX_BUFFER_DRAIN_TICK_INTERVALS_PER_PEER (31) peers, awaiting_pong_timer_tick_intervals can overflow before we hit the limit. This isn't super harmful, we'll still disconnect peers as long as they don't send any messages between two pings, but it does cause us to not disconnect peers which are extremely slow in responding to messages, e.g. because they are overloaded.

If we have more than
127 / `MAX_BUFFER_DRAIN_TICK_INTERVALS_PER_PEER` (31) peers,
`awaiting_pong_timer_tick_intervals` can overflow before we hit
the limit. This isn't super harmful, we'll still disconnect peers
as long as they don't send *any* messages between two pings, but it
does cause us to not disconnect peers which are extremely slow in
responding to messages, e.g. because they are overloaded.
@TheBlueMatt TheBlueMatt added this to the 0.0.116 milestone Apr 28, 2023
@codecov-commenter
Copy link

codecov-commenter commented Apr 28, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (88c63e9) 91.57% compared to head (fa33f98) 91.58%.

📣 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

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2245   +/-   ##
=======================================
  Coverage   91.57%   91.58%           
=======================================
  Files         104      104           
  Lines       51930    51930           
  Branches    51930    51930           
=======================================
+ Hits        47556    47559    +3     
+ Misses       4374     4371    -3     
Impacted Files Coverage Δ
lightning/src/ln/peer_handler.rs 62.57% <ø> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@wpaulino wpaulino merged commit 0e8da58 into lightningdevkit:main Apr 28, 2023
14 checks passed
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.

None yet

4 participants