libp2p / libp2p/specs

extensions: misbehaving cases

Open
#705 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
1.8k
Forks
320
Avg merge
11d 15h
Merged PRs (30d)
1

Description

specification for gossipsub extensions, "test extension" and partial messages extension are not very well describing what should be considered as misbehavior (penalty).

for example:
- > If a peer supports any extension, the Extensions control message MUST be included in the first message on the stream
- if an extension control message is sent, but it is not the first message, is it misbehavior?

- > Extensions control message MUST NOT be sent more than once
- go-libp2p identifies this case as misbehavior

- > A node MUST omit the partialMessage field of the PartialMessagesExtension message when sending a message to this peer. In other words, it MUST NOT send this peer encoded partialMessage data since it did not request it.
- not clear if this should be misbehavior

in general, it would be better if specs had a better way of specifying what cases should be considered as misbehavior. for example, all documents (in gossipsub) could have an additional section where all misbehavior cases are listed.

---

edit: there are some cases when `MUST` is not use in spec. for example `partialMessage` rpc has `groupID` and `topic` fields which are mandatory for extensions to be set, but since they are optional (on protobuf) extensions should do senity checks on these fields and when those are not set, peer that sent message should be considered as misbehaving?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the gossipsub extensions specification, especially the “test extension” and PartialMessagesExtension rules quoted in the issue. Identify which violations, including repeated or misplaced control messages and missing extension fields, should count as misbehavior. Done means the specification explicitly lists these cases and their penalties.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.