-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tbls: replace verifier with pubshares #604
Conversation
Codecov Report
@@ Coverage Diff @@
## main #604 +/- ##
==========================================
- Coverage 54.66% 54.63% -0.04%
==========================================
Files 96 96
Lines 9010 8984 -26
==========================================
- Hits 4925 4908 -17
+ Misses 3378 3368 -10
- Partials 707 708 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
// Field (1+i) 'Verifier' | ||
hh.PutBytes(verifier) | ||
for _, pubshare := range v.PubShares { | ||
// Field (1+i) 'Pubshare' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can remove this comment
@@ -31,20 +31,12 @@ | |||
}, | |||
"distributed_validators": [ | |||
{ | |||
"distributed_public_key": "0x7b182e046410f44bc4b0f3f03a0d06820a30f257", | |||
"threshold_verifiers": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't threshold_verifiers
be replaced with pubshares
?
@@ -219,7 +219,7 @@ func makeShares( | |||
targetID uint32, | |||
) ([]share, error) { | |||
// Get set of public shares for each validator. | |||
pubShares := make(map[uint32]map[uint32]*bls_sig.PublicKey) // map[ValIdx]map[SourceID]*bls_sig.PublicKey | |||
pubShares := make(map[uint32]map[int]*bls_sig.PublicKey) // map[ValIdx]map[SourceID]*bls_sig.PublicKey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: why int
instead of uint32
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while going through the code i didn't found any specific reason to use uint32 for dkg, that's why i went with fundamental types such as int
can change if there was any specific reason behind the usage of uint32 for dkg purposes
SecretShare: shares[ni], | ||
PubKey: tss.PublicKey(), | ||
PublicShares: tss.PublicShares(), | ||
SecretShare: shares[ni], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can we rename the loop variable ni
?
Remaining cleanup to replace verifiers with public shares based on the comments on #604 category: refactor ticket: none
Refactors tbls to use pubshares from start and remove verifier from the workflow.
category: refactor
ticket: #596