mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-08-24 23:11:12 +00:00
feature/rpc-query (#186)
* started working on rpc query * rpc * fixes * setup * made it work * update * Create store.md * Update nangang.md
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# Running Store Protocol
|
||||
|
||||
## How to
|
||||
|
||||
Build:
|
||||
|
||||
```
|
||||
# make wakunode2 is run as part of scripts2 target
|
||||
make scripts2
|
||||
```
|
||||
|
||||
Run two nodes and connect them:
|
||||
|
||||
```
|
||||
# Starts listening on 60000 with RPC server on 8545.
|
||||
# Note the "listening on address" in logs.
|
||||
./build/wakunode2 --ports-shift:0
|
||||
|
||||
# Run another node with staticnode argument
|
||||
./build/wakunode2 --ports-shift:1 --staticnode:/ip4/0.0.0.0/tcp/60000/p2p/16Uiu2HAmF4tuht6fmna6uDqoSMgFqhUrdaVR6VQRyGr6sCpfS2jp --storenode:/ip4/0.0.0.0/tcp/60000/p2p/16Uiu2HAmF4tuht6fmna6uDqoSMgFqhUrdaVR6VQRyGr6sCpfS2jp
|
||||
```
|
||||
|
||||
You should see your nodes connecting.
|
||||
|
||||
Do basic RPC calls:
|
||||
|
||||
```
|
||||
./build/rpc_subscribe 8545
|
||||
./build/rpc_subscribe 8546
|
||||
./build/rpc_publish 8545 # enter your message in STDIN
|
||||
./build/rpc_query 8546 # enter your topic default is "foobar"
|
||||
```
|
||||
|
||||
You should see other node receive something.
|
||||
Reference in New Issue
Block a user