3119 Commits

Author SHA1 Message Date
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
dc5155056b
feat!: SDS improvements and fixes (#2539)
* introduce `MessageId` type

# Conflicts:
#	packages/sds/src/message_channel/message_channel.ts

* fix: own messages are not used for ack

* fix: own messages are not used for ack

* doc: long term solution is SDS protocol change

* SDS: renaming to match message function

* SDS: introduce `Message` class for easier encoding/decoding

# Conflicts:
#	packages/sds/src/message_channel/events.ts
#	packages/sds/src/message_channel/message_channel.ts

* SDS Message is a class now

* SDS: it's "possibly" not "partially" acknowledged.

* SDS: TODO

* SDS: fix tests

* SDS: make logs start with `waku`

* SDS: add bloom filter test

# Conflicts:
#	packages/sds/src/message_channel/events.spec.ts

* SDS: improve naming

* SDS: improve naming

Messages are not "sent" or received, but pushed for processing in local queues.

* SDS: sync message should not be delivered

* SDS: renaming from earlier

* SDS: remove useless variable

* SDS: Fix comment

* SDS: sync messages do not get "delivered"

* SDS: acks

* SDS: simplify delivered event

* SDS: improve event naming

* SDS: fix comment

* SDS: make task error an official event

* SDS: Mark messages that are irretrievably lost

* SDS: remove default for irretrievable and simplify config

* SDS: typo on sync event

* SDS: add and user sender id

* SDS: resent message never get ack'd

* SDS: fix cylic dependencies

* SDS: helpful logs

* SDS: avoid duplicate history entries

* SDS: export options
2025-08-12 10:47:52 +10:00
fryorcraken
459fe96fe6
fix: should not self-acknowledge messages (#2528)
* introduce `MessageId` type

* fix deprecated import

* test: own messages are not used for acks

* fix: own messages are not used for ack

* fix: own messages are not used for ack

* test: do not self-possible-ack

* doc: long term solution is SDS protocol change
2025-08-08 10:18:01 +10:00
fryorcraken
52e5c34520
test: add browser tests for sds (#2527)
* tests: add browser tests for sds

* test: use FIREFOX_BIN if set
2025-08-06 10:30:00 +10:00
fryorcraken
449797d5c1
fix: bloom filter protobuf decoding (#2529)
* SDS: add bloom filter test

* fix: ensure bloom filter can be decoded from protobuf
2025-08-05 14:55:57 +10:00
Arseniy Klempner
103f21ef85
Merge pull request #2313 from waku-org/fix/do-not-limit-dns-discovered-peers
feat!: do not limit DNS Peer Discovery on capability
2025-07-31 17:06:23 -07: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
fbarbu15
c1f9471cd7
chore: extra reliability tests 2 (#2450)
* chore: add throughput reliability tests

* chore: add capability to run all

* chore: add network-latency reliability tests

* chore: add network-latency reliability tests

* chore: add other network reliability tests

* chore: add other network reliability tests

* chore: fix tc cleanup

* chore: refactor common code

* chore: refactor common code

* chore: refactor common code

* chore: refactor common code

* chore: refactor common code

* chore: refactor common code

* chore: refactor common code

* chore: fix

* chore: fix tests

* chore: fix tests
2025-07-29 10:17:43 +03:00
fryorcraken
0be4861c79
Merge pull request #2471 from waku-org/waku-api/fix-nwaku-master
feat!: Introduce routing info concept
2025-07-22 11:37:53 +10:00
fryorcraken
f8f20db85c
small optimization 2025-07-22 10:59:47 +10:00
fryorcraken
cd265ba1ae
fix test for nwaku master 2025-07-21 15:54:05 +10:00
fryorcraken
39c139158c
Delete dual test (makes it hard to work on nwaku master) 2025-07-21 15:44:30 +10:00
fryorcraken
77c694095d
fixing test against nwaku nightly 2025-07-21 15:40:05 +10:00
fryorcraken
158f6ecf98
fix retry_manager test 2025-07-21 15:02:26 +10:00
fryorcraken
d4429702c2
introduce interface for better mocking
As one could fall in a trap of not defining the right methods on the mock
2025-07-21 14:47:07 +10:00
fryorcraken
1e7e0291fa
separate file tests
To not have 2 `runTests` in same file.
2025-07-21 14:10:00 +10:00
fryorcraken
b51d598581
re-enable commented test 2025-07-21 13:57:06 +10:00
fryorcraken
ec8ded9c6a
revert distracting changes 2025-07-21 12:26:51 +10:00
fryorcraken
3bb5a4931f
fix peer exchange test 2025-07-21 12:26:29 +10:00
fryorcraken
0739fd1dd2
revert shard info -> relay shard renaming 2025-07-19 21:50:51 +10:00
fryorcraken
e5919a6bd9
revert most invasive changes 2025-07-19 21:25:21 +10:00
fryorcraken
97a26b2373
revert test changes 2025-07-19 19:21:39 +10:00
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