@@ -36,13 +36,13 @@ def simulate_simplpedpop(seeds, t) -> List[Tuple[simplpedpop.DKGOutput, bytes]]:
36
36
pmsgs = [ret [1 ] for ret in prets ]
37
37
38
38
cmsg , cout , ceq = simplpedpop .coordinator_step (pmsgs , t , n )
39
- pre_finalize_outputs = [(cout , ceq )]
39
+ pre_finalize_rets = [(cout , ceq )]
40
40
for i in range (n ):
41
41
shares_sum = Scalar .sum (* ([pret [2 ][i ] for pret in prets ]))
42
- pre_finalize_outputs += [
42
+ pre_finalize_rets += [
43
43
simplpedpop .participant_pre_finalize (prets [i ][0 ], cmsg , shares_sum )
44
44
]
45
- return pre_finalize_outputs
45
+ return pre_finalize_rets
46
46
47
47
48
48
def encpedpop_keys (seed : bytes ) -> Tuple [bytes , bytes ]:
@@ -67,12 +67,12 @@ def simulate_encpedpop(seeds, t) -> List[Tuple[simplpedpop.DKGOutput, bytes]]:
67
67
pstates = [pstate for (pstate , _ ) in enc_prets1 ]
68
68
69
69
cmsg , cout , ceq , enc_shares_sums = encpedpop .coordinator_step (pmsgs , t , enckeys )
70
- pre_finalize_outputs = [(cout , ceq )]
70
+ pre_finalize_rets = [(cout , ceq )]
71
71
for i in range (n ):
72
- pre_finalize_outputs += [
72
+ pre_finalize_rets += [
73
73
encpedpop .participant_pre_finalize (pstates [i ], cmsg , enc_shares_sums [i ])
74
74
]
75
- return pre_finalize_outputs
75
+ return pre_finalize_rets
76
76
77
77
78
78
def simulate_chilldkg (
@@ -91,13 +91,13 @@ def simulate_chilldkg(
91
91
for i in range (n ):
92
92
prets1 += [chilldkg .participant_step1 (seeds [i ], params )]
93
93
94
- pstate1s = [pret [0 ] for pret in prets1 ]
94
+ pstates1 = [pret [0 ] for pret in prets1 ]
95
95
pmsgs = [pret [1 ] for pret in prets1 ]
96
96
cstate , cmsg = chilldkg .coordinator_step (pmsgs , params )
97
97
98
98
prets2 = []
99
99
for i in range (n ):
100
- prets2 += [chilldkg .participant_step2 (seeds [i ], pstate1s [i ], cmsg )]
100
+ prets2 += [chilldkg .participant_step2 (seeds [i ], pstates1 [i ], cmsg )]
101
101
102
102
cmsg2 , cout , crec = chilldkg .coordinator_finalize (
103
103
cstate , [pret [1 ] for pret in prets2 ]
@@ -136,15 +136,7 @@ async def main():
136
136
return await asyncio .gather (* coroutines )
137
137
138
138
outputs = asyncio .run (main ())
139
-
140
- # Check coordinator output
141
- return [
142
- (
143
- simplpedpop .DKGOutput (out [0 ][0 ], out [0 ][1 ], out [0 ][2 ]),
144
- chilldkg .RecoveryData (out [1 ]),
145
- )
146
- for out in outputs
147
- ]
139
+ return outputs
148
140
149
141
150
142
def derive_interpolating_value (L , x_i ):
@@ -197,7 +189,6 @@ def test_correctness_dkg_output(t, n, dkg_outputs: List[simplpedpop.DKGOutput]):
197
189
assert secshares [0 ] is None
198
190
199
191
# Check that each secshare matches the corresponding pubshare
200
- # (secshares[1:])
201
192
for i in range (1 , n + 1 ):
202
193
assert secshares [i ] * G == pubshares [0 ][i - 1 ]
203
194
0 commit comments