* disable libp2p autodial
* improve logs for peer-exchange
* add a function to fetch discovered and connected peers by discovery
* connection-manager: introduce event emissions by discovery
* write a spec test for events
* minor code improvement for peer-exchange
* rm: comment
* rename peer event result interface
* switch to using libp2p EventEmitter
* rename variables for readability
* reset peer-exchange spec file
* address review
* test: minor refactor
* fix: failing test
* increase peer IDs to test against for attemptDial
* improve structuring
* upgrade libp2p version, partially update protocols, rename to IBaseProtocol
* complete transition for protocols
* complete transition of connection maanger
* finish sdk
* complete core
* complete relay
* complete peer-exchange
* complete dns-discovery
* add components field to Libp2p interface and use it in core
* add type hack for Libp2p creation:
* finish waku node test
* complete relay test
* complete peer exchange
* complete dns peer discovery test
* add missing dependency to relay
* fix new peer store integration
* improve initialization of pubsub
* add catch for missing peer
* update test and remove extra dependency
* prevent error throw
* fix edge case with peerStore
* fix peer exchange
* fix protocols used
* fix test with another evnet
* bump libp2p and interfaces
* add missing package
* fix peer-exchange problem
* prefer libp2p peerDiscovery for integration tests
* fix import
* increate timeout
* return test against Test fleet
* remove await for peer:update
* increase timeout
* add await for peerStore
* comment event for testing
* fix lint
* remove bind
* fix stub
* decouple to separate test case
* move back to explicit build
* remove only
* do not test event
* skip fleet test for CI
* add: compliance test
* fix: check CI
* fix: nwaku node name
* remove: setTimeout
* force typecasting instead of ts-ignore
* rm: only for the test
* increase readability
- Replace exception pattern with a result pattern as it better fits the
usage.
- merge few maps to prefer chaining to assign var after var.
- Make `isDefined` type helper a common util function
If we `continue` when the peer is already known by the `peerStore` then
the next step of checking the tags is useless (no tags if peer is not
known).
There are two ways around it:
1. either do nothing if peer is already in peer store
2. OR, do nothing if peer is in peer store and is already tagged
I opted for the second approach to ensure all peers are tagged properly.
* remove peer-exchange from @waku/core
- also removes the manual test for peer-exchange (assumption is that the
only way to initialise peer-exchange is through libp2p's peerDiscovery and
not manually) (ref:
https://github.com/waku-org/js-waku/pull/1158#discussion_r1108055234)
# Please enter the commit message for your changes. Lines
starting
* fix: build
* update interop test
* decrease test duration for px auto discovery
* rm: only for tests
* address comment
when the query is set in an interval, it first
gets invoked when the interval time is reached.
refactor: invoke it immmediately, and then set an
interval
* fix: discovery for peer-exchange
use the bootstrap node as a starter to send a
peer-exchange query to, and emit the response
peers received from it for further connection to
libp2p using the peer-discovery interface
* init: test for libp2p bootstrap/discovery for
peer-exchange
* temp-add: console.logs for easier debugging
* add: peer discovery test & rm: console.logs
* chore: rm and redundant spec test
* add: interval for peer exchange queries
we set an interval to query a peer every 5 minutes
for peer exchange, and add new peers if found
* address: reviews
- add `type` for imports not using values
- better handling for peer-exchange query interval
* chore: fix tsc for peer-exchange
use node16 for module resolution
* chore: add extra exports to fix typedoc warnings
ref: https://github.com/TypeStrong/typedoc/issues/1739