Skip to content

Commit 03364f8

Browse files
authored
Parameter sweep experiment for EB attacks (#495)
* Designed sweep over EB attacks * Analyzed experiment * Documented findings in slides * Updated logbook
1 parent e7d3391 commit 03364f8

File tree

65 files changed

+8174
-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.

65 files changed

+8174
-0
lines changed

Logbook.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Leios logbook
22

3+
## 2025-08-15
4+
5+
### Parameter-sweep experiment for late-EB attacks
6+
7+
A follow-up experiment on the attack experiment earlier this week was conducted to determine for what EB delay the attack was strongest. For the promising `txs-received` propagation and with L<sub>diff</sub> on/off, the delay of adversaries releasing their EBs and transactions was varied from six to eight seconds. Note that L<sub>vote</sub> = 7s in this simulations and that the adversary controlled 33% of the stake.
8+
9+
Findings:
10+
11+
1. Efficiency starts dropping when EBs and transactions are delayed 6.5 seconds.
12+
2. Efficiency doesn’t continue dropping much after delays of 7 seconds.
13+
3. L<sub>diff</sub> = 0s performs better than L<sub>diff</sub> = 7s.
14+
4. None of the cases, using txs-received, loses transactions or bogs down.
15+
16+
Artifacts:
17+
18+
- [Slides](analysis/simms/2025w33b/ReadMe.pdf)
19+
- [Notebook](analysis/simms/2025w33b/analysis.ipynb)
20+
- [Configurations](analysis/simms/2025w33b/experiments/)
21+
322
## 2025-08-12
423

524
### First simulation experiment for attacks
@@ -10,6 +29,8 @@ An experiment invovling late EB and/or late transaction diffusion was run, where
1029
- [Notebook](analysis/sims/2025w33/analysis.ipynb)
1130
- [Configurations](analysis/sims/2025w33/experiments/)
1231

32+
Follow-up analysis determined that transactions were lost in some cases due to a misformulation of the memory-pool rules in the simulator.
33+
1334
## 2025-08-08
1435

1536
## CIP Progress

analysis/sims/2025w33b/ReadMe.pdf

3.39 MB
Binary file not shown.

analysis/sims/2025w33b/analysis.ipynb

Lines changed: 4018 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.15
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
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
experiments/txs-received,0,7,5.0,0/run.sh
2+
experiments/txs-received,0,7,6.0,0/run.sh
3+
experiments/txs-received,0,7,6.5,0/run.sh
4+
experiments/txs-received,0,7,7.0,0/run.sh
5+
experiments/txs-received,0,7,7.5,0/run.sh
6+
experiments/txs-received,0,7,8.0,0/run.sh
7+
experiments/txs-received,0,7,0.0,0/run.sh
8+
experiments/txs-received,7,7,0.0,0/run.sh
9+
experiments/txs-received,7,7,5.0,0/run.sh
10+
experiments/txs-received,7,7,6.0,0/run.sh
11+
experiments/txs-received,7,7,6.5,0/run.sh
12+
experiments/txs-received,7,7,7.0,0/run.sh
13+
experiments/txs-received,7,7,7.5,0/run.sh
14+
experiments/txs-received,7,7,8.0,0/run.sh

0 commit comments

Comments
 (0)