184 Commits

Author SHA1 Message Date
fryorcraken
bc8acf7611
feat: Waku API create node (#3580)
* introduce createNode

# Conflicts:
#	apps/wakunode2/cli_args.nim

* remove confutils dependency on the library

* test: remove websocket in default test config

* update to latest specs

* test: cli_args

* align to spec changes (sovereign, message conf, entrypoints

* accept enr, entree and multiaddr as entry points

* post rebase

* format

* change from "sovereign" to "core"

* add example

* get example to continue running

* nitpicks

* idiomatic constructors

* fix enum naming

* replace procs with consts

* remove messageConfirmation

* use pure enum

* rename example file
2025-10-01 16:31:34 +10:00
Darshan K
3c9b355879 feat: deprecate tree_path and rlnDB (#3577) 2025-09-26 14:47:15 +05:30
gabrielmer
012d719722 chore: cleaning waitFor instances (#3495) 2025-07-10 19:49:47 +03:00
Ivan FB
478925a389 chore: refactor to unify online and health monitors (#3456) 2025-06-16 18:44:21 +02:00
fryorcraken
cc66c7fe78 chore!: separate internal and CLI configurations (#3357)
Split `WakuNodeConfig` object for better separation of concerns and to introduce a tree-like structure to configuration.

* fix: ensure twn cluster conf is still applied when clusterId=1
* test: remove usage of `WakuNodeConf`
* Remove macro, split builder files, remove wakunodeconf from tests
* rm network_conf_builder module as it is not used

---------

Co-authored-by: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com>
Co-authored-by: Ivan Folgueira Bande <ivansete@status.im>
2025-05-07 23:05:35 +02:00
Ivan FB
3786ce12e2 chore: Circuit relay (#3112)
* undo apt install libpcre (not circuit-relay related.)
* nat.nim: protect against possible exceptions when calling getExternalIP
* new external CLI argument, isRelayClient
* waku factory change to mount circuit hop proto by default
* waku_node: move autonat_service to a separate module
2024-10-28 09:17:46 +01:00
gabrielmer
36df0fd838 fix: setting up node with modified config (#3036) 2024-09-16 16:30:38 +03:00
Darshan K
8da2a9c0a5 chore: refactor relative path to better absolute (#2861) 2024-07-06 00:03:38 +02:00
Darshan K
7ad9722ecf chore: remove all pre-nim-1.6 deadcode from codebase (#2857) 2024-06-28 16:04:57 +05:30
Ivan FB
ab3b7df42e chore: libwaku - allow to properly set the log level in libwaku and unify a little (#2708)
* waku.nimble: set properly chronicles compilation flags for static libwaku
* adapt examples to new log setup
2024-05-17 16:28:54 +02:00
Ivan FB
652fc172d4 chore: generic change to reduce the number of compilation warnings (#2696) 2024-05-16 22:29:11 +02:00
Ivan FB
0b2859ed5a chore: move code from wakunode2 to a more generic place, waku (#2670)
* testlib/wakunode.nim: not use cluster-id == 1 to avoid test rln by default
2024-05-13 17:45:48 +02:00
Ivan FB
1d35ca970f refactor: big refactor to add waku component in libwaku instead of onlu waku node (#2658) 2024-05-03 14:07:15 +02:00
Ivan FB
7bab843003 refactor: metrics server. Simplify app.nim module (#2650) 2024-04-30 15:07:17 +02:00
Ivan FB
963d79aee7 refactor: addition of waku_api/rest/builder.nim and reduce app.nim (#2623) 2024-04-24 15:59:50 +02:00
NagyZoltanPeter
daa88019d0 chore: Separation of node health and initialization state from rln_relay (#2612)
* Separation of node health and initialization state from rln_relay status. Make (only) health endpoint avail early and install others in the last stage of node setup.

* Proper json report from /health, adjusted and fixed test, added convenient script for checking node health

* Stop wakunode2 if configured rest server cannot be started

* Fix wakuRlnRelay protocol existence check

* Fix typo

* Removed unused imports from touched files.

* Added missing /health test for all
2024-04-23 18:53:18 +02:00
Ivan FB
dc7d036074 refactor: move app.nim and networks_config.nim to waku/factory (#2608) 2024-04-19 20:03:36 +02:00
Ivan FB
790b708d11 refactor: start moving discovery modules to waku/discovery (#2587) 2024-04-17 21:48:20 +02:00
Alvaro Revuelta
c0609a1a9e fix: cluster-id 0 disc5 issue (#2562) 2024-04-04 08:19:31 +02:00
Alvaro Revuelta
c432c1bfcc chore: remove deprecated legacy filter protocol (#2507)
* chore: remove deprecated legacy filter protocol

* fix: do not use legacy import in test

* fix: remove legacy test references

* fix: more test fixes, starting filter client

* fix: sigh. more references to remove.

* fix: fix dereferencing error

* fix: fix merge mess up

* fix: sigh. merge tool used tabs.

* fix: more peer manager tests needed fixing

---------

Co-authored-by: Hanno Cornelius <hanno@status.im>
Co-authored-by: Hanno Cornelius <68783915+jm-clius@users.noreply.github.com>
2024-03-25 18:07:56 +00:00
Ivan FB
cf6298ca1f Generic re-style with nph 0.5.1 (#2396) 2024-03-16 00:08:47 +01:00
gabrielmer
877c618ef1 chore: factory cleanup (#2523) 2024-03-12 07:44:54 -06:00
gabrielmer
92051e95d2 chore: migrating logic from wakunode2.nim to node_factory.nim (#2504) 2024-03-08 16:46:42 -06:00
Aaryamann Challani
af27c97ddd chore(rln_db_inspector): include in wakunode2 binary (#2292) 2024-03-06 19:38:43 +05:30
gabrielmer
8cf2f78b6c chore: moving node initialization code to node_factory.nim (#2479) 2024-03-02 18:59:53 -06:00
Ivan FB
75521122a4 chore: Postgres migrations (#2477)
* Add postgres_driver/migrations.nim
* Postgres and archive logic adaptation to the migration implementation
* libwaku: adapt node_lifecycle_request.nim to migration refactoring
* test_app.nim: add more detail for test that only fails in CI
* postgres migrations: store the migration scripts inside the resulting wakunode binary instead of external .sql files.
2024-03-01 12:05:27 +01:00
Alvaro Revuelta
a8769955f0 chore: remove json rpc (#2416) 2024-02-29 23:35:27 +01:00
NagyZoltanPeter
7885ce0c9e chore: Implemented CORS handling for nwaku REST server (#2470)
* Add allowOrigin configuration for wakunode and WakuRestServer
Update nim-presto to the latest master that contains middleware support
Rework Rest Server in waku to utilize chronos' and presto's new middleware design and added proper CORS handling.
Added cors tests and fixes

Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
2024-02-29 09:48:14 +01:00
Alvaro Revuelta
cd9ebde02f chore: remove rln epoch hardcoding (#2483) 2024-02-28 17:19:20 +01:00
Aaryamann Challani
52af324f47 fix(rln-relay): regex pattern match for extended domains (#2444)
* fix(rln-relay): regex pattern match for extended domains

* fix: enable localhost too
2024-02-16 22:42:35 +05:30
Aaryamann Challani
57220f4606 chore(rln-relay): remove wss support from node config (#2442)
* chore(rln-relay): remove wss support from node config

* fix: incl regex pattern examples

* docs: update rln docs
2024-02-16 18:36:31 +05:30
Aaryamann Challani
1563ea8188 fix(rln-relay): graceful shutdown with non-zero exit code (#2429)
* fix(rln-relay): graceful shutdown with non-zero exit code

* fix: missed args

* fix: exception str

Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>

* fix: remove old comment

---------

Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
2024-02-15 16:55:08 +05:30
Aaryamann Challani
a9819fce60 fix(wakunode2): move node config inside app init branch (#2423) 2024-02-13 15:40:45 +05:30
Aaryamann Challani
3842584558 feat(rln-relay-v2): nonce/messageId manager (#2413)
* feat(rln-relay-v2): nonce/messageId manager

* fix: simplify
2024-02-13 10:18:02 +05:30
Aaryamann Challani
9133a2439c feat(rln-relay-v2): rln-keystore-generator updates (#2392)
* chore: init rln-v2 in OnchainGroupManager

* chore: update wrappers

* fix: units for userMessageLimit

* valueOr for error handling

* fix: len usage
2024-02-09 16:31:45 +05:30
Alvaro Revuelta
34d207c4c2 chore: Simplify configuration for the waku network (#2404) 2024-02-07 12:42:20 +01:00
gabrielmer
72c67363ec feat: running validators in /relay/v1/messages/{pubsubTopic} (#2373) 2024-02-01 18:16:10 +01:00
Simon-Pierre Vivier
cfd62e495c feat: shard aware relay peer management (#2332)
note that this feature is behind a config flag. `--relay-shard-manager`
2024-01-30 07:28:21 -05:00
Simon-Pierre Vivier
bfb17ef549 chore: handle errors w.r.t. configured cluster-id and pubsub topics (#2368) 2024-01-30 07:15:23 -05:00
Aaryamann Challani
2065f3db3c chore(rln-relay): remove websocket from OnchainGroupManager (#2364)
* chore(rln-relay): remove websocket from OnchainGroupManager

* fix: swap ws for http
2024-01-23 23:22:45 +05:30
NagyZoltanPeter
f048babdc4 chore: Refactor of FilterV2 subscription management with Time-to-live maintenance (#2341)
* Refactor of FilterV2 subscription handling and maintenance with addition subscription time-to-live support.
Fixed all tests and reworked where subscription handling changes needed it.
Adapted REST API /admin filter subscription retrieve to new filter subscription structure.

* Fix tests and PR comments

* Added filter v2 subscription timeout tests and fixed

* Fix review comments and suggestions. No functional change.

* Remove leftover echoes from test_rest_admin

* Fix failed legacy filter tests due to separation of mounting the filters.

* Small fixes, fix naming typo, removed duplicated checks in test
2024-01-16 17:27:40 +01:00
Ivan FB
c738841d43 chore: message.nim - set max message size to 150KiB according to spec (#2298)
* message.nim: set max message size to 150KiB according to spec

Using KiB instead of KB because that seems more aligned with
the actual default defined in nim-libp2p (1024 * 1024)

Spec details: https://rfc.vac.dev/spec/64/#message-size

* test_protocol.nim: align test to current WakuMessage limit
* test_waku_client.nim: adapt test to MaxWakuMessageSize change
* make maxMessageSize configurable for wakunode2
* wakunode2 app now accepts max-num-bytes-msg-size with KiB, KB, or B units
* testlib/wakunode.nim: set maxMessageSize: "1024 KiB"
* test_waku_client.nim: remove duplicate check in "Valid Payload Sizes"
* set DefaultMaxWakuMessageSizeStr as the only source of truth
* external_config.nim: rename max-num-bytes-msg-size -> max-msg-size
2024-01-03 13:11:50 +01:00
Ivan FB
ce567acb62 ip colocation is parameterizable. If set to 0, it is disabled (#2323)
The "ip colocation" concept refers to the maximum allowed peers
from the same IP address. For example, we allow disabling this limit when the
node works behind a reverse proxy.
2024-01-02 14:01:18 +01:00
Ivan FB
cb59623466 fix: Revert "feat: shard aware peer management (#2151)" (#2312)
This reverts commit dc1d6ce4bf7390e23b73d96634ff87ca9341e129.

We need to revert this commit because
the waku-simulator stopped working. i.e. the nodes couldn't establish
connections among them: 054ba9e33f

Also, the following js-waku test fails due to this commit:
"same cluster, different shard: nodes connect"

* waku_lightpush/protocol.nim: minor changes to make it compile after revert
2023-12-20 15:23:41 +01:00
Ivan FB
7c692cc313 chore: vendor bump for 0.23.0 (#2274)
* on_chain/group_manager: use .async: (raises:[Exception]).
* bump nim-dnsdisc
* update nim-chronos to the latest state
* chat2.nim: catch any possible exception when stopping
* chat2bridge.nim: make it to compile after vendor bump
* ValidIpAddress (deprecated) -> IpAddress
* vendor/nim-libp2p additional bump
* libwaku: adapt to vendor bump
* testlib/wakunode.nim: adapt to vendor bump (ValidIpAddress -> IpAddress)
* waku_node: avoid throwing any exception from stop*(node: WakuNode)
* test_confutils_envvar.nim: ValidIpAddress -> IpAddress
* test_jsonrpc_store: capture exception
* test_rln*: handling exceptions
* adaptation to make test_rln_* to work properly
* signature enhancement of group_manager methods
2023-12-14 07:16:39 +01:00
Simon-Pierre Vivier
dc1d6ce4bf feat: shard aware peer management (#2151) 2023-12-07 06:48:28 -05:00
Simon-Pierre Vivier
ffc39e1f55 chore(rest): refactor message cache (#2221) 2023-11-28 07:21:41 -05:00
Ivan FB
75cbea86cb chore: postres driver allow setting the max number of connection from a parameter (#2246)
* postres driver: allow setting the max number of connections from a parameter
2023-11-24 16:21:22 +01:00
Prem Chaitanya Prathi
76fa222816 fix: admin REST API to be enabled only if config is set (#2218) 2023-11-24 14:43:20 +05:30
Simon-Pierre Vivier
0be13a356f chore: mics. improvements to cluster id and shards setup (#2187) 2023-11-21 15:15:39 -05:00