Skip to content

Commit db4a0a8

Browse files
curiecryptiquerejeta
authored andcommitted
comparison
1 parent 0aea61d commit db4a0a8

File tree

2 files changed

+145
-6
lines changed

2 files changed

+145
-6
lines changed

mithril-core/Comparison.md

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
## Benchmark Results - Batch Compatible
2+
3+
```shell
4+
+-------------------+
5+
| Size of proofs |
6+
+-------------------+
7+
|-------------------|
8+
| Trivial proofs |
9+
+-------------------+
10+
| Results obtained by using the parameters suggested in paper.
11+
+-------------------+
12+
+-------------------+
13+
| Hash: Blake2b 512 |
14+
+-------------------+
15+
k = 445 | m = 2728 | nr parties = 3000; 118760 bytes
16+
+-------------------+
17+
| Hash: Blake2b 256 |
18+
+-------------------+
19+
k = 445 | m = 2728 | nr parties = 3000; 99384 bytes
20+
+-------------------+
21+
| Hash: Blake2b 512 |
22+
+-------------------+
23+
k = 554 | m = 3597 | nr parties = 3000; 133936 bytes
24+
+-------------------+
25+
| Hash: Blake2b 256 |
26+
+-------------------+
27+
k = 554 | m = 3597 | nr parties = 3000; 113728 bytes
28+
```
29+
30+
```shell
31+
STM/Blake2b/Key registration/k: 25, m: 150, nr_parties: 300
32+
time: [388.95 ms 389.43 ms 389.90 ms]
33+
Found 1 outliers among 100 measurements (1.00%)
34+
1 (1.00%) high mild
35+
STM/Blake2b/Play all lotteries/k: 25, m: 150, nr_parties: 300
36+
time: [699.76 µs 701.42 µs 703.63 µs]
37+
Found 6 outliers among 100 measurements (6.00%)
38+
2 (2.00%) high mild
39+
4 (4.00%) high severe
40+
STM/Blake2b/Aggregation/k: 25, m: 150, nr_parties: 300
41+
time: [18.888 ms 18.903 ms 18.920 ms]
42+
Found 9 outliers among 100 measurements (9.00%)
43+
3 (3.00%) high mild
44+
6 (6.00%) high severe
45+
STM/Blake2b/Verification/k: 25, m: 150, nr_parties: 300
46+
time: [2.1547 ms 2.1609 ms 2.1686 ms]
47+
Found 8 outliers among 100 measurements (8.00%)
48+
1 (1.00%) low mild
49+
1 (1.00%) high mild
50+
6 (6.00%) high severe
51+
52+
STM/Blake2b/Key registration/k: 250, m: 1523, nr_parties: 2000
53+
time: [2.5986 s 2.6042 s 2.6101 s]
54+
Found 8 outliers among 100 measurements (8.00%)
55+
8 (8.00%) high mild
56+
STM/Blake2b/Play all lotteries/k: 250, m: 1523, nr_parties: 2000
57+
time: [5.9141 ms 5.9346 ms 5.9641 ms]
58+
Found 11 outliers among 100 measurements (11.00%)
59+
9 (9.00%) high mild
60+
2 (2.00%) high severe
61+
STM/Blake2b/Aggregation/k: 250, m: 1523, nr_parties: 2000
62+
time: [189.63 ms 190.10 ms 190.69 ms]
63+
Found 14 outliers among 100 measurements (14.00%)
64+
5 (5.00%) high mild
65+
9 (9.00%) high severe
66+
STM/Blake2b/Verification/k: 250, m: 1523, nr_parties: 2000
67+
time: [14.040 ms 14.143 ms 14.271 ms]
68+
Found 4 outliers among 100 measurements (4.00%)
69+
1 (1.00%) high mild
70+
3 (3.00%) high severe
71+
```
72+
73+
74+
## Benchmark Results - Single Signature with Path
75+
76+
```shell
77+
+-------------------+
78+
| Size of proofs |
79+
+-------------------+
80+
|-------------------|
81+
| Trivial proofs |
82+
+-------------------+
83+
| Results obtained by using the parameters suggested in paper.
84+
+-------------------+
85+
+-------------------+
86+
| Hash: Blake2b 512 |
87+
+-------------------+
88+
k = 445 | m = 2728 | nr parties = 3000; 356632 bytes
89+
+-------------------+
90+
| Hash: Blake2b 256 |
91+
+-------------------+
92+
k = 445 | m = 2728 | nr parties = 3000; 222536 bytes
93+
+-------------------+
94+
| Hash: Blake2b 512 |
95+
+-------------------+
96+
k = 554 | m = 3597 | nr parties = 3000; 419808 bytes
97+
+-------------------+
98+
| Hash: Blake2b 256 |
99+
+-------------------+
100+
k = 554 | m = 3597 | nr parties = 3000; 261488 bytes
101+
```
102+
103+
```shell
104+
STM/Blake2b/Key registration/k: 25, m: 150, nr_parties: 300
105+
time: [385.81 ms 386.20 ms 386.67 ms]
106+
Found 6 outliers among 100 measurements (6.00%)
107+
3 (3.00%) high mild
108+
3 (3.00%) high severe
109+
STM/Blake2b/Play all lotteries/k: 25, m: 150, nr_parties: 300
110+
time: [696.75 µs 697.61 µs 699.18 µs]
111+
Found 5 outliers among 100 measurements (5.00%)
112+
2 (2.00%) high mild
113+
3 (3.00%) high severe
114+
STM/Blake2b/Aggregation/k: 25, m: 150, nr_parties: 300
115+
time: [21.321 ms 22.943 ms 24.806 ms]
116+
Found 21 outliers among 100 measurements (21.00%)
117+
2 (2.00%) high mild
118+
19 (19.00%) high severe
119+
STM/Blake2b/Verification/k: 25, m: 150, nr_parties: 300
120+
time: [2.1854 ms 2.1963 ms 2.2096 ms]
121+
Found 3 outliers among 100 measurements (3.00%)
122+
3 (3.00%) high mild
123+
124+
STM/Blake2b/Key registration/k: 250, m: 1523, nr_parties: 2000
125+
time: [2.5808 s 2.6032 s 2.6377 s]
126+
Found 8 outliers among 100 measurements (8.00%)
127+
3 (3.00%) high mild
128+
5 (5.00%) high severe
129+
STM/Blake2b/Play all lotteries/k: 250, m: 1523, nr_parties: 2000
130+
time: [5.8590 ms 5.8654 ms 5.8724 ms]
131+
Found 4 outliers among 100 measurements (4.00%)
132+
3 (3.00%) high mild
133+
1 (1.00%) high severe
134+
STM/Blake2b/Aggregation/k: 250, m: 1523, nr_parties: 2000
135+
time: [190.47 ms 190.70 ms 190.96 ms]
136+
Found 10 outliers among 100 measurements (10.00%)
137+
7 (7.00%) high mild
138+
3 (3.00%) high severe
139+
STM/Blake2b/Verification/k: 250, m: 1523, nr_parties: 2000
140+
time: [14.007 ms 14.048 ms 14.092 ms]
141+
Found 5 outliers among 100 measurements (5.00%)
142+
4 (4.00%) high mild
143+
1 (1.00%) high severe
144+
```

mithril-core/benches/size_benches.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ where
2929
let mut ps: Vec<StmInitializer> = Vec::with_capacity(nparties);
3030
let params = StmParameters {
3131
k,
32-
// m equal to one, to get an upper bound were a signer can only submit a single signature
3332
m,
3433
phi_f: 0.2,
3534
};
@@ -52,25 +51,21 @@ where
5251
.par_iter()
5352
.filter_map(|p| p.sign(&msg))
5453
.collect::<Vec<StmSig<H>>>();
55-
5654
let clerk = StmClerk::from_signer(&ps[0]);
5755

5856
// Aggregate with random parties
5957
let aggr = clerk.aggregate(&sigs, &msg).unwrap();
6058

6159
println!(
6260
"k = {} | m = {} | nr parties = {}; {} bytes",
63-
m,
6461
k,
62+
m,
6563
nparties,
6664
aggr.to_bytes().len() as usize,
6765
);
6866
}
6967

7068
fn main() {
71-
// Upper bound on the size. We only allow one signature per party. In practice
72-
// a party with a lot of stake might win more than one lottery. The paths depend
73-
// on the number of signers, so we need to iterate over that as well
7469
println!("+-------------------+");
7570
println!("| Size of proofs |");
7671
println!("+-------------------+");

0 commit comments

Comments
 (0)