1245 Commits

Author SHA1 Message Date
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
Vaclav Pavlin
5d30e0acab chore(ci): use commit instead of master for docker image (#1990) 2023-09-05 11:58:01 +02:00
Aaryamann Challani
507966c844 feat(relay): ordered validator execution (#1966)
* feat(relay): ordered validator execution

* fix: make more readable

* test: ignore accepts only

* fix: idempotent .subscribe

* fix(rln-relay): make validators private

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

* fix: include comments, unsubscribe behaviour

* fix: compilation

---------

Co-authored-by: Ivan Folgueira Bande <128452529+Ivansete-status@users.noreply.github.com>
2023-09-05 14:35:07 +05:30
Aaryamann Challani
1c18e4eff1 chore(rln-relay): log levels for certain logs (#1986) 2023-09-04 18:43:59 +05:30
Vaclav Pavlin
595bc3c731 fix(ci): incorrect use of braces (#1987) 2023-09-04 14:08:11 +02:00
Aaryamann Challani
8b34c4a4e6 chore(rln-relay): use the only key from keystore if only 1 exists (#1984)
* chore(rln-relay): use the only key from keystore if only 1 exists

* fix: convert iterator to seq and then index into it
2023-09-04 15:46:44 +05:30
Vaclav Pavlin
a05f153679 chore(ci): enable experimental for the PR image builds (#1976) 2023-09-04 10:47:12 +02:00
Aaryamann Challani
93c79ca7f2 chore(rln-relay): confirm that the provided credential is correct using onchain query (#1980) 2023-09-04 11:22:31 +05:30
Alvaro Revuelta
1b96999d55 chore(api): validate rln message before sending (rest + rpc) (#1968) 2023-09-01 15:03:59 +02:00
Aaryamann Challani
40848871c5 fix(Makefile): invalid path to crate build (#1981) 2023-09-01 16:50:55 +05:30
Ivan Folgueira Bande
969b42bfb5 chore(cbindings): Thread-safe libwaku. WakuNode instance created directly from the Waku Thread (#1957)
* libwaku: create the WakuNode in the Waku thread. Not in the main thread
* node_lifecycle_request.nim: moving hard-coded value to a const item
* libwaku.nim: start using 'isOkOr' instead of 'isErr()'-approach
* node_lifecycle_request.nim: better 'async' & 'await' usage. Not block the runtime
2023-09-01 08:37:02 +02:00
Ivan Folgueira Bande
9304fca800 Dockerfile: forcing a particular heaptrack version to avoid build issues (#1979) 2023-09-01 08:17:12 +02:00
Simon-Pierre Vivier
d4decc2fc5 fix: --topic should be ignore when using --pubsub-topic or --content-topic (#1977) 2023-08-31 16:13:45 -04:00
Ivan Folgueira Bande
94605f40b2 external_config.nim: cleanup 'store-resume-peer' attribute (#1970) 2023-08-31 17:29:05 +02:00
Alvaro Revuelta
547ad4e67a fix(tests): fix flaky test (#1972) 2023-08-31 12:24:41 +02:00
Aaryamann Challani
98c9c21b31 fix(rln-relay): deserialization of valid merkle roots (#1973) 2023-08-31 13:19:43 +05:30
richΛrd
5184a7b15e chore: add debug log indicating succesful message pushes and also log the message hash (#1965) 2023-08-30 18:10:51 -04:00
Vaclav Pavlin
9fbfbc2085 fix(ci): rename tools artifact to prevent conflict (#1971) 2023-08-30 17:29:41 +02:00