Playing with topology creation for waku-kurtosis integration
Go to file
0xFugue d677a4c78d
Tweaks (#2)
* added scalefree/newman_watts_strogatz models, fixed a bug

* Readme

* Readme

* added PR2 suggestions
2022-12-22 23:55:48 +05:30
.gitignore json batch generation, kurtosis batch execution tools (#1) 2022-12-21 18:38:24 +05:30
Readme.md Tweaks (#2) 2022-12-22 23:55:48 +05:30
gen_jsons.sh json batch generation, kurtosis batch execution tools (#1) 2022-12-21 18:38:24 +05:30
generate_network.py Tweaks (#2) 2022-12-22 23:55:48 +05:30
main.star json batch generation, kurtosis batch execution tools (#1) 2022-12-21 18:38:24 +05:30
run_kurtosis_tests.sh json batch generation, kurtosis batch execution tools (#1) 2022-12-21 18:38:24 +05:30

Readme.md

This repo contains the scripts to generate different network models for wakukurtosis runs.

run_kurtosis_tests.sh

run_kurtosis_tests.sh will run kurtosis on a set of json files in a directory. It requires two arguments. First is a directory containing json files; other file types in the directory are ignored. Second is the github root/prefix of the kurtosis module you run the tests under.

usage: ./run_kurtosis_tests.sh <input_dir> <repo_prefix>

Running this script is somewhat complicated; so follow the following instructions to a dot. You WILL require the main.star provided here. The main.star reads a input json and instantiates Waku nodes accordingly. The runs are repeated for each of the input json files under the specified directory.

step 0)

symlink run_kurtosis_tests.sh to the root directory of your kurtosis module.

step 1)

backup the your kurtosis module's own main.star. copy the main.star provided here to the root directory of your kurtosis module.
!!! WARNING: symlinking the main.star will NOT work !!!

step 3)

put all the json files you want to use in a directory. Call it Foo

step 3)

copy the Foo directory to the root of your kurtosis module
!!! WARNING: symlinking the directory will NOT work !!!

step 4)

run this script in the root directory of the kurtosis module. provide the directory (Foo) and the github root/prefix of the kurtosis module as arguments to the script

gen_jsons.sh

gen_jsons.sh can generate given number of Waku networs and outputs them to a directory. Please make sure that the output directory exists; both relative and absolute paths work. The Wakunode parameters are generated at random; edit the MIN and MAX for finer control. The script requires bc & /dev/urandom.

usage: ./gen_jsons.sh <output_dir> <#json files needed>

generate_network.py

generate_network.py can generate networks with specified number of nodes and topics. the network types currently supported is "configuration_model" and more are on the way. Use with Python3. Comment out the #draw(fname, H) line to visualise the generated graph.

usage: generate_network [-h] [-o <file_name>] [-n <#nodes>] [-t <#topics>] [-T ]


Generates and outputs the Waku network conforming to input parameters
optional arguments:
-h, --help show this help message and exit
-o , --output output json filename for the Waku network
-n <#nodes>, --numnodes <#nodes> number of nodes in the Waku network
-t <#topics>, --numtopics <#topics> number of topics in the Waku network
-T , --type network type for the Waku network
-p <#partitions>, --numparts <#partitions> number of partitions in the Waku network

The defaults are: -o "Topology.json"; -n 1; -t 1; -p 1; -T "configuration_model"