-
Notifications
You must be signed in to change notification settings - Fork 80
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
dkg: add frost command test #482
Conversation
Codecov Report
@@ Coverage Diff @@
## main #482 +/- ##
==========================================
+ Coverage 53.67% 56.46% +2.78%
==========================================
Files 81 81
Lines 7385 7424 +39
==========================================
+ Hits 3964 4192 +228
+ Misses 2868 2656 -212
- Partials 553 576 +23
Continue to review full report at Codecov.
|
cluster/distvalidator.go
Outdated
Verifiers [][]byte `json:"threshold_verifiers"` | ||
// PublicShares are the public keys of each node's secret key share. | ||
// It can be used to verify a partial signature created by any node in the cluster. | ||
PublicShares [][]byte `json:"public_shares,omitempty"` |
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 name this PubShares
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.
ok cool
cluster/distvalidator.go
Outdated
@@ -22,8 +22,13 @@ type DistValidator struct { | |||
// PubKey is the root distributed public key. | |||
PubKey string `json:"distributed_public_key"` | |||
|
|||
// Verifiers are the public shares. | |||
Verifiers [][]byte `json:"threshold_verifiers"` | |||
// PublicShares are the public keys of each node's secret key share. |
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.
// PublicShares are the public keys of each node's secret key share. | |
// PubShares are the public keys corresponding to each node's secret key share. |
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.
ok cool
|
||
// Verifiers are the threshold verifier commitments. | ||
// Deprecated: Use PublicShares. | ||
Verifiers [][]byte `json:"threshold_verifiers,omitempty"` |
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.
discussion: why are we keeping this around then?
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.
still used, will refactor in another PR
shares = make([][]*bls_sig.SecretKey, vals) | ||
locks []cluster.Lock | ||
secretShares = make([][]*bls_sig.SecretKey, def.NumValidators) | ||
locks []cluster.Lock |
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.
locks []cluster.Lock | |
locks []cluster.Lock |
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.
this was gofmt
tbls/tblsconv/tblsconv.go
Outdated
@@ -26,6 +26,16 @@ import ( | |||
"github.com/obolnetwork/charon/core" | |||
) | |||
|
|||
// KeyFromBytes unmarshalls the bytes into a kryptology bls public key. |
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.
// KeyFromBytes unmarshalls the bytes into a kryptology bls public key. | |
// KeyFromBytes unmarshals the bytes into a kryptology bls public key. |
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.
cool
}) | ||
} | ||
|
||
func testDKG(t *testing.T, def cluster.Definition, p2pKeys []*ecdsa.PrivateKey) { |
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: we can also have another test which checks the negative cases, like what happens when we have a malformed or incomplete definition/lock
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.
you are welcome to add these in another PR
Adds frost algo to the dkg command test.
category: test
ticket: #478
feature_set: alpha