Commit Graph

42 Commits

Author SHA1 Message Date
Gabriel mermelstein 467d030b8f
re-inserting chronicles 2024-04-12 09:54:06 +03:00
Gabriel mermelstein d8f2e43a93
adding base64 import 2024-04-10 18:45:10 +03:00
Gabriel mermelstein 69162bbdb5
removing log scope 2024-04-10 18:31:04 +03:00
Gabriel mermelstein ece6eb6670
removing unused import 2024-04-10 18:21:05 +03: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
richΛrd 7aea2d4fc4
fix(rest): filter/v2/subscriptions response (#2529) 2024-03-18 18:21:06 -04:00
Ivan FB 3ba4378cbe
Generic re-style with nph 0.5.1 (#2396) 2024-03-16 00:08:47 +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
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
Ivan FB b890f9c663
rest: rm openapi defs. they are in https://github.com/waku-org/waku-rest-api (#2520) 2024-03-08 19:43:55 +01:00
NagyZoltanPeter b151672143
Removed json-rpc leftovers (#2503) 2024-03-05 15:51:43 +01:00
Alvaro Revuelta c994ee049b
chore: remove json rpc (#2416) 2024-02-29 23:35:27 +01:00
NagyZoltanPeter d832f92a43
chore: Implemented CORS handling for nwaku REST server (#2470)
* Add allowOrigin configuration for wakunode and WakuRestServer
Update nim-presto to the latest master that contains middleware support
Rework Rest Server in waku to utilize chronos' and presto's new middleware design and added proper CORS handling.
Added cors tests and fixes

Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
2024-02-29 09:48:14 +01:00
gabrielmer 3903f130cb
feat: supporting meta field in WakuMessage (#2384) 2024-02-14 17:29:59 +02:00
Aaryamann Challani 50308eda0d
feat(rln-relay-v2): nonce/messageId manager (#2413)
* feat(rln-relay-v2): nonce/messageId manager

* fix: simplify
2024-02-13 10:18:02 +05:30
gabrielmer e4e147bcbb
feat: running validators in /relay/v1/auto/messages/{topic} (#2394) 2024-02-05 10:24:54 +02:00
gabrielmer 59d8b6204f
feat: running validators in /relay/v1/messages/{pubsubTopic} (#2373) 2024-02-01 18:16:10 +01:00
Ivan FB 3e65cc18f6
REST store: get msgs from self node when store is mounted and no peerAddr is passed (#2387)
A node that handles REST-Store requests normally acts as a 
Store-client and therefore it retrieved the messages from another
Store-node.
With these changes, we allow a node with Store mounted, to retrieve
its messages. In other words, the node can act as a Store-server of
its messages.

* test_rest_store.nim: add a new test to validate that the self-node can
retrieve its messages to the REST client.

* rest/store/client.nim: add new proc to allow making a GET store
request without peerAddr.

* rest/store/handle.nim: add logic to handle requests that don't
provide peerAddr but the self/local node has Store mounted. In this case,
the self/local node will retrieve its locally stored messages.

* waku_store/self_req_handler.nim: logic to handle "store" requests
allowing the REST-store node to act as a Store-server node. The
'self_req_handler.nim' helps to bypass the store protocol and directly
retrieve the messages from the local/self node. I added this logic in
a separate file from 'protocol.nim' because it doesn't participate in
any libp2p communication.

* waku_store/protocol.nim: make 'queryHandler' attribute public so that
it can be used from the 'self_req_handler.nim' module.
2024-01-31 17:43:59 +01:00
Simon-Pierre Vivier edca1df1a8
feat: shard aware relay peer management (#2332)
note that this feature is behind a config flag. `--relay-shard-manager`
2024-01-30 07:28:21 -05:00
gabrielmer f841454edc
chore: improve POST /relay/v1/auto/messages/{topic} error handling (#2339) 2024-01-18 13:49:13 +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 bcab9d55da
feat: adding filter data admin endpoint (REST) (#2314) 2024-01-09 11:42:29 +01:00
Ivan FB bd7570faa3
bump vendors for 0.24.0 (#2333)
The following vendors have changes but are not being updated for
the reason explained.

nim-web3: not updated because unit tests started to fail and no
straightforward solution found.

nim-toml-serialization: not updated because it introduced a breaking
change on how the --config-file attribute is parsed. The array
attributes now need a comma. For example, the following attribute
from within the config file:

pubsub-topic = [ "/waku/2/default-waku/proto" "/waku/2/testing-store" ]

... should be converted to:

pubsub-topic = [ "/waku/2/default-waku/proto", "/waku/2/testing-store" ]

and we cannot accept that breaking change
2024-01-04 17:35:00 +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 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 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
Simon-Pierre Vivier bebaa59c3b
chore(rest): refactor message cache (#2221) 2023-11-28 07:21:41 -05:00
gabrielmer 59ee3c69c8
chore(REST): returning lightpush support and updated filter protocol (#2219) 2023-11-22 10:56:23 +02:00
Alvaro Revuelta 51f36099d5
fix(rln): error in api when rate limit (#2212) 2023-11-21 19:24:31 +01:00
NagyZoltanPeter 6d81e3841a
chore: Allow text/plain content type descriptor for json formatted content body (#2209)
* Allow text/plain content type descriptor for json formatted content body. Refactored duplicated encode/decode functions for rest api

* Fix relay endpoint decodings of content bodies to accept text/plain

* Added support for content body decoder for checking media type if additional parameters are present

* Fix wrong usage of ContentTypeData - appeared only for tests
2023-11-14 16:59:53 +01:00
Vaclav Pavlin 2cb0989a28
fix(rest): properly check if rln is used (#2205)
* fix(rest): properly check if rln is used

* fix(apis): fix remaining usage of defined(rln)
2023-11-10 15:25:07 +01:00
Ivan FB fa467e2462
fix: lightpush rest (#2176)
* rest/lightpush/handlers.nim: enhance feedback in case of error.
* lightpush/openapi.yaml: fix typo in pubsubTopic field.
2023-11-01 11:30:53 +01:00
Alvaro Revuelta 250e8b983c
fix(rest): fix bug in rest api when sending rln message (#2169) 2023-10-30 16:19:49 +01:00
Simon-Pierre Vivier 7ca516a5f8
feat: REST APIs discovery handlers (#2109) 2023-10-27 15:43:54 -04:00
NagyZoltanPeter b8bcb1e74b
Pull new version of nim-presto that implements RestServer' new error handler callback (#2144)
Added rest request error handler to capture calls on not installed endpoints
better, more descriptive error message returned.
2023-10-27 16:31:57 +02:00
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
Simon-Pierre Vivier 56dbe2a7e1
feat: added RELAY openapi definitions (#2081) 2023-09-26 15:53:46 -04:00
Simon-Pierre Vivier 1763b1efa1
feat: Autosharding API for RELAY subscriptions (#1983) 2023-09-26 07:33:52 -04:00
Simon-Pierre Vivier 3e72e83067
refactor: Moved external APIs out of node (#2069) 2023-09-22 09:36:46 -04:00