3047 Commits

Author SHA1 Message Date
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
Arseniy Klempner
f85a476261
Merge pull request #2337 from waku-org/release-please--branches--master
chore: release master
relay-v0.0.18 enr-v0.0.29 interfaces-v0.0.30 sdk-v0.0.31 sds-v0.0.3 core-v0.0.35 proto-v0.0.10 message-hash-v0.1.19 message-encryption-v0.0.33 rln-v0.1.5 utils-v0.0.23 discovery-v0.0.8
2025-04-23 08:47:46 -07:00
Sasha
e22f211d46 chore: release master 2025-04-23 07:38:08 +02:00
Sasha
fa1beca7f1
chore: fix shard info for wss checker (#2373)
* feat: introduce WSS checker CI

* rename CI step

* specify nodejs

* try

* remove not needed dep

* use npx and fail on failure

* run by dispatch only and improve naming

* fix fail detection

* chore: fix shard info for wss checker
2025-04-22 18:47:20 +02:00
Arseniy Klempner
bb927424f4
Merge pull request #2359 from waku-org/fix/npm-audit-fix-2024-04-16
fix: npm audit without force
2025-04-22 08:27:25 -07:00
Arseniy Klempner
6456d09809
fix: npm audit without force 2025-04-22 08:11:02 -07:00
Arseniy Klempner
4da382d594
Merge pull request #2299 from waku-org/feat/sds-message-history
feat(sds): add retrieval hint to causal history
2025-04-22 08:05:41 -07:00
Arseniy Klempner
408be95a13
feat(sds): add retrieval hint to causal history 2025-04-22 07:45:05 -07:00
Arseniy Klempner
0826f32b69
feat(sds): adds ephemeral messages, delivered message callback and event 2025-04-22 07:41:52 -07:00
Arseniy Klempner
18e08f94df
Merge pull request #2302 from waku-org/feat/sds-ephemeral
feat(sds): adds ephemeral messages, delivered message callback and event
2025-04-22 07:38:28 -07:00
Arseniy Klempner
6b4848c853
feat(sds): adds ephemeral messages, delivered message callback and event 2025-04-22 07:16:14 -07:00
Sasha
e45736ff98
feat: introduce WSS checker CI (#2366)
* feat: introduce WSS checker CI

* rename CI step

* specify nodejs

* try

* remove not needed dep

* use npx and fail on failure

* run by dispatch only and improve naming

* fix fail detection
2025-04-18 22:51:07 +02:00
Sasha
fd2f5b7b8d
chore: up readme (#2367) 2025-04-18 20:44:22 +02:00
Sasha
551238006c
fix: health indicator properly handle peer:identify event (#2369) 2025-04-18 20:11:09 +02:00
Sasha
3038c48917
feat: introduce createDecoder and createEncoder on IWaku (#2352)
* feat: introduce createDecoder and createEncoder on IWaku

* add tests, refactor

* fix type
2025-04-14 10:46:47 +02:00
Sasha
163bea56c3
chore: skip flaky test due to nwaku bug (#2349)
* chore: skip flaky test due to nwaku bug

* return full test cases for lightpush
2025-04-11 18:30:28 +02:00
Sasha
3793e6f5c0
chore: update interop test suit for latest nwaku (0.35.1) (#2345)
* update Filter test suit, make service nodes connected to each other, remove single node Filter test suit, use 0.35 nwaku image

* update light push tests

* improve auto shard tests

* update static sharding test

* skip blocked tests

* fix test

* remove usage of pusubtopic with nwaku

* remove comment
2025-04-11 01:34:11 +02:00
Danish Arora
28f28d0d36
fix(rln): update types to match nwaku (#2339)
* chore: update types to match nwaku

* chore: add userMessageLimit // not in spec
2025-04-10 14:42:57 +05:30
Danish Arora
4adf8706c3
feat(rln): create CredentialsManager without Zerokit (#2295)
* chore: update ABI

* chore: update contract address and chain ID to Linea Sepolia

* chore: improve error handling

* fix: bigint conversion

* chore: update tests

* chore: clean comments

* chore: export keystore types

* chore: update README with contract address

* tests: add reusable mock functions

* chore: LINEA_CONTRACT instead of SEPOLIA_CONTRACT

* chore: add linea to cspell

* chore: add rateLimit to MembershipInfo

* fix: determine start options

* feat: RLNLight

* chore: fix

* chore: export

* fix: returns for ratelimit

* chore: big number conversions

* chore: rename RLNLight to CredentialsManager, add logs

* chore: setup and use rln_base_contract

* chore: use CredentialsManager for rln.ts

* chore: public methods written above private methods

* fix: rate limit getter

* chore: simplify getters/setters

* chore: insert empty line
2025-04-07 16:04:06 +05:30
Danish Arora
a8ff776962
chore(rln): update ABI and contract address to Linea Sepolia, enhancements (#2294)
* chore: update ABI

* chore: update contract address and chain ID to Linea Sepolia

* chore: improve error handling

* fix: bigint conversion

* chore: update tests

* chore: clean comments

* chore: export keystore types

* chore: update README with contract address

* tests: add reusable mock functions

* chore: LINEA_CONTRACT instead of SEPOLIA_CONTRACT

* chore: add linea to cspell

* chore: add rateLimit to MembershipInfo

* fix(tests): rate limit additions

* chore: update gitignore
2025-03-31 14:32:29 +05:30
Sasha
ea6daae927
chore: release master (#2311) interfaces-v0.0.29 core-v0.0.34 discovery-v0.0.7 sds-v0.0.2 rln-v0.1.4 sdk-v0.0.30 enr-v0.0.28 message-hash-v0.1.18 message-encryption-v0.0.32 relay-v0.0.17 proto-v0.0.9 utils-v0.0.22 2025-03-24 14:41:33 +01:00
Sasha
1ee77c0423
fix: downgraid chainsafe (#2316)
* fix: downgraid chainsafe

* up lock

* up lock

* bump playwright

* add override section
2025-03-24 13:07:29 +01:00
fryorcraken
d27db21ba5
fix: do not use waku test fleet as default bootstrap (#2312)
The waku test fleet is unstable and should not be used as boostrap.

The issue is that DNS Discovery looks for "2" nodes and stop there. Meaning that if those "discovered" nodes are not reachable (ie, coming from test suite). js-waku does not connect.
2025-03-20 16:32:27 +01:00
Sasha
e0b8bd8c9c
chore: update release please and add packages (#2305) 2025-03-20 00:40:34 +01:00
Sasha
044da751bd
fix: npm action branch detection (#2308) 2025-03-19 11:55:59 +01: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
Sasha
c315b363c5
chore: update ci npm command (#2304) 2025-03-17 09:57:16 +01:00
Arseniy Klempner
8db7690233
Merge pull request #2293 from waku-org/feat/sds-sync
feat(sds): send and receive sync messages
2025-03-13 11:52:21 -07:00
Arseniy Klempner
13ae5d4f73
feat(sds): send and receive sync messages 2025-03-13 11:29:55 -07:00
Arseniy Klempner
5b3a256b4c
Merge pull request #2280 from waku-org/feat/sds-buffer-sweep
feat(sds): adds logic to sweep incoming and outgoing buffers
2025-03-04 07:01:23 -08:00
Arseniy Klempner
f7666a6588
feat(sds): adds logic to sweep incoming and outgoing buffers 2025-03-03 22:09:44 -08:00
Danish Arora
6fc6bf3916
feat(rln): migrate from v1 to v2, rate limiting, memberships, test coverage (#2262)
* chore: update ABIs and deployed address

* chore: remove storage contract references

* feat: upgrading adapter to basic rlnv2

* feat: rate limit

* chore: upgrade packages revert

* fix: tests

* chore: remove uneeded file

* feat(rln): implement RLNv2 rate limiting and membership states

- Add rate limit validation and handling in proof generation/verification
- Implement membership lifecycle state management (Active/GracePeriod/Expired)
- Add new membership management methods:
  - getMembershipInfo
  - extendMembership
  - eraseMembership
  - registerMembership
- Update proof verification to include rate limit checks
- Refactor message serialization to include rate limit data

Breaking changes:
- verifyWithRoots now takes roots as array instead of spread parameters
- Proof verification methods now accept optional rateLimit parameter

* fix: typo

* chore: add to cspell

* chore: reduce diff

* chore: simplify subdir for abi

* chore: address comments

* chore: simplify access to variables

* chore: address comments

* chore: simplify constants

* chore: add error handling

* chore: change rln v2 references to rln

* fix: check
2025-03-03 18:14:06 +05:30
Sasha
09108d9284
feat: enable auto start upon node creation (#2291)
* feat: enable auto start upon node creation

* update the state
2025-02-27 14:00:28 +01:00
Sasha
f199d92d60
feat: migrate to latest LightPush version (#2281)
* create retry manager

* update tests

* add retry manager tests, update peer manager

* fix start & merge with master

* return send to many logic

* add new error handling

* add sections to protocol errors

* fix check

* up test

* add waku.start in test

* fix check and test

* improve name
2025-02-25 22:40:03 +01:00
Sasha
0ede57f387
chore: simplify protocol creation (#2283)
* simplify protocol creation

* up relay

* fix check

* up size limit config
2025-02-25 18:41:32 +01:00
Sasha
87a918d9cc
chore: remove go-waku related code in tests (#2285)
* remove go-waku related code in tests

* remove not needed

* remove args level for go-waku
2025-02-25 17:56:55 +01:00
Arseniy Klempner
4cd1eea05a
Merge pull request #2261 from waku-org/feat/sds-participant-state
feat(sds): add message channel with buffers and send/receive logic
2025-02-21 15:23:32 -08:00
Arseniy Klempner
389ca4062e
feat(sds): add message channel with buffers and send/receive logic
This commit creates the class for an SDS message channel, including
buffers for outgoing and incoming messages. Adds logic for sending
messages, receiving messages, delivering messages, and reviewing
acknowledgement status of messages. Also adds byte serialization
for bloom filters.
2025-02-21 14:12:29 -08:00
Danish Arora
a3fb1d7a5b
Revert "chore: upgrade nwaku to 0.34.0 and update tests suite for compatibili…" (#2273)
This reverts commit 26ab836900d907b0ca185e6ad5fb6b3b548350fb.
2025-02-21 23:06:45 +01:00
Danish Arora
582c4e1c81
chore: sds and rln before tests (#2263) 2025-02-18 16:46:33 +05:30
Danish Arora
26ab836900
chore: upgrade nwaku to 0.34.0 and update tests suite for compatibility (#2170)
* chore: upgrade nwaku to v0.33.1

* chore: upgrade to nwaku 0.34.0

* feat: connect nwaku nodes amongst each other over relay

* chore(lightpush): use multiple service nodes for lightpush (instead of just one)
- nwaku now expects >=1 nodes at least connected

* chore: all single-node lightpush requests should now be expected to fail

* chore: update sharding tests

* chore: update tests

* chore: improve Docker network config reliability

* chore: deduplicate ecies encrypted payloads

* chore: update to precise expects

* fix: return early if expect passes

* chore: lightpush 5 times instead of 30

* fix: non duplicacy should happen in application-specific scenario

* chore: update mocha config + fix epehermal tests

* chore: reinstall deps after rebase

* chore: attempt stability for test suite

* fix: store tests to now use multiple nodes, delete uneeded test

* fix: memory leak

* chore: switch while loop with timeout-promise

* chore: remove redundant nodes startup

* chore: add delays for nwaku setup
2025-02-17 19:21:33 +05:30
Danish Arora
0a0a92bccb
feat: @waku/rln (#2244)
* chore: setup rln as a new package

* chore: migrate src

* fix: wasm loading, tests, config

* chore: fix Karma CI

* fix: bundler

* chore: copy dist resources

* chore(rln): enable all tests

* chore: increase karma timeouts
2025-02-11 15:28:00 +05:30
Danish Arora
becb46f3a5
chore(sds): use allure reporting (#2255) 2025-02-11 00:56:00 +05:30
Arseniy Klempner
053e4901e7
Merge pull request #2253 from waku-org/feat/sds-bigint-nimhashn
feat(sds): migrate bloomfilter to bigint and import hashn function from nim
2025-02-07 11:59:27 -08:00
Arseniy Klempner
be93e4b71f
feat(sds): migrate bloomfilter to bigint and import hashn function from nim
Uses an array of bigint to store sufficient bits in bloom filter.
Updates all arithmetic to explicitly cast to bigint where necessary.
Makes the hashn function for bloomfilter a parameter.
Adds an implementation of hashn generated using nim compiler.
Adds tests.
2025-02-05 17:27:41 -08:00
Sasha
3136f3a704
feat: add HealthIndicator with simplified logic and testing (#2251)
* implement HealthIndicator

* up libp2p interface version

* up lock

* remove unused tests

* expose HealthIndicator from Waku

* update test, add start and stop

* fix error handling
2025-02-05 13:24:50 +01:00
Sasha
fc93fae873
feat: move Peer to PeerId (#2246)
* feat: move Peer to PeerId

* up tests

* update tests
2025-02-05 11:21:22 +01:00
fbarbu15
2a7f4b6e86
chore: add back allure (#2247) 2025-02-03 13:59:55 +05:30