Feature: Implement js-libp2p Interop Tests for Echo Protocol
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
- 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-libp2pnode listening on TCP that handles/echo/1.0.0by piping the stream back to the source.
- Python Test Harness:
- Create a new test file at
tests/interop/js_libp2p/test_js_echo.py. - Implement a
pytestfixture to manage the JS daemon lifecycle (similar to the existing Nim implementation). - Implement the test function using
trioto 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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