A collection of supplementary files for the BHS in GoQuorum performance study. Included in this repo are:
- Emulated network generation and experiment-running scripts
- Built for AWS (see diagram below)
- Results fetching and plotting scripts
- Experiment results (see
data/results/)
EmNet generates GoQuorum networks for the following setup:
The caliper VM runs the benchmarking tool Hyperledger Caliper, which sends transactions to the network VM, which runs the Docker emulated network. pumba is used to inject egress packet delay and bandwidth limits on each container. An NGINX load-balancer distributes transactions over the emulated network.
data/: Experiment data and data processing scriptsgenerator/: Test-generation scripts and outputscripts/: VM installation scripts
Experiment results are found in data/results/:
results
βββ bl_rate # baseline cond. send rate
β βββ hotstuff_n=16_tps=100
β β βββ report_1
β β β βββ params.json
β β β βββ report.html
β β βββ report_2
β β βββ ...
β β βββ report_9
β β βββ report_10
β βββ hotstuff_n=16_tps=200
β βββ ...
β βββ plots
βββ bl_scale # baseline cond. scale
βββ bw_200 # BW-limited cond. at 200 TPS
βββ bw_400 # BW-limited cond. at 400 TPS
βββ bw_rate # BW-limited cond. send rate
βββ bw_scale # BW-limited cond. scale
βββ delay_rate # delay-added cond. send rate
βββ delay_scale # delay-added cond. scaleEach test report contains the ff files:
params.json: Test metadata and passed.envparameters to the networkreport.html: Test report generated by Caliper; contains all metrics
All report.html files are processed by to_csv.py before plotting. See plots.ipynb for how plots were generated including report.html metrics are found in the plots/ subdirectories (see gen_plots.py in Usage).
Experiment logs were uploaded to GDrive. [todo: upload to Zenodo]
- On the
caliperVM, run theinstall_cal.shscript - On the
networkVM, run theinstall_net.shscript - Set
.envvalues (see.env.sample). Our study used the same.pemfile for both VMs. - [Optional] Setup the data processing scripts (in
data/) using the ff:
local:~/emnet$ pip install -r requirements.txtMake sure .env values are properly set.
Use gen_tests.py to generate multiple tests. Examples below output to generator/sample_tests:
local:~/emnet$ python3 gen_tests.py -t 300 -n 16 -c "2.50" -a "hotstuff" "qbft" -r 5mbit 10mbit 20mbit 50mbit -o sample_testslocal:~/emnet$ python3 gen_tests.py -t 100 200 300 400 -n 4 8 16 -c "2.50" -a "ibft" "qbft" -d 25 50 100 -o sample_testsGenerated tests have the ff structure:
generator/<test_dir_name>/
βββ fetch_results.py
βββ runner.py
βββ hotstuff_n=16_tps=200_net=r10mbit
βββ hotstuff...
βββ ibft_n=16_tps=200_net=r10mbit
βββ ibft...
βββ qbft_n=16_tps=200_net=r10mbit
βββ qbft...Each test directory (i.e. hotstuff_n=...) contains all the necessary files to run alone using the hotstuff_n=.../test.py script.
Run upload_test.py:
local:~/emnet$ python3 upload_test.py -t generator/<test_dir_name>This should upload the test directory to the network VM (i.e. network:~/<test_dir_name>).
On the network VM, run a tmux session in the test directory and run the ff:
network:~/<test_dir_name>$ python3 runner.pyYou can optionally append sudo shutdown -h now to shutdown the VM after a test.
network:~/<test_dir_name>$ python3 runner.py; sudo shutdown -h nowlocal:~/emnet$ python3 get_results.py -t <test_dir_name>Test reports are placed in the data/ directory. Logs are kept on the network VM (not fetched).
Process and plot test data by running the ff:
local:~/emnet/data$ python3 to_csv.py -t <test_dir_name>
local:~/emnet/data$ python3 gen_plots.py -t <test_dir_name> -k <test_type>Where <test_type> can be one of: send_rate, scalabiltiy, and rate_limit (BW-limit).
Note that to_csv.py skips failed tests.
- ConsenSys Quorum Dev Quickstart as our basis for creating a Docker container network
