Closed hacdias closed 2 months ago
@lidel @aschmahmann I have reworked this PR on top of #114. In addition, we now run a parallel DHT just for peer routing if DHT is disabled and the host is not shared.
I also extracted some parts of the setup as their own functions - this will simplify #88.
Closes #109. This PR adds seed-based automatic peering. This works by either leveraging the already-running DHT (if DHT is enabled with shared host), or running a parallel DHT with the main host only for peer routing.
I've added tests that you can run on your machine, but disabled on the CI. The time it takes to connect can vary and I thought it could be a bit flaky to run in the CI. In addition, it would maybe pollute the Amino DHT with all ephemeral peers that are created in each test.
Depends on https://github.com/ipfs/rainbow/pull/114. Closes #27