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

PeerManager: add separate queue for gossip broadcasts #1683

Merged

Conversation

valentinewallace
Copy link
Contributor

@valentinewallace valentinewallace commented Aug 24, 2022

This allows us to better prioritize channel messages over gossip broadcasts and lays groundwork for rate limiting onion messages more simply, since they won't be competing with gossip broadcasts in the channel message queue.

Also fixes a bug that was introduced in #1660, oops.

  • docs

Lays groundwork for #1604

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

Nice, thanks.

@valentinewallace valentinewallace force-pushed the 2022-08-multiqueue-peerman branch from 758561d to 91b113d Compare August 25, 2022 14:56
Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

LGTM. Can we now drop the enqueue_encoded_message utility now and only use the gossip variant?

@valentinewallace valentinewallace force-pushed the 2022-08-multiqueue-peerman branch from 91b113d to 50a417d Compare August 25, 2022 16:39
@valentinewallace valentinewallace marked this pull request as ready for review August 25, 2022 16:40
@valentinewallace valentinewallace force-pushed the 2022-08-multiqueue-peerman branch from 50a417d to 0fce80d Compare August 25, 2022 16:41
@codecov-commenter
Copy link

codecov-commenter commented Aug 25, 2022

Codecov Report

Merging #1683 (47e818f) into main (414d8e1) will decrease coverage by 0.05%.
The diff coverage is 46.42%.

@@            Coverage Diff             @@
##             main    #1683      +/-   ##
==========================================
- Coverage   90.91%   90.85%   -0.06%     
==========================================
  Files          85       85              
  Lines       45753    45763      +10     
  Branches    45753    45763      +10     
==========================================
- Hits        41596    41580      -16     
- Misses       4157     4183      +26     
Impacted Files Coverage Δ
lightning/src/ln/peer_handler.rs 56.77% <46.42%> (-0.06%) ⬇️
lightning/src/chain/onchaintx.rs 94.02% <0.00%> (-0.92%) ⬇️
lightning/src/ln/payment_tests.rs 98.57% <0.00%> (-0.32%) ⬇️
lightning/src/ln/functional_tests.rs 96.84% <0.00%> (-0.20%) ⬇️
lightning/src/ln/monitor_tests.rs 99.35% <0.00%> (-0.13%) ⬇️
lightning/src/ln/channelmanager.rs 85.13% <0.00%> (-0.03%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@jkczyz jkczyz self-requested a review August 25, 2022 17:32
Copy link
Contributor

@jkczyz jkczyz left a comment

Choose a reason for hiding this comment

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

Looks good but should make commits atomic as per comment.

@TheBlueMatt
Copy link
Collaborator

If you're referring to another PR in the git commit, please refer to the specific commit by commit hash, not to github - git history should stand on its own without context from github.

Fixes a flipped bool that was introduced in
4a1ee5f
It's more accurate to name it as dropping gossip broadcasts, as it won't drop
all gossip.
This allows us to better prioritize channel messages over gossip broadcasts and
lays groundwork for rate limiting onion messages more simply, since they won't
be competing with gossip broadcasts for space in the main message queue.
@valentinewallace valentinewallace force-pushed the 2022-08-multiqueue-peerman branch from 9b3fe9e to 47e818f Compare August 25, 2022 18:58
@TheBlueMatt TheBlueMatt merged commit 2358b0b into lightningdevkit:main Aug 25, 2022
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.

5 participants