92 Commits

Author SHA1 Message Date
NagyZoltanPeter
e0b563ffe5
feat: lightpush v3 (#3279)
* Separate new lightpush protocol
New RPC defined
Rename al occurence of old lightpush to legacy lightpush, fix rest tests of lightpush
New lightpush protocol added back
Setup new lightpush protocol, mounting and rest api for it

	modified:   apps/chat2/chat2.nim
	modified:   tests/node/test_wakunode_lightpush.nim
	modified:   tests/node/test_wakunode_sharding.nim
	modified:   tests/test_peer_manager.nim
	modified:   tests/test_wakunode_lightpush.nim
	renamed:    tests/waku_lightpush/lightpush_utils.nim -> tests/waku_lightpush_legacy/lightpush_utils.nim
	renamed:    tests/waku_lightpush/test_all.nim -> tests/waku_lightpush_legacy/test_all.nim
	renamed:    tests/waku_lightpush/test_client.nim -> tests/waku_lightpush_legacy/test_client.nim
	renamed:    tests/waku_lightpush/test_ratelimit.nim -> tests/waku_lightpush_legacy/test_ratelimit.nim
	modified:   tests/wakunode_rest/test_all.nim
	renamed:    tests/wakunode_rest/test_rest_lightpush.nim -> tests/wakunode_rest/test_rest_lightpush_legacy.nim
	modified:   waku/factory/node_factory.nim
	modified:   waku/node/waku_node.nim
	modified:   waku/waku_api/rest/admin/handlers.nim
	modified:   waku/waku_api/rest/builder.nim
	new file:   waku/waku_api/rest/legacy_lightpush/client.nim
	new file:   waku/waku_api/rest/legacy_lightpush/handlers.nim
	new file:   waku/waku_api/rest/legacy_lightpush/types.nim
	modified:   waku/waku_api/rest/lightpush/client.nim
	modified:   waku/waku_api/rest/lightpush/handlers.nim
	modified:   waku/waku_api/rest/lightpush/types.nim
	modified:   waku/waku_core/codecs.nim
	modified:   waku/waku_lightpush.nim
	modified:   waku/waku_lightpush/callbacks.nim
	modified:   waku/waku_lightpush/client.nim
	modified:   waku/waku_lightpush/common.nim
	modified:   waku/waku_lightpush/protocol.nim
	modified:   waku/waku_lightpush/rpc.nim
	modified:   waku/waku_lightpush/rpc_codec.nim
	modified:   waku/waku_lightpush/self_req_handler.nim
	new file:   waku/waku_lightpush_legacy.nim
	renamed:    waku/waku_lightpush/README.md -> waku/waku_lightpush_legacy/README.md
	new file:   waku/waku_lightpush_legacy/callbacks.nim
	new file:   waku/waku_lightpush_legacy/client.nim
	new file:   waku/waku_lightpush_legacy/common.nim
	new file:   waku/waku_lightpush_legacy/protocol.nim
	new file:   waku/waku_lightpush_legacy/protocol_metrics.nim
	new file:   waku/waku_lightpush_legacy/rpc.nim
	new file:   waku/waku_lightpush_legacy/rpc_codec.nim
	new file:   waku/waku_lightpush_legacy/self_req_handler.nim

Adapt to non-invasive libp2p observers

cherry pick latest lightpush (v1) changes into legacy lightpush code after rebase to latest master

Fix vendor dependencies from origin/master after failed rebase of them

Adjust examples, test to new lightpush - keep using of legacy

Fixup error code mappings

Fix REST admin interface with distinct legacy and new lightpush

Fix lightpush v2 tests

* Utilize new publishEx interface of pubsub libp2p

* Adapt to latest libp2p pubslih design changes. publish returns an outcome as Result error.

* Fix review findings

* Fix tests, re-added lost one

* Fix rebase

* Apply suggestions from code review

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

* Addressing review comments

* Fix incentivization tests

* Fix build failed on libwaku

* Change new lightpush endpoint version to 3 instead of 2. Noticed that old and new lightpush metrics can cause trouble in monitoring dashboards so decided to give new name as v3 for the new lightpush metrics and change legacy ones back - temporarly till old lightpush will be decommissioned

* Fixing flaky test with rate limit timing

* Fixing logscope of lightpush and legacy lightpush

---------

Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
2025-03-05 12:07:56 +01:00
gabrielmer
a407664613
fix: using nimMainPrefix in libwaku (#3311) 2025-03-03 11:22:48 +02:00
gabrielmer
ef634c436e
fix: subscribing to RelaydefaultHandler in libwaku (#3308) 2025-02-26 18:04:13 +02:00
gabrielmer
addce8dc33
chore: deprecating dnsDiscovery flag (#3305) 2025-02-24 22:06:48 +02:00
gabrielmer
a3876f1ec4
fix: libwaku's invalid waku message error handling (#3301) 2025-02-17 18:37:43 +02:00
gabrielmer
85da5efa13
chore: supporting parallel libwaku requests (#3296) 2025-02-13 15:08:32 +02:00
gabrielmer
b792bee695
fix: libwaku store request parsing (#3294) 2025-02-12 18:35:50 +02:00
gabrielmer
8a7e602543
fix: avoid sending relay callbacks if relay is disabled (#3276) 2025-02-05 18:16:37 +02:00
gabrielmer
9c209b4c3b
chore: sending msg hash as string on libwaku message event (#3234) 2025-01-30 10:15:31 +02:00
Ivan FB
625c8ee51b
chore: libwaku tweaks (#3233)
* make lightpush return msg hash after successful publish
* libwaku avoid the use of string
* library alloc.nim allocate memory when nil cstring is passed
* libwaku store_request remove extra destroyShared(self)
2025-01-08 20:52:44 +01:00
gabrielmer
e81a5517be
feat: connection change event (#3225) 2025-01-08 18:53:00 +01:00
richΛrd
d932dd10cc
feat(libwaku): add protected topic (#3211) 2025-01-07 09:29:39 -04:00
Ivan FB
04a5355631
libwaku invoke callback within waku_destroy (#3228) 2025-01-03 16:13:26 +01:00
Ivan FB
22ce9ee872
chore: enhance libwaku store protocol and more (#3223)
* json_message_event: avoid converting a WakuMessageHash into 0x...
* waku_thread: wait until the waku thread completely received the request
* waku_thread: add missing deallocShared
* libwaku avoid nonsense onReceivedMessage cb in waku_relay_publish
2025-01-03 12:26:46 +01:00
gabrielmer
6020a673b0
feat: topic health tracking (#3212) 2024-12-24 11:47:38 +01:00
gabrielmer
049fbeabbb
feat: allowing configuration of application level callbacks (#3206) 2024-12-13 17:38:16 +01:00
richΛrd
ab0c1d4aa0
fix(libwaku): waku_relay_unsubscribe (#3207) 2024-12-12 08:06:54 -04:00
richΛrd
2022f54f5c
fix(libwaku): support string and int64 for timestamps (#3205) 2024-12-10 13:52:21 -04:00
gabrielmer
d7d00bfd79
feat: making dns discovery async (#3175) 2024-12-03 14:39:37 +01:00
richΛrd
47a6235414
refactor(libwaku): async (#3180) 2024-12-02 10:56:12 -04:00
Ivan FB
f856298caa
chore: Filter in libwaku (#3177) 2024-11-29 15:31:08 +01:00
Ivan FB
294dd03c45
chore: libwaku - better error handling and better waku thread destroy handling (#3167) 2024-11-08 14:59:02 +07:00
richΛrd
3cb8ebdd8f
refactor(libwaku): allow several multiaddresses for a single peer in store queries (#3171)
* fix: parameter name
* refactor: allow multiple addresses for a peer in a store query
2024-11-08 14:36:16 +07:00
gabrielmer
507b1fc4d9
feat: adding waku_dial_peer and get_connected_peers to libwaku (#3149) 2024-10-30 16:26:33 +02:00
gabrielmer
5c7720c24d
fixing libwaku's dns discovery multiaddress generation (#3155) 2024-10-29 11:39:38 +02:00
richΛrd
3665991a65
chore: support ping with multiple multiaddresses and close stream (#3154) 2024-10-28 15:51:07 -04:00
Ivan FB
cfde7eea82
chore: Circuit relay (#3112)
* undo apt install libpcre (not circuit-relay related.)
* nat.nim: protect against possible exceptions when calling getExternalIP
* new external CLI argument, isRelayClient
* waku factory change to mount circuit hop proto by default
* waku_node: move autonat_service to a separate module
2024-10-28 09:17:46 +01:00
richΛrd
de11e576f4
feat(libwaku): ping peer (#3144) 2024-10-24 09:07:08 -04:00
gabrielmer
76606421a2
fix: peer exchange libwaku response handling (#3141) 2024-10-24 10:32:57 +03:00
gabrielmer
c5a825e206
chore: add to libwaku peer id retrieval proc (#3124) 2024-10-17 19:13:00 +03:00
gabrielmer
3321fd05e7
returning seqs in libwaku as comma separated strings (#3121) 2024-10-16 14:07:23 +03:00
gabrielmer
25da810257
chore: adding to libwaku dial and disconnect by peerIds (#3111) 2024-10-15 15:32:02 +03:00
gabrielmer
ed0ee5be20
chore: improving get_peer_ids_by_protocol by returning the available protocols of connected peers (#3109) 2024-10-11 13:58:29 +03:00
gabrielmer
78759f6e52
using cstring instead of nim strings to avoid segfault (#3108) 2024-10-11 13:57:55 +03:00
gabrielmer
37edaf6264
fix: returning peerIds in base 64 (#3105) 2024-10-10 16:53:30 +03:00
richΛrd
c861fa9f75
chore: remove warnings (#3106)
- Removes deprecation and unused import warnings for libwaku
- Removes unused imports
- Adds .base. pragma to `SubscriptionObserver.onSubscribe`
- Uses casting for uint to enums conversions
- Bumps nim-chronicles
2024-10-10 08:40:09 -04:00
gabrielmer
2e6c299d36
fix: changing libwaku's error handling format (#3093) 2024-10-09 15:12:45 +03:00
gabrielmer
4aabd64b40
fix libwaku's returned enr string (#3097) 2024-10-08 17:22:49 +03:00
gabrielmer
713aa66a63
adding missing error handling in libwaku (#3084) 2024-10-03 00:13:42 +03:00
gabrielmer
d8e6a5cda7
Adding error logs for failed libwaku operations (#3067) 2024-10-01 12:23:04 +03:00
Darshan K
729e63f53d
refactor: wrap peer store (#3051)
Encapsulate peerstore with wakupeerstore
2024-09-27 18:16:46 +05:30
Ivan FB
fd83b42faa
chore: extending store metrics (#3042)
* adding query_metrics module
* update fleet-dashboard with new store panels for better timing insight
2024-09-20 13:23:53 +02:00
NagyZoltanPeter
0a7f16a332
chore: rate limit peer exchange protocol, enhanced response status in RPC (#3035)
* Enhanced peer-ex protocol - added rate limiting, added response status and desc to the rpc

* Better error result handling for PeerEx request, adjusted tests

* Refactored RateLimit configuration option for better CLI UX - now possible to set separate limits per protocol. Adjusted mountings. Added and adjusted tests

* Fix libwaku due to changes of error return type of fetchPeerExchangePeers

* Fix rate limit setting tests due to changed defaults

* Introduce new gauge to help dasboard effectively show current rate limit applied for protocol

* Adjust timeing in filter rate limit test to let macos CI test run ok.

* Address review findings, namings, error logs, removed left-overs

* Changes to reflect latest spec agreement and changes. PeerExchange RPC is changed the now respond structure will contain status_code and status_desc.
2024-09-18 15:58:07 +02:00
Ivan FB
1713f56235
chore: libwaku reduce repetitive code by adding a template handling resp returns (#3032) 2024-09-11 18:11:59 +02:00
Ivan FB
5ea1cf0cf3
chore: libwaku - extending the library with peer_manager and peer_exchange features (#3026)
* libwaku: get peerids by protocol and peer exchange request
2024-09-11 10:13:54 +02:00
Ivan FB
6c890de4a8
chore: Bump dependencies for v0.33 (#3017) 2024-09-09 10:45:14 +02:00
Ivan FB
19feb6bd58
libwaku better params validation and a bit more clarity (#3005) 2024-08-29 22:57:23 +02:00
Ivan FB
bd2cf99d7e
libwaku: exposing more features (#3003)
- Allow to start or store discv5
- Expose lightpush request operation
- Expose list of connected and mesh peers
- Expose store client
2024-08-29 14:29:02 +02:00
Ivan FB
1ff9f1dd67
chore: libwaku retrieve my enr and adapt golang example (#2987) 2024-08-22 12:01:14 +02:00
Ivan FB
fd6a71cdd7
chore: Bump dependencies for v0.31.0 (#2885)
* bump_dependencies.md: add nim-results dependency
* change imports stew/results to results
* switching to Nim 2.0.8
* waku.nimble: reflect the requirement nim 1.6.0 to 2.0.8
  Adding --mm:refc as nim 2.0 enables a new garbage collector that we're
  not yet ready to support
* adapt waku code to Nim 2.0
* gcsafe adaptations because Nim 2.0 is more strict
2024-07-09 13:14:28 +02:00