Go to file
Alberto Soutullo 4ddaf9533e Added node builders tests to main test script 2023-01-20 20:50:28 +01:00
config Added node key so some tests are reproducible 2023-01-20 20:50:01 +01:00
gennet-module Quick change to gennet so it takes arguments and file, prioritizing cli 2023-01-19 19:23:40 +01:00
monitoring Refactor (#18) 2022-12-23 17:51:42 +05:30
src modified system variables to add tests variables 2023-01-20 20:50:13 +01:00
wsl-module Added function that calculates the time to the next message 2023-01-09 16:48:27 +00:00
.dockerignore Initial commit 2022-10-13 18:46:01 +02:00
.gitignore Added topology path to config 2023-01-16 12:39:32 +00:00
README.md Updated kurtosis version to 0.64.2 2023-01-19 19:25:22 +01:00
build.sh Updated kurtosis version to 0.64.2 2023-01-19 19:25:22 +01:00
kurtosis.yml Trying to set up prometheus under Kurtosis 2022-12-16 13:13:12 +01:00
main.star Changed starlark code to match 0.64.2 2023-01-19 19:26:34 +01:00
run.sh Changed run.sh to print only neccessary information, and also handle the gennet json to use it in Kurtosis 2023-01-18 15:06:28 +01:00
tests.star Added node builders tests to main test script 2023-01-20 20:50:28 +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.64.2. 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/node_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

From the root of the repo run:

sh ./run.sh

This will load the default confiration .json file ./config/config.json. You can also specify a different .json config file and its location with:

sh ./run.sh ./config/config.json

JSON main configuration file options

These are arguments that can be modified:

  • enclave_name: string. Default: wakurtosis. Defines the name of the Kurtosis enclave being created.
  • 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.
  • simulation_time: int. Default: 300. Specifies the simulation time in seconds.
  • message_rate: int. Default: 25. Specifies the message rate in packets per second.
  • min_packet_size: int. Default: 1. Specifies the minimum size of the packet in bytes. Must be an even number (Waku constrain).
  • min_packet_size: int. Default: 1024. Specifies the maximum size of the packet in bytes. Must be an even number (Waku constrain).
  • dist_type: int. Default: uniform. Specifies the size distribution of the messages being injected into the network. Options are: gaussian and uniform
  • emitters_fraction: int. Default: 0.5. Specifies the fraction of nodes that will be injecting traffic.
  • inter_msg_type: int. Default: poisson. Specifies the inter-message times. Options are: poisson and uniform

dist_type : "gaussian"

# Fraction (of the total number of nodes) that inject traffic
# Values: [0., 1.]
emitters_fraction : 0.5

# Inter-message times
# Values: uniform and gaussian
inter_msg_type : "uniform"
  • num_nodes: int. Number of nodes in the enclave.
  • num_topics: int. Number of topics.
  • node_type: string. Type of node. Options are **desktop and mobile
  • network_type: string. Network topology. Options are configmodel, scalefree, newmanwattsstrogatz, barbell, balancedtree, and star
  • num_partitions: int. Number of partitions within the network.
  • num_subnets: int. Number of subnetworks.

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.

Once all nodes have been interconnected the simulation starts and will inject traffic into the network following the parameters specified in the configuration file.

Check Prometheus+Grafana+Logs

  • Simulation log:

'kurtosis service logs wakurtosis $(kurtosis enclave inspect | grep wsl- | awk '{print $1}')'

  • Grafana server:

To display the IP address and Port of the Grafana server on your local machine run:

'kurtosis enclave inspect | grep grafana- | awk '{print $6}'

Remember that by default is 'wakurtosis'.

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