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
- 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.
- 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
Description
Add a new interoperability test suite that validates
py-libp2pagainstjs-libp2pusing the Echo protocol(/echo/1.0.0).Motivation
As part of the Universal Connectivity initiative (2026 Roadmap),
py-libp2pis 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 Implement go-libp2p interop tests (echo protocol) #1136, Implement the rust-libp2p interop test #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
tests/interop/js_libp2p/js_node/src/echo_server.js.js-libp2pnode listening on TCP that handles/echo/1.0.0by piping the stream back to the source.tests/interop/js_libp2p/test_js_echo.py.pytestfixture to manage the JS daemon lifecycle (similar to the existing Nim implementation).trioto dial the JS peer and verify payload integrity.Open questions
None.
Are you planning to do it yourself in a pull request ?
Yes