Skip to content

feat(gossipsub): report low score peers #575

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
wants to merge 5 commits into
base: sigp-gossipsub
Choose a base branch
from

Conversation

jxs
Copy link
Member

@jxs jxs commented Jul 21, 2025

Description

Notes & open questions

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

@jxs jxs force-pushed the sigp-gossipsub branch from a174727 to 2a726cd Compare July 21, 2025 14:46
@jxs jxs changed the title Report lowscore peers feat(gossipsub): report low score peers Jul 21, 2025
@@ -164,6 +164,8 @@ pub enum Event {
/// The types and amounts of failed messages that are occurring for this peer.
failed_messages: FailedMessages,
},
/// A Peer is below the score threshold.
LowScorePeers { peer_ids: Vec<PeerId> },

Choose a reason for hiding this comment

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

How about BelowThresholdPeers?

Copy link
Member Author

Choose a reason for hiding this comment

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

yup, makes sense, Thanks Diego

let mut to_remove_peers = Vec::new();
for peer_id in peers.iter() {
// report peers below the score report threshold.
let mut removed_peers = 0;

Choose a reason for hiding this comment

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

Is it a good idea to change to_remove_peer in this PR? It doesn't seem related

Copy link
Member Author

Choose a reason for hiding this comment

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

it's not directly related, but since I am touching this code might as well take the opportunity to cleanup this part

@jxs jxs deleted the branch sigp:sigp-gossipsub August 5, 2025 14:52
@jxs jxs closed this Aug 5, 2025
@jxs jxs reopened this Aug 9, 2025
@jxs jxs force-pushed the report-lowscore-peers branch from f14936a to 397c09c Compare August 13, 2025 15:40
@jxs jxs force-pushed the report-lowscore-peers branch from 397c09c to 4b04c2d Compare August 13, 2025 15:41
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.

2 participants