1. Only listen for peers added and identify events.
2. Remove the old "Limited" check. Peers only show up as "Connected" if
they have non-limited connections.
3. Don't bother listening for new connections directly and/or
connectivity changes. We'll get a new identify event per new connection
regardless.
fixes#546
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.
* add default validator support
* add an implementation for basic seqno as nonce validation
* missing return
* the nonce belongs to the origin peer
* add note about rust predicament
* add seqno validator tests
* minor test tweak, ensure at least 1ms before replay
* reimplement timecache for sane and performant behaviour
* remove seenMessagesMx, take advantage of new tc api
* fix timecache tests
* fix typo
* store expiry, don't make life difficult
* refactor common background sweep procedure for both impls
* add godocs to TimeCache
* feat: expire messages from the cache based on last seen time
* chore: minor renaming
* fix: messages should not be found after expiration
* chore: editorial
* fix: use new time cache strategy consistently
* fix: default to old time cache and add todo for background gc
* 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
* updates gitignore
* implements draft solution
* consolidates update and get
* extends test
* adds cleaner logic
* removes a redundant else case
* refactors cleanup in a goroutine
* adds a jitter to backoff
* stretches the sleep for cleanup
* reduces jitter time
* fixes a test
* adds maximum backoff attempts
* returns error for closing channel
* refactors peer status exceed backoff threshold
* converts if-else to switch
* nit
* consolidates update and maximum backoff check
* bug fix
* nit
* refactors cleanup with a ticker object
* - added PublishWithSk functionality on the Topic implementation
* - fixes after merge
* - complete refactor: used publishing options instead of a new function
* - added one more check in unit test
* - bugfix: use local variables instead of fields
* - renamed tests