gossipsub: downscore peers on protocol violations - #735
Open
gmelodie wants to merge 2 commits into
Open
Conversation
Contributor
Author
|
@MarcoPolo I cannot tag you as a reviewer as you asked, but here you go :) |
MarcoPolo
approved these changes
Aug 30, 2026
MarcoPolo
left a comment
Contributor
There was a problem hiding this comment.
looks good. Please update the revision number at the top
|
|
||
| To prevent DoS the number of `IDONTWANT` control messages is limited to `max_idontwant_messages` per heartbeat | ||
|
|
||
| The receiver SHOULD ignore the `IDONTWANT` messages beyond `max_idontwant_messages` within a heartbeat, and SHOULD |
Contributor
There was a problem hiding this comment.
please update the revision number at the top
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #729 (comment), where @MarcoPolo asked for a separate PR.
The Topic Streams Extension says a receiver SHOULD downscore a peer for some spec violations. Other gossipsub documents state MUST and MUST NOT conditions without saying what a receiver does when a peer breaks them. This PR states the consequence once, in the extensions framework document, and applies it where an extension needs a specific rule.
gossipsub-v1.3.mdgets a new "Peer Scoring on Protocol Violations" section:P₇behavioural penalty from gossipsub v1.1.extensions.proto.The Extensions control message rules now state their consequence: a receiver SHOULD downscore a peer that sends the message after the first message on the stream, or sends more than one.
partial-messages.mdpoints at the v1.3 section, and states the one rule that needs the extension's own terms: a node that receives apartialMessagefield for a topic it did not request partial messages on SHOULD downscore the sending peer, unless the peer could have sent it before processing the node's latestSubOptsfor that topic.Two documents are left alone on purpose.
gossipsub-v1.1.mdalready owns the scoring machinery, and adding a blanket penalty rule to it is a semantic change rather than an editorial one.extensions/experimental/test-extension.mdexists to test interop, so a penalty there is noise.