-
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
Reuse long running libp2p host for checks #53
Comments
Some more context from @aschmahmann on situations where reusing the long-running libp2p host may reduce insight:
Seems like we could still end up in the same situation it's just that the use cases become more esoteric. A couple that come to mind:
These are all fairly edge cases, so if they're huge pains maybe it's worth ignoring them if we document the issues (so at least we know what the limitations are). If we can do our best to replicate what should happen with a sanely configured new peer though then there are fewer of the edge cases anyone even needs to have in mind if helping a user debug. So the benefit seems largely about taking this class of edge cases off the table as something to consider. There are few areas where (go-)libp2p users not using Amino run into problems that are all in the same area:
|
At the time of writing, we host this backend as a public good and don't run into this problem because we have a public IP which allows dialbacks and prevents the need for hole punching. So this is mostly a problem if you run it behind NAT, i.e. in local development. Some more ideas:
|
What's the problem
Running the
ipfs-check
backend 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
The text was updated successfully, but these errors were encountered: