Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
corverroos committed May 5, 2022
1 parent fced896 commit 74413f9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions cluster/distvalidator.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ type DistValidator struct {
// PubKey is the root distributed public key.
PubKey string `json:"distributed_public_key"`

// 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.
// It can be used to verify a partial signature created by any node in the cluster.
PublicShares [][]byte `json:"public_shares,omitempty"`
PubShares [][]byte `json:"public_shares,omitempty"`

// Verifiers are the threshold verifier commitments.
// Deprecated: Use PublicShares.
// Deprecated: Use PubShares.
Verifiers [][]byte `json:"threshold_verifiers,omitempty"`

// FeeRecipientAddress Ethereum address override for this validator, defaults to definition withdrawal address.
Expand Down
6 changes: 3 additions & 3 deletions dkg/dkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ func dvsFromShares(shares []share) ([]cluster.DistValidator, error) {
}

dvs = append(dvs, cluster.DistValidator{
PubKey: fmt.Sprintf("%#x", msg.PubKey),
Verifiers: msg.Verifiers,
PublicShares: msg.PubShares,
PubKey: fmt.Sprintf("%#x", msg.PubKey),
Verifiers: msg.Verifiers,
PubShares: msg.PubShares,
})
}

Expand Down
4 changes: 2 additions & 2 deletions dkg/dkg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ func testDKG(t *testing.T, def cluster.Definition, p2pKeys []*ecdsa.PrivateKey)

// Ensure all public shares can verify the partial signature
for _, lock := range locks {
if len(lock.Validators[i].PublicShares) == 0 {
if len(lock.Validators[i].PubShares) == 0 {
// TODO(corver): convert keycast to use public shares, not verifiers.
continue
}
pk, err := tblsconv.KeyFromBytes(lock.Validators[i].PublicShares[j])
pk, err := tblsconv.KeyFromBytes(lock.Validators[i].PubShares[j])
require.NoError(t, err)
ok, err := tbls.Verify(pk, msg, sig)
require.NoError(t, err)
Expand Down
2 changes: 1 addition & 1 deletion tbls/tblsconv/tblsconv.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/obolnetwork/charon/core"
)

// KeyFromBytes unmarshalls the bytes into a kryptology bls public key.
// KeyFromBytes unmarshals the bytes into a kryptology bls public key.
func KeyFromBytes(bytes []byte) (*bls_sig.PublicKey, error) {
resp := new(bls_sig.PublicKey)
if err := resp.UnmarshalBinary(bytes); err != nil {
Expand Down

0 comments on commit 74413f9

Please sign in to comment.