3094 Commits

Author SHA1 Message Date
fryorcraken
e53717cd08
revert temporary change 2025-07-19 19:03:51 +10:00
fryorcraken
3c930dedfc
revert change on encoder 2025-07-19 18:07:38 +10:00
fryorcraken
065ef0adb0
getRoutingInfo is best as a method as it can use the context from this. 2025-07-19 17:32:58 +10:00
fryorcraken
8d278f8132
revert change that is just noise 2025-07-19 17:24:34 +10:00
fryorcraken
1bbb129d04
fix relay test 2025-07-19 17:19:58 +10:00
fryorcraken
3200b19a02
Simplify IRouting interface 2025-07-19 14:45:06 +10:00
fryorcraken
d04130feb6
use IRouting info for typing 2025-07-19 14:30:44 +10:00
fryorcraken
b8867dee38
test: re-introduce usage of ensureSubscriptions 2025-07-19 14:24:30 +10:00
fryorcraken
b4787e0e87
remove default values for cluster id and num shards in cluster
These are high level configuration values, that need to be consistent within a given execution. Setting them as default value at such a low level is a footgun risk.
2025-07-19 13:22:45 +10:00
fryorcraken
3842d84b55
feat!: Introduce routing info concept
Concepts are being mixed up between the global network config (static vs auto sharding), that needs to be the same of all nodes in the network, individual node configuration (eg relay node subscribing to a given shard), and the routing characteristic of a specific message (eg pubsub topic, shard).

This stops proper configuration of nwaku post 0.36.0 because we know need to be deliberate on whether nwaku nodes are running with auto or static sharding.

It also included various back and forth conversions between shards, pubsub topics, etc.

With this change, we tidy up the network configuration, and make it explicit whether it is static or auto sharded.
We also introduce the concept of routing info, which is specific to a message, and tied to the overall network configuration.

Routing info abstract pubsub topic, shard, and autosharding needs. Which should lead to easier tidy up of the pubsub concept at a later stage.

# Conflicts:
#	packages/core/src/lib/connection_manager/connection_manager.ts
#	packages/core/src/lib/metadata/metadata.ts
#	packages/interfaces/src/metadata.ts
#	packages/interfaces/src/sharding.ts
#	packages/relay/src/create.ts
#	packages/sdk/src/filter/filter.ts
#	packages/sdk/src/filter/types.ts
#	packages/sdk/src/light_push/light_push.spec.ts
#	packages/tests/tests/sharding/auto_sharding.spec.ts
#	packages/tests/tests/sharding/static_sharding.spec.ts

# Conflicts:
#	packages/sdk/src/store/store.ts
2025-07-19 13:22:45 +10:00
Arseniy Klempner
e92cc570f2
Merge pull request #2441 from waku-org/release-please--branches--master
chore: release master
core-v0.0.37 interfaces-v0.0.32 rln-v0.1.7 sdk-v0.0.33 message-encryption-v0.0.35 discovery-v0.0.10 proto-v0.0.12 utils-v0.0.25 sds-v0.0.5 enr-v0.0.31 relay-v0.0.20
2025-07-18 18:54:31 -07:00
Sasha
79f319cc86 chore: release master 2025-07-19 01:52:31 +02:00
Sasha
36f6884d22
feat: implement store query chunking (#2511)
* feat: implement store query chunking

* add unit tests for store core

* add Store SDK utils

* add e2e test
2025-07-19 01:37:28 +02:00
Siddarth Kumar
7fc2895b6a
ci: disable restart from stage in jenkins (#2502)
related issue : https://github.com/status-im/infra-ci/issues/202
2025-07-18 22:16:39 +05:30
fryorcraken
c24842a4a5
Merge pull request #2467 from waku-org/waku-api/remove-pubsub-topic-from-metadata-queries
fix!: remove node level pubsub topic concept
2025-07-17 11:37:07 +10:00
fryorcraken
6d55af947e
fix!: remove node level pubsub topic concept
For an edge node, there is no such thing as a "pubsub topic configuration". An edge node should be able to operate for any possible shard, and it is a per-protocol matter (eg send message with light push).

A relay node do subscribe to shards, but in this case, even metadata protocol does not need to advertise them, this is already handled by gossipsub.

Only service node should advertise their shards via metadata protocol, which is out of scope for js-waku.

# Conflicts:
#	packages/interfaces/src/connection_manager.ts
2025-07-17 09:57:15 +10:00
fryorcraken
188e4bf928
fix typo 2025-07-17 09:56:15 +10:00
Sasha
ed389ccbc9
feat: add recovery and connection maintenance (#2496)
* add FF for auto recovery

* implement connection locking, connection maintenance, auto recovery, bootstrap connections maintenance and fix bootstrap peers dropping

* add ut for peer manager changes

* implement UT for Connection Limiter

* increase connection maintenance interval

* update e2e test
2025-07-17 01:15:36 +02:00
Danish Arora
7f7f772d93
feat(rln): price calculator for rate limits (#2480)
* chore: add ABI for PriceCalculator

* chore: rename LINEA_CONTRACT to RLN_CONTRACT

* chore: add price calculator & test

* fix: import

* chore: convert e2e test to unit

* fix: test
2025-07-16 15:16:13 +05:30
Sasha
35acdf8fa5
feat: don't dial peers that failed before, make dialer use dial queue (#2478)
* make dialer use dial queue

* skip undiable peers

* cover new cases in tests

* expose dialer config at connection manager

* update tests with new config

* add more tests
2025-07-15 23:13:58 +02:00
Sasha
27292edabc
feat!: unify events under one source (#2473)
* move health indicator under waku.events and expose from Waku as a value

* update tests

* make new type for libp2p event handlers

* fix types
2025-07-15 00:59:45 +02:00
Arseniy Klempner
14085de3c4
Merge pull request #2439 from waku-org/feat/lp-v3-proto
feat(proto): add light push v3 definition
2025-07-14 08:54:37 -07:00
Arseniy Klempner
94788d0dfc
feat(proto): add light push v3 definition 2025-07-14 08:39:41 -07:00
Danish Arora
9b0c5e8311
fix: idCommitmentBigInt must always be less than the contract Q (#2394)
* chore: idCommitmentBigInt validates against contract Q

* chore: fix linting

* chore: add log

* chore: rename Q and make sync

* fix: test

* chore: remove stubbed contract test

* chore: hardcode default constant for Q

* use non deprecated sha256

* chore: use full 32 bytes for bigint

* chore: all storage in LE, but smart contract interactions in BE

* chore: remove references to idCOmmitmentBigInt in Identity

* chore: don't fetch Q from contract

* chore: ByteUtils as a class

* chore: store Identity in BE, convert during Keystore

* chore: add IDCommitmentBigInt part of Identity

* chore: minor improvements

* chore: switch idTrapdoor to LE

* chore: add logs

* chore: rename `DEFAULT_Q` to `RLN_Q`

* chore: rm spec test

* chore: improve modulo logging

* fix(tests): add IDCommitmentBigInt
2025-07-14 16:35:34 +05:30
fbarbu15
5d8cfff7eb
chore: add throughput reliability tests (#2444)
* chore: add throughput reliability tests

* chore: add capability to run all
2025-07-14 11:38:42 +03:00
Sasha
f75634d9c5
feat: update logger format (#2472) 2025-07-11 22:15:22 +02: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
bfda249aa6
chore: remove fitler codec initiator in filter core (#2443) 2025-07-03 13:28:32 +02:00
Sasha
058f2ff620
feat: make peer manager aware of codec and shard, fix retry manager and shut down subscriptions (#2425)
* implement new peer manager, use in lightPush, improve retry manager and fix retry bug

* fix unsubscribe issue

* remove not needed usage of pubsub, use peer manager in store sdk

* chore: remove deprecated filter implementation

* update tests

* update next filter for new peer manager

* skip IReceiver test, remove unused utility

* remove comment

* fix typo

* remove old connection based peer manager

* update types, export, and edge case for light push

* add retry manager tests

* add new peer manager tests

* refactor tests

* use peer manager events in filter and check for pubsub topic as well

* update test names

* address comments

* unskip Filter e2e test

* address more comments, remove duplication

* skip CI test

* update after merge

* move to peer:idenfity and peer:disconnect events, improve mapping in filter subscriptions

* update tests

* add logs and change peer manager time lock to 10s
2025-07-02 23:03:47 +02:00
Sasha
981248eedd
chore!: remove deprecated filter implementation (#2433)
* chore: remove deprecated filter implementation

* update tests

* skip IReceiver test, remove unused utility

* fix typo

* address comments

* unskip Filter e2e test

* address more comments, remove duplication

* skip CI test
2025-07-02 12:37:54 +02:00
Sasha
cd1d909de3
chore: release master (#2390) message-encryption-v0.0.34 sds-v0.0.4 core-v0.0.36 interfaces-v0.0.31 utils-v0.0.24 rln-v0.1.6 discovery-v0.0.9 enr-v0.0.30 relay-v0.0.19 proto-v0.0.11 sdk-v0.0.32 2025-06-23 22:29:40 +02:00
Sasha
f55db3eb4b
feat: shard retrieval for store and store peers selection (#2417)
* feat: implement shard retrieval for store and improve set store peers usage

* remove log

* remove only, improve condition

* implement smarter way to retrieve peers

* up tests

* update mock

* address nits, add target to eslint, revert to es2022
2025-06-23 10:01:54 +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
Danish Arora
fecc026dd7
fix: DIRVER -> DRIVER typo in nwaku (#2406)
* fix: DIRVER -> DRIVER nwaku

* chore: empty commit

* chore: access CI/test env vars and conditionally check test

* fix: undefined nwaku version

* chore: improve splitting

* simplify, test error string only for new versions

---------

Co-authored-by: Sasha <oleksandr@status.im>
2025-06-20 15:34:51 +02:00
Sasha
7c8d1073b0
chore!: remove IBaseProtocol and improve interface on PeerExchange (#2422)
* remove IBaseProtocol

* fix references, interfaces and integration

* fix ci

* up mock

* up lock

* add mock for local storage

* add missing prop, fix tests

* up lock
2025-06-20 12:53:42 +02:00
Arseniy Klempner
a0fc9e05d4
Merge pull request #2322 from waku-org/feat/sds-command-queue
feat: add command queue architecture and improve message handling
2025-06-13 16:47:38 -07:00
Arseniy Klempner
8444bc940f
fix: reorder methods by visibility 2025-06-13 15:22:52 -07:00
Arseniy Klempner
a2c3b2e6aa
feat(sds)_: add command queue architecture and improve message handling
- Introduce command queue system for sequential task processing
- Add comprehensive event system for message lifecycle tracking
- Restructure codebase with separate bloom_filter directory
- Export encode/decode helpers for SDS proto messages
- Use Set for deduplication in missing message detection
- Fix sync message handling for empty content messages
- Always emit MissedMessages event even with empty array
- Improve duplicate message detection logic
2025-06-10 20:19:22 -07:00
fbarbu15
4997440225
chore: add reliability tests package with longevity tests (#2361)
* chore: add reliability tests package with longevity tests

* chore: add reliability tests package with longevity tests

* chore: fix ci errors

* chore: fix

* chore: fix timeout
2025-06-05 11:19:00 +03:00
Arseniy Klempner
49f26d89a8
Merge pull request #2397 from waku-org/fix/store-hash-query
fix(store): update store query validation logic to support msg hash q…
2025-06-03 14:26:57 -07:00
Arseniy Klempner
f649f59e64
fix: rebase package lock 2025-06-03 11:24:37 -07:00
Arseniy Klempner
5f63cb5bfb
fix: remove unnecessary comments from store validation
- Remove inline comments that explain obvious code behavior
- Keep only the reference URL comment which provides useful context
- Address review feedback about excessive commenting
2025-06-03 09:05:54 -07:00
Arseniy Klempner
2d92191029
fix: address review feedback for message hash tests
- Remove all console.log statements (8 instances)
- Update type usage from DecodedMessage[] to IDecodedMessage[]
- Replace assert.equal() with expect().to.equal() for consistency
- Import expect from chai alongside existing imports

These changes address all feedback from PR review without altering test logic.
2025-06-03 09:05:54 -07:00
Arseniy Klempner
9f7a15dfb1
fix(store): update store query validation logic to support msg hash queries 2025-06-03 09:05:54 -07:00
Sasha
1905558753
feat!: re-work messaging parts and sharding (#2399)
* remove message-hash package, move it to core

* add js-doc to message hash

* up

* address type changes

* fix lint
2025-06-03 11:08:02 +02:00
Danish Arora
16328a3f11
feat: enable/disable discoveries without defaultBootstrap: true (#2363)
* feat: enable/disable discoveries without defaultBootstrap: true

* chore: rm .only

* chore: don't redefine default discoveries object

* chore: don't export default const from library

* chore: rename discoveriesEnabled to discovery

* fix: rename

* address comments

* chore: reset default

Co-authored-by: Sasha <118575614+weboko@users.noreply.github.com>

* chore: address comments

* chore: update tests

---------

Co-authored-by: Sasha <118575614+weboko@users.noreply.github.com>
2025-05-30 16:27:00 +05:30
Arseniy Klempner
6d6e256fec
Merge pull request #2371 from waku-org/feat/browser-headless-test
feat: headless app and api for testing js-waku in browser
2025-05-29 11:38:08 -07:00
Arseniy Klempner
5ed35471ca
feat: headless app and api for testing js-waku in browser 2025-05-29 10:19:56 -07:00
Danish Arora
3b23bceb9d
feat: refine work with membership info and other meta information (#2341)
* chore: update definitions to match the ABI

* chore: improve exports and types

* chore: use big endian instead of little endian

* chore: improve logging

* chore: update import

* fix: use overloaded function call

* chore: estimate gas

* test

* npm i

* chore: regen locl

* chore: update

* chore: update playwright docker images

* chore: cannot erase membership if it isn't expired/in grace period

* chore: fix condition

* chore: add `getMembershipStatus` method

* refactor(rln): cache min/max rate limits at contract instantiation

* chore: fix accessor

* chore: rename arg

* chore: allow chromebin path through env
2025-05-29 16:09:08 +05:30
Sasha
a4dfd3455c
feat: event based approach to Filter (#2300)
* create new filter api

* implement await on main methods on new Filter

* add info logs in new filter

* add logs to subscription impl

* remove lint supress

* add unit tests

* introduce E2E tests

* update e2e tests and add case for testing filter recovery after nwaku nodes replacement

* add new test cases for max limits and enable decoders as array on new filter

* fix edge case testing, correct test cases

* skip test

* update error message

* up text

* up text

* fix lint

* implement unsubscribeAll

* add js-dock to new filter

* add cspell

* implement TTL set for message history
2025-05-28 00:44:44 +02:00