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(gossipsub): introduce backpressure #5595

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jxs
Copy link
Member

@jxs jxs commented Sep 10, 2024

Description

superseeds #4914 with some changes and improvements, namely:

  • introduce a Delay for Forward and Publish messages, messages that take more than the configured delay to be sent are discarded
  • introduce scoring and penalize slow peers
  • remove control pool
  • report slow peers with the number of failed messages

@jxs jxs force-pushed the impl-gossipsub-backpressure-2 branch from 6d406e1 to 5e349f5 Compare September 10, 2024 22:44
@jxs jxs force-pushed the impl-gossipsub-backpressure-2 branch from 5e349f5 to 00cde64 Compare September 10, 2024 22:52
Copy link
Contributor

@ackintosh ackintosh left a comment

Choose a reason for hiding this comment

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

I’ve left a few small comments.

protocols/gossipsub/src/behaviour.rs Outdated Show resolved Hide resolved
protocols/gossipsub/src/peer_score.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@guillaumemichel guillaumemichel left a comment

Choose a reason for hiding this comment

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

It would be great to add new tests for the introduced backpressure

protocols/gossipsub/src/peer_score/params.rs Show resolved Hide resolved
protocols/gossipsub/src/config.rs Show resolved Hide resolved
protocols/gossipsub/src/config.rs Show resolved Hide resolved
protocols/gossipsub/src/config.rs Show resolved Hide resolved
protocols/gossipsub/src/types.rs Outdated Show resolved Hide resolved
protocols/gossipsub/src/types.rs Show resolved Hide resolved
protocols/gossipsub/src/types.rs Show resolved Hide resolved
protocols/gossipsub/src/types.rs Outdated Show resolved Hide resolved
protocols/gossipsub/src/peer_score.rs Show resolved Hide resolved
protocols/gossipsub/src/behaviour.rs Show resolved Hide resolved
Copy link
Member Author

@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 for the reviews Akihito and Gui!

protocols/gossipsub/src/behaviour.rs Outdated Show resolved Hide resolved
protocols/gossipsub/src/peer_score.rs Outdated Show resolved Hide resolved
protocols/gossipsub/src/behaviour.rs Show resolved Hide resolved
protocols/gossipsub/src/config.rs Show resolved Hide resolved
protocols/gossipsub/src/types.rs Show resolved Hide resolved
protocols/gossipsub/src/types.rs Outdated Show resolved Hide resolved
protocols/gossipsub/src/types.rs Show resolved Hide resolved
protocols/gossipsub/src/types.rs Outdated Show resolved Hide resolved
protocols/gossipsub/src/types.rs Outdated Show resolved Hide resolved
protocols/gossipsub/src/types.rs Outdated Show resolved Hide resolved
@jxs jxs force-pushed the impl-gossipsub-backpressure-2 branch from 8564d5e to 887fe07 Compare October 31, 2024 10:27
Copy link
Member Author

@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.

It would be great to add new tests for the introduced backpressure

yup for sure thanks for the suggestion Gui! Added some tests

@jxs jxs force-pushed the impl-gossipsub-backpressure-2 branch from ee51578 to ec0e0b4 Compare November 4, 2024 10:29
Copy link
Contributor

@ackintosh ackintosh left a comment

Choose a reason for hiding this comment

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

Thanks João, LGTM!

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.

4 participants