Go to file
Alberto Soutullo d04d3b6c17 Deleted unnecessary variables 2023-02-12 01:57:44 +01:00
config Fixed mistake when rebasing 2023-02-09 18:31:25 +01:00
gennet-module 0xfugue gennet go waku topic (#71) 2023-02-08 21:01:35 +05:30
monitoring Refactor (#18) 2022-12-23 17:51:42 +05:30
src Deleted unnecessary variables 2023-02-12 01:57:44 +01:00
wsl-module Loads topics TOML 2023-01-27 15:23:31 +00:00
.dockerignore Initial commit 2022-10-13 18:46:01 +02:00
.gitignore Wait till simulation end and copy summary back to host 2023-01-30 13:05:08 +00:00
README.md Upgrade Kurtosis and fix breaking changes 2023-02-09 10:05:19 +01:00
build.sh Upgrade Kurtosis and fix breaking changes 2023-02-09 10:05:19 +01:00
kurtosis.yml Trying to set up prometheus under Kurtosis 2022-12-16 13:13:12 +01:00
main.star Changed system_variables variable to sys, since it was too verbose 2023-02-12 01:57:27 +01:00
run.sh Fixed run.sh because of last changes in kurtosis version 2023-02-09 18:31:25 +01:00
tests.star Changed system_variables variable to sys, since it was too verbose 2023-02-12 01:57:27 +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.66.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.