Implement go-libp2p interop tests (echo protocol over QUIC)#1138
Implement go-libp2p interop tests (echo protocol over QUIC)#1138Jineshbansal wants to merge 2 commits intolibp2p:mainfrom
Conversation
|
@Jineshbansal : Hi Jinesh. Wish to share that for all interop related tasks, please work at https://github.com/libp2p/test-plans. In any case, we should avoid having .sh and .go files in py-libp2p main library. As discussed in the maintainer's call, kindly collaborate with @sumanjeet0012 and @acul71 , who will help you in taking initiatives on interop suite front. CCing @pacrob. Please also study the documentation added by @dhuseby. |
|
Hi @seetadev , Thanks for the feedback. I actually followed the existing pattern from nim_libp2p which already has .nim and .sh files in py-libp2p. That said , I'll collaborate with @sumanjeet0012 and @acul71 on moving this work in test-plans repo. |
|
@Jineshbansal : Hi Jinesh — thanks for opening this and for the very clear, well-structured proposal 🙌 A few important alignment pointers to help you get this landed smoothly, especially since you’re a new contributor: 📍 Where interop tests should liveEven though there’s currently a placeholder under All cross-implementation interop tests (Go ↔ Python, Rust ↔ Python, JS ↔ Python, etc.) should live in the canonical repo: That repo is where:
Please follow the structure and conventions documented here: So the Go echo server, build scripts, pytest fixtures, and test flow you outlined should be implemented under 📦 Scope of py-libp2p PRsPRs to
If, while implementing the Go Echo interop test, you uncover:
…then a focused PR to py-libp2p is absolutely appropriate. Otherwise, the interop logic itself should stay in 🧭 On your proposed approach
From a roadmap perspective, this aligns very well with the Universal Connectivity / v0.6.0 goals. 🤝 Maintainers sync (recommended for new contributors)Since you’re new to the libp2p ecosystem, please try to join the libp2p maintainers meeting every Thursday.
Overall, this is a strong and well-motivated issue, and exactly the kind of contribution we want to encourage. |
|
Closing, to be moved to test-plans. |
Fixes #1136
What was wrong?
The tests/interop/go_libp2p/ directory only contained a placeholder test that didn't verify any actual interoperability with go-libp2p. This meant py-libp2p had no automated way to verify it can communicate with the reference libp2p implementation (go-libp2p) .
Related: Following the pattern established by nim-libp2p interop tests
How was it fixed?
Implemented a complete interop testing suite that verifies py-libp2p can communicate with go-libp2p over QUIC transport using the echo protocol (
/echo/1.0.0).Components Added
Go Echo Server (
go_echo_server.goBuild Script (
scripts/setup_go_echo.sh)Test Fixtures (
conftest.py)Test Suite (
test_echo_interop.py)Tests Implemented
test_basic_echotest_echo_empty_stringtest_echo_large_messagetest_echo_unicodetest_echo_multiple_sequentialtest_multiple_connectionsTesting
All tests passing
Screenshot: Test Results
Manual verification