-
Notifications
You must be signed in to change notification settings - Fork 54
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
feat: message prioritization with immediate peer-published dispatch and queuing for other msgs #1015
Conversation
8a2f8db
to
22d533d
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## unstable #1015 +/- ##
============================================
+ Coverage 83.17% 83.28% +0.11%
============================================
Files 91 91
Lines 15351 15442 +91
============================================
+ Hits 12768 12861 +93
+ Misses 2583 2581 -2
|
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.
Thank you :). Looks good to me.
Did you already test this in a test network / simulation, to make sure the behaviour is as expected.
Why did you open a new PR? Wouldn't it be easier to track changes if we'd push new commits to the existing ones?
@kaiserd I tested it running a local Nimbus node on Holenski, the previous metrics seem fine. But I see huge spikes in the non-priority queue size (can be hundreds of thousands for some nodes. I'm subscribing to all subnets to have enough traffic. It'd be good to test with a validator node as well. |
My idea with this PR was to make the difference between the implementations more explicit and potentially testing each one easier. I'm gonna squash the commits here and close the original PR later. |
9fe2ec6
to
5b48aa4
Compare
Thank for the clarification. For information of contributors not in the Vac P2P unit: We discussed in the meeting this is experimental and not meant for merging yet. We'll also do more experiments on #1009 |
29f8cd1
to
4f49ac8
Compare
826ce1b
to
07cab43
Compare
3ec2097
to
14d1787
Compare
988a38e
to
a1f3940
Compare
67d1060
to
558eca1
Compare
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. Thank you :).
Motivation: We are assuming the local peer might be spending too much time/bandwidth relaying messages rather than publishing its own messages, which could increase latency for the latter.
Objective: To enhance efficiency in message processing by prioritizing immediate dispatch of peer-published messages, and managing other messages through a queuing system.
Changes:
Immediate Dispatch for Peer-Published Messages: Ensures top priority by immediately sending messages published by the peer.
Queued Handling for IWANT Replies and Relay Messages: Introduces a unified queuing system for both replies to "IWANT" messages and messages from other peers that need relaying. These are processed after peer-published messages.
Asynchronous Task Queue Tracking: Implements an additional queue to monitor asynchronous tasks associated with each published message. The queue for IWANT replies and relay messages is processed once this is cleared.