Skip to content

docs: follow EthLib's open report to libp2p #3521

Not planned

Description

@tcoratger

EthLib's gossipsub work found that libp2p never says how one gossipsub message is separated from the next on a stream; the question is open upstream, and this issue follows it until EthLib has reacted to the answer.
Size: S

The problem

Two gossipsub peers exchange messages called RPCs over one long-lived stream.
An RPC is a protobuf message, and protobuf messages are not self-delimiting: their bytes do not say where they end.
EthLib decodes one RPC from its bytes, but cannot specify how a node reads a stream of them, because the source does not say.
libp2p/specs#747 asks.

The idea

  • libp2p/specs#747: is each RPC prefixed with its length as an unsigned varint, as other libp2p protocols state, and how does that relate to the 1 MiB message limit?
    • Answered: specify the stream reader with the stated framing, and prove that writing then reading a list of RPCs gives the list back.
    • Closed with no answer: record in SOUNDNESS.md that EthLib specifies single RPCs only.
    • libp2p/specs#754 proposes the answer: each RPC on a stream is prefixed with its length as an unsigned varint. When it merges, specify the stream reader with that framing.

Example

A peer sends two RPCs, each subscribing to topic a; each one is the 7 bytes 0a 05 08 01 12 01 61.
Read as one protobuf, the 14 bytes are a single RPC with two subscriptions.
So without a framing rule, the receiver cannot tell one RPC from two.

Done when

  • The box is ticked with the EthLib PR that reacted, or with the SOUNDNESS.md entry that records the gap.

Activity

  1. added
    type: docs
    on Nov 20, 2026
  2. tcoratger commented on Nov 22, 2026

    @tcoratger
    CollaboratorAuthor

    From the trace of the gossipsub router (#3971): libp2p/specs#748 (two broken section links in the pubsub specs).

  3. tcoratger commented on Nov 22, 2026

    @tcoratger
    CollaboratorAuthor

    From the trace of Noise and peer IDs (#3978): libp2p/specs#749 (links to a removed section of noise-libp2p) and libp2p/specs#750 (peer-ids counted two requirements and listed four).

  4. tcoratger commented on Nov 22, 2026

    @tcoratger
    CollaboratorAuthor

    From the trace of the muxers (#3979): libp2p/specs#751 (the yamux initial window in two units, and typos).

  5. tcoratger commented on Nov 22, 2026

    @tcoratger
    CollaboratorAuthor

    From the trace of the TLS messages and certificates (#3983): libp2p/specs#752 (two typos in tls.md).

  6. tcoratger commented on Nov 22, 2026

    @tcoratger
    CollaboratorAuthor

    From the traces of gossipsub (#3971) and the muxers (#3979): libp2p/specs#753 (flood publishing reaches a peer at the publish threshold) and multiformats/multistream-select#26 (two typos).

  7. tcoratger commented on Nov 24, 2026

    @tcoratger
    CollaboratorAuthor

    Status on 2026-11-24: libp2p/specs#747 and its answer #754 are still open, so the stream reader waits. Six other reports merged between 2026-11-22 and 2026-11-23: #748 (pubsub links), #749 (noise links), #750 (peer-ids count), #751 (yamux unit), #752 (tls typos) and #753 (flood publishing at the threshold). EthLib's rule already includes a peer at the publish threshold. The yamux note on 256KiB against 256KB is now stale; a follow-up PR moves the yamux citation to libp2p/specs 1a084b6 and drops it. multiformats/multistream-select#26 is open.

  8. tcoratger commented on Nov 25, 2026

    @tcoratger
    CollaboratorAuthor

    Status on 2026-11-25: libp2p/specs#747 and its answer #754 are still open, and so is multiformats/multistream-select#26. The stream reader keeps waiting.

  9. tcoratger commented on Nov 26, 2026

    @tcoratger
    CollaboratorAuthor

    Folded into #3632, which now tracks every open upstream report in one checklist, with EthLib's action for each outcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    networking: gossiptype: docs

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions