1262 Commits

Author SHA1 Message Date
Simon-Pierre Vivier
e8d1484b3c feat: added RELAY openapi definitions (#2081) 2023-09-26 15:53:46 -04:00
Ivan Folgueira Bande
4d18b967e1 fix: libwaku.nim: unsubscribe -> unsubscribeAll to make it build properly (#2082)
* libwaku.nim: unsubscribe -> unsubscribeAll to make it build properly

We introduced a change in the next PR
https://github.com/waku-org/nwaku/pull/1983/
that made the `libwaku` to stop building properly
(make libwaku) because a signature change in the
`unsubscribe` proc of waku/waku_relay/protocol.nim.

This commit is a temporary workaround to make it work,
and not block any ongoing PR tests,
although not exactly as it is expected because we are
unsubscribing from all topics.

* ci.yml: adds library/** to force tests when changes under that folder
2023-09-26 16:32:51 +02:00
Vaclav Pavlin
5c88041d57 feat(wakucanary): add latency measurement using ping protocol (#2074) 2023-09-26 15:02:12 +02:00
Ivan Folgueira Bande
33022aa3be fix(archive): dburl check (#2071)
* dburl.nim: simpler regex that can support db_urls with . and - in hostname
* dbrul.nim: accepting any non-empty sequence for user and password
* dburl.nim: skipping validation for 'sqlite' db paths
2023-09-26 13:59:54 +02:00
Simon-Pierre Vivier
9cfde68fdf feat: Autosharding API for RELAY subscriptions (#1983) 2023-09-26 07:33:52 -04:00
Simon-Pierre Vivier
b67db79994 fix: filter discv5 bootstrap nodes by shards (#2073) 2023-09-26 07:30:55 -04:00
Ivan Folgueira Bande
63caaad8e4 chore: Adding -d:postgres flag when creating a Docker image for release and PRs (#2076) 2023-09-26 10:11:38 +02:00
Vaclav Pavlin
0072b070ba feat(networkmonitor): add ping latencies, optimize reconnections (#2068) 2023-09-25 14:38:59 +02:00
Aaryamann Challani
a90ccfafd0 fix(rln-relay): segfault when no params except rln-relay is passed in (#2047) 2023-09-25 13:26:16 +05:30
Ivan Folgueira Bande
4b7fffe8c3 Makefile: making the 'libwaku.so' to be built with 'make all' (#2070) 2023-09-25 08:15:43 +02:00
Ivan Folgueira Bande
01fd3e0082 bumping web3 (#2066) 2023-09-25 08:13:40 +02:00
Simon-Pierre Vivier
19af92455a feat: peer manager can filter select peer by shard (#2063) 2023-09-22 15:13:50 -04:00
chair
2fc42328de create dependency bump template for releases (#2058) 2023-09-22 10:18:01 -07:00
Ivan Folgueira Bande
5fcc15135a waku_thread.nim: Using 'ThreadSignalPtr' instead of loop to handle req/resp (#2045) 2023-09-22 16:36:31 +02:00
Simon-Pierre Vivier
091cb5d899 refactor: Moved external APIs out of node (#2069) 2023-09-22 09:36:46 -04:00
NagyZoltanPeter
971b59c44a feat: lightpush rest api (#2052)
RestApi Lightpush endpoint implemented
* Openapi definition for lightpush rest api
* Update waku/node/rest/lightpush/handlers.nim
* Fix install handler naming, added negative test cases and fixes for restapi lightpush
* Fix error handling in lightpush rest handler
* Fix main success case - relay message that comes with pushRequest
* Fix rest relay serdes test with RelayWakuMessage validation changes
* Checking response message tests
2023-09-22 13:46:55 +02:00
Ivan Folgueira Bande
5122517b9a chore: bump nim-libp2p, nim-toml-serialization, nim-unicodedb, nim-unittest2, nim-websock, nim-zlib, & nimbus-build-system (#2065) 2023-09-22 12:54:23 +02:00
Ivan Folgueira Bande
b4e1a1ca49 Bumping vendor/nim-confutils and vendor/nim-serialization (#2056) 2023-09-21 13:12:14 +02:00
Florin Barbu
9c4e060147 fix js-waku tests in the ci (#2061) 2023-09-21 12:56:04 +03:00
Ivan Folgueira Bande
8a0c2f1a37 Bumping vendor/nim-stew. Adding vendor/nim-results (#2055)
The 'nim-results' package is extracted from 'nim-stew'
2023-09-20 17:46:27 +02:00
Ivan Folgueira Bande
ee033bffca Bumping some vendors (#2048)
dnsclient.nim
nim-bearssl
nim-eth
nim-faststreams
nim-http-utils
nim-json-rpc
nim-json-serialization
nim-libbacktrace
nim-metrics
nim-regex
nim-secp256k1
nim-stew
nim-stint
nim-testutils
2023-09-20 15:45:20 +02:00
Vaclav Pavlin
c0e6576ad2 chore(ci): add js-waku as a dependency for pre-release createion (#2022) 2023-09-20 14:09:38 +02:00
Ivan Folgueira Bande
6694ec7689 Adding 'librln' to libwaku and cleaning waku_example.c (#2044)
* When adding the dependency with 'librln' to 'libwaku', it is required
  to remove the dependency with 'confutils' because the 'nim-confutils'
  module prevents the creation of a dynamic library (libwaku.so.)

* waku_example.c: less code is needed because the Waku Thread attends
  any Waku event whereas the main thread can have a blocking scanf
  to retrieve user inputs.
2023-09-19 17:01:32 +02:00
5a4b763082 ci: add jq, fix RLN build script to not use rustup
To resolve RLN build issues like this:
```
Building: librln_v0.3.4.a
./scripts/build_rln.sh: line 29: rustup: command not found

Warning: to ensure you are building in a supported repo state, please always run "make update" after "git pull"
(it looks like you've forgotten to do this).
This also applies whenever you switch to a new branch or commit, e.g.: whenever you run "git checkout ...".

Failed to download -rln.tar.gz
./scripts/build_rln.sh: line 42: jq: command not found
error: could not find `Cargo.toml` in `/app` or any parent directory
make: *** [Makefile:131: librln_v0.3.4.a] Error 127
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-09-19 16:20:06 +02:00
Ivan Folgueira Bande
66b389a3c4 chore: Updating nim-chronicles, nim-chronos, nim-presto, nimcrypto, nim-libp2p, and nim-nat-transversal (#2043) 2023-09-18 18:51:49 +02:00
Ivan Folgueira Bande
2f32e733aa refactor(cbindings): Thread-safe communication between the main thread and the Waku Thread (#1978)
* Thread-safe comms between main thread & Waku Thread - ChannelSPSCSingle.
* Renaming procs from 'new' to 'createShared'. They use the shared allocator.
* peer_manager_request: no need to use ptr WakuNode.
* waku_thread: moving the 'waitFor' to upper layer.
* waku_thread: `poll()` -> `waitFor sleepAsync(1)` to avoid risk of blocking.
* libwaku: thread-safe "sub-objects" in an inter-thread requests.
  When two threads send data each other, that data cannot contain any
  GC'ed type (string, seq, ref, closures) at any level.
* Allocating the 'configJson' in main thread and deallocating in Waku Thread.
2023-09-18 09:21:50 +02:00
Aaryamann Challani
a28be0557c chore(rln-relay): logs, updated submodule, leaves_set metric (#2024)
* chore(rln-relay): logs, updated submodule, leaves_set metric

* chore(rln-relay): update build script, fix makefile
2023-09-18 10:56:58 +05:30
NagyZoltanPeter
dd86da3247 feat: HTTP REST API: Filter support v2 (#1890)
Filter v2 rest api support implemented 
Filter rest api documentation updated with v1 and v2 interface support.
Separated legacy filter rest interface
Fix code and tests of v2 Filter rest api
Filter v2 message push test added
Applied autoshard to Filter V2
Redesigned FilterPushHandling, code style, catch up apps and tests with filter v2 interface changes
Rename of FilterV1SubscriptionsRequest to FilterLegacySubscribeRequest, fix broken chat2 app, fix tests
Changed Filter v2 push handler subscription to simple register
Separate node's filterUnsubscribe and filterUnsubscribeAll
2023-09-14 21:28:57 +02:00
Vaclav Pavlin
099ff9e4a6 chore(release): update changelog for v0.20.0 release (#2026)
* chore(release): update changelog for v0.20.0 release

* Update CHANGELOG.md

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

* Update CHANGELOG.md

Co-authored-by: Simon-Pierre Vivier <simvivier@status.im>

* fix typo and autosharding highlight, note CLI options removal

---------

Co-authored-by: Ivan Folgueira Bande <128452529+Ivansete-status@users.noreply.github.com>
Co-authored-by: Simon-Pierre Vivier <simvivier@status.im>
2023-09-14 16:03:13 +02:00
Ivan Folgueira Bande
ce37db7af1 fix(sqlite): Properly set user_version to 7 so that the migration procedure is not started (#2031) 2023-09-14 14:12:37 +02:00
Álex Cabeza Romero
8d19e9dfbe test(waku-filter): Subscriber ping tests (#2023)
* Move waku filter utility functions to a different file for reuse.
* Add asyncSetup and asyncTeardown templates.
* Implement waku filter subscriber ping tests.
2023-09-14 11:30:56 +02:00
Ivan Folgueira Bande
042701fcc5 chore(postgres): not loading the libpq library by default & better user feedback (#2028)
* removing implicit dependency with libpq if postgres is not being used.
* We only run the postgres tests when explicitly willing to, i.e. make
POSTGRES=1 test. The reason is that the postgres tests expect a
database instance to be running locally.
2023-09-13 12:45:55 +02:00
NagyZoltanPeter
5913d6e946 chore: move SubscriptionManager under waku_core (#2025)
* chore: cherry-pick from Filter V2 RestApi PR: move FilterPushHandler and SubscriptionManager from Filter V1 to under waku_core
2023-09-12 17:08:40 +02:00
Álex Cabeza Romero
3755d0e714 docs(README): List possible WSL Issue (#1995)
* Add disclaimer on WSL building issue to README.
* Add bundled nim runtime information to README.
2023-09-11 18:06:19 +02:00
Vaclav Pavlin
f6a8852f3c chore(ci): add js-waku test to pre-release workflow (#2017) 2023-09-11 16:16:53 +02:00
Aaryamann Challani
03a7336cf0 fix(rln-relay): waku_rln_number_registered_memberships metrics appropriately handled (#2018) 2023-09-11 19:21:45 +05:30
gabrielmer
f7649c1bc8 fix: prevent IP 0.0.0.0 from being published and update peers with empty ENR data (#1982) 2023-09-11 11:30:12 +03:00
Aaryamann Challani
75fd99e5a4 feat(rln-relay): removed rln from experimental 🚀 (#2001)
* feat(rln-relay): removed rln from experimental 🚀

* fix(waku_node): if rln-relay is nil, return true

* chore(tests): mark rest health as skipped
2023-09-11 12:02:31 +05:30
Aaryamann Challani
09ae3506be chore(rln-relay): updated docs (#1993) 2023-09-11 11:10:41 +05:30
Aaryamann Challani
2278bd7c55 fix(rln-relay): missed roots during sync (#2015) 2023-09-08 18:24:27 +05:30
Vaclav Pavlin
0f2b8b6567 chore(ci): execute js-waku integration tests on image build (#2006) 2023-09-08 14:01:59 +02:00
Alvaro Revuelta
ffa1e7d174 fix(p2p): fix possible connectivity issue (#1996) 2023-09-08 13:36:26 +02:00
NagyZoltanPeter
d7cd41d78c feat: Rest endoint /health for rln (#2011)
* Rest endoint /health added

* Remove dev-debug echo

* Changed not ready message

* Update waku/node/rest/health/handlers.nim

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

* Various fixes on PR foundings, added comments

---------

Co-authored-by: Ivan Folgueira Bande <128452529+Ivansete-status@users.noreply.github.com>
2023-09-08 11:19:47 +02:00
Aaryamann Challani
c928ef0e46 fix(rln-db-inspector): use valueOr pattern (#2012) 2023-09-08 13:58:27 +05:30
Aaryamann Challani
c9bc6bd28f feat(rln_db_inspector): create rln_db_inspector tool (#1999)
* feat(rln_db_inspector): create rln_db_inspector tool

* Apply suggestions from code review

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

---------

Co-authored-by: Ivan Folgueira Bande <128452529+Ivansete-status@users.noreply.github.com>
2023-09-07 18:15:25 +05:30
Simon-Pierre Vivier
038b29d810 fix(tests): relay tests use random port to avoid conflict (#1998) 2023-09-07 07:41:56 -04:00
Ivan Folgueira Bande
399c2bca1e Adding healtcheck and reconnection mechanism to the postgres archive driver (#1997)
It starts an asynchronous infinite task that checks the connectivity
with the database. In case of error, the postgres_healthcheck task
tries to reconnect for a while, and if it determines that the connection
cannot be resumed, then it invokes a callback indicating that
situation. For the case of the `wakunode2` app, this callback
quits the application itself and adds a log trace indicating
the connectivity issue with the database.
2023-09-06 19:16:37 +02:00
Aaryamann Challani
d91b0bdb2b chore(rln-relay): add isReady check (#1989)
* chore(rln-relay): add isReady check

* fix(rln-relay): multiple parameters for checking if node is in sync

* fix: set latesthead in newHeadCallback

* fix: explicit rpc call

* fix: unhandled exception
2023-09-06 14:16:19 +05:30
Aaryamann Challani
7c4ce7361b chore(rln-relay): clean up nullifier table every MaxEpochGap (#1994) 2023-09-06 13:48:02 +05:30
Alvaro Revuelta
82e690367d Add utils to Dockerfile (#1991) 2023-09-05 15:50:54 +02:00