Go to file
Alberto Soutullo Rendo 7bfd00073f Added wait for rpc 2022-12-30 15:06:53 +01:00
config Refactor (#18) 2022-12-23 17:51:42 +05:30
monitoring Refactor (#18) 2022-12-23 17:51:42 +05:30
src Added wait for rpc 2022-12-30 15:06:53 +01:00
wsl-module Fixed overwriting of requirements.txt 2022-12-30 13:46:38 +01:00
.dockerignore Initial commit 2022-10-13 18:46:01 +02:00
.gitignore Added wsl-module requirements to gitignore 2022-12-28 15:30:19 +01:00
README.md Refactor (#18) 2022-12-23 17:51:42 +05:30
kurtosis.yml Trying to set up prometheus under Kurtosis 2022-12-16 13:13:12 +01:00
main.star Working with kurtosis run --enclave-id wakurtosis . 2022-12-28 12:59:56 +01:00

README.md

Wakurtosis

Starting version for Waku network simulations (https://github.com/waku-org/pm/issues/2)

More info about Kurtosis: https://docs.kurtosis.com/

How to use:

Before using this repository note that:

  • You are using Kurtosis version 0.62.0. This is important, as they are working on it and changes can be huge depending on different versions. You can find all Kurtosis versions here.
  • The topology files that will be used by default are defined in config/network_topology/. This topology is created with https://github.com/logos-co/Waku-topology-test
  • Each node will need its own configuration file in config/waku_config_files/waku_X.toml being waku_X the same name that is defined in the topology.
  • Only kurtosis and docker are needed to run this.

How to run

If you want to run it with default arguments, if you are in the root of this repository, you can simply run:

kurtosis run .

There are arguments that can be modified:

  • same_toml_configuration: boolean. Default: true. If true, the some .toml file will be applied to every Waku node. If *false, every node will use its own .toml file.
  • topology_file: string. Default: waku_test_topology_small.json. If defines the network topology that will be created.

Example modifying arguments:

kurtosis run . '{"same_toml_configuration": false, "topology_file": "waku_test_topology_big.json"}'

The enclaves that will be created have randon names, that can be checked with:

kurtosis enclave ls

You can set up a pre-defined enclave name, for example:

kurtosis run --enclave-id wakurtosis .

Note that, if you try to run the same kurtosis module again, you will have clashes. You can clean previous enclaves with:

kurtosis clean -a

What will happen

Kurtosis will automatically add one Waku node as container inside the enclave. The way that nodes are interconnected is given by the topology. The configuration of each node is given by the configuration files. Services are being instantiated SEQUENTIALLY. After each node is set up, there are 5 seconds (defined in system_variables) of waiting time for that node to be ready, and then the ID is requested and saved.

Once all nodes are ready, prometheus and grafana will be set up and connected to all waku nodes.

All nodes are then interconnected.

A predefined number of test messages with specific delay (defined in system_variables) are sent by every node to the same topic.

Peers from one node are requested, just for testing.

Check Prometheus+Grafana

In order to know how to access to Prometheus or Grafana, run:

kurtosis enclave inspect <enclave-name>

With this, you will be able to see the ports exposed to your local machine.

Please, any improvements/bugs that you see, create an issue, and we will work on it.