Replies: 1 comment
-
11 Nov 2025Section 1 - TLDRTotal Tests: 141 Quick Stats by Implementation
Section 2 - Tests SummaryBy Implementation
By Configuration
By Direction
Section 3 - All Failed TestsTotal failed tests: 13
chromium-rust-v0.53 (1 failures)
go-v0.40 (1 failures)
go-v0.41 (1 failures)
go-v0.42 (1 failures)
go-v0.43 (1 failures)
go-v0.44 (1 failures)
go-v0.45 (1 failures)
jvm-v1.2 (6 failures)
Section 4 - TODO to FixPriority 1: High-Impact Issuesjvm-v1.2 - 6 failures
Suggested Action: Investigate JVM interop issues - multiple transport failures Priority 2: Configuration-Specific Issuesquic-v1 - 7 failures
Suggested Action: Python QUIC listener issue - affects all implementations ws, noise, mplex - 3 failures
Suggested Action: Investigate WebSocket-specific issues ws, noise, yamux - 2 failures
Suggested Action: Investigate WebSocket-specific issues Priority 3: Direction-Specific IssuesPython listener - 11 failures
Suggested Action: Python listener issues - check connection handling Python dialer - 2 failures
Suggested Action: Python dialer issues - check connection establishment Individual FailuresTests that don't fit into the above patterns: (All failures fit into the above patterns) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Transport-Interop Python Implementation - Complete Guide
Last review: August 2025
This document provides a comprehensive overview of the Python libp2p ping implementation for transport-interop testing, consolidating information from all documentation files.
Table of Contents
Overview
The Python libp2p ping implementation enables interoperability testing between different libp2p implementations. It supports:
Protocol Configuration
Where Protocol Lists Are Specified
The Python protocol list (TCP, Noise, Yamux, Mplex) is specified in two main locations:
1. Framework Configuration:
versionsInput.jsonLocation:
/transport-interop/versionsInput.json{ "id": "python-v0.2.9", "transports": [ "tcp" ], "secureChannels": [ "noise", "plaintext" ], "muxers": [ "mplex", "yamux" ] }This is the central configuration file that defines all supported protocols for each implementation. The framework uses this to:
2. Runtime Validation:
ping_test.pyLocation:
/transport-interop/impl/python/v0.2/ping_test.pyThis provides runtime validation to ensure only supported protocols are used.
Current Python Protocol Support
["tcp"]["noise", "plaintext"]["mplex", "yamux"]Comparison with Other Implementations
Python has limited transport support compared to other implementations:
["tcp", "ws", "wss", "quic-v1", "webtransport", "webrtc-direct"]["ws", "tcp", "quic-v1", "webrtc-direct"]["tcp", "ws", "wss"]["webtransport", "wss", "webrtc-direct", "webrtc"]["tcp"]← Only TCPAdding New Protocols
To add new protocols to Python, you would need to:
versionsInput.json: Add new protocols to the Python configurationping_test.py: Add validation and implementation for new protocolsThe protocol list is intentionally limited in Python compared to other implementations, likely due to the current capabilities of the py-libp2p library.
Architecture
Component Roles
Prerequisites
System Requirements
Docker Configuration
Network Pool Configuration
If you encounter "all predefined address pools have been fully subnetted" error:
Then restart Docker:
sudo systemctl restart dockerQuick Start
1. Build Python Implementation
cd transport-interop/impl/python/v0.2 make all2. Start Redis
3. Test Listener (Terminal 1)
docker run --rm --network host \ -e transport=tcp -e muxer=mplex -e security=noise \ -e is_dialer=false -e ip="0.0.0.0" \ -e redis_addr=localhost:6379 -e test_timeout_seconds=15 \ python-v0.2.9-git python ping_test.py4. Test Dialer (Terminal 2)
5. Cleanup
docker stop redis-test && docker rm redis-testTesting Methods
Manual Testing
Basic Ping/Pong Test
Multiple Test Runs
Automated Testing
Framework Setup
Test Python Implementation
Cross-Implementation Testing
Cross-Implementation Testing
Python vs JS-libp2p
Supported Combinations
Configuration
Environment Variables
Python Implementation
Automated Testing
Makefile Targets
Redis Coordination
Purpose
Redis serves as a coordination mechanism between dialer and listener components, enabling:
Process Flow
Listener Starts: Creates libp2p host, publishes address to Redis
Dialer Starts: Retrieves listener address from Redis
Connection: Dialer connects to listener using retrieved address
Redis Commands
Data Structure
Troubleshooting
Common Issues
Issue 1: Redis Connection Failed
Symptoms:
Error: Error -2 connecting to redis:6379Solutions:
Issue 2: Docker Image Not Found
Symptoms:
Unable to find image 'python-v0.2.9-git'Solutions:
Issue 3: Port Already in Use
Symptoms:
Address already in useerrorsSolutions:
Issue 4: Timeout Waiting for Listener
Symptoms:
Error: Timeout waiting for listener addressSolutions:
Issue 5: Docker Network Pool Exhausted
Symptoms: "all predefined address pools have been fully subnetted"
Solutions:
Debug Mode
Enable Debug Logging
Debug Features
/tmp/LIBP2P_DEBUGis not setPerformance
Expected Metrics
Localhost Testing
Performance Benchmarks
Performance Testing
Advanced Features
Load Testing
Stress Testing
Automated Test Matrix
Continuous Monitoring
Success Criteria
A successful test should demonstrate:
Expected Test Results
Successful Test Output
{ "handshakePlusOneRTTMillis": 43.84, "pingRTTMilllis": 0.26 }Performance Benchmarks
Cleanup
Post-Test Cleanup
Maintenance
Summary
This Python libp2p ping implementation provides:
The implementation successfully demonstrates cross-implementation compatibility and provides a solid foundation for transport-interop testing across the libp2p ecosystem.
Beta Was this translation helpful? Give feedback.
All reactions