gossipsub: experimental draft for large message segmentation extension#2
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
27507cd to
f909f55
Compare
|
Pushed a follow-up commit (f909f55) addressing review-readiness gaps in the draft:
Also worth flagging: a py-libp2p reference implementation tracking this draft was opened today at libp2p/py-libp2p#1323 by @shivv23. There are two minor divergences (RPC field number, default segment size) — I've responded over there with my thoughts and we should be able to converge quickly. Cross-implementation activity at this stage is exactly what the experimental-extension lifecycle is meant to surface. cc @MarcoPolo @cskiraly — would appreciate early signal on whether the experimental-extension framing is the right entry point here, or whether segmentation should target a separate protocol ID. Related to #1. |
- Change largeMessageSegmentation field from 8473921 to 6492435 in both ControlExtensions and RPC to match py-libp2p (PR libp2p/py-libp2p#1323) - Rename RPC.largeSegmentation to RPC.largeMessageSegmentation for consistency - Note py-libp2p's 256 KiB default segment size under Open Question 2
align field number and naming with py-libp2p reference implementation
|
Quick status update: merged shivv23/specs#align-field-number into the spec branch. The protobuf field number is now 6492435 (matching py-libp2p), the RPC field is consistently named largeMessageSegmentation, and Open Question 2 in the spec text now notes the py-libp2p reference default of 256 KiB segment payload under the 1 MiB ceiling. Spec and reference implementation are now aligned on field number, segment-size policy, and (per shivv23's matching update on libp2p/py-libp2p#1323) messageID derivation. |
…tion) Addresses the implementer-raised gap from py-libp2p#1323. Defines normative MUSTs/SHOULDs for per-peer caps, per-messageID memory bounds, timeouts, inconsistency handling, successful reassembly, and eviction. Promotes existing security mitigations from inferred to normative.
Summary
This is a draft exploratory spec note for transparent segmentation of large Gossipsub payloads, plus minimal protobuf registry hooks so implementations can experiment in a consistent way.
pubsub/gossipsub/extensions/experimental/large-message-segmentation.md(discussion-oriented; non-normative).pubsub/gossipsub/extensions/extensions.protowith an experimental capability flag, an RPC extension field, andLargeMessageSegmentationExtension.Context
The goal is to sketch how segmentation could sit alongside the existing extension framework and how it differs from Partial Messages (complementary use cases: “no one has the full blob yet” vs “most of the message is already held”). Peer scoring is discussed at the reconstructed message level only; retry/retransmission is explicitly out of scope here.
Notes
Related:
[DMP 2026]: Gossipsub 1.4 Large Message Handling, Specification PR and Candidate Recommendation #1