Skip to content
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

add tests for AutoNAT #124

Open
Tracked by #64
marten-seemann opened this issue Feb 1, 2023 · 6 comments
Open
Tracked by #64

add tests for AutoNAT #124

marten-seemann opened this issue Feb 1, 2023 · 6 comments

Comments

@marten-seemann
Copy link
Contributor

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:

  • Implementing the NAT.
  • AutoNAT requires a few interactions with different nodes, so we’d have to boot up a small network of helper nodes.
@MarcoPolo
Copy link
Contributor

Should we just focus on autonat v2?

@marten-seemann
Copy link
Contributor Author

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
Copy link
Member

p-shahi commented Jun 29, 2023

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
Copy link
Contributor

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
Copy link
Member

sukunrt commented Jun 30, 2023

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.

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. add autonat v2 spec specs#538 (comment)
  2. How should we think about amplification attack prevention? add autonat v2 spec specs#538 (comment)

@thomaseizinger
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants