Skip to content

Limit the number of outstanding IWANTs per messageid and per heartbeat.#625

Open
MarcoPolo wants to merge 1 commit intomasterfrom
marco/limit-IWANT
Open

Limit the number of outstanding IWANTs per messageid and per heartbeat.#625
MarcoPolo wants to merge 1 commit intomasterfrom
marco/limit-IWANT

Conversation

@MarcoPolo
Copy link
Copy Markdown
Contributor

This fixes an issue where a node would end up making an IWANT request each time a peer advertised a message with IHAVE, resulting in many duplicates for the requesting peer.

The change is to limit the number of IWANT requests per message id, and to reset this limit every heartbeat. This allows fewer reqeusts

Fixes #606

@MarcoPolo MarcoPolo force-pushed the marco/limit-IWANT branch from 3e80860 to e2702a7 Compare July 2, 2025 23:41
Comment thread gossipsub_test.go Outdated
Copy link
Copy Markdown
Contributor

@haxxpop haxxpop left a comment

Choose a reason for hiding this comment

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

Looking good overall

This fixes an issue where a node would end up making an IWANT request
each time a peer advertised a message with IHAVE, resulting in many
duplicates for the requesting peer.

The change is to limit the number of IWANT requests per message id, and
to reset this limit every heartbeat. This allows fewer reqeusts
@MarcoPolo MarcoPolo force-pushed the marco/limit-IWANT branch from e2702a7 to f4068ea Compare July 3, 2025 18:53
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.

Sending only one IWANT at a time

2 participants