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

feat: broadcasting idontwant for published messages #5773

Merged
merged 11 commits into from
Jan 4, 2025

Conversation

hopinheimer
Copy link
Contributor

@hopinheimer hopinheimer commented Dec 29, 2024

Description

This PR introduces an optimisation to preemptively broadcast IDONTWANT for published messages, preventing redundant downloads of the same message received over gossip. This feature is opt-in and respects the existing idontwant_message_size_threshold. By default, IDONTWANT messages will only be sent for published messages larger than 1000 bytes.

reference PRs:
spec

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@dariusc93 dariusc93 requested a review from jxs December 29, 2024 23:01
jxs
jxs previously approved these changes Jan 4, 2025
Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

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

Thanks!

protocols/gossipsub/CHANGELOG.md Outdated Show resolved Hide resolved
protocols/gossipsub/src/config.rs Outdated Show resolved Hide resolved
protocols/gossipsub/src/config.rs Outdated Show resolved Hide resolved
@jxs jxs added the send-it label Jan 4, 2025
@mergify mergify bot dismissed jxs’s stale review January 4, 2025 21:44

Approvals have been dismissed because the PR was updated after the send-it label was applied.

@mergify mergify bot merged commit 7e3086d into libp2p:master Jan 4, 2025
71 checks passed
jxs pushed a commit to jxs/rust-libp2p that referenced this pull request Jan 6, 2025
This PR introduces an optimisation to preemptively broadcast `IDONTWANT` for published messages, preventing redundant downloads of the same message received over gossip. This feature is opt-in and respects the existing `idontwant_message_size_threshold`. By default, `IDONTWANT` messages will only be sent for published messages larger than 1000 bytes.

reference PRs:
[spec](libp2p/specs#642)

Pull-Request: libp2p#5773.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants