Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ bin/
.vscode/
examples/*/output/*
integration_test/output
integration_test/data

######## Node
# Logs
Expand Down Expand Up @@ -109,7 +110,6 @@ dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus
Expand Down
2 changes: 1 addition & 1 deletion cli/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func WriteResults(
return fmt.Errorf("expectedValidatorCount is 0")
}
if len(depositDataArr) != len(keySharesArr) || len(depositDataArr) != len(proofs) {
return fmt.Errorf("Incoming result arrays have inconsistent length")
return fmt.Errorf("incoming result arrays have inconsistent length")
}
if len(depositDataArr) == 0 {
return fmt.Errorf("no results to write")
Expand Down
30 changes: 15 additions & 15 deletions integration_test/certs/localhost.crt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-----BEGIN CERTIFICATE-----
MIIEljCCAn6gAwIBAgIUFHPaG8f7cV4RN0IBQJpxUBicWIIwDQYJKoZIhvcNAQEL
MIIEljCCAn6gAwIBAgIUFHPaG8f7cV4RN0IBQJpxUBicWIowDQYJKoZIhvcNAQEL
BQAwVTELMAkGA1UEBhMCQ04xCzAJBgNVBAgMAkdEMQswCQYDVQQHDAJTWjEYMBYG
A1UECgwPbG9jYWxob3N0LCBJbmMuMRIwEAYDVQQDDAlsb2NhbGhvc3QwHhcNMjQw
NDAzMTEyMDI1WhcNMjUwNDAzMTEyMDI1WjBVMQswCQYDVQQGEwJDTjELMAkGA1UE
A1UECgwPbG9jYWxob3N0LCBJbmMuMRIwEAYDVQQDDAlsb2NhbGhvc3QwHhcNMjYw
MTA3MTI1MDQyWhcNMzYwMTA1MTI1MDQyWjBVMQswCQYDVQQG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UCX+eBWRX
0OEDcwCjazTWlHCSJTv2TQZhOFry4voYFcBw8lyXr6A5lxo9mComFJ80E7rcaPF4
624QD6yR5VC3HqdQLqvGuQm13S9l79UaW47lJX616EeEGUl7cRE0l5irvtBJT+ij
ZAoQm0tkfBVSYntc4llwOeQVloFoz6csLQ0=
gBRZXWgOmRnpmEx6i7Djnf/j4y930zANBgkqhkiG9w0BAQsFAAOCAgEADvfy6R3h
AL/nUT/63VhMBqkheTEDWJ3bhLmYlqBMcCz9+6tYpJXCtvB8pd8X1QS0mFBQlrPo
IBbKMT+UBLoMQ9I213Lf3ybRcqXoXaDjHlhCee01umfQX6Cid/TgBzETTmLSt45L
aJcV9aktWsDtuXLwWHBpsY4CfNAGeTau4cKkx7DlvqupV0wtEtl4hBjlp0QBHu0D
oW2pMGMmtN6Tchc0+MQg3l7g5On3z0u3TCwm6TXPcOzlawCBE9xMuvz/UmzB4wKC
6PtIQwtLyq7urJwAVixx4fZDu0uZtMmbP5puo4d4zK1SZS7Ycf4hxiIqZ9qNwqmG
M0mukHtj8bMogoklFDFA/IQehI+hftxu3NlS6sZg8joKbGxaKx0ffbIMYandkCRl
LIr1Wiju1ftQ0uoIfS2g1uDrH7PHpqQPHvpizBwSayh9CpbIcGDmwk6vvY4Grn6D
Yqklmyu3JLS+/ybeaZeH1zwKJ2ml2sq1B/I9t0cF6s3+6pTVrT0lLo4lxFQEE3h3
CYIVc/ArCSFU17gvCDJK+lz5+FneaMZbLIHOw2CoK1Z8nizpUzHa4WgRl+Zesd0a
OxRrZ3jn0jEL6ivgC3YWoWHWhENzGNwzy1jXukNn6KYnlYrMABSHrbHEBBnh7ZeY
MGNbDRqXK52mpL7HUlo3XLofUwF6Ajx8VX4=
-----END CERTIFICATE-----
2 changes: 1 addition & 1 deletion integration_test/certs/rootCA.srl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1473DA1BC7FB715E11374201409A7150189C5889
1473DA1BC7FB715E11374201409A7150189C588A
4 changes: 2 additions & 2 deletions integration_test/health_check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func TestHealthCheck(t *testing.T) {
RootCmd.SetArgs(args)
err := RootCmd.Execute()
require.NoError(t, err)
w.Close()
_ = w.Close()
out, _ := io.ReadAll(r)
os.Stdout = rescueStdout
t.Log(string(out))
Expand All @@ -63,7 +63,7 @@ func TestHealthCheck(t *testing.T) {
RootCmd.SetArgs(args)
err := RootCmd.Execute()
require.NoError(t, err)
w.Close()
_ = w.Close()
out, _ := io.ReadAll(r)
os.Stdout = rescueStdout
t.Log(string(out))
Expand Down
2 changes: 1 addition & 1 deletion integration_test/init_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ func testSharesData(ops wire.OperatorsCLI, operatorCount int, keys []*rsa.Privat
// Find operator ID by PubKey
var operatorID uint64
for _, op := range ops {
if bytes.Equal(priv.PublicKey.N.Bytes(), op.PubKey.N.Bytes()) {
if bytes.Equal(priv.N.Bytes(), op.PubKey.N.Bytes()) {
operatorID = op.ID
break
}
Expand Down
2 changes: 1 addition & 1 deletion pkgs/crypto/rsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
// DecryptRSAKeystore reads an encrypted RSA private key using the given password.
func DecryptRSAKeystore(keyData []byte, password string) (*rsa.PrivateKey, error) {
if strings.TrimSpace(password) == "" {
return nil, errors.New("Password required for encrypted PEM block")
return nil, errors.New("password required for encrypted PEM block")
}

// Unmarshal the JSON-encoded data
Expand Down
6 changes: 3 additions & 3 deletions pkgs/operator/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func TestCreateInstance(t *testing.T) {

wrapper, ok := inst.(*instWrapper)
require.True(t, ok)
require.True(t, wrapper.LocalOwner.OperatorSecretKey.PublicKey.Equal(&privateKey[0].PublicKey))
require.True(t, wrapper.OperatorSecretKey.PublicKey.Equal(&privateKey[0].PublicKey))
}

testParams := []struct {
Expand Down Expand Up @@ -284,7 +284,7 @@ func TestCrashByMaliciousOperatorAtInit(t *testing.T) {

wrapper, ok := inst.(*instWrapper)
require.True(t, ok)
require.True(t, wrapper.LocalOwner.OperatorSecretKey.PublicKey.Equal(&privateKey[0].PublicKey))
require.True(t, wrapper.OperatorSecretKey.PublicKey.Equal(&privateKey[0].PublicKey))

// create multiple transport with wrong
exchMsg := wire.Exchange{
Expand Down Expand Up @@ -353,7 +353,7 @@ func TestCrashByMaliciousOperatorAtReshare(t *testing.T) {

wrapper, ok := inst.(*instWrapper)
require.True(t, ok)
require.True(t, wrapper.LocalOwner.OperatorSecretKey.PublicKey.Equal(&privateKey[0].PublicKey))
require.True(t, wrapper.OperatorSecretKey.PublicKey.Equal(&privateKey[0].PublicKey))

// create multiple transport with wrong
exchMsg := wire.Exchange{
Expand Down
2 changes: 1 addition & 1 deletion pkgs/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func WriteJSON(filePth string, data any) error {
if err != nil {
return err
}
defer file.Close()
defer func() { _ = file.Close() }()
return json.NewEncoder(file).Encode(data)
}

Expand Down