Skip to content

Commit da99ff5

Browse files
authored
Experiment for regenerating CIP figures (#500)
* Rerun CIP experiments at tag `sim-rs-1.0.0` * Executed experiment * Analyzed experiment
1 parent 81dee89 commit da99ff5

File tree

51 files changed

+6402
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+6402
-0
lines changed

analysis/sims/cip/analysis.ipynb

Lines changed: 4184 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env nix-shell
2+
#!nix-shell -i bash -p gnused gzip pigz "rWrapper.override { packages = with rPackages; [ data_table R_utils bit64 ggplot2 magrittr stringr ]; }"
3+
4+
set -e
5+
6+
mkdir -p results/$d
7+
for f in lifecycle resources receipts cpus sizes
8+
do
9+
DIR=$(find experiments -type f -name $f.csv.gz \( -not -empty \) -printf %h\\n -quit)
10+
HL=$(sed -n -e '1p' "$DIR/case.csv")
11+
HR=$(zcat "$DIR/$f.csv.gz" | sed -n -e '1p')
12+
if [[ "$f" == "lifecycle" || "$f" == "resources" || "$f" == "sizes" ]]
13+
then
14+
FRACT=1.00
15+
else
16+
FRACT=0.50
17+
fi
18+
(
19+
echo "$HL,$HR"
20+
for g in $(find experiments -type f -name $f.csv.gz \( -not -empty \) -printf %h\\n)
21+
do
22+
if [ ! -e "$g/stderr" ]
23+
then
24+
echo "Skipping $g because it has no stderr." >> /dev/stderr
25+
elif [ -s "$g/stderr" ]
26+
then
27+
echo "Skipping $g because its stderr is not empty." >> /dev/stderr
28+
else
29+
BL=$(sed -n -e '2p' "$g/case.csv")
30+
zcat "$g/$f.csv.gz" | gawk 'FNR > 1 && rand() <= '"$FRACT"' { print "'"$BL"'" "," $0}'
31+
fi
32+
done
33+
) | pigz -p 3 -9c > results/$f.csv.gz
34+
R --vanilla << EOI > /dev/null
35+
require(data.table)
36+
sampleSize <- $FRACT
37+
print(sampleSize)
38+
$f <- fread("results/$f.csv.gz", stringsAsFactors=TRUE)
39+
save($f, sampleSize, file="results/$f.Rdata", compression_level=9)
40+
EOI
41+
done

analysis/sims/cip/experiments.list

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
experiments/typical,0.100/run.sh
2+
experiments/typical,0.150/run.sh
3+
experiments/typical,0.200/run.sh
4+
experiments/typical,0.250/run.sh
5+
experiments/typical,0.300/run.sh
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Network,Bandwidth,CPU,Diffusion duration,Voting duration,Max EB size,Tx size,Throughput,Tx validation,Tx start [s],Tx stop [s],Sim stop [s]
2+
topology-v2,10 Mb/s,4 vCPU/node,L_diff = 0 slots,L_vote = 7 slots,12 MB/EB,1500 B/Tx,0.100 TxMB/s,0.4284 ms/Tx,60,960,1200
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
{
2+
"relay-strategy": "request-from-first",
3+
"tcp-congestion-control": true,
4+
"multiplex-mini-protocols": true,
5+
"simulate-transactions": true,
6+
"treat-blocks-as-full": false,
7+
"cleanup-policies": [
8+
"cleanup-expired-vote"
9+
],
10+
"timestamp-resolution-ms": 0.1,
11+
"leios-variant": "linear-with-tx-references",
12+
"linear-vote-stage-length-slots": 7,
13+
"linear-diffuse-stage-length-slots": 0,
14+
"leios-stage-length-slots": 7,
15+
"leios-stage-active-voting-slots": 1,
16+
"leios-vote-send-recv-stages": false,
17+
"leios-late-ib-inclusion": true,
18+
"leios-header-diffusion-time-ms": 1000.0,
19+
"leios-ib-generation-time-ms": 130.0,
20+
"leios-mempool-sampling-strategy": "ordered-by-id",
21+
"leios-mempool-aggressive-pruning": true,
22+
"store-txs-as-references": true,
23+
"praos-chain-quality": 100,
24+
"praos-fallback-enabled": true,
25+
"tx-generation-distribution": {
26+
"distribution": "constant",
27+
"value": 15.000
28+
},
29+
"tx-size-bytes-distribution": {
30+
"distribution": "constant",
31+
"value": 1500
32+
},
33+
"tx-conflict-fraction": 0,
34+
"tx-overcollateralization-factor-distribution": {
35+
"distribution": "constant",
36+
"value": 0
37+
},
38+
"tx-validation-cpu-time-ms": 0.4284,
39+
"tx-max-size-bytes": 16384,
40+
"tx-start-time": 60,
41+
"tx-stop-time": 960,
42+
"rb-generation-probability": 0.05,
43+
"rb-head-size-bytes": 1024,
44+
"rb-body-max-size-bytes": 90112,
45+
"rb-generation-cpu-time-ms": 1.0,
46+
"rb-head-validation-cpu-time-ms": 1.0,
47+
"rb-body-legacy-praos-payload-avg-size-bytes": 0,
48+
"rb-body-legacy-praos-payload-validation-cpu-time-ms-constant": 0.1481,
49+
"rb-body-legacy-praos-payload-validation-cpu-time-ms-per-byte": 0.0001141,
50+
"ib-generation-probability": 2.0,
51+
"ib-shards": 1,
52+
"ib-shard-period-length-slots": 1,
53+
"ib-shard-group-count": 1,
54+
"ib-head-size-bytes": 304,
55+
"ib-body-avg-size-bytes": 98304,
56+
"ib-body-max-size-bytes": 262144,
57+
"ib-generation-cpu-time-ms": 130.0,
58+
"ib-head-validation-cpu-time-ms": 1.0,
59+
"ib-body-validation-cpu-time-ms-constant": 0.1481,
60+
"ib-body-validation-cpu-time-ms-per-byte": 0.0001141,
61+
"ib-diffusion-strategy": "freshest-first",
62+
"ib-diffusion-max-bodies-to-request": 1,
63+
"ib-diffusion-max-headers-to-request": 100,
64+
"ib-diffusion-max-window-size": 100,
65+
"eb-generation-probability": 1.0,
66+
"eb-size-bytes-constant": 240,
67+
"eb-size-bytes-per-ib": 32,
68+
"eb-generation-cpu-time-ms": 75.0,
69+
"eb-validation-cpu-time-ms": 1.0,
70+
"eb-header-validation-cpu-time-ms": 50.0,
71+
"eb-body-validation-cpu-time-ms-constant": 0.1481,
72+
"eb-body-validation-cpu-time-ms-per-byte": 0.0001141,
73+
"eb-include-txs-from-previous-stage": false,
74+
"eb-diffusion-strategy": "peer-order",
75+
"eb-diffusion-max-bodies-to-request": 1,
76+
"eb-diffusion-max-headers-to-request": 100,
77+
"eb-diffusion-max-window-size": 100,
78+
"eb-max-age-slots": 240,
79+
"eb-max-age-for-relay-slots": 40,
80+
"eb-referenced-txs-max-size-bytes": 12000000,
81+
"eb-body-avg-size-bytes": 12000000,
82+
"vote-generation-probability": 500.0,
83+
"vote-threshold": 300,
84+
"vote-generation-cpu-time-ms-constant": 0.164,
85+
"vote-generation-cpu-time-ms-per-ib": 0,
86+
"vote-generation-cpu-time-ms-per-tx": 0,
87+
"vote-validation-cpu-time-ms": 0.816,
88+
"vote-bundle-size-bytes-constant": 0,
89+
"vote-bundle-size-bytes-per-eb": 105,
90+
"vote-diffusion-strategy": "peer-order",
91+
"vote-diffusion-max-bodies-to-request": 1,
92+
"vote-diffusion-max-headers-to-request": 100,
93+
"vote-diffusion-max-window-size": 100,
94+
"cert-size-bytes-constant": 7168,
95+
"cert-size-bytes-per-node": 0,
96+
"cert-generation-cpu-time-ms-constant": 90.0,
97+
"cert-generation-cpu-time-ms-per-node": 0,
98+
"cert-validation-cpu-time-ms-constant": 130.0,
99+
"cert-validation-cpu-time-ms-per-node": 0,
100+
"linear-eb-propagation-criteria": "txs-received"
101+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../run.sh
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
INFO praos: sim_cli::events: 60001 transactions(s) were generated in total.
2+
INFO praos: sim_cli::events: 52 naive praos block(s) were published.
3+
INFO praos: sim_cli::events: 1148 slot(s) had no naive praos blocks.
4+
INFO praos: sim_cli::events: 60001 transaction(s) (90.00 MB) finalized in a naive praos block.
5+
INFO praos: sim_cli::events: 0 transaction(s) (0 B) did not reach a naive praos block.
6+
INFO praos: sim_cli::events: Pool 4 published 1 naive praos block(s)
7+
INFO praos: sim_cli::events: Pool 37 published 1 naive praos block(s)
8+
INFO praos: sim_cli::events: Pool 41 published 2 naive praos block(s)
9+
INFO praos: sim_cli::events: Pool 53 published 1 naive praos block(s)
10+
INFO praos: sim_cli::events: Pool 55 published 1 naive praos block(s)
11+
INFO praos: sim_cli::events: Pool 56 published 1 naive praos block(s)
12+
INFO praos: sim_cli::events: Pool 59 published 1 naive praos block(s)
13+
INFO praos: sim_cli::events: Pool 65 published 1 naive praos block(s)
14+
INFO praos: sim_cli::events: Pool 68 published 1 naive praos block(s)
15+
INFO praos: sim_cli::events: Pool 73 published 1 naive praos block(s)
16+
INFO praos: sim_cli::events: Pool 97 published 2 naive praos block(s)
17+
INFO praos: sim_cli::events: Pool 132 published 1 naive praos block(s)
18+
INFO praos: sim_cli::events: Pool 136 published 1 naive praos block(s)
19+
INFO praos: sim_cli::events: Pool 361 published 1 naive praos block(s)
20+
INFO praos: sim_cli::events: Pool 362 published 1 naive praos block(s)
21+
INFO praos: sim_cli::events: Pool 363 published 1 naive praos block(s)
22+
INFO praos: sim_cli::events: Pool 367 published 2 naive praos block(s)
23+
INFO praos: sim_cli::events: Pool 371 published 2 naive praos block(s)
24+
INFO praos: sim_cli::events: Pool 376 published 1 naive praos block(s)
25+
INFO praos: sim_cli::events: Pool 418 published 3 naive praos block(s)
26+
INFO praos: sim_cli::events: Pool 431 published 1 naive praos block(s)
27+
INFO praos: sim_cli::events: Pool 443 published 2 naive praos block(s)
28+
INFO praos: sim_cli::events: Pool 474 published 2 naive praos block(s)
29+
INFO praos: sim_cli::events: Pool 478 published 2 naive praos block(s)
30+
INFO praos: sim_cli::events: Pool 510 published 1 naive praos block(s)
31+
INFO praos: sim_cli::events: Pool 513 published 1 naive praos block(s)
32+
INFO praos: sim_cli::events: Pool 521 published 1 naive praos block(s)
33+
INFO praos: sim_cli::events: Pool 527 published 1 naive praos block(s)
34+
INFO praos: sim_cli::events: Pool 532 published 1 naive praos block(s)
35+
INFO praos: sim_cli::events: Pool 533 published 2 naive praos block(s)
36+
INFO praos: sim_cli::events: Pool 542 published 1 naive praos block(s)
37+
INFO praos: sim_cli::events: Pool 547 published 1 naive praos block(s)
38+
INFO praos: sim_cli::events: Pool 553 published 1 naive praos block(s)
39+
INFO praos: sim_cli::events: Pool 554 published 1 naive praos block(s)
40+
INFO praos: sim_cli::events: Pool 557 published 1 naive praos block(s)
41+
INFO praos: sim_cli::events: Pool 563 published 1 naive praos block(s)
42+
INFO praos: sim_cli::events: Pool 564 published 1 naive praos block(s)
43+
INFO praos: sim_cli::events: Pool 567 published 1 naive praos block(s)
44+
INFO praos: sim_cli::events: Pool 568 published 1 naive praos block(s)
45+
INFO praos: sim_cli::events: Pool 744 published 1 naive praos block(s)
46+
INFO praos: sim_cli::events: Pool 745 published 1 naive praos block(s)
47+
INFO praos: sim_cli::events: Pool 749 published 1 naive praos block(s)
48+
INFO leios: sim_cli::events: 0 IB(s) were generated, on average 0.000 IB(s) per slot.
49+
INFO leios: sim_cli::events: 0 out of 60001 transaction(s) were included in at least one IB.
50+
INFO leios: sim_cli::events: The average age of the pending transactions is NaNs (stddev NaN).
51+
INFO leios: sim_cli::events: Each transaction was included in an average of NaN IB(s) (stddev NaN).
52+
INFO leios: sim_cli::events: Each IB contained an average of NaN transaction(s) (stddev NaN) and an average of 0 B (stddev 0 B). 0 IB(s) were empty.
53+
INFO leios: sim_cli::events: Each node received an average of 0.000 IB(s) (stddev 0.000).
54+
INFO leios: sim_cli::events: 52 EB(s) were generated; on average there were 0.043 EB(s) per slot.
55+
INFO leios: sim_cli::events: Each EB contained an average of 2336.615 transaction(s) (stddev 2127.325). 12 EB(s) were empty.
56+
INFO leios: sim_cli::events: Each EB contained an average of 0.000 IB(s) (stddev 0.000). 12 EB(s) were empty.
57+
INFO leios: sim_cli::events: Each IB was included in an average of NaN EB(s) (stddev NaN).
58+
INFO leios: sim_cli::events: 0 out of 0 IBs were included in at least one EB.
59+
INFO leios: sim_cli::events: 0 out of 0 IBs expired before they reached an EB.
60+
INFO leios: sim_cli::events: 5 out of 52 EBs expired before an EB from their stage reached an RB.
61+
INFO leios: sim_cli::events: 59941 out of 60001 transaction(s) were included in at least one EB.
62+
INFO leios: sim_cli::events: 24984 total votes were generated.
63+
INFO leios: sim_cli::events: Each stake pool produced an average of 115.667 vote(s) (stddev 23.275).
64+
INFO leios: sim_cli::events: Each EB received an average of 480.462 vote(s) (stddev 97.985).
65+
INFO leios: sim_cli::events: There were 9637 bundle(s) of votes. Each bundle contained 2.593 vote(s) (stddev 1.442).
66+
INFO leios: sim_cli::events: 46 L1 block(s) had a Leios endorsement.
67+
INFO leios: sim_cli::events: 59641 tx(s) (89.46 MB) were referenced by a Leios endorsement.
68+
INFO leios: sim_cli::events: 360 tx(s) (540 kB) were included directly in a Praos block.
69+
INFO leios: sim_cli::events: Spatial efficiency: 89.46 MB/4.23 MB (2114.761%) of Leios bytes were unique transactions.
70+
INFO leios: sim_cli::events: 48234 tx(s) (44.713%) referenced by a Leios endorsement were redundant.
71+
INFO leios: sim_cli::events: Each transaction took an average of NaNs (stddev NaN) to be included in an IB.
72+
INFO leios: sim_cli::events: Each transaction took an average of 21.082s (stddev 17.506) to be included in an EB.
73+
INFO leios: sim_cli::events: Each transaction took an average of 47.338s (stddev 24.907) to be included in a block.
74+
INFO network: sim_cli::events: 44940749 TX message(s) were sent. 44940749 of them were received (100.000%).
75+
INFO network: sim_cli::events: 0 IB message(s) were sent. 0 of them were received (NaN%).
76+
INFO network: sim_cli::events: 38948 EB message(s) were sent. 38948 of them were received (100.000%).
77+
INFO network: sim_cli::events: 7218113 Vote message(s) were sent. 7218113 of them were received (100.000%).
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Network,Bandwidth,CPU,Diffusion duration,Voting duration,Max EB size,Tx size,Throughput,Tx validation,Tx start [s],Tx stop [s],Sim stop [s]
2+
topology-v2,10 Mb/s,4 vCPU/node,L_diff = 0 slots,L_vote = 7 slots,12 MB/EB,1500 B/Tx,0.150 TxMB/s,0.4284 ms/Tx,60,960,1200
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
{
2+
"relay-strategy": "request-from-first",
3+
"tcp-congestion-control": true,
4+
"multiplex-mini-protocols": true,
5+
"simulate-transactions": true,
6+
"treat-blocks-as-full": false,
7+
"cleanup-policies": [
8+
"cleanup-expired-vote"
9+
],
10+
"timestamp-resolution-ms": 0.1,
11+
"leios-variant": "linear-with-tx-references",
12+
"linear-vote-stage-length-slots": 7,
13+
"linear-diffuse-stage-length-slots": 0,
14+
"leios-stage-length-slots": 7,
15+
"leios-stage-active-voting-slots": 1,
16+
"leios-vote-send-recv-stages": false,
17+
"leios-late-ib-inclusion": true,
18+
"leios-header-diffusion-time-ms": 1000.0,
19+
"leios-ib-generation-time-ms": 130.0,
20+
"leios-mempool-sampling-strategy": "ordered-by-id",
21+
"leios-mempool-aggressive-pruning": true,
22+
"store-txs-as-references": true,
23+
"praos-chain-quality": 100,
24+
"praos-fallback-enabled": true,
25+
"tx-generation-distribution": {
26+
"distribution": "constant",
27+
"value": 10.000
28+
},
29+
"tx-size-bytes-distribution": {
30+
"distribution": "constant",
31+
"value": 1500
32+
},
33+
"tx-conflict-fraction": 0,
34+
"tx-overcollateralization-factor-distribution": {
35+
"distribution": "constant",
36+
"value": 0
37+
},
38+
"tx-validation-cpu-time-ms": 0.4284,
39+
"tx-max-size-bytes": 16384,
40+
"tx-start-time": 60,
41+
"tx-stop-time": 960,
42+
"rb-generation-probability": 0.05,
43+
"rb-head-size-bytes": 1024,
44+
"rb-body-max-size-bytes": 90112,
45+
"rb-generation-cpu-time-ms": 1.0,
46+
"rb-head-validation-cpu-time-ms": 1.0,
47+
"rb-body-legacy-praos-payload-avg-size-bytes": 0,
48+
"rb-body-legacy-praos-payload-validation-cpu-time-ms-constant": 0.1481,
49+
"rb-body-legacy-praos-payload-validation-cpu-time-ms-per-byte": 0.0001141,
50+
"ib-generation-probability": 2.0,
51+
"ib-shards": 1,
52+
"ib-shard-period-length-slots": 1,
53+
"ib-shard-group-count": 1,
54+
"ib-head-size-bytes": 304,
55+
"ib-body-avg-size-bytes": 98304,
56+
"ib-body-max-size-bytes": 262144,
57+
"ib-generation-cpu-time-ms": 130.0,
58+
"ib-head-validation-cpu-time-ms": 1.0,
59+
"ib-body-validation-cpu-time-ms-constant": 0.1481,
60+
"ib-body-validation-cpu-time-ms-per-byte": 0.0001141,
61+
"ib-diffusion-strategy": "freshest-first",
62+
"ib-diffusion-max-bodies-to-request": 1,
63+
"ib-diffusion-max-headers-to-request": 100,
64+
"ib-diffusion-max-window-size": 100,
65+
"eb-generation-probability": 1.0,
66+
"eb-size-bytes-constant": 240,
67+
"eb-size-bytes-per-ib": 32,
68+
"eb-generation-cpu-time-ms": 75.0,
69+
"eb-validation-cpu-time-ms": 1.0,
70+
"eb-header-validation-cpu-time-ms": 50.0,
71+
"eb-body-validation-cpu-time-ms-constant": 0.1481,
72+
"eb-body-validation-cpu-time-ms-per-byte": 0.0001141,
73+
"eb-include-txs-from-previous-stage": false,
74+
"eb-diffusion-strategy": "peer-order",
75+
"eb-diffusion-max-bodies-to-request": 1,
76+
"eb-diffusion-max-headers-to-request": 100,
77+
"eb-diffusion-max-window-size": 100,
78+
"eb-max-age-slots": 240,
79+
"eb-max-age-for-relay-slots": 40,
80+
"eb-referenced-txs-max-size-bytes": 12000000,
81+
"eb-body-avg-size-bytes": 12000000,
82+
"vote-generation-probability": 500.0,
83+
"vote-threshold": 300,
84+
"vote-generation-cpu-time-ms-constant": 0.164,
85+
"vote-generation-cpu-time-ms-per-ib": 0,
86+
"vote-generation-cpu-time-ms-per-tx": 0,
87+
"vote-validation-cpu-time-ms": 0.816,
88+
"vote-bundle-size-bytes-constant": 0,
89+
"vote-bundle-size-bytes-per-eb": 105,
90+
"vote-diffusion-strategy": "peer-order",
91+
"vote-diffusion-max-bodies-to-request": 1,
92+
"vote-diffusion-max-headers-to-request": 100,
93+
"vote-diffusion-max-window-size": 100,
94+
"cert-size-bytes-constant": 7168,
95+
"cert-size-bytes-per-node": 0,
96+
"cert-generation-cpu-time-ms-constant": 90.0,
97+
"cert-generation-cpu-time-ms-per-node": 0,
98+
"cert-validation-cpu-time-ms-constant": 130.0,
99+
"cert-validation-cpu-time-ms-per-node": 0,
100+
"linear-eb-propagation-criteria": "txs-received"
101+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../run.sh

0 commit comments

Comments
 (0)