From 529b31edd78d0188fb0e3a4700cb03d98049a737 Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Tue, 14 Mar 2023 13:40:24 +0100 Subject: [PATCH 1/3] adding Scenario 1 config Signed-off-by: Csaba Kiraly --- config_scenario1.py | 62 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 config_scenario1.py diff --git a/config_scenario1.py b/config_scenario1.py new file mode 100644 index 0000000..9ec93a3 --- /dev/null +++ b/config_scenario1.py @@ -0,0 +1,62 @@ +"""Example configuration file + +This file aims to set parameters to realistic values +""" + +import logging +import itertools +import numpy as np +from DAS.shape import Shape + +dumpXML = 1 +visualization = 1 +logLevel = logging.INFO + +# number of parallel workers. -1: all cores; 1: sequential +# for more details, see joblib.Parallel +numJobs = -1 + +# distribute rows/columns evenly between validators (True) +# or generate it using local randomness (False) +evenLineDistribution = False + +# Number of simulation runs with the same parameters for statistical relevance +runs = range(10) + +# Number of validators +numberNodes = [5000] + +# Percentage of block not released by producer +failureRates = range(0, 25, 5) + +# Block size in one dimension in segments. Block is blockSizes * blockSizes segments. +blockSizes = [512] + +# Per-topic mesh neighborhood size +netDegrees = range(4, 7, 2) + +# number of rows and columns a validator is interested in +chis = range(1, 5, 1) + +# ratio of class1 nodes (see below for parameters per class) +class1ratios = [0.9] + +# number of validators per beacon node +validatorsPerNode1 = [1] +validatorsPerNode2 = [16, 32, 64] + +# Set uplink bandwidth. In segments (~560 bytes) per timestep (50ms?) +# 1 Mbps ~= 1e6 / 20 / 8 / 560 ~= 11 +bwUplinksProd = [2200] +bwUplinks1 = [110] +bwUplinks2 = [2200] + +deterministic = True + +def nextShape(): + for run, fr, class1ratio, chi, vpn1, vpn2, blockSize, nn, netDegree, bwUplinkProd, bwUplink1, bwUplink2 in itertools.product( + runs, failureRates, class1ratios, chis, validatorsPerNode1, validatorsPerNode2, blockSizes, numberNodes, netDegrees, bwUplinksProd, bwUplinks1, bwUplinks2): + # Network Degree has to be an even number + if netDegree % 2 == 0: + shape = Shape(blockSize, nn, fr, class1ratio, chi, vpn1, vpn2, netDegree, bwUplinkProd, bwUplink1, bwUplink2, run) + yield shape From d1ee649533140e099e01c0730bd99b086b5cd304 Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Tue, 21 Mar 2023 12:08:21 +0100 Subject: [PATCH 2/3] fixup: define random seed in scenario1 Signed-off-by: Csaba Kiraly --- config_scenario1.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config_scenario1.py b/config_scenario1.py index 9ec93a3..3b066f1 100644 --- a/config_scenario1.py +++ b/config_scenario1.py @@ -52,6 +52,8 @@ bwUplinks1 = [110] bwUplinks2 = [2200] deterministic = True +# If your run is deterministic you can decide the random seed. This is ignore otherwise. +randomSeed = "DAS" def nextShape(): for run, fr, class1ratio, chi, vpn1, vpn2, blockSize, nn, netDegree, bwUplinkProd, bwUplink1, bwUplink2 in itertools.product( From d40a5432aee20c7a3aac4409c31474e5c0d40c5e Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Tue, 21 Mar 2023 14:45:31 +0100 Subject: [PATCH 3/3] updating Scenario1 config Signed-off-by: Csaba Kiraly --- config_scenario1.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/config_scenario1.py b/config_scenario1.py index 3b066f1..14432d5 100644 --- a/config_scenario1.py +++ b/config_scenario1.py @@ -21,35 +21,35 @@ numJobs = -1 evenLineDistribution = False # Number of simulation runs with the same parameters for statistical relevance -runs = range(10) +runs = range(1) # Number of validators -numberNodes = [5000] +numberNodes = [8000] # Percentage of block not released by producer -failureRates = range(0, 25, 5) +failureRates = [0] # Block size in one dimension in segments. Block is blockSizes * blockSizes segments. blockSizes = [512] # Per-topic mesh neighborhood size -netDegrees = range(4, 7, 2) +netDegrees = [6] # number of rows and columns a validator is interested in -chis = range(1, 5, 1) +chis = [2] # ratio of class1 nodes (see below for parameters per class) -class1ratios = [0.9] +class1ratios = [0.8] # number of validators per beacon node validatorsPerNode1 = [1] -validatorsPerNode2 = [16, 32, 64] +validatorsPerNode2 = [100] # Set uplink bandwidth. In segments (~560 bytes) per timestep (50ms?) # 1 Mbps ~= 1e6 / 20 / 8 / 560 ~= 11 -bwUplinksProd = [2200] +bwUplinksProd = [11000] bwUplinks1 = [110] -bwUplinks2 = [2200] +bwUplinks2 = [11000] deterministic = True # If your run is deterministic you can decide the random seed. This is ignore otherwise.