ipfs / ipfs/ipfs-check

Reuse long running libp2p host for checks

Open
#53 2 comments 1 reaction 0 assignees View on GitHub
dif/medium effort/days P2
Dominant language
Go
Stars
60
Forks
27
PR merge metrics
No merged PRs in 30d

Description

## 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

https://github.com/libp2p/go-libp2p/issues/2941

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.