-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
failure to hole punch as part of test #40
Comments
I just tried deploying #42, letting Vole create the test host, and I still get the same error More extensive log:
|
After upgrading go-libp2p to the latest release and finding the root cause for the problem, I was able to patch a fix to go-libp2p which would allow hole punching to happen. However, after discussion with @lidel, we decided that until this is fixed in go-libp2p, we should try to keep the behaviour of ipfs-check as close as possible to Boxo/Kubo. Therefore, I took a difference approach and updated the node’s firewall rules to allow incoming UDP connections on ephemeral/dynamic ports. This would allow connection establishment through a dial back, which avoids the need for NAT hole punching. This also brings keeps ipfs-check in line with how Kubo/Rainbow works while reducing the latency of the checks. This means though that ipfs-check does not test whether it's possible to hole punch to the peer in the check. But it's debatable whether that's something ipfs-check should check. |
Background
When running a check with a
p2p-circuit
multiaddr, e.g./ip4/77.102.162.54/udp/22942/quic-v1/p2p/12D3KooWHgnuckrBHmV6KJ933PvTRoShzaSQJ7S78cbbfneTh6ve/p2p-circuit/p2p/12D3KooWRBy97UB99e3J6hiPesre1MZeuNQvfan4gBziswrRJsNK
, we rely on DCUtR to hole punch after which the Bitswap check runs.What's wrong
ipfs-check consistently fails to hole punch to the passed maddr, causing it to fail the Bitswap check:
https://github.com/ipfs-shipyard/ipfs-check/blob/a5b6cf2182aba1699022a8b9e60d7110f0ebb7be/daemon.go#L191-L208
This is unexpected beause running the same test with the Vole cli from the same server, e.g.
vole bitswap check bafybeicklkqcnlvtiscr2hzkubjwnwjinvskffn4xorqeduft3wq7vm5u4 "/ip4/77.102.162.54/udp/22942/quic-v1/p2p/12D3KooWHgnuckrBHmV6KJ933PvTRoShzaSQJ7S78cbbfneTh6ve/p2p-circuit/p2p/12D3KooWRBy97UB99e3J6hiPesre1MZeuNQvfan4gBziswrRJsNK"
is successful. (note that the p2p-circuit maddrs change over time)The only thing that is different between Vole and ipfs-check is how the libp2p host is created:
Debugging efforts
p2p-holepunch=debug
which wasn't informative enough and laterdebug
to get all debug12D3KooWRBy97UB99e3J6hiPesre1MZeuNQvfan4gBziswrRJsNK
(error:basic/basic_host.go:463 protocol mux failed: stream reset (took 175.354729ms, id:12D3KooWRB-2-7, remote peer:12D3KooWRBy97UB99e3J6hiPesre1MZeuNQvfan4gBziswrRJsNK, remote addr:/ip4/77.102.162.54/udp/22942/quic-v1/p2p/12D3KooWHgnuckrBHmV6KJ933PvTRoShzaSQJ7S78cbbfneTh6ve/p2p-circuit)
)The text was updated successfully, but these errors were encountered: