123 Commits

Author SHA1 Message Date
NagyZoltanPeter
1762548741
chore: clarify api folders (#3637)
* Rename waku_api to rest_api and underlying rest to endpoint for clearity
* Rename node/api to node/kernel_api to suggest that it is an internal accessor to node interface + make everything compile after renaming
* make waku api a top level import
* fix use of relative path imports and use default to root rather in case of waku and tools modules
2025-11-15 23:31:09 +01:00
Fabiana Cecin
7b580dbf39
chore(refactoring): replace some isErr usage with better alternatives (#3615)
* Closes apply isOkOr || valueOr approach (#1969)
2025-10-27 14:07:06 -03:00
Ivan FB
7e5041d5e1
Move log level from debug to info (#3622)
* convert all debug logs to info log level
* waku_relay protocol mv notice spammy logs to debug
2025-10-15 10:49:36 +02:00
Prem Chaitanya Prathi
4b0bb29aa9
chore: an attempt to move node API's to separate files (#3614)
* chore: move node API's to separate files
2025-10-08 20:06:46 +05:30
Ivan FB
d94cb7c736
fix log libwaku (#3608)
* libwaku properly set a default log config
* waku_example.c set numShardsInNetwork to 257
2025-10-01 22:03:05 +02:00
fryorcraken
bc8acf7611
feat: Waku API create node (#3580)
* introduce createNode

# Conflicts:
#	apps/wakunode2/cli_args.nim

* remove confutils dependency on the library

* test: remove websocket in default test config

* update to latest specs

* test: cli_args

* align to spec changes (sovereign, message conf, entrypoints

* accept enr, entree and multiaddr as entry points

* post rebase

* format

* change from "sovereign" to "core"

* add example

* get example to continue running

* nitpicks

* idiomatic constructors

* fix enum naming

* replace procs with consts

* remove messageConfirmation

* use pure enum

* rename example file
2025-10-01 16:31:34 +10:00
Darshan K
5fc8c59f54 chore: bump dependencies to v0.37.0 (#3536) 2025-09-10 13:20:37 +05:30
gabrielmer
5d1d538b45 chore: improve connection proc (#3509) 2025-07-16 13:25:06 +02:00
gabrielmer
0830898530 fix: libwaku received signal (#3507) 2025-07-15 14:43:05 +02:00
gabrielmer
7123c5532c chore: wait before starting watchdog (#3502) 2025-07-11 12:07:12 +03:00
gabrielmer
012d719722 chore: cleaning waitFor instances (#3495) 2025-07-10 19:49:47 +03:00
gabrielmer
d820976eaf chore: improve keep alive (#3458) 2025-06-27 11:16:00 +02:00
Ivan FB
26c2b96cfe chore: rename modules (#3469) 2025-06-26 11:27:39 +02:00
Ivan FB
d7a3a85db9 chore: Libwaku watchdog that can potentially raise a WakuNotResponding event if Waku is blocked (#3466)
* refactor add waku not responding event to libwaku

Co-authored-by: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com>
2025-06-24 23:20:08 +02:00
Ivan FB
478925a389 chore: refactor to unify online and health monitors (#3456) 2025-06-16 18:44:21 +02:00
Ivan FB
25a3f4192c feat: retrieve metrics from libwaku (#3452) 2025-06-12 12:49:05 +02:00
gabrielmer
daa4a6a986 feat: add waku_disconnect_all_peers to libwaku (#3438) 2025-06-05 17:25:14 +02:00
Ivan FB
336fbf8b64 fix: relay unsubscribe (#3422)
* waku_relay protocol fix unsubscribe and remove topic validator
* simplify subscription and avoid unneeded code
* tests adaptations
* call wakuRelay.subscribe only in one place within waku_node
2025-06-02 22:02:49 +02:00
gabrielmer
94cd2f88b4 chore: exposing online state in libwaku (#3433) 2025-05-30 17:47:06 +02:00
Ivan FB
2926542fcd simplify libwaku error returns (#3399) 2025-05-14 11:05:02 +02:00
fryorcraken
cc66c7fe78 chore!: separate internal and CLI configurations (#3357)
Split `WakuNodeConfig` object for better separation of concerns and to introduce a tree-like structure to configuration.

* fix: ensure twn cluster conf is still applied when clusterId=1
* test: remove usage of `WakuNodeConf`
* Remove macro, split builder files, remove wakunodeconf from tests
* rm network_conf_builder module as it is not used

---------

Co-authored-by: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com>
Co-authored-by: Ivan Folgueira Bande <ivansete@status.im>
2025-05-07 23:05:35 +02:00
Ivan FB
6bc05efc02 chore: Avoid double relay subscription (#3396)
* make sure subscribe once to every topic in waku_node
* start suggest use of removeValidator in waku_relay/protocol. Commented until libp2p updated.
2025-05-05 22:57:20 +02:00
gabrielmer
8dd31c200b fix: mistaken comments and broken link (#3381) 2025-04-17 23:16:35 +02:00
gabrielmer
559776557b fix: libwaku's redundant allocs (#3380) 2025-04-17 23:15:35 +02:00
gabrielmer
001456cda0 chore: expect camelCase JSON for libwaku store queries (#3366) 2025-04-11 11:07:35 +02:00
Ivan FB
e99762ddfe chore: maintenance to c and c++ simple examples (#3367) 2025-04-11 11:05:22 +02:00
gabrielmer
dffad311a2 fix: avoid performing nil check for userData (#3365) 2025-04-10 14:34:54 +03:00
Ivan FB
75b8838fbf chore: retrieve protocols in new added peer from discv5 (#3354)
* add new unit test to validate that any peer can be retrieved
* add new discv5 test and better peer store management
* wakuPeerStore -> switch.peerStore
* simplify waku_peer_store, better logs and peer_manager enhancements
2025-04-07 12:24:03 +02:00
gabrielmer
93698a0a88 feat: add waku_get_connected_peers_info to libwaku (#3356) 2025-04-04 11:52:33 +03:00
gabrielmer
6d3c758540 feat: waku_relay_get_peers_in_mesh to libwaku (#3352) 2025-04-03 15:13:10 +03:00
gabrielmer
8b443edd98 feat: add waku_relay_get_connected_peers to libwaku (#3353) 2025-04-03 14:27:27 +03:00
NagyZoltanPeter
dcf09dd365 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
05b46239ba fix: using nimMainPrefix in libwaku (#3311) 2025-03-03 11:22:48 +02:00
gabrielmer
798b4bb57b fix: subscribing to RelaydefaultHandler in libwaku (#3308) 2025-02-26 18:04:13 +02:00
gabrielmer
a1901a044e chore: deprecating dnsDiscovery flag (#3305) 2025-02-24 22:06:48 +02:00
gabrielmer
8275d70f35 fix: libwaku's invalid waku message error handling (#3301) 2025-02-17 18:37:43 +02:00
gabrielmer
6b00684ad1 chore: supporting parallel libwaku requests (#3296) 2025-02-13 15:08:32 +02:00
gabrielmer
9063605669 fix: libwaku store request parsing (#3294) 2025-02-12 18:35:50 +02:00
gabrielmer
a117143ca1 fix: avoid sending relay callbacks if relay is disabled (#3276) 2025-02-05 18:16:37 +02:00
gabrielmer
8867fd6fa9 chore: sending msg hash as string on libwaku message event (#3234) 2025-01-30 10:15:31 +02:00
Ivan FB
48859c4266 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
f301c6d9db feat: connection change event (#3225) 2025-01-08 18:53:00 +01:00
richΛrd
ba1870d114 feat(libwaku): add protected topic (#3211) 2025-01-07 09:29:39 -04:00
Ivan FB
c725c96609 libwaku invoke callback within waku_destroy (#3228) 2025-01-03 16:13:26 +01:00
Ivan FB
9f46c3c123 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
e4a07a99ce feat: topic health tracking (#3212) 2024-12-24 11:47:38 +01:00
gabrielmer
790de8a5df feat: allowing configuration of application level callbacks (#3206) 2024-12-13 17:38:16 +01:00
richΛrd
ee9564ec73 fix(libwaku): waku_relay_unsubscribe (#3207) 2024-12-12 08:06:54 -04:00
richΛrd
ddfa212608 fix(libwaku): support string and int64 for timestamps (#3205) 2024-12-10 13:52:21 -04:00
gabrielmer
ad03b22413 feat: making dns discovery async (#3175) 2024-12-03 14:39:37 +01:00