libp2p / test-plans

Interoperability tests for libp2p
https://libp2p.io
Other
51 stars 43 forks source link

add tests for AutoNAT #124

Open marten-seemann opened 1 year ago

marten-seemann commented 1 year ago

We should have a test that checks that nodes can reliably determine if they are behind a NAT. This will most likely require us to implement some kind of NAT (equivalent?), maybe using iptables.

Main challenge:

MarcoPolo commented 1 year ago

Should we just focus on autonat v2?

marten-seemann commented 1 year ago

Makes sense. Having this tested end-to-end (with "real" NATs) is valuable, even if rust-libp2p and js-libp2p don't have an implementation right away.

p-shahi commented 1 year ago

No significant users of AutoNat in rust-libp2p, js-libp2p has this feature but unsure of users. Although only one implementation will have v2 (go-libp2p), it will still be valuable to add as an interop test as it's difficult to test in unit tests

thomaseizinger commented 1 year ago

What is the progress on the V2 spec and the go implementation? I am interested in having V2 asap in rust-libp2p because with our recent release of kademlia client-mode, knowing our external addresses has become more important.

sukunrt commented 1 year ago

I'm busy finishing the smart dialing effort. https://github.com/libp2p/go-libp2p/issues/2394 is the last major piece left. I will pick AutoNAT v2 implementation after next week. I'll start addressing the open issues on the specs from Monday.

So far as I understand there are two major open issues on the specs.

  1. How to ensure that we don't reuse the socket that was used to make the dial back request. https://github.com/libp2p/specs/pull/538#discussion_r1201206137
  2. How should we think about amplification attack prevention? https://github.com/libp2p/specs/pull/538#discussion_r1245433030
thomaseizinger commented 1 year ago

I'm busy finishing the smart dialing effort. libp2p/go-libp2p#2394 is the last major piece left. I will pick AutoNAT v2 implementation after next week. I'll start addressing the open issues on the specs from Monday.

Cool! I didn't mean to stress by the way, just asking! :) Looking forward to the spec discussions.