Commit Graph

78 Commits

Author SHA1 Message Date
Arseniy Klempner 37f24e9ea1
fix: remove rpc settings when starting nwaku image 2024-03-04 07:16:16 -08:00
Sasha 9f198dd149
feat: add bootstrapPeers option and refactor sdk (#1871)
* move relay related code

* move libp2p to utils

* define CreateWakuNodeOptions

* improve options

* make libp2p use from create function

* add bootstrapPeers option

* fix lint

* fix types, imports

* fix exports

* use bootstrap along default bootstrap

* fix test as REST does not return peer though connection is made

* rollback condition change

* enable gossipSub back for every node
2024-03-04 10:56:20 +01:00
Florin Barbu df8c0d79f7
test: peer exchange tests (#1859)
* peer exchange tests

* adjust after test with nwaku 25
2024-02-27 09:54:34 +02:00
Florin Barbu 7af6b71d24
upgrade nwaku to v0.25 (#1861) 2024-02-22 16:04:43 +02:00
Arseniy Klempner 6009af7453
feat: migrates e2e tests to use rest instead of rpc 2024-02-16 18:52:51 -08:00
Arseniy Klempner 739f2bc2c9
feat: switches to REST for calling nwaku messages/subscription endpoints
This commit modifies functions in ServiceNode to use the REST API
instead of JSON RPC when reading messages for a pubsub topic or
content topic, and when ensuring a nwaku node is subscribed to a
pubsub topic. Also modifies default Docker params to enable the
rest API and provide a port.
2024-02-15 14:39:40 -08:00
Florin Barbu de5be4413b
chore: use graceful timeout mechanism (#1841)
* use graceful timeout mechanism

* set max timeout for all hooks

* small fix

* small fix

* use MOCHA_HOOK_MAX_TIMEOUT as default timeoutDuration

* force retry even when the hook fails

* use custom hooks

* fix global timeout problem

* fix unwanted change

* fix enr issue

* force retry on before error as well
2024-02-15 08:50:03 +02:00
Danish Arora f8e02ab19e
fix(tests): append `p2p` with the multiaddrs from ENR (#1817)
* append `p2p` with the multiaddrs from ENR

* fix(tests): add p2p checks for ENR multiaddrs

* fix(tests): type getter

* chore(ci): remove debug flag from nwaku_master and go-waku tests
2024-02-07 01:57:41 +05:30
Florin Barbu dbb51e4c86
test: fix for nwaku 24 (#1820)
* bump nwaku to v0.24.0

* fix tests on nwaku 0.24

* fix multiple service node filter sub tests

* fix timeout for metadata tests
2024-01-31 17:31:09 +02:00
Danish Arora 7affbe222d
feat: lightpush & filter send requests to multiple peers (#1779)
* feat: lightpush & filter send requests to multiple peers

* build message-hash before core

* chore: restructure folder heirrarchy

* fix: imports

* chore: move @waku/core to dev deps

* feat: create a new `ServiceNodes` wrapper class to encapsulate service node and message collector with redundancy accounted for

* chore(filter): move tests against single service node to a subdir

* feat: support relay, add strict checking, add tests

* fix(filter): handle errors

* chore(tests): add tests for ping

* add tests for push

* chore: abstract redundancy

* feat: add unsubscribe tests

* fix: tests

* add lightpush tests

* fix: imports

* fix: merge & add warning

* merge: master

* fix: breaking tests with master

* address comments

* make num peers configurable

* fix: typo
2024-01-24 18:24:03 +05:30
Florin Barbu 13d3d70609
chore: increase max sub topic size to 100 (#1791)
* increase max sub topic size to 100

* make tests run fine both ways

* fix:import error

* update nwaku and gowaku master images

* prepare for pr
2024-01-18 21:22:51 +05:30
Arseniy Klempner ae7bc3eeec
chore: bump all libp2p packages to latest version 2024-01-17 11:59:08 -08:00
Danish Arora 2e6d9836bf
chore(tests): restructure & cleanup (#1796)
* chore: restructure folder heirrarchy

* fix: imports
2024-01-18 00:26:31 +05:30
Danish Arora dc96074c81
fix(tests): peer-exchange interop (#1773)
* fix(tests): px interop

* optimize waitFor utility

* address minor comments

* fix: test refactoring
2024-01-11 16:39:48 +05:30
danisharora099 2bc3735e4d
feat: add support for autosharded pubsub topics
tests: use a generator for sharded pubsub topics
set pubsub topic in encoder/decoder based on sharding type
add function for grouping content topics by pubsub topic
add autosharding config to create options
add autoshard rpc endpoints to nwaku and use in tests
set autoshard pubsub topics in all protocols
fix rebase with static sharding
removes unused function
remove console logs
remove autosharding from ShardInfo, add to EncoderOptions
fix enr and encoder/decoder options
test that same application/version hashes to same shard index
update comment on shard field
fix spelling of autosharding
fix content topic protocol in tests
add sharding type alias and function to determine topic in encoders/decoders
move DefaultPubsubTopic from core to interfaces
2023-12-21 10:03:22 -08:00
Danish Arora bbd372120a
chore: update all references of shard info to RFC terminology (#1740)
* update all references of shard info to RFC terminology

* bump nwaku to v0.22.0 (#1741)
2023-11-29 17:37:59 +05:30
Danish Arora 4d19fc7b75
bump nwaku to v0.22.0 (#1741) 2023-11-29 15:48:50 +05:30
Danish Arora 4cf2ffefa7
feat!: add support for sharded pubsub topics & remove support for named pubsub topics (#1697)
* merge branches

* tests: use a generator for sharded pubsub topics

* fix namespace edge case

* move shardInfo to pubsubTopic logic in waku.ts

* simplify encoder/decoder creation logic + update tests

* sharding utils: add error handling

* remove redundant test util

* baseprotocol: create abstraction for initialising pubsub topics

* fix: `createDecoder` interface

* filter: createSubscription takes shardInfo instead of pubsubTopicStr

* fix: sharding utils for error handling

* SingleShardInfo: use a new interface instead of omitting and rename namespace

* change redundant namespaces
2023-11-28 15:57:18 +05:30
Danish Arora 3166a5135e
chore!: change all instances of `PubSubTopic` to `PubsubTopic` (#1703)
* rename all PubSub patterns

* feat: forbid identifiers with camelcase pubSub (#1709)

---------

Co-authored-by: Arseniy Klempner <adklempner@gmail.com>
2023-11-14 18:52:52 +03:00
Florin Barbu 9593a8a8a5
test: fix ci logs (#1687)
* fix ci logs

* replace lodash with uint8arrays/equals
2023-10-25 10:39:04 +03:00
Florin Barbu 1ec0c200ca
chore: new relay tests (#1649)
* make relay folder

* make relay folder

* adjust message collector for relay

* small fix

* small fix

* small fix

* split tests more

* small fixes

* small fix

* new test

* fix pubsubtopic name

* new subscribe tests

* new subscribe tests

* new tests

* small fix after ci run

* small fix after ci run2

* fix skipped test

* added issue for skipped test
2023-10-23 18:08:33 +03:00
Florin Barbu 80a33b9c2b
chore: allure test reporting (#1668)
* allure test reporting

* make reports only for the main job

* fail a test for demo

* fail a test for demo

* revert

* fail a test for demo

* revert

* deploy to allure-jswaku

* use PAT

* add pat as secret

* check if pat exists

* debug secrets issue

* remove debug steps

* debug1

* debug2

* debug3

* debug4

* set reports for all tests

* fix after ci run

* self review

---------

Co-authored-by: Sasha <118575614+weboko@users.noreply.github.com>
2023-10-23 17:53:56 +03:00
Danish Arora 0f7d63ef93
feat: Logger with log levels (#1672)
* setup a custom Logger with log level support

* refactor codebase for to use new Logger with log levels

* disallow usage of `debug` directly / only allow usage in/through custom Logger

* remove `debug` from logger
2023-10-20 16:36:47 +05:30
Florin Barbu 1150ddcd02
fix: remote peer rejected (#1645)
* update empty payload light push tests response

* bump up nwaku version

* remove only

* remove diff between gowaku and nwaku
2023-10-20 10:21:15 +03:00
Danish Arora 9fe04d85f3
chore: use `pubsubTopic`/`pubsubTopics` across the codebase (#1653)
* chore: change all references of pubSubTopic to pubsubTopic

* change references of pubSubTopics to pubsubTopics

* flag words in cspell
2023-10-16 12:52:32 +05:30
Florin Barbu b96c3bd3e1
chore: disable paralles runs locally (#1662)
* disable paralles runs locally

* add logs

* add readme info about local execution
2023-10-13 17:32:28 +03:00
Florin Barbu 347cbfa08a
chore: run tests in parallel (#1655)
* run tests in parallel

* small fixes

* small fixes

* fix setup of nodes

* fix relay tests

* fix Static Sharding: Running Nodes tests

* try with 5 threads

* try with 6 threads

* use startWithRetries as default start

* revert to 6

* set 10 jobs

* revert to back to 6

* add CI info in readme
2023-10-13 12:36:43 +03:00
fbarbu15 aa93a441d5
use loadash instead of custom function 2023-10-10 09:15:36 +03:00
fbarbu15 c9389e3d07
improve teardown nodes 2023-10-10 09:03:44 +03:00
fbarbu15 00cb2c6b28
Merge branch 'master' of https://github.com/waku-org/js-waku into chore/new-store-tests 2023-10-04 11:57:40 +03:00
Florin Barbu 29d83786b2
chore: update org (#1632)
* update org

* update other images as well

* small fix
2023-10-03 16:11:41 +05:30
fbarbu15 9371477069
new store tests 2023-10-03 10:05:32 +03:00
fbarbu15 2ff19c7901
merge master 2023-10-02 13:11:12 +03:00
Florin Barbu f1d8d6097f
chore(static sharding): add tests for multiple pubsub topics (#1624)
* new tests for static sharding

* store tests

* small fixes after ci run

* small fixes after ci run

* small fixes after ci run

* multiple pubsubtopics on nwaku node
2023-10-02 15:07:00 +05:30
fbarbu15 f307e9b6c6
intermediat commit 2023-09-29 14:03:43 +03:00
Simon-Pierre Vivier 6fa106aa7f
fix: subscription RPC & added test subscriptions (#1587)
Co-authored-by: Sasha <118575614+weboko@users.noreply.github.com>
2023-09-26 00:24:49 +02:00
Florin Barbu 9ab4e86f19
chore: bump nwaku version to 0.20 (#1591) 2023-09-22 02:55:49 +02:00
Simon-Pierre Vivier 7905aa478b
fix: explicit nwaku subscriptions in tests (#1572)
* Nwaku subscriptions explicit in tests

* Subscription before each & renaming

* Fix
2023-09-19 22:45:27 +02:00
fbarbu15 e284c78701
chore: new lightpush tests (#1571)
* new lightpush tests

* fixes after CI run

* split tests into 2 files

* small fix

* address code review comments

* small fix after CI run

---------

Co-authored-by: Danish Arora <35004822+danisharora099@users.noreply.github.com>
2023-09-19 15:51:03 +05:30
fbarbu15 b42601d156
chore: new filter tests (#1552)
* add bulk of tests

* refactored and improved tests

* add more comments

* fixes after CI run

* split filter tests into mulitple suites

* split filter tests into mulitple suites
2023-09-12 23:31:35 +02:00
fbarbu15 617622c3ec manually triggerr ci with custom nim node image 2023-08-24 14:03:44 +03:00
Danish Arora 7a805a277a
bump nwaku to 0.19 (#1485) 2023-08-16 23:23:37 +05:30
Danish Arora 87717981eb
chore: upgrade libp2p and related deps (#1482)
* chore: update noise

* update: package.lock

* update: @chainsafe/libp2p-gossipsub

* rm unwanted libp2p interface deps & bump up libp2p

* refactor code for new deps

* update: new package.lock

* setup prettier, refactor eslint  and rm trailing commas

* update package.lock

* fix build

* import type for interface

* fix imports for merge

* update typedoc exports

* add: CustomEvent import

* use new libp2p interface

* add aegir as dev dep for tests
2023-08-16 20:18:13 +05:30
Sasha 51f9261a16
chore: update dependencies (#1460)
* update to latest prettier

* fix with prettier: added trailing comma

* remove deps from test package, add sinon types, fix type hack in a test, update esling prettier config

* update typescript eslint plugins

* update package-locks
2023-08-11 15:14:02 +02:00
Sasha 75808ffc9d
chore: test agains Fleets and add optional tests (#1432)
* test Prod and Test fleets in CI

* compute predefined nodes once

* remove async

* add optional test step

* fix command
2023-08-07 10:27:16 +02:00
Danish Arora 376bcf2a0a
chore: new eslint rules (#1416)
* add new eslint rules

* remove eslint scripts for build-utils

* refactor all files to fix breaking changes with new rules

* add a basic eslintrc for build-utils

* test

* fix more linting errors

* test

* update package.lock

* update stopping container

* update px node spec

* enable tests

* fix: conn manager events

* fix: peer exchange

* increase timeout on px test
2023-07-24 16:04:24 +05:30
fryorcraken.eth 008bb6ca2e
test: `topics` arg renamed to `topic` in nwaku 2023-06-30 15:14:01 +10:00
fryorcraken.eth 3b1f0adb43
test: bump nwaku to v0.18.0 2023-06-30 15:14:00 +10:00
Danish Arora b2caf10d03
fix: go-waku interop tests (#1378)
* fix interop for filter v1

* change to better desc
2023-05-23 23:45:08 +05:30
Danish Arora 6e2d1d674a
update nwaku image in run-tests script (#1375) 2023-05-23 16:53:30 +05:30