-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dynamic key reload for remote keymanager (#8611)
* Dynamic key reload for remote keymanager * fix failing keymanager test * keymanager tests * define RemoteKeymanager interface * WaitForActivation tests * gzl * handle error in test
- Loading branch information
Showing
14 changed files
with
355 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,28 @@ | ||
package testutil | ||
|
||
import "github.com/prysmaticlabs/prysm/shared/bytesutil" | ||
import ( | ||
types "github.com/prysmaticlabs/eth2-types" | ||
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" | ||
"github.com/prysmaticlabs/prysm/shared/bytesutil" | ||
) | ||
|
||
// ActiveKey represents a public key whose status is ACTIVE. | ||
var ActiveKey = bytesutil.ToBytes48([]byte("active")) | ||
|
||
// GenerateMultipleValidatorStatusResponse prepares a response from the passed in keys. | ||
func GenerateMultipleValidatorStatusResponse(pubkeys [][]byte) *ethpb.MultipleValidatorStatusResponse { | ||
resp := ðpb.MultipleValidatorStatusResponse{ | ||
PublicKeys: make([][]byte, len(pubkeys)), | ||
Statuses: make([]*ethpb.ValidatorStatusResponse, len(pubkeys)), | ||
Indices: make([]types.ValidatorIndex, len(pubkeys)), | ||
} | ||
for i, key := range pubkeys { | ||
resp.PublicKeys[i] = key | ||
resp.Statuses[i] = ðpb.ValidatorStatusResponse{ | ||
Status: ethpb.ValidatorStatus_UNKNOWN_STATUS, | ||
} | ||
resp.Indices[i] = types.ValidatorIndex(i) | ||
} | ||
|
||
return resp | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package keymanager | ||
|
||
const KeysReloaded = "Reloaded validator keys into keymanager" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.