Sasha
95da57a870
feat: peer exchange discovery improvements ( #2537 )
...
* rename, mark stuff to remove
* rename type
* update exports from discovery package, improve PX implementation
* re-structure px discovery, comment tests
* implement UT, E2E Tests, clean code a bit, implement recurring PX discovery, move DNS E2E Tests to separate folder, remove not needed E2E tests
* fix discovery dialer e2e test
* mark as started
* fix dns tests
* attempt to fix e2e
* skip test
* update tests
* fix typo
* add catch all in stream manager, update tests
* update mock
* update test
2025-08-14 09:47:55 +02:00
Sasha
ada265731a
fix: improve error handling for stream manager ( #2546 )
...
* fix: improve error handling for stream manager
* fix browser tests
* update logs for stream manager
* fix tests
* fix playwright
2025-08-12 23:25:23 +02:00
fryorcraken
d7919e8c9b
improve var name
2025-07-29 19:29:21 +10:00
fryorcraken
f4a2778e02
test: return first peer without traversing branch
2025-07-29 19:29:20 +10:00
fryorcraken
25f884e05b
feat: retrieve peers from all passed enrtree URLs
...
Order retrieval is random, but it attemps to retrieve from all ENR trees.
2025-07-29 19:29:20 +10:00
fryorcraken
0dfe35281c
fix: do not limit DNS Peer Discovery on capability
...
Nodes returned by DNS Discovery are not guaranteed to be reachable.
Hence, setting an upfront limit based on sought capability does not provide
any guarantees that such capability should be reached.
The discovery's mechanism role is to find Waku 2 nodes. As many as possible.
It is then the role of the peer manager to decide:
- whether to attempt connecting to the node based on advertised capabilities
- retain connection to the node based on actual mounted protocols.
We still want to prevent infinite loops, hence the `maxGet` parameter.
Also, there was a dichotomy between code tested, and code actually used by libp2p peer discovery, now resolved.
# Conflicts:
# packages/discovery/src/dns/constants.ts
2025-07-29 19:29:13 +10:00
Sasha
c7682ea67c
feat!: re-architect connection manager ( #2445 )
...
* remove public pubsub field and redundant util
* add hangUp and improve dial operations, improve keepAliveManager and remove unused method, move utils and add tests
* improve public dial method to start keep alive checks
* move dial method
* implement discovery dialer
* implement discovery dialer with queue with tests
* add discovery dialer e2e tests, change local discovery log tag, update other tests
* remove comment
* add issue link, remove only
* implement shard reader component
* create evetns module, remove unused connection manager events and related tests
* implement network indicator
* implement connection limiter, change public API of connection manager, implement recovery strategy
* decouple keep alive maanger
* add connection manager js-doc
* refactor keep alive manager, cover with tests
* add tests for connection manager main facade
* add tests for connection limiter
* add e2e tests for connection manager modules
pass js-waku config during test node init
remove dns discovery for js-waku
* restructure dialing tests
* address last e2e tests
* address review
* add logging for main methods
* decouple pure dialer class, update network monitor with specific metrics
* remove console.log
* remove usage of protocols
* update sdk package tests
* add connect await promise
* add debug for e2e tests
* enable only packages tests
* use only one file
* revert debugging
* up interface for netwrok manager
* add logs
* add more logs
* add more logs
* add another logs
* remove .only
* remove log statements
* skip the test with follow up
2025-07-09 21:23:14 +02:00
Sasha
fcc6496fef
chore!: upgrade libp2p, nodejs and typescript ( #2401 )
...
* remove react native package
* upgrade nodejs
* upgrade libp2p
* upgrade typescript, use 22 node
* up lock
* fix node compatibility
* upgrade playwright
* upgrade proto
* update tests
2025-06-22 17:41:23 +02:00
fryorcraken
edfb56243d
doc: build first to avoid not found deps issues ( #2307 )
...
* doc: build first to avoid not found deps issues
* fix: Remove XMLHttpRequest usage
XMLHttpRequest API is deprecated and not available in browser extensions.
Replace the culprit dependency with a more modern one.
Some options are removed. The assumption is that nobody uses them. It can always be added if a developer wants the flexibility.
* test: simplify test
The test focus on testing DNS Discovery, there is no need to also have a nwaku local node for bootstrap.
Bootstrap on nwaku local node is used in many other tests.
2025-03-19 09:43:41 +01:00
Danish Arora
7c0ce7b2ec
chore: upgrade to libp2p v2 ( #2143 )
...
* chore: upgrade libp2p to v2 and related deps
* chore: fix ENR
* chore(core): remove CustomEvent polyfill import
* chore: `peer-id-factory` has been removed
* chore(discovery): fix local-cache & remove CustomEvent imports
* chore(sdk): update config
* chore(tests): update tests without peer-id-factory
* fix: spec tests
* chore: fix test
* chore: upgrade dataset-core
* chore: upgrade libp2p and stale references
* chore: upgrade playwright
* chore: rm console log
* fix: lock
2024-10-21 16:43:24 +05:30
Sasha
0263cb80c5
fix: improve node bootstrapping ( #2121 )
...
* fix: improve node bootstrapping
* implement dns discovery on failed dials
* update const to match RFC
* up
2024-09-06 01:10:54 +02:00
gabrielmer
08fc2d133a
chore: changing default pubsub topic to its static sharding version ( #2083 )
...
* changing default pubsub topic to its static sharding version
* keeping RFC's Waku Message test vectors
* reverting change in changelog
* setting pubsub topic when creating nwaku node
* adding shardInfo to runMultipleNodes call
* adding shardInfo to runMultipleNodes call in lightpush tests
* add pubsub topics to nwaku.start
* get rid of it.only that remained
* fixing compliance tests
* setting clusterId to 0
* removing unnecessary fix
* adding shardInfo when creating nodes
* fixing wait for remote peer tests
* fixing peer exchange test
* refactor
* removing unnecessary variable
* feat: create default shard info, update tests (#2085 )
* feat: create default shard info, update tests
* add link
* fix tests
* remoe only
* up tests
* up test
---------
Co-authored-by: Sasha <118575614+weboko@users.noreply.github.com>
2024-07-26 00:21:52 +02:00
Danish Arora
169a09d552
chore: enforce access modifiers ( #2068 )
...
* feat: introduce eslint flag
* chore: update logger
* chore: update enr
* chore: update core
* chore: update sdk
* chore: update relay
* chore: update discovery
* chore: update message-encryption
* chore: update tests
* chore: fix modifiers
* chore(tests): fix access modifiers
* chore: fix rebase
2024-07-19 15:58:17 +05:30
Danish Arora
16e9116c7c
fix: bootstrapping with default pubsub topic ( #2031 )
...
* fix: bootstrapping into default pubsub topic
* chore: update tests
* chore: update TODO with GH issue
* chore: rename fleets
* feat: use TWN fleets, or wakuv2.prod if DefaultPubsubTopic
* chore: update imports for enrtree
2024-06-06 12:55:57 -04:00
Anton Iakimov
9f2c0ed6b5
chore: switch wakuv2 fleet to waku ( #1910 )
...
* chore: switch from decomissioned wakuv2 fleet
* chore: minor fixes + CI
* chore: fix eslint
* fix: eslint
* chore: fix test
---------
Co-authored-by: danisharora099 <danisharora099@gmail.com>
2024-04-07 15:21:00 +03:00
Danish Arora
1e86c3d63e
feat!: @waku/discovery ( #1876 )
...
* initialise the new package
* move dns-discovery
* move peer-exchange
* move local-peer-cache-discovery
* add polyfill for node - dynamic import
* update size-limit
* update release-please
* chore: update pacakge desc
* chore: cleanup
* add peer-exchange and local peer cache to size-limit
2024-03-12 15:56:49 +05:30