libp2p / libp2p/py-libp2p

Interoperability between js-libp2p and py-libp2p focused on ping protocol

Open
#630 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement feature help wanted Interoperability
Dominant language
Python
Stars
624
Forks
256
Avg merge
1d 34m
Merged PRs (30d)
47

Description

Description

This issue tracks a cross-language interoperability test between py-libp2p and js-libp2p using the /ipfs/ping/1.0.0 protocol. The goal is to verify that a Python libp2p node can connect to a JavaScript libp2p node over TCP/WebSockets, negotiate the ping protocol, and successfully exchange a 32-byte payload.

This serves as a foundational test for validating protocol compliance, stream handling, and transport compatibility between the two implementations.

Motivation

libp2p is designed to be a modular, cross-platform networking stack that works across programming languages and runtimes. However, real-world interoperability between implementations (e.g., JavaScript and Python) requires active validation and testing.

This project aims to:

  • Ensure compatibility between py-libp2p and js-libp2p on the protocol, transport, and stream levels.
  • Provide a minimal working example to demonstrate cross-language communication using a well-defined protocol (/ipfs/ping/1.0.0).
  • Lay the groundwork for broader protocol support (e.g., identify, pubsub, DHT) and more advanced scenarios like NAT traversal and QUIC/WebRTC transports.
  • Support the libp2p community with a reproducible test suite that helps debug and verify cross-stack behavior.
Current Implementation
  • The py-libp2p repository is under active development and includes support for:

    • Basic host and peer identity setup
    • TCP transport (partial WebSocket support may be experimental or missing)
    • Stream multiplexing using mplex
    • Protocol negotiation via multistream-select
    • Preliminary /ipfs/ping/1.0.0 protocol logic (may require additional integration)
  • The js-libp2p stack is mature and fully supports:

    • Multiple transports: TCP, WebSockets, WebRTC
    • Stream multiplexers: mplex, yamux
    • Protocol negotiation and stream handlers
    • A built-in /ipfs/ping/1.0.0 responder

Currently, there is no integrated setup or test that connects a py-libp2p node with a js-libp2p node for pinging. Each stack operates in isolation, and interoperability is unverified.

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

Maybe

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

Start by reviewing the py-libp2p host and peer identity setup, TCP/WebSocket transport support, mplex stream multiplexing, multistream-select negotiation, and preliminary ping implementation described in the issue. Define a reproducible integration test with js-libp2p that connects the nodes and exchanges the 32-byte /ipfs/ping/1.0.0 payload over a supported transport.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python
Domain
distributed-systems, networking, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.