Skip to content

fix(gossipsub): Changed unsubscribe_backoff to expect Duration - #6124

Merged
mergify[bot] merged 8 commits into
libp2p:masterfrom
sirandreww-starkware:unsubscribe_backoff_use_duration
Aug 14, 2025
Merged

fix(gossipsub): Changed unsubscribe_backoff to expect Duration#6124
mergify[bot] merged 8 commits into
libp2p:masterfrom
sirandreww-starkware:unsubscribe_backoff_use_duration

Conversation

@sirandreww-starkware

@sirandreww-starkware sirandreww-starkware commented Aug 10, 2025

Copy link
Copy Markdown
Contributor

Description

Gossipsub config back-off takes a duration as a number of seconds instead of std::time::Duration, this PR fixes that.

Fixes #6120

Notes & open questions

Allows using sub second and more specific unsubscribe_backoff times

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

@AgeManning AgeManning left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This change looks good to me.

Although you have linked an issue, can you please add a description and motivation for this PR.

This PR is what is primarily linked to the squashed commit and is what users will lookup in the history. All our PRs should have an accurate description and motivation.

@AgeManning

AgeManning commented Aug 10, 2025

Copy link
Copy Markdown
Contributor

Also, we need to modify the CHANGELOG in gossipsub, which is partially why CI is failing.

Also this modifies the user-facing API and will need a version update to include it.

@AgeManning AgeManning left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me. Will need a version bump to handle the API change.

@elenaf9 elenaf9 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Will need a version bump to handle the API change.

v0.50.0 is not released yet, so no version bump is needed. Only the changelog entry needs to be fixed.

Comment thread protocols/gossipsub/CHANGELOG.md Outdated

@elenaf9 elenaf9 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@jxs jxs added the send-it label Aug 14, 2025
@mergify
mergify Bot merged commit 172bbed into libp2p:master Aug 14, 2025
70 checks passed
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.

gossipsub config unsubscribe_backoff should expect a Duration

5 participants