Skip to content

Commit bab018d

Browse files
committed
reference: rename share -> secshare
1 parent 3dac7bd commit bab018d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

reference/simplpedpop.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class SignerState(NamedTuple):
8282
# TODO This should probably moved somewhere else as its common to all DKGs.
8383
# Hm, moving it to reference.py is difficult due to cylic module dependencies.
8484
class DKGOutput(NamedTuple):
85-
share: Scalar
85+
secshare: Scalar
8686
threshold_pubkey: GE
8787
pubshares: List[GE]
8888

reference/tests.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def test_correctness_internal(t, n, simulate_dkg):
181181

182182

183183
def test_correctness_dkg_output(t, n, dkg_outputs: List[simplpedpop.DKGOutput]):
184-
shares = [out[0] for out in dkg_outputs]
184+
secshares = [out[0] for out in dkg_outputs]
185185
threshold_pubkeys = [out[1] for out in dkg_outputs]
186186
signer_pubshares = [out[2] for out in dkg_outputs]
187187

@@ -196,11 +196,11 @@ def test_correctness_dkg_output(t, n, dkg_outputs: List[simplpedpop.DKGOutput]):
196196

197197
# Check that the share corresponds to the signer_pubshare
198198
for i in range(n):
199-
assert shares[i] * G == signer_pubshares[0][i]
199+
assert secshares[i] * G == signer_pubshares[0][i]
200200

201201
# Check that the first t signers (TODO: should be an arbitrary set) can
202202
# recover the threshold pubkey
203-
recovered_secret = recover_secret(list(range(1, t + 1)), shares[0:t])
203+
recovered_secret = recover_secret(list(range(1, t + 1)), secshares[0:t])
204204
assert recovered_secret * G == threshold_pubkey
205205

206206

@@ -224,10 +224,10 @@ def test_correctness(t, n, simulate_dkg):
224224
backups = [out[1] for out in outputs]
225225
# test correctness of chilldkg_recover
226226
for i in range(n):
227-
(share, threshold_pubkey, signer_pubshares), _ = chilldkg.signer_recover(
227+
(secshare, threshold_pubkey, signer_pubshares), _ = chilldkg.signer_recover(
228228
seeds[i], backups[i], b""
229229
)
230-
assert share == dkg_outputs[i][0]
230+
assert secshare == dkg_outputs[i][0]
231231
assert threshold_pubkey == dkg_outputs[i][1]
232232
assert signer_pubshares == dkg_outputs[i][2]
233233

0 commit comments

Comments
 (0)