hole-punch: add Python impl (v0.5)#45
Conversation
|
ccing @acul71 @seetadev @sumanjeet0012 currently working on the rust×py (Rust dialer, Python listener) — tcp/ws × both relays to fix the failing tests there |
|
@parth-soni07 I just fixed the rust-v0.56 hole punch tests in #48 One of the bugs I discovered was a problem in the iptables configuration in the linux NAT/routers. So your tests won't work until #48 lands and you merge it into this branch. |
|
BTW, websockets and webrtc-direct connections cannot hole-punch due to protocol incompatibilities. When you run your tests use |
ohh, yes i think this explains why even if the DCUtR handshake completes correctly between the Python listener and Rust dialer, the actual hole-punch would fail. Meanwhile till #48 lands, I'll have a look at the changes you made in it for my sake of understanding. |
Sure sure, thanks @dhuseby!! |
|
@parth-soni07 it looks like you need to merge master into your branch and push again. |
ohh, yesyes, DONE!!, thanks @dhuseby! |
PR: Python hole-punch implementation
Summary
Adds a Python (py-libp2p v0.5) implementation for the hole-punch test harness and fixes interoperability so that py×py and py×rust (Python dialer, Rust listener) tests pass with both Rust and Python relays. Scope is limited to Python-related tests; Rust-only failures are out of scope.
Test results (full 32-test matrix)
Passing (9)
Failing (23)
Changes
New: Python implementation (
hole-punch/images/python/v0.5/)0.2.0/hopand0.2.0/stop,_dial_rust_relay,_handle_rust_stop_streamlisten_addrs=[listen_addr]innew_host()so WS is used for/wsaddresses0.2.0/hopand0.2.0/stop_open_rust_stop/_handle_py_connect_to_rustRust
swarm.add_external_address(address)after listen so RESERVE OK includes the address (avoids NoAddressesInReservation for clients).my_observed_addr.is_some()(do not requireIdentify::Sent) so listener proceeds with Python relaylistener_peer_idto Redis after 2s delay (Python relay wire format does not emit ReservationReqAccepted the same way)Harness / config