nwaku/tools/wakucanary
Jakub Sokołowski 36adfa85fc
tools: move readmes into their respective folders
Makes it easier to link to just one folder in the repo for documentation
purposes without having to also link the parent folder.

Also added a meta file linking to the tools.
Not sure what the others ones do.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-11-15 16:21:51 +01:00
..
README.md tools: move readmes into their respective folders 2022-11-15 16:21:51 +01:00
nim.cfg chore: build rln dependecies only when building v2 2022-11-07 09:14:21 +01:00
wakucanary.nim chore(wakucanary): remove port hardcoding + add cli config (#1345) 2022-11-05 12:56:41 +01:00

README.md

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].

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=/ip4/8.210.222.231/tcp/30303/p2p/16Uiu2HAm4v86W3bmT1BiH6oSPzcsSr24iDQpSN5Qa992BCjjwgrD --protocol=store --protocol=filter
$ echo $?
0

A node that can't be reached.

$ ./build/wakucanary --address=/ip4/8.210.222.231/tcp/1000/p2p/16Uiu2HAm4v86W3bmT1BiH6oSPzcsSr24iDQpSN5Qa992BCjjwgrD --protocol=store --protocol=filter
$ echo $?
1

Note that a domain name can also be used.

$ ./build/wakucanary --address=/dns4/node-01.do-ams3.status.test.statusim.net/tcp/30303/p2p/16Uiu2HAkukebeXjTQ9QDBeNDWuGfbaSg79wkkhK4vPocLgR6QFDf --protocol=store --protocol=filter
$ echo $?
0