Commit Graph

575 Commits

Author SHA1 Message Date
Aaryamann Challani efdc5244f6
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
Hanno Cornelius 7de91d92bb
fix: Fix test for filter client receiving messages after restart (#2360) 2024-01-19 13:05:06 +02:00
gabrielmer f841454edc
chore: improve POST /relay/v1/auto/messages/{topic} error handling (#2339) 2024-01-18 13:49:13 +01:00
gabrielmer 8a9fad2905
fix: making filter admin data test order independent (#2355) 2024-01-17 09:42:22 +01:00
NagyZoltanPeter c3358409bb
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
gabrielmer 3d816c0814
chore: Bump `nim-dnsdisc` (#2354)
* chore: bump `vendor/nim-dnsdisc`

* chore: Update import path of dnsdisc

---------

Co-authored-by: Emil Ivanichkov <emil.ivanichkov@gmail.com>
2024-01-15 16:54:02 +02:00
gabrielmer bcab9d55da
feat: adding filter data admin endpoint (REST) (#2314) 2024-01-09 11:42:29 +01:00
NagyZoltanPeter a34c39c891
test(peer-connection-managenent): Functional Tests (#2321) @ e9d083b27 introduced build error through ambigous function call, testwaku build failed on master (#2337) 2024-01-08 16:45:03 +01:00
Álex Cabeza Romero e9d083b278
test(peer-connection-managenent): Functional Tests (#2321)
* Add simple mock mechanism.
* Implement migrations tests.
* Implement peer storage tests.
* Add simple protobuf serialisation testcase.
2024-01-05 14:49:04 +01:00
Álex Cabeza Romero 3bbe234962
test(autosharding): Functional Tests (#2318)
* Implement autosharding tests.
2024-01-04 16:26:27 +01:00
Ivan FB ed09074cc3
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 32668f43f5
fix: Revert "feat: shard aware peer management (#2151)" (#2312)
This reverts commit dba9820c1f.

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
Álex Cabeza Romero 86353e22a8
test(store): Implement store tests (#2235, 2240)
* Implement store tests
2023-12-19 15:38:43 +01:00
Álex Cabeza Romero fae20bff20
refactor(store): HistoryQuery.direction (#2263)
* Fix issue with default history query ascending value in serde operations: Should use the same value.
* Update direction types to PagingDirection.
2023-12-19 15:10:27 +01:00
Ivan FB 8b37919ee0
test_driver_postgres: enhance test coverage, multiple and single topic (#2301)
Co-authored-by: Abhimanyu <ABresting@users.noreply.github.com>
2023-12-19 10:41:50 +01:00
Alvaro Revuelta 5847f49d3d
fix: make rln rate limit spec compliant (#2294) 2023-12-15 10:26:17 +01:00
Ivan FB 385daf16be
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 dba9820c1f
feat: shard aware peer management (#2151) 2023-12-07 06:48:28 -05:00
Ivan FB 42f1957920
fix: add protection in rest service to always publish with timestamp if user doesn't provide it (#2261) 2023-12-06 14:02:21 +01:00
Ivan FB 72a1f8c724
chore: Better feedback invalid content topic (#2254)
* typo correction appplication -> application
* content_topic.nim: better feedback to user when wrong topic is passed
* test_namespaced_topics.nim: updating tests accordingly
2023-11-30 11:11:33 +01:00
Simon-Pierre Vivier bebaa59c3b
chore(rest): refactor message cache (#2221) 2023-11-28 07:21:41 -05:00
Álex Cabeza Romero 38e100e923
chore(store-archive): Remove duplicated code (#2234)
* Refactor utility functions for store and archive test.
2023-11-27 18:33:27 +01:00
Simon-Pierre Vivier c301e880c8
chore: refactoring peer storage (#2243) 2023-11-27 08:08:58 -05:00
Abhimanyu a1ed517f9c
fix: extended Postgres code to support retention policy + refactoring (#2244)
* updated Postgres retention policy code + refactoring

* Update waku/waku_archive/driver/postgres_driver/postgres_driver.nim

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

* updated code review changes

* data unit fixed, processing everything in bytes now

---------

Co-authored-by: Simon-Pierre Vivier <simvivier@status.im>
2023-11-24 15:43:47 +01:00
Abhimanyu aeb77a3e75
feat: Add new DB column `messageHash` (#2202)
* feat: added DB column messageHash

* feat: minor change

* feat: minor merge conflict fix

* Update test_resume.nim

* Update test_resume.nim

* randomblob() func used to populate attribute

* PRIMARY key updated - SQLite and Postgres
2023-11-22 17:32:56 +01:00
Abhimanyu a22ee60494
chore: deterministic message hash algorithm updated (#2233)
* deterministic hash algorithm updated + testcases

* updated code review
2023-11-22 15:23:43 +01:00
Ivan FB c48accb513
waku_store: better response when the store is requested with wrong cursor (#2231) 2023-11-22 09:32:39 +01:00
Simon-Pierre Vivier 897f487978
chore: mics. improvements to cluster id and shards setup (#2187) 2023-11-21 15:15:39 -05:00
Abhimanyu 9ff441ab47
chore: removing automatic vacuuming from retention policy code (#2228)
* retention policy and testcase updated

* removing dead code

* review updated code
2023-11-21 11:27:50 +01:00
Álex Cabeza Romero c9e869fb29
fix(relay): Failing protocol tests (#2224)
* Fix failing relay protocol tests.
2023-11-16 16:18:50 +01:00
Álex Cabeza Romero a5da1fc494
fix(tests): Compilation failure fix (#2222)
* Add missing required keywords.
2023-11-15 18:10:10 +01:00
Álex Cabeza Romero bd25191a74
test(relay-filter): cleanup (#2138)
* Fix some tests.
* Clean legacy tests.
* Fix imports.
2023-11-15 16:15:38 +01:00
Álex Cabeza Romero f5f431382b
test(waku-relay): Relay (#2101)
* Implement message id tests.
* Implement relay tests.
* Update import paths to use test_all.
2023-11-15 16:11:36 +01:00
Álex Cabeza Romero 85265e6c61
test(waku-filter): Unsubscribe tests (#2085)
* Implement unsubscribe waku filter tests.
* test(waku-filter): Unsubscribe all, payloads and security tests (#2095)
* Implement waku node filter Security and Privacy tests (#2096)
2023-11-15 10:26:01 +01:00
Aaryamann Challani 3498a84600
feat: rln-keystore-generator is now a subcommand (#2189) 2023-11-09 11:48:39 +02:00
Abhimanyu d7ef3ca192
Revert "feat: amending computeDigest func. + related test cases (#2132)" (#2180)
This reverts commit 1669f710ce.
2023-11-08 01:41:23 +01:00
Ivan FB 6da1aeec53
chore: Optimize postgres - prepared statements in select (#2182)
* db_postgres: use prepared statements on most freq select queries
* db_postgres/dbconn.nim adding better feedback in case of query error
* dbconn: use of isOkOr
* pgasyncpool: refactor to reduce code (valueOr, catch:)
2023-11-07 13:38:37 +01:00
Simon-Pierre Vivier 200a11da09
feat(discv5): filter out peers without any listed capability (#2186) 2023-11-06 07:31:36 -05:00
Simon-Pierre Vivier bcf8e9630d
feat: metadata protocol shard subscription (#2149) 2023-10-30 16:58:15 -04:00
Simon-Pierre Vivier 7ca516a5f8
feat: REST APIs discovery handlers (#2109) 2023-10-27 15:43:54 -04:00
gabrielmer f7b9afc26f
feat: implementing port 0 support (#2125) 2023-10-27 10:11:47 +03:00
gabrielmer 944dfdaa99
chore: adding ext-multiaddr-only CLI flag (#2141) 2023-10-24 18:39:25 +03:00
Abhimanyu 13aeebe46f
Revert "feat: messageHash attribute added in SQLite + testcase (#2142)" (#2154)
This reverts commit 9cd8c73d27.
2023-10-24 16:05:39 +02:00
Abhimanyu 9cd8c73d27
feat: messageHash attribute added in SQLite + testcase (#2142)
* feat: messageHash attaribute added in SQLite + testcase

* Update tests/waku_archive/test_driver_sqlite_query.nim

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

---------

Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
2023-10-24 12:19:52 +02:00
Abhimanyu 1669f710ce
feat: amending computeDigest func. + related test cases (#2132)
* feat: amending computeDigest func. + related test cases

* minor fixes

* minor fixes v1: testcase saga continues

---------

Co-authored-by: Vaclav Pavlin <vaclav@status.im>
2023-10-19 11:59:17 +02:00
gabrielmer a5b1cfd024
fix: consider WS extMultiAddrs before publishing host address (#2122) 2023-10-17 12:53:41 +03:00
Álex Cabeza Romero 1bba183492
test(waku-filter): Subscribe tests batch (1/4) (#2034)
* Implement waku filter client subscribe tests.
* Remove legacy filter tests.
* Fix constant for max criteria per subscription limit.
2023-10-12 20:59:21 +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
Sergei Tikhomirov 2c5eb427d7
fix: return erring response if lightpush request is invalid (#2083)
fixes #1641
2023-10-09 16:38:23 +02:00