Commit Graph

159 Commits

Author SHA1 Message Date
NagyZoltanPeter 5277d122d0
Fix wrong install of filter rest api - now installed when using filter client mode and filter client protocol is mounted correctly (#2133) 2023-10-18 11:47:47 +02:00
Alvaro Revuelta d5c3ade5e2
feat: add new metadata protocol (#2062) 2023-10-11 08:58:45 +02:00
Abhimanyu 25d6e52e38
chore: added size based retention policy (#2098)
* chore: added size based retention policy

* chore: post review code - size based retention policy

* chore: review integrated, size retention updated, vacuuming in capacity retention

* chore: typo fixed

* chore: review integrated

* chore: external config updated to support newly added retention policy
2023-10-10 15:29:09 +05:30
NagyZoltanPeter 7b5c36b1c6
feat: /admin rest api endpoint (#2094)
/admin rest api implementation and tests
* open api doc
* Add rest admin test to all tests
* Enrich /admin get peers interface, group protocols by peers in response
2023-10-05 14:00:09 +02:00
Vaclav Pavlin c5aa97046b
chore(networkmonitor): refactor setConnectedPeersMetrics, make it partially concurrent, add version (#2080)
* chore(networkmonitor): refactor setConnectedPeersMetrics, make it partially concurrent, add version

* add more metrics, refactor how most metrics are calculated

* rework metrics table fillup

* reset connErr to make sure we honour successful reconnection
2023-09-28 10:07:27 +02:00
gabrielmer 7797b2cd03
chore: resolving DNS IP and publishing it when no extIp is provided (#2030) 2023-09-27 16:02:24 +03:00
Anton Iakimov 89854a96f6
fix: update wakuv2 fleet DNS discovery enrtree
https://github.com/status-im/infra-misc/issues/171
2023-09-27 13:39:10 +02:00
Vaclav Pavlin 6cb9a8da86
feat(wakucanary): add latency measurement using ping protocol (#2074) 2023-09-26 15:02:12 +02:00
Ivan Folgueira Bande a27d005ffc
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 1763b1efa1
feat: Autosharding API for RELAY subscriptions (#1983) 2023-09-26 07:33:52 -04:00
Vaclav Pavlin ed47354528
feat(networkmonitor): add ping latencies, optimize reconnections (#2068) 2023-09-25 14:38:59 +02:00
Simon-Pierre Vivier 3e72e83067
refactor: Moved external APIs out of node (#2069) 2023-09-22 09:36:46 -04:00
NagyZoltanPeter 02a814bd35
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 1c4533a27a
Bumping vendor/nim-confutils and vendor/nim-serialization (#2056) 2023-09-21 13:12:14 +02:00
NagyZoltanPeter dac072f843
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
Aaryamann Challani 645b034367
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
NagyZoltanPeter fc6194bb6b
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
Ivan Folgueira Bande 1fb13b0967
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 483f40c8f7
chore(rln-relay): clean up nullifier table every MaxEpochGap (#1994) 2023-09-06 13:48:02 +05:30
Aaryamann Challani debc5f19d9
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 a14c32614a
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
Simon-Pierre Vivier 037b166263
fix: --topic should be ignore when using --pubsub-topic or --content-topic (#1977) 2023-08-31 16:13:45 -04:00
Ivan Folgueira Bande 7d37f2ec28
external_config.nim: cleanup 'store-resume-peer' attribute (#1970) 2023-08-31 17:29:05 +02:00
Aaryamann Challani e7b2b88f5b
fix(rln-relay): modify keystore credentials logic (#1956)
* fix(rln-relay): modify keystore credentials logic

fix: bump version

* Update waku/waku_rln_relay/group_manager/on_chain/group_manager.nim

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

* Update tests/waku_rln_relay/test_waku_rln_relay.nim

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

* Update waku/waku_keystore/protocol_types.nim

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

* fix: greatly improve error handling

* fix: display proc and appropriate assert

---------

Co-authored-by: Ivan Folgueira Bande <128452529+Ivansete-status@users.noreply.github.com>
2023-08-29 17:46:21 +05:30
Simon-Pierre Vivier 4539dfc761
feat(discv5): topic subscriptions update discv5 filter predicate (#1918) 2023-08-23 11:50:59 -04:00
Simon-Pierre Vivier c369b3294e
feat: topic subscriptions updates discv5 ENR (#1875) 2023-08-23 09:53:17 -04:00
Aaryamann Challani 6c6302f9e1
fix(rln-relay): waitFor startup, otherwise valid proofs will be marked invalid (#1920) 2023-08-22 17:47:06 +05:30
Aaryamann Challani f08315cdde
fix(rln-relay): remove registration capability (#1916) 2023-08-22 11:49:18 +05:30
Alvaro Revuelta af95b5713f
chore(rln): run rln in all relay pubsubtopics + remove cli flags (#1917) 2023-08-21 08:55:34 +02:00
Simon-Pierre Vivier cf3013962c
feat: update various protocols to autoshard (#1857)
* feat: update FILTER & LIGHTPUSH to autoshard
2023-08-17 08:11:18 -04:00
richΛrd fc604ca5f6
fix: no enr record in chat2 (#1907) 2023-08-14 20:43:10 -04:00
Simon-Pierre Vivier d5d2243c2e
fix: bring back default topic in config (#1902)
* fix: bring back default topic in config

* fix

* Fix a bug

* Fix enr creation
2023-08-11 17:28:24 +02:00
Vaclav Pavlin 7dce0b9e94
fix(wakucanary): add missing return on timeout (#1901) 2023-08-11 10:00:19 +02:00
Hanno Cornelius b9d5d28af5
chore: remove references to v2 (#1898)
* chore: remove references to v2

* fix: lingering rln-relay import path
2023-08-09 18:11:50 +01:00
Hanno Cornelius ab344a9dec
chore: remove Waku v1 and wakubridge code (#1874)
* chore: remove v1 code

* chore: deprecate support for v1 compatibility from JSON-RPC API

* chore: remove v1 tests from JSON-RPC suite

* chore: remove wakubridge code

* chore: remove v1 compatibility functions

* chore: remove support for v1 payloads from chat2 app

* chore: remove v1 from CI processes

* fix: lingering references to private API functions

* fix: remove v1 compat from chat2

* fix: some more lingering references in tests
2023-08-07 15:11:46 +01:00
NagyZoltanPeter 08ff667227
feat: Rest API interface for legacy (v1) filter service. (#1851)
* Added Rest API interface for legacy (v1) filter service with tests.
2023-08-04 11:34:22 +02:00
Vaclav Pavlin 831a093f25
fix(wakucanary): add enr record to builder (#1882) 2023-08-04 07:22:31 +02:00
Simon-Pierre Vivier afb93e2995
feat: autosharding content topics in config (#1856)
- added content topic to config.
- updated ENR building to include content topics.
2023-08-01 16:01:44 -04:00
Simon-Pierre Vivier bbff1ac138
feat: autosharding core algorithm (#1854)
- basic rendezvous hashing
- content topic parsing
- sharding config
- tests
2023-08-01 09:05:16 -04:00
Aaryamann Challani 3fe4522a7e
chore(rln-relay): verify proofs based on bandwidth usage (#1844)
* chore(rln-relay): Verify proofs based on bandwidth usage

* fix(rln-relay): make default threshold 0, for backwards compat

* fix(rln-relay): add unit test for bandwidth cutoff

* fix(rln-relay): rlnRelayBandwidthTreshold option
2023-07-07 17:28:37 +05:30
Alvaro Revuelta 17b24cded6
feat: limit relay connections below max conns (#1813) 2023-07-04 13:31:18 +02:00
Ivan Folgueira Bande 97d3b9f79f
chore(refactor): Move record creation & fix libwaku compilation (#1833)
* Move record creation & fix libwaku

* app,external_config,internal_config,libwaku,sharding: refactorgin to make it compile

---------

Co-authored-by: SionoiS <simvivier@status.im>
2023-06-29 21:59:53 +02:00
Ivan Folgueira Bande 96aa59ba58
refactor of internal_config to avoid passing a 'WakuNodeConf' item (#1832)
This change is needed so that the `libwaku.nim` code gets simpler. The
`libwaku.nim` can't import the 'WakuNodeConf' type because this is
related to the wakunode2 app, and the library shouldn't know about it.
2023-06-29 11:01:14 +02:00
Simon-Pierre Vivier cf46fb7cf6
chore: discv5 re-org clean-up (#1823)
- Remove discv5 from node and it's builder
- Require a record to init a node (was previously using discv5 record).
- Fix various tests that assumed nodes with discv5.
- Fix ENR creation
- Fix wakubridge
- Fix networkmonitor
2023-06-28 08:57:10 -04:00
Ivan Folgueira Bande 3aefade647
fix(discv5): Fixing issue that prevented the wakunode2 from starting (#1829)
* Fixing issue that prevented the wakunode2 from starting

The issue was introduced in PR#1818.

Before this commit, the `wakunode2` app crashed with the next error:

ERR 2023-06-27 15:57:27.268+00:00 5/7 Starting node and protocols failed
topics="wakunode main" tid=1 file=wakunode2.nim:92 error="failed to
start waku discovery v5: "

* fix tests accordingly

* publisher.nim, subscriber.nim: fix
2023-06-27 15:16:59 -04:00
Simon-Pierre Vivier 62d3653022
chore: move discv5 out of node. (#1818)
- Refactor discv5 start, stop & loop.
- Fix tests.
2023-06-27 09:50:11 -04:00
Ivan Folgueira Bande 52894a82d0
refactor(archive): Moving waku archive logic from app.nim to the archive module (#1817)
* Refactoring the Waku Archive. Simplifying the app.nim

This change is needed to accommodate the further PRs where we will integrate Postgres in `wakunode2`.
2023-06-27 13:24:31 +02:00
Alvaro Revuelta 71c4ac1641
chore: add peer manager config to builder (#1816) 2023-06-23 15:30:28 +02:00
Simon-Pierre Vivier 44f9d8dc0e
chore: discv5 re-org setup (#1815)
Key, netconfig, enr are created at App initialization and config files has been renamed.
2023-06-22 16:58:14 -04:00
Ivan Folgueira Bande a44d4bfbcd
refactor(databases): Creation of the databases folder to keep the logic for sqlite and postgres (#1811)
* Refactoring in sqlite and postgres. Creation of the databases folder.
2023-06-22 11:27:40 +02:00