libp2p / libp2p/py-libp2p

Gossipsub Interoperability: py-libp2p ↔ go-libp2p

Open
#947 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
624
Forks
256
Avg merge
1d 34m
Merged PRs (30d)
47

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or existing tests are identified. Begin with the proposed minimal py-libp2p and go-libp2p environment, then verify protocol negotiation, shared-topic subscription, publishing, receiving, peer discovery, and mesh formation. Done requires reproducible automated interop tests, CI coverage if feasible, and documented setup and findings.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, python
Domain
distributed-systems, networking, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.