And change it to take into account the fact that libp2p now trims
connections immediately (when no grace-period is specified) instead of
waiting for a timeout.
This removes dependencies on swarm/testing and the blank host.
1. swarm/testing really shouldn't be used at all except for internal
libp2p stuff.
2. The blank host should only be used in _very_ special cases (autonat,
mostly).
* Subscribe to libp2p events to maintain our own Certified Address Book
* Update go version
* Use TestGossipsubStarTopology test instead of new test
* Don't return an error in manageAddrBook
* Return on error while subscribing
* Use null resource manager so that the new IP limit doesn't break tests
* Mod tidy
This will allow us to add more logic around when we split/merge
messages. It will also allow us to build the outgoing rpcs as we go
rather than building one giant rpc and then splitting it.
* Implement Unsusbcribe backoff
* Add test to check that prune backoff time is used
* Update which backoff to use in TestGossibSubJoinTopic test
* Fix race in TestGossipSubLeaveTopic
* Wait for all the backoff checks, and check that we aren't missing too many
* Remove open question
* cleanup: fix vet failures and most staticcheck failures
* Fix remaining staticcheck failures
* Give test goroutines chance to exit early when context is canceled
In [drand](https://github.com/drand/drand) we have a gossipsub relay to allow users to subscribe to getting random values over pubsub. We want to support pure gossip relays who relay from a relay. For this we need direct peering agreements and want to mitigate the possibility of "missing" randomness messages by ensuring the direct connect ticks period is less than the period between updates.
This PR simply adds a new functional option allowing us to set the direct connect ticks value without modifying the global variable.