Skip to content
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

Merged
merged 1 commit into from
May 24, 2022
Merged

Conversation

dB2510
Copy link
Contributor

@dB2510 dB2510 commented May 24, 2022

Refactors tbls to use pubshares from start and remove verifier from the workflow.

category: refactor
ticket: #596

@codecov
Copy link

codecov bot commented May 24, 2022

Codecov Report

Merging #604 (e9302e4) into main (5c4dd41) will decrease coverage by 0.03%.
The diff coverage is 71.87%.

@@            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     
Impacted Files Coverage Δ
cluster/distvalidator.go 52.38% <0.00%> (-19.05%) ⬇️
cluster/test_cluster.go 0.00% <0.00%> (ø)
tbls/tss.go 50.59% <66.66%> (+1.51%) ⬆️
cmd/createcluster.go 51.51% <100.00%> (+0.57%) ⬆️
dkg/dkg.go 50.98% <100.00%> (+0.25%) ⬆️
dkg/frost.go 77.19% <100.00%> (ø)
dkg/keycast.go 66.89% <100.00%> (+1.86%) ⬆️
core/dutydb/memory.go 77.56% <0.00%> (-1.93%) ⬇️
app/app.go 59.89% <0.00%> (-0.82%) ⬇️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c4dd41...e9302e4. Read the comment docs.

@dB2510 dB2510 linked an issue May 24, 2022 that may be closed by this pull request
Copy link
Contributor

@corverroos corverroos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@dB2510 dB2510 added the merge when ready Indicates bulldozer bot may merge when all checks pass label May 24, 2022
@obol-bulldozer obol-bulldozer bot merged commit 320f260 into main May 24, 2022
@obol-bulldozer obol-bulldozer bot deleted the dhruv/kryptopubshare branch May 24, 2022 14:27
// Field (1+i) 'Verifier'
hh.PutBytes(verifier)
for _, pubshare := range v.PubShares {
// Field (1+i) 'Pubshare'
Copy link
Contributor

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": [
Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Contributor Author

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],
Copy link
Contributor

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?

obol-bulldozer bot pushed a commit that referenced this pull request May 25, 2022
Remaining cleanup to replace verifiers with public shares based on the comments on #604 

category: refactor
ticket: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready Indicates bulldozer bot may merge when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor: replace verifiers with pubshares
3 participants