Skip to content

feat(gossipsub): add v1.4 large-message wire types and capability flag - #6599

Open
MavenRain wants to merge 3 commits into
libp2p:masterfrom
MavenRain:feat/gossipsub-v14-wire-capability
Open

feat(gossipsub): add v1.4 large-message wire types and capability flag#6599
MavenRain wants to merge 3 commits into
libp2p:masterfrom
MavenRain:feat/gossipsub-v14-wire-capability

Conversation

@MavenRain

@MavenRain MavenRain commented Aug 31, 2026

Copy link
Copy Markdown

Description

Related #6597.

First incremental step for the GossipSub v1.4 large message extension (spec: libp2p/specs#654, wire format and design document: libp2p/specs#720). This PR adds the wire types and capability detection only:

  • Protobuf additions, with field numbers matching the draft spec: largeMessageHandling flag in ControlExtensions, ControlPreamble and ControlImReceiving control messages, and LargeMessageFragment in RPC.
  • Typed decoding for the new frames. Incoming v1.4 frames decode cleanly and are ignored by the behaviour for now.
  • A default-off config option. When enabled, the extensions advertisement on connect includes largeMessageHandling, and per-peer support is tracked the same way partial-message support is.

Default behavior does not change. Peers without v1.4 keep today's behavior in every configuration.

Follow-up PRs, per the plan in #6597: fragmentation and reassembly with bounded buffers, fragment forwarding before full reassembly, and size-gated IMRECEIVING duplicate suppression.

AI Assistance Disclosure

Tools used (required — write none if no AI was used): Claude Code

Attestation (required):

  • I have read every line of this diff, understand what it does, and can explain it in review.

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

…ection

First incremental step for the GossipSub v1.4 large message extension
(spec: libp2p/specs#654, wire format: libp2p/specs#720), per the plan in
issue libp2p#6597.

Adds the protobuf wire types with field numbers from the draft spec
(largeMessageHandling extensions flag, ControlPreamble, ControlImReceiving,
LargeMessageFragment), the typed decode layer, and per-peer capability
tracking through the v1.3 extensions handshake, behind a default-off
config option.  Incoming v1.4 frames decode cleanly and are ignored by
the behaviour.  Default behavior does not change in any configuration.

Related: libp2p#6597
Signed-off-by: Onyeka Obi <softwareengineerasaservant@isurvivable.cv>
@MavenRain MavenRain changed the title feat(gossipsub): add v1.4 large-message wire types and capability detection feat(gossipsub): add v1.4 large-message wire types and capability flag Aug 31, 2026
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.

1 participant