Skip to content

Feature: Implement js-libp2p Interop Tests for Echo Protocol #1155

Description

Description

Add a new interoperability test suite that validates py-libp2p against js-libp2p using the Echo protocol (/echo/1.0.0).

Motivation

As part of the Universal Connectivity initiative (2026 Roadmap), py-libp2p is expanding its interoperability coverage to ensure parity with other stack implementations.

Currently, the repository has:

However, we are missing a dedicated Echo Protocol test for js-libp2p. Validating the Echo protocol is critical because it tests full bidirectional stream read/write capabilities (muxing, window management, payload integrity), whereas simple Ping tests often miss subtle stream handling bugs (e.g., Yamux hangs).

Requirements

  1. JS Echo Server:
  • Create a new script at tests/interop/js_libp2p/js_node/src/echo_server.js.
  • This script should spin up a js-libp2p node listening on TCP that handles /echo/1.0.0 by piping the stream back to the source.
  1. Python Test Harness:
  • Create a new test file at tests/interop/js_libp2p/test_js_echo.py.
  • Implement a pytest fixture to manage the JS daemon lifecycle (similar to the existing Nim implementation).
  • Implement the test function using trio to dial the JS peer and verify payload integrity.

Open questions

None.

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

Yes

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