feat(gossipsub): add v1.4 large-message wire types and capability flag - #6599
Open
MavenRain wants to merge 3 commits into
Open
feat(gossipsub): add v1.4 large-message wire types and capability flag#6599MavenRain wants to merge 3 commits into
MavenRain wants to merge 3 commits into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
largeMessageHandlingflag inControlExtensions,ControlPreambleandControlImReceivingcontrol messages, andLargeMessageFragmentinRPC.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
noneif no AI was used): Claude CodeAttestation (required):
Notes & open questions
extensions.protoon master. If the spec review renumbers fields before merge, this PR should be updated to match.Change checklist