-
Notifications
You must be signed in to change notification settings - Fork 25
Reuse long running libp2p host for checks #53
Copy link
Copy link
Open
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps updif/mediumPrior experience is likely helpfulPrior experience is likely helpfuleffort/daysEstimated to take multiple days, but less than a weekEstimated to take multiple days, but less than a week
Metadata
Metadata
Assignees
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps updif/mediumPrior experience is likely helpfulPrior experience is likely helpfuleffort/daysEstimated to take multiple days, but less than a weekEstimated to take multiple days, but less than a week
Type
Fields
Give feedbackNo fields configured for issues without a type.
What's the problem
Running the
ipfs-checkbackend on a machine behind NAT will fail running checks against other peers behind NAT, because we create a short-lived test host for the check, which doesn't connect to any peers, so it can't find any observed addrs, preventing NAT hole punching from happening.Idea
Reuse the long running libp2p peer for checks that don't involve an explicit multiaddr
Since the DHT traversal which happens as part of the check will likely open a connection (and hole punch) to a peer, we could reuse the long running libp2p host and pass it into Vole for the bitswap check.This would simplify the code and speed up the response.
Moreover, this would ensure higher success rates for users running this backend behind NAT.
Other ideas
Reduce activation threshold
Unfortunately, this configuration is global, so may not work for us, but this solved a similar problem in Vole https://github.com/ipfs-shipyard/vole/pull/39/files
Related issues
libp2p/go-libp2p#2941