-
Notifications
You must be signed in to change notification settings - Fork 209
Partial Messages Extension #631
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
Open
MarcoPolo
wants to merge
16
commits into
master
Choose a base branch
from
marco/partial-messages-2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
222428a to
5299023
Compare
6a50510 to
8162df6
Compare
8162df6 to
74b015e
Compare
7402459 to
939defb
Compare
a1d0543 to
c5773aa
Compare
4e4faae to
857c8cc
Compare
a76890d to
96339bb
Compare
ppopth
reviewed
Sep 23, 2025
ppopth
reviewed
Sep 23, 2025
818f40d to
7fc7eb4
Compare
ppopth
reviewed
Sep 24, 2025
ppopth
reviewed
Sep 24, 2025
ppopth
reviewed
Sep 24, 2025
ppopth
reviewed
Sep 24, 2025
ppopth
reviewed
Sep 24, 2025
7fc7eb4 to
578e12f
Compare
|
thanks for the review @ppopth, friendly reminder you can see the latest changes with |
f165483 to
4bec540
Compare
sukunrt
reviewed
Oct 8, 2025
4bec540 to
eb2f04a
Compare
sukunrt
reviewed
Oct 10, 2025
eb2f04a to
a099440
Compare
The bitmap is probably the common case, so add library support for it.
This allows a peer's local partsMetadata to merge with their remote partsMetadata. As long as the underlying PartsMetadata type supports CRDT-like addition, we can avoid sending the peer duplicates. Take the following example (credit Sukun): > Say: We have parts 1, 2, 5, 6 > > 1. Peer sends a message saying I have part 1, 2 > 2. We send parts 5, 6 and update the peerstate in PublishMessage to (1, 2, 5, 6) > 3. Concurrently with 2, we receive message from the peer saying I now have parts (1, 2, 3, 4) With this change we can now correctly store the fact that this peer should have parts 1,2,3,4,5,6. And in a way that does not assume a specific representation of the PartsMetadata.
a099440 to
a0a57bb
Compare
sukunrt
reviewed
Oct 12, 2025
sukunrt
reviewed
Oct 12, 2025
and fix a bug where we would skip sending them full messages if they requested partial messages and we disabled partial messages.
237d418 to
c66cef0
Compare
if they requested partial messages on a given topic.
When a topic join happens concurrently with adding a new peer, we may send the topic join announcement before the hello packet which contains our extensions. This is a protocol violation. This change starts sending rpcs on new stream only after we've enqued a hello packet. We use UrgentPush to ensure that it's the first one sent.
instead of requiring a message object
We need some way to give peer feedback to gossipsub if the application is using partial messages. This adds a new PeerFeedback method that lets an application modify the peer score.
9158d1c to
34e9bba
Compare
sukunrt
approved these changes
Oct 15, 2025
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 🎉
34e9bba to
d0f9caf
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements libp2p/specs#685
Commits are meaningful. Best to review commit by commit.