Tool to simulate a waku network with multiple nodes, traffic and users https://simulator.waku.org
Go to file
Alvaro Revuelta e08c84e8e2
Delete unused action
2024-06-12 12:50:01 +02:00
.github/workflows Delete unused action 2024-06-12 12:50:01 +02:00
monitoring removing all uses and references to gowaku (#35) 2024-04-18 16:07:55 +02:00
src Add waku-simulator book (#65) 2024-06-12 12:34:16 +02:00
.gitignore Add waku-simulator book (#65) 2024-06-12 12:34:16 +02:00
.gitmodules Rln membership registration implementation (#23) 2024-03-14 13:35:25 +02:00
5xx.html Block explorer nginx (#61) 2024-06-07 16:53:01 +02:00
README.md Update README.md 2024-06-12 12:44:54 +02:00
book.toml Add waku-simulator book (#65) 2024-06-12 12:34:16 +02:00
deploy_rln_contract.sh Upgrade to RLNv2 (#45) 2024-06-07 10:13:45 +02:00
docker-compose.yml Use rest-traffic image (#64) 2024-06-10 18:44:35 +02:00
nginx.conf Block explorer nginx (#61) 2024-06-07 16:53:01 +02:00
run_bootstrap.sh Add pubsub-topic and cluster-id config to fix peer connectivity (#49) 2024-05-15 16:44:33 +02:00
run_nwaku.sh Enable light push (#60) 2024-06-07 13:15:50 +02:00
wakusim.env Upgrade to RLNv2 (#45) 2024-06-07 10:13:45 +02:00

README.md

waku-simulator

Requires

  • docker
  • docker-compose

How to run

git clone https://github.com/waku-org/waku-simulator.git
cd waku-simulator

Configure the simulation parameters. You can place the env variable in an .env file.

export NWAKU_IMAGE=quay.io/wakuorg/nwaku-pr:2759-rln-v2
export NUM_NWAKU_NODES=5
export TRAFFIC_DELAY_SECONDS=15
export MSG_SIZE_KBYTES=10
export PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
export ETH_FROM=0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
export RLN_RELAY_EPOCH_SEC=10
export RLN_RELAY_MSG_LIMIT=2

docker-compose --compatibility up -d

This will:

  • create a private blockchain and attach a block explorer.
  • deploy RLN contract to it.
  • spin up a bootstrap nwaku node.
  • spin up a given amount of nwaku nodes with specific versions.
  • register an RLN membership for each nwaku node.
  • spin up a rest-traffic instance that will inject traffic into the network via the REST API.
  • see block-explorer http://localhost:3000.
  • see grafana with node metrics http://localhost:3001.

notes

The default login/password for grafana is admin/admin.

warning

in case arp tables are overflowing:

sysctl net.ipv4.neigh.default.gc_thresh3=32000

Compose V2 users should spin up the containers with the following command:

docker-compose --compatibility up -d

Infrastructure

An instance of this service is deployed at https://simulator.waku.org/.

It is configured using wakusim.env file, and new changes to this repository are picked up using a GitHub webhook handler. The docker images used are updated using Watchtower as well.

For details on how it works please read the Ansible role readme file. The original deployment issue can be found here.

The deployed branch is deploy-wakusim.