Skip to content

Add partial message support for gossipsub#433

Closed
raulk wants to merge 17 commits intolibp2p:masterfrom
raulk:feat/partial-messages
Closed

Add partial message support for gossipsub#433
raulk wants to merge 17 commits intolibp2p:masterfrom
raulk:feat/partial-messages

Conversation

@raulk
Copy link
Member

@raulk raulk commented Jan 7, 2026

Summary

This PR adds support for partial messages in gossipsub, enabling bandwidth-efficient propagation for protocols like PeerDAS that need to distribute large data in fragments.

Key changes:

  • Protobuf extension: Add PartialMessagesExtension message and requestsPartial/supportsSendingPartial fields in SubOpts
  • Core interfaces: PartialMessage interface for applications to implement, PartialMessageExtension for router integration
  • State tracking: PartialMessageState for tracking message reconstruction across partial RPCs
  • Subscription signaling: New subscribePartial() API to indicate partial message support to peers
  • Router integration: GossipRouter processes partial subscription options and forwards partial RPCs

Usage

// Create partial message extension with callback
val partialExt = PartialMessageExtension { peerId, partialRpc ->
    // Handle incoming partial RPC
}

// Build router with extension
val router = GossipRouterBuilder()
    .partialMessageExtension(partialExt)
    .build()

// Subscribe with partial support
gossip.subscribePartial(topic)

// Publish partial message
gossip.publishPartial(partialMsg, topic)

Test plan

  • Unit tests for PartialMessageState and PartialMessage
  • Interop testing with Shadow network simulator
  • Integration tests with go-libp2p-pubsub partial messages

ianopolous and others added 17 commits April 11, 2025 12:26
Quic secure transport implementation

---------

Co-authored-by: Anton Nashatyrev <anton.nashatyrev@gmail.com>
* Relay local/remote multiaddress retrieval to Transport implementations to get rid of subclass checks
* chore: add or force update .github/workflows/stale.yml

* chore: add or force update .github/workflows/generated-pr.yml
---------

Co-authored-by: Anton Nashatyrev <Nashatyrev@users.noreply.github.com>
fixed the problem of openjdk images being gone
This adds support for partial messages in gossipsub, enabling bandwidth-efficient
propagation for protocols like PeerDAS that need to distribute large data in fragments.

Key changes:
- Add PartialMessagesExtension protobuf message in rpc.proto
- Add SubOpts.requestsPartial and supportsSendingPartial fields
- Implement PartialMessage interface and PartialMessageExtension
- Add PartialMessageState for tracking message reconstruction
- Support partial subscription signaling via subscribePartial()
- Process partial subscription options in GossipRouter

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
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.

10 participants