-
Notifications
You must be signed in to change notification settings - Fork 8
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
base: sigp-gossipsub
Are you sure you want to change the base?
Conversation
protocols/gossipsub/src/behaviour.rs
Outdated
@@ -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> }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about BelowThresholdPeers
?
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
f14936a
to
397c09c
Compare
397c09c
to
4b04c2d
Compare
Description
Notes & open questions
Change checklist