Skip to content

Gossipsub Interoperability: py-libp2p ↔ go-libp2p #947

@seetadev

Description

@seetadev

Description

We need to ensure that the py-libp2p Gossipsub implementation can interoperate seamlessly with other libp2p implementations, starting with go-libp2p.

This will help us verify that:

  • ✅ Message propagation works consistently
  • ✅ Topic subscription is aligned across stacks
  • ✅ Peer scoring and mesh formation behave as expected
  • ✅ Protocol negotiation correctly follows the spec

Achieving this will build confidence that py-libp2p nodes can participate in heterogeneous libp2p networks.

Motivation

  • Real-world networks are multi-language. Interoperability ensures py-libp2p nodes can join production libp2p swarms alongside go, js, and rust implementations.
  • go-libp2p is the reference implementation. Compatibility here gives us a solid foundation.
  • Future-proofing. This work lays the groundwork for supporting GossipSub 1.2 / 2.0 and strengthens cross-stack testing coverage.
  • Ecosystem growth. Developers can confidently build applications with mixed libp2p stacks.

Current Implementation Plan

1. Minimal Interop Test Environment

  • Run one py-libp2p Gossipsub node
  • Run one go-libp2p Gossipsub node
  • Establish a connection and exchange messages across a shared topic

2. Protocol Negotiation

  • Confirm py-libp2p correctly negotiates /meshsub/1.1.0 (or later) with go-libp2p

3. Message Propagation & Subscription Validation

  • Ensure py-libp2p nodes can subscribe, publish, and receive messages from go-libp2p nodes
  • Verify peer discovery and mesh formation across both stacks

4. Cross-Implementation Testing Framework

  • Add automated interop tests that can later be extended to js-libp2p and rust-libp2p
  • Consider adding CI jobs that spin up minimal multi-language clusters

5. Documentation & Reporting

  • Write clear instructions for running interop tests locally
  • Track and document any inconsistencies in protocol behavior or message handling

Next Steps

  • Kick off the initial py-libp2p ↔ go-libp2p interop test
  • Collect findings and fix any compatibility issues
  • Expand coverage to js-libp2p and rust-libp2p after baseline validation
  • Add test artifacts (scripts, Docker configs, logs) for reproducibility

Are you planning to do it yourself in a pull request?

Maybe. Open to collaboration and contributions from others who want to join this effort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions