Skip to content

Gossipsub: make partial message part forwarding normative - #737

Open
MavenRain wants to merge 5 commits into
libp2p:masterfrom
MavenRain:feat/partial-messages-normative-forwarding
Open

Gossipsub: make partial message part forwarding normative#737
MavenRain wants to merge 5 commits into
libp2p:masterfrom
MavenRain:feat/partial-messages-normative-forwarding

Conversation

@MavenRain

Copy link
Copy Markdown

Summary

The partial-messages spec mentions forwarding parts before full receipt only as a motivation-level possibility ("partial messages could also be forwarded"). This PR promotes that behavior to normative requirements and bumps the revision to r1.

The new Forwarding Message Parts section specifies:

  • A part that the application can validate on its own is individually verifiable.
  • Applications SHOULD validate individually verifiable parts on receipt and SHOULD forward validated parts to mesh peers that requested partial messages, without waiting for the full message.
  • Applications MUST NOT forward a part that failed validation.
  • Implementations MUST accept a partial publish for a group before the full message is known, MUST accept repeated publishes for the same group as more parts arrive, and SHOULD deduplicate per peer so repeated publishes only send what a peer lacks.
  • Parts that are not individually verifiable MUST NOT be forwarded before the full message validates.

The Motivation bullet now points at the new section instead of the "could" phrasing.

Why normative, and why now

This codifies behavior that is already deployed rather than proposing new behavior:

  • The rust-libp2p implementation of this extension (feat(gossipsub): implement partial messages extension rust-libp2p#6275) places no completeness requirement on publish_partial: it caches the application's partial, supports incremental re-publish of a growing group, and skips sends whose metadata adds nothing.
  • Lighthouse's cell dissemination (Cell Dissemination (Partial messages) sigp/lighthouse#8314, merged 2026-04-23) uses exactly this path in production code: every merge that adds KZG-verified cells to a still-incomplete column immediately republishes the incomplete column to the network (PartialDataColumnAssembler::merge_partials returns updated_partials, which gossip_methods publishes via publish_partial).

Making the forwarding rule normative gives other implementations and applications a clear interop target for the store-and-forward latency win that motivated the extension, and pins down the safety condition (individual verifiability plus validation before forwarding) that the deployed code already honors.

Relationship to the v1.4 work

Complementary to #654 / #720: those define fragmentation and pipelined relay for opaque payloads at the protocol layer, while this change covers applications with application-defined verifiable parts on the shipped v1.3 partial-messages extension.

Promote forwarding of individually verifiable message parts from a
motivation-level possibility to normative requirements, and bump the
partial-messages spec revision to r1.

The new Forwarding Message Parts section specifies that applications
SHOULD validate and forward individually verifiable parts before the
full message is known, MUST NOT forward parts that failed validation,
and that implementations MUST accept incremental partial publishes for
a group.  This codifies behavior that is already deployed: the
rust-libp2p implementation (libp2p/rust-libp2p#6275) places no
completeness requirement on published partials, and Lighthouse
(sigp/lighthouse#8314) validates and republishes incomplete data
columns as cells arrive.

Signed-off-by: Onyeka Obi <softwareengineerasaservant@isurvivable.cv>
Comment thread pubsub/gossipsub/partial-messages.md Outdated
Comment thread pubsub/gossipsub/partial-messages.md Outdated
Comment thread pubsub/gossipsub/partial-messages.md Outdated
Comment thread pubsub/gossipsub/partial-messages.md Outdated
Comment thread pubsub/gossipsub/partial-messages.md Outdated
Comment thread pubsub/gossipsub/partial-messages.md Outdated
Address the first review round on the normative part forwarding
section of the partial-messages spec:

- Rename the section to "Forwarding Message Parts Without Knowing
  Full Message" and update the Motivation link to match.
- Soften the Motivation bullet from "allowing us to reduce" to
  "helping to reduce" the store-and-forward delay.
- Drop the paragraph that defined individually verifiable parts; the
  Terms section already defines a Message Part as the smallest
  verifiable part of a message.
- Fold the "cannot be individually validated" case into the single
  MUST NOT forward rule and remove the now redundant closing
  paragraph.
- Replace "track per-peer state" with "track peer state" and add a
  concrete description of that state: for each peer and Group ID an
  implementation keeps the parts it believes the peer has and the
  partsMetadata it last sent, sends only the difference on repeated
  publishes, and drops both records after a bounded number of
  heartbeats.  This matches the rust-libp2p implementation
  (libp2p/rust-libp2p#6275).

Signed-off-by: Onyeka Obi <softwareengineerasaservant@isurvivable.cv>
Comment thread pubsub/gossipsub/partial-messages.md Outdated
Co-authored-by: Gabriel Cruz <8129788+gmelodie@users.noreply.github.com>
@MavenRain
MavenRain requested a review from gmelodie September 3, 2026 12:32

@gmelodie gmelodie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Comment thread pubsub/gossipsub/partial-messages.md Outdated
Comment thread pubsub/gossipsub/partial-messages.md Outdated
MavenRain and others added 2 commits September 8, 2026 16:53
Co-authored-by: richΛrd <info@richardramos.me>
Co-authored-by: richΛrd <info@richardramos.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

3 participants