libp2p / libp2p/py-libp2p

Feature: Implement js-libp2p Interop Tests for Echo Protocol

Open
#1,155 3 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

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:

  • nim-libp2p: Echo protocol tests.
  • go-libp2p & rust-libp2p: Active work on Ping/Echo (Issues #1136, #1142).

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

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 comparing the existing Nim interoperability implementation, then inspect the JS entry point at tests/interop/js_libp2p/js_node/src/echo_server.js and the Python harness at tests/interop/js_libp2p/test_js_echo.py. Add the JS daemon and pytest/trio lifecycle test so py-libp2p can dial /echo/1.0.0 and verify payload integrity through the echoed stream.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, python
Domain
networking, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.