libp2p/py-libp2p

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

オープン

#630 opened on 2025/05/29

 (2 件のコメント) (2 件のリアクション) (0 人の担当者)Python (238 件のフォーク)auto 404
Interoperabilityenhancementfeaturehelp wanted

Repository metrics

Stars
 (618 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド