Looks like this project stopped running the `test:node` npm script when it was migrated to gh actions.
Re-enable it and fix all the related test failures.
Do not abort all attempts to find peers when `findPeers` on one router throws synchronously
Co-authored-by: Robert Kiel <robert.kiel@hoprnet.io>
Co-authored-by: achingbrain <alex@achingbrain.net>
`interface-datastore` now only contains the interface definition,
`datastore-core` has the various implementations.
BREAKING CHANGE: datastore implementations provided to libp2p must be compliant with interface-datastore@6.0.0
* chore: remove ipfs-utils dep
We only use it for the env detection, so use [wherearewe](https://www.npmjs.com/package/wherearewe)
instead which is that, but pulled out into a tiny module.
The `TextDecoder` class is global everywhere we support so we don't
need to pull it in from `ipfs-utils` and it's been removed from v8
anyway.
* chore: update ipfs-http-client
BREAKING CHANGES:
top level types were updated, multiaddr@9.0.0 is used, dialer and keychain internal property names changed and connectionManager minPeers is not supported anymore
The NAT manager test will throw if the current computer is behind a
double NAT as at runtime it won't be possible to map external ports.
We don't care about that during the test so configure a fake external
IP so the test will still test the shut-down functionality on a computer
that is behind a double NAT.
* feat: add uPnP nat manager
Adds a really basic nat manager that attempts to use UPnP to punch
a hole through your router for any IPV4 tcp addresses you have
configured.
Adds any configured addresses to the node's observed addresses list
and adds observed addresses to `libp2p.multiaddrs` so we exchange
them with peers when performing `identify` and people can dial you.
Adds configuration options under `config.nat`
Hole punching is async to not affect start up time.
Co-authored-by: Vasco Santos <vasco.santos@moxy.studio>
* fix: store provider multiaddrs during find providers
Changes the behaviour of `libp2p.contentRouting.findProviders` to store
the multiaddrs reported by the routers before yielding results to
the caller, so when they try to dial the provider, the multiaddrs are
already in the peer store's address book.
Also dedupes providers reported by routers but keeps all of the addresses
reported, even for duplicates.
Also, also fixes a performance bug where the previous implementation would
wait for any router to completely finish finding providers before sending
any results to the caller. It'll now yield results as they come in which
makes it much, much faster.