Commit Graph

652 Commits

Author SHA1 Message Date
Ivan FB 24661ea969
postgres partitions: ensure the partition ranges are o'clock (#2776)
Also, skip the error "partition already exists" because that happens
when multiple nodes interact with the same database.
2024-06-05 17:45:38 +02:00
gabrielmer 21a4b5bd4a
unifying clusterId to be uint16 (#2777) 2024-06-05 15:32:35 +02:00
Ivan FB 25a1aa9231
test_waku_store.nim: add logs to better analyse uncertain flaky tests (#2740) 2024-05-29 10:05:07 +02:00
Prem Chaitanya Prathi 57ecb3e090
fix: move postgres related tests under linux conditional 2024-05-28 17:24:22 +05:30
Simon-Pierre Vivier a65b13fcb8
fix: invalid cursor returning messages (#2724)
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
2024-05-27 10:54:10 -04:00
Simon-Pierre Vivier 4a6ec468db
fix: store v3 bug fixes (#2718) 2024-05-23 08:01:52 -04:00
Ivan FB 78132dc12e
chore: generic change to reduce the number of compilation warnings (#2696) 2024-05-16 22:29:11 +02:00
Ivan FB f0f94412a0
test_client: simple sleep to try avoid macos CI test failures (#2707) 2024-05-16 18:04:04 +02:00
Ivan FB 5b1fbb26c4
test_client: add nil error handling after serverSwitch.start() clientSwitch.start() (#2703) 2024-05-15 12:36:17 +02:00
Akhil 9dfdfa2774
feat: Added message size check before relay for lightpush (#2695) 2024-05-15 14:13:13 +04:00
Ivan FB 840e012294
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
Álex Cabeza Romero 6c3ad50455
test(sharding): Implement sharding tests (#2603)
* Implement sharding tests.
2024-05-13 17:43:14 +02:00
Álex Cabeza Romero 49dd6c1989
test(peer-and-connection-management): Implement tests (#2566)
* Implement peer and connection management tests.
* Fix multiple peers added on initialisation.
* Remove clusterId parameter from newTestWakuNode.
2024-05-13 17:25:44 +02:00
Ivan FB 8451cf8e1b
chore: Postgres enhance get oldest timestamp (#2687)
* postgres: consider also the existing paritions when getting oldest timestamp
* test_driver_postgres_query: adapt test to oldest timestamp
2024-05-10 18:31:01 +02:00
gabrielmer a37c9ba911
fix: use await instead of waitFor in async tests (#2690) 2024-05-10 14:13:58 +02:00
NagyZoltanPeter 026d804a0d
feat: Added flexible rate limit checks for store, legacy store and lightpush (#2668)
* Added flexible rate limit checks for store, legacy store and lightpush. Also added rate and traffic metrics.

* Fix chat2 after WakuLegacyStoreCodec rename

* Update waku/common/ratelimit.nim

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

* Update waku/common/ratelimit.nim

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

* Update waku/waku_store_legacy/protocol.nim

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

* Fix review findings, added limit to debug logs

---------

Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
2024-05-09 20:07:49 +02:00
Simon-Pierre Vivier fa26d05f8e
fix: message cache removal crash (#2682) 2024-05-09 10:38:55 -04:00
gabrielmer b643f4c4ae
adding wait after starting node to avoid segfault (#2686) 2024-05-09 11:31:58 +02:00
Simon-Pierre Vivier d700006a6a
feat: store v3 return pubsub topics (#2676) 2024-05-08 15:35:56 -04:00
gabrielmer a46d4451eb
feat: supporting meta field in store (#2609) 2024-05-06 10:20:21 +02:00
Ivan FB 2463527b24
refactor: big refactor to add waku component in libwaku instead of onlu waku node (#2658) 2024-05-03 14:07:15 +02:00
Simon-Pierre Vivier e03d1165e6
fix: store v3 validate cursor & remove messages (#2636) 2024-05-01 14:47:06 -04:00
Aaryamann Challani 5dd645cfc3
fix(waku_keystore): sigsegv on different appInfo (#2654)
* fix(waku_keystore): sigsegv on different appInfo

* fix: field specific errors

* fix: more verbose error logs
2024-05-01 23:05:22 +05:30
Aaryamann Challani a9e19efd7a
fix(rln-relay): persist metadata every batch during initial sync (#2649)
* fix(rln-relay): persist metadata every batch during initial sync

* fix: test

* Apply suggestions from code review

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

* patch: isOkOr template

---------

Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
2024-04-30 18:52:47 +05:30
Ivan FB 4a110f65ff
refactor: metrics server. Simplify app.nim module (#2650) 2024-04-30 15:07:17 +02:00
Aaryamann Challani 1d7ff2881b
chore(rln-relay): resultify rln-relay 1/n (#2607)
* chore(rln-relay): resultify rln-relay 1/n

* fix: v2 too

* fix: for static group manager

* fix: cleanup, make PR digestable

* fix: remove resultified retry wrapper

* fix: cleanup

* fix: cleanup
2024-04-26 11:53:58 +02:00
Simon-Pierre Vivier 0b0fbfad5c
feat: store v3 (#2431) 2024-04-25 09:09:52 -04:00
Ivan FB b28207ab07
refactor: addition of waku_api/rest/builder.nim and reduce app.nim (#2623) 2024-04-24 15:59:50 +02:00
NagyZoltanPeter 6d135b0d1b
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
Prem Chaitanya Prathi e61e4ff90a
fix: don't use WakuMessageSize in req/resp protocols (#2601)
* fix: don't use WakuMessageSize in req/resp protocols
2024-04-20 09:10:52 +05:30
Ivan FB 1ba9df4be0
refactor: move app.nim and networks_config.nim to waku/factory (#2608) 2024-04-19 20:03:36 +02:00
kaichao 768c61b114
fix: create options api for cors preflight request (#2598) 2024-04-18 18:29:50 +08:00
Ivan FB 4a8e62ac5e
fix: node restart test issue (#2576)
* test_protocol.nim: enhance test reboot and connect

- Is not necessary to start the node if the switch object has been
already started
- Enable an existing "Relay can receive messages after reboot and
reconnect" test
- Explicit reconnect to peer in "Relay can receive messages after reboot
and reconnect" test

* tests/waku_relay/utils: avoid starting the proto again in newTestSwitch proc
With that, we avoid double start of the protocol.

* bump nim-libp2p
2024-04-18 11:20:39 +02:00
Ivan FB 828583adc2
refactor: start moving discovery modules to waku/discovery (#2587) 2024-04-17 21:48:20 +02:00
NagyZoltanPeter a00f350cd1
feat: Added simple, configurable rate limit for lightpush and store-query (#2390)
* feat: Added simple, configurable rate limit for lightpush and store-query
Adjust lightpush rest response to rate limit, added tests ann some fixes
Add rest store query test for rate limit checks and proper error response
Update apps/wakunode2/external_config.nim
Move chronos/tokenbucket to nwaku codebasee with limited and fixed feature set
Add meterics counter to lightpush rate limits

Co-authored-by: gabrielmer <101006718+gabrielmer@users.noreply.github.com>
2024-04-15 15:28:35 +02:00
Alvaro Revuelta 47ad0fb001
fix: fix regresion + remove deprecated flag (#2556) 2024-03-26 19:44:55 +01:00
Sergei Tikhomirov 65530264d5
feat(incentivization): add codec for eligibility proof and status (#2419)
* incentivization: add codec for eligibility proofs

* add codec for eligibility proof and eligibility status

* address minor comments

* make status code mandatory in eligibility status
2024-03-26 18:25:42 +01:00
Alvaro Revuelta e861317209
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
Anton Iakimov 18a053591d
chore: switch wakuv2 to waku fleet (#2519)
See https://github.com/status-im/infra-nim-waku/issues/91
2024-03-20 16:28:00 +01:00
Álex Cabeza Romero 33774fada0
fix(2491): Fix metadata protocol disconnecting light nodes (#2533)
* Fix metadata protocol disconnecting light nodes.
* Implement test cases.
2024-03-19 16:18:52 +01:00
richΛrd 7aea2d4fc4
fix(rest): filter/v2/subscriptions response (#2529) 2024-03-18 18:21:06 -04:00
Ivan FB 693a1778d1
chore: Better postgres duplicate insert (#2535)
* postgres_driver: add ON CONFLICT DO NOTHING in the insert statement
* test_driver_postgres: adapt test to ON CONFLICT DO NOTHING
  The insert does not fail when duplicate, it returns a positive response
  when doing 'put' of a duplicated row. The test is adapted so that
  we just check that the number of messages doesn't grow after
  trying to add a duplicated row.
2024-03-18 15:59:45 +01:00
Ivan FB 3ba4378cbe
Generic re-style with nph 0.5.1 (#2396) 2024-03-16 00:08:47 +01:00
Álex Cabeza Romero 0894f0cfea
test(discv5): Implement discv5 tests (#2487)
* Implement discv5 tests.
2024-03-14 19:01:13 +01:00
Álex Cabeza Romero f436240d53
test(peer-exchange): Implement peer exchange tests (#2464)
* Implement peer exchange tests.
* Refactor, and remove duplicated tests.
* feat(wakunode): Resultify fetch peer exchange peers (#2486)
2024-03-14 17:48:09 +01:00
richΛrd c734f60d06
feat(rest): add support to ephemeral field (#2525) 2024-03-13 08:49:21 -04:00
Alvaro Revuelta 5a225809cd
fix: enable autosharding in any cluster (#2505) 2024-03-13 10:58:13 +01:00
gabrielmer a1b3e090e6
chore: adding node factory tests (#2524) 2024-03-12 10:12:44 -05:00
Simon-Pierre Vivier 505479b870
feat: archive update for store v3 (#2451) 2024-03-12 07:51:03 -04:00
Aaryamann Challani 059cb97518
chore(rln-relay-v2): wakunode testing + improvements (#2501)
* chore(rln-relay-v2): additional testing

* fix: bump librln to v0.4.2 for v2

* fix: catch possible error from the copyFrom

* ci: rename step title for rln-version
2024-03-12 16:20:30 +05:30