Skip to content

Reuse long running libp2p host for checksΒ #53

@2color

Description

@2color

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium: Good to have, but can wait until someone steps updif/mediumPrior experience is likely helpfuleffort/daysEstimated to take multiple days, but less than a week

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions