Deployment docker-compose files to deploy a go-waku node
Go to file
Prem Chaitanya Prathi 269a4d1d53
chore: rearrange panels in dashboard
2024-01-01 17:04:29 +05:30
monitoring chore: rearrange panels in dashboard 2024-01-01 17:04:29 +05:30
postgres_cfg Initial release of nwaku-compose 2023-08-09 12:36:03 +02:00
.gitignore update 2023-11-07 19:01:28 +01:00
ADVANCED.md feat: changes to make compose work with go-waku 2023-11-23 21:19:31 +05:30
README.md feat: changes to make compose work with go-waku 2023-11-23 21:19:31 +05:30
docker-compose.yml feat: changes to make compose work with go-waku 2023-11-23 21:19:31 +05:30
register_rln.sh feat: changes to make compose work with go-waku 2023-11-23 21:19:31 +05:30
run_node.sh fix: install wget to derive public IP automatically 2023-11-28 14:43:48 +05:30

README.md

go-waku-compose

Ready to use docker-compose to run your own go-waku full node:

  • go-waku node running relay and store protocols with RLN enabled.
  • Simple frontend to interact with your node and the network, to publish and receive messages.
  • Grafana dashboard for advanced users or node operators.
  • Requires docker-compose and git.

📝 0. Prerequisites

You need:

  • Ethereum Sepolia WebSocket endpoint. Get one free from Infura.
  • Ethereum Sepolia account with some balance <0.01 Eth. Get some here.
  • A password to protect your rln membership.
export ETH_CLIENT_ADDRESS=wss://sepolia.infura.io/ws/v3/YOUR_INFURA_KEY
export ETH_TESTNET_KEY=REPLACE_BY_YOUR_KEY
export KEYSTORE_PASSWORD=PICK_A_PASSWORD

🔑 1. Register RLN membership

The RLN membership is your access key to The Waku Network. Its registration is done onchain, and allows your go-waku node to publish messages in a decentralized and private way, respecting some rate limits. Messages exceeding the rate limit won't be relayed by other peers.

This command will register your membership and store it in keystore/keystore.json. Note that if you just want to relay traffic (not publish), you don't need one.

./register_rln.sh

🖥️ 2. Start your node

Start all processes: go-waku node, database and grafana for metrics. Your RLN membership is loaded into go-waku under the hood.

docker-compose up -d

🏄🏼‍♂️ 3. Interact with your go-waku node

📬 4. Use the REST API

Your go-waku node exposes a REST API to interact with it.

# get go-waku version
curl http://127.0.0.1:8645/debug/v1/version
# get go-waku info
curl http://127.0.0.1:8645/debug/v1/info

Publish a message to a contentTopic. Everyone subscribed to it will receive it. Note that payload is base64 encoded.

curl -X POST "http://127.0.0.1:8645/relay/v1/auto/messages" \
 -H "content-type: application/json" \
 -d '{"payload":"'$(echo -n "Hello Waku Network - from Anonymous User" | base64)'","contentTopic":"/my-app/2/chatroom-1/proto"}'

Get messages sent to a contentTopic. Note that any store node in the network is used to reply.

curl -X GET "http://127.0.0.1:8645/store/v1/messages?contentTopics=%2Fmy-app%2F2%2Fchatroom-1%2Fproto&pageSize=50&ascending=true" \
 -H "accept: application/json"

For advanced documentation, refer to ADVANCED.md.