mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-06-04 13:09:32 +00:00
Why these changes hang together: - Rename `waku/node/kernel_api/` to `waku/node/waku_node/`: the folder holds the node's protocol APIs, so it should carry the node's name rather than the legacy "kernel_api" label. - Collapse the old `kernel_api.nim` aggregator into the top-level `waku/waku_node.nim` barrel, and drop `net_config`/`health_monitor` from it. Those aren't the node's concern; consumers that used them now import them directly (clearer, explicit deps). - Move the `WakuNode` type from `node_types.nim` into `waku_node.nim`. `node_types.nim` only existed to dodge a `WakuNode`/`SubscriptionManager` import cycle that Nim actually handles fine, so the type now lives in one obvious home and the indirection module is deleted. - Extract `ShardSubscription` and `EdgeFilterSubState` into their own small modules: they are standalone value types with no back-reference to the node. `SubscriptionManager` stays with `WakuNode` on purpose (it is the node's subscription subsystem; the relationship is real). Verified: `wakunode2` and `libwaku` build; representative node tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
waku canary tool
Attempts to dial a peer and asserts it supports a given set of protocols.
./build/wakucanary --help
Usage:
wakucanary [OPTIONS]...
The following options are available:
-a, --address Multiaddress of the peer node to attempt to dial.
-t, --timeout Timeout to consider that the connection failed [=chronos.seconds(10)].
-p, --protocol Protocol required to be supported: store,relay,lightpush,filter (can be used
multiple times).
-l, --log-level Sets the log level [=LogLevel.DEBUG].
-np, --node-port Listening port for waku node [=60000].
--websocket-secure-key-path Secure websocket key path: '/path/to/key.txt' .
--websocket-secure-cert-path Secure websocket Certificate path: '/path/to/cert.txt' .
-c, --cluster-id Cluster ID of the fleet node to check status [Default=1]
-s, --shard Shards index to subscribe to topics [ Argument may be repeated ]
The tool can be built as:
$ make wakucanary
And used as follows. A reachable node that supports both store and filter protocols.
$ ./build/wakucanary \
--address=/dns4/store-01.do-ams3.status.staging.status.im/tcp/30303/p2p/16Uiu2HAm3xVDaz6SRJ6kErwC21zBJEZjavVXg7VSkoWzaV1aMA3F \
--protocol=store \
--protocol=filter \
--cluster-id=16 \
--shard=64
$ echo $?
0
A node that can't be reached.
$ ./build/wakucanary \
--address=/dns4/store-01.do-ams3.status.staging.status.im/tcp/1000/p2p/16Uiu2HAm3xVDaz6SRJ6kErwC21zBJEZjavVXg7VSkoWzaV1aMA3F \
--protocol=store \
--protocol=filter \
--cluster-id=16 \
--shard=64
$ echo $?
1
Note that a domain name can also be used.
--- not defined yet
$ echo $?
0
Websockets are also supported. The websocket port openned by waku canary is calculated as $(--node-port) + 1000 (e.g. when you set -np 60000, the WS port will be 61000)
$ ./build/wakucanary --address=/ip4/127.0.0.1/tcp/7777/ws/p2p/16Uiu2HAm4ng2DaLPniRoZtMQbLdjYYWnXjrrJkGoXWCoBWAdn1tu --protocol=store --protocol=filter
$ ./build/wakucanary --address=/ip4/127.0.0.1/tcp/7777/wss/p2p/16Uiu2HAmB6JQpewXScGoQ2syqmimbe4GviLxRwfsR8dCpwaGBPSE --protocol=store --websocket-secure-key-path=MyKey.key --websocket-secure-cert-path=MyCertificate.crt