mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 21:38:05 -05:00
Remove Keymanageropts Pattern from Wallets and Remove Enable/Disable Feature for V1 CLI (#7831)
* rem opts * rem more km opts * more removal of km opts * removal of km opts * definition of internal accounts store * refactor enable/disable * enable build * fix rpc * remove keymanageropts * fix imported tests * table driven tests for enable disable * table driven tests for disable * comprehensive tests for disable * tests complete for enable and disable * pass enable disable tests * clarify imported * fix deadlocks * imported tests pass * remove enable disable entrypoints * better derived text * deep source suggestions * gaz * tidy Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
1
go.mod
1
go.mod
@@ -28,7 +28,6 @@ require (
|
||||
github.com/ghodss/yaml v1.0.0
|
||||
github.com/go-logr/logr v0.2.1 // indirect
|
||||
github.com/go-yaml/yaml v2.1.0+incompatible
|
||||
github.com/gofrs/flock v0.7.1
|
||||
github.com/gogo/protobuf v1.3.1
|
||||
github.com/golang/gddo v0.0.0-20200528160355-8d077c1d8f4c
|
||||
github.com/golang/mock v1.4.4
|
||||
|
||||
2
go.sum
2
go.sum
@@ -274,8 +274,6 @@ github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/go-yaml/yaml v2.1.0+incompatible h1:RYi2hDdss1u4YE7GwixGzWwVo47T8UQwnTLB6vQiq+o=
|
||||
github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0=
|
||||
github.com/gofrs/flock v0.7.1 h1:DP+LD/t0njgoPBvT5MJLeliUIVQR03hiKR6vezdwHlc=
|
||||
github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
||||
github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||
|
||||
395
proto/validator/accounts/v2/web_api.pb.go
generated
395
proto/validator/accounts/v2/web_api.pb.go
generated
@@ -343,12 +343,11 @@ func (m *GenerateMnemonicResponse) GetMnemonic() string {
|
||||
}
|
||||
|
||||
type WalletResponse struct {
|
||||
WalletPath string `protobuf:"bytes,1,opt,name=wallet_path,json=walletPath,proto3" json:"wallet_path,omitempty"`
|
||||
KeymanagerKind KeymanagerKind `protobuf:"varint,2,opt,name=keymanager_kind,json=keymanagerKind,proto3,enum=ethereum.validator.accounts.v2.KeymanagerKind" json:"keymanager_kind,omitempty"`
|
||||
KeymanagerConfig map[string]string `protobuf:"bytes,3,rep,name=keymanager_config,json=keymanagerConfig,proto3" json:"keymanager_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
WalletPath string `protobuf:"bytes,1,opt,name=wallet_path,json=walletPath,proto3" json:"wallet_path,omitempty"`
|
||||
KeymanagerKind KeymanagerKind `protobuf:"varint,2,opt,name=keymanager_kind,json=keymanagerKind,proto3,enum=ethereum.validator.accounts.v2.KeymanagerKind" json:"keymanager_kind,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *WalletResponse) Reset() { *m = WalletResponse{} }
|
||||
@@ -398,13 +397,6 @@ func (m *WalletResponse) GetKeymanagerKind() KeymanagerKind {
|
||||
return KeymanagerKind_DERIVED
|
||||
}
|
||||
|
||||
func (m *WalletResponse) GetKeymanagerConfig() map[string]string {
|
||||
if m != nil {
|
||||
return m.KeymanagerConfig
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ListAccountsRequest struct {
|
||||
GetDepositTxData bool `protobuf:"varint,1,opt,name=get_deposit_tx_data,json=getDepositTxData,proto3" json:"get_deposit_tx_data,omitempty"`
|
||||
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
|
||||
@@ -1324,7 +1316,6 @@ func init() {
|
||||
proto.RegisterType((*EditWalletConfigRequest)(nil), "ethereum.validator.accounts.v2.EditWalletConfigRequest")
|
||||
proto.RegisterType((*GenerateMnemonicResponse)(nil), "ethereum.validator.accounts.v2.GenerateMnemonicResponse")
|
||||
proto.RegisterType((*WalletResponse)(nil), "ethereum.validator.accounts.v2.WalletResponse")
|
||||
proto.RegisterMapType((map[string]string)(nil), "ethereum.validator.accounts.v2.WalletResponse.KeymanagerConfigEntry")
|
||||
proto.RegisterType((*ListAccountsRequest)(nil), "ethereum.validator.accounts.v2.ListAccountsRequest")
|
||||
proto.RegisterType((*ListAccountsResponse)(nil), "ethereum.validator.accounts.v2.ListAccountsResponse")
|
||||
proto.RegisterType((*Account)(nil), "ethereum.validator.accounts.v2.Account")
|
||||
@@ -1349,119 +1340,117 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_8a5153635bfe042e = []byte{
|
||||
// 1788 bytes of a gzipped FileDescriptorProto
|
||||
// 1752 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcb, 0x8f, 0x1b, 0x49,
|
||||
0x19, 0xa7, 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, 0x40, 0xf8, 0x82, 0xf4, 0xf5, 0xa5,
|
||||
0xd2, 0xea, 0x52, 0x79, 0x45, 0x91, 0xb7, 0xb2, 0x7e, 0x87, 0x60, 0xd9, 0x18, 0xc7, 0x4d, 0xd8,
|
||||
0x30, 0xde, 0x19, 0xf7, 0x9c, 0xe1, 0xe8, 0xb8, 0xcf, 0x3a, 0x4e, 0x94, 0x83, 0xa2, 0xbd, 0x36,
|
||||
0x66, 0xbe, 0x54, 0xbc, 0x43, 0x7a, 0x2e, 0x47, 0xa6, 0x81, 0xe4, 0x70, 0x32, 0x88, 0x52, 0x53,
|
||||
0x30, 0xb4, 0xe7, 0x64, 0x40, 0x25, 0xd2, 0xe9, 0x04, 0xa4, 0x95, 0xc1, 0x2b, 0xee, 0x44, 0xf4,
|
||||
0xef, 0x48, 0xb9, 0x80, 0x9d, 0xa8, 0xc7, 0x2a, 0xd9, 0x6b, 0xa5, 0x31, 0x59, 0xb5, 0xda, 0x21,
|
||||
0x94, 0xa2, 0x78, 0x8c, 0x47, 0xc3, 0x18, 0xae, 0x0e, 0x6a, 0xd1, 0x86, 0x61, 0x84, 0x32, 0xc4,
|
||||
0x55, 0x58, 0x66, 0xdc, 0x65, 0x1d, 0x1a, 0x56, 0x53, 0x5b, 0xe9, 0xed, 0x8c, 0x1d, 0x1d, 0xad,
|
||||
0x27, 0x50, 0x78, 0x34, 0x12, 0xdd, 0xc8, 0x52, 0x0d, 0x72, 0xf1, 0x03, 0x62, 0x5a, 0x35, 0x3a,
|
||||
0xcb, 0x50, 0x9a, 0xbe, 0x74, 0x59, 0x60, 0x6e, 0x9a, 0xd7, 0x94, 0x7d, 0x16, 0x58, 0x2f, 0xa0,
|
||||
0xa8, 0x2d, 0x99, 0x34, 0xaf, 0xc3, 0x92, 0xce, 0x8b, 0xb6, 0xa3, 0x0f, 0xf8, 0x2e, 0x94, 0xd5,
|
||||
0x1f, 0x87, 0x9e, 0x0d, 0x59, 0xa0, 0x2e, 0xa5, 0x4c,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, 0x9c, 0x1a, 0xca, 0xef, 0xc0, 0x15, 0x93, 0x7c, 0x7a,
|
||||
0xc6, 0x42, 0xd5, 0xb9, 0x32, 0x4e, 0x45, 0x4d, 0x6c, 0x2b, 0x9a, 0x75, 0x02, 0x95, 0x83, 0xc1,
|
||||
0xd0, 0x0f, 0x84, 0x2c, 0x3a, 0xe1, 0x07, 0x34, 0x31, 0x89, 0x70, 0x2f, 0xa2, 0x39, 0x4c, 0xc9,
|
||||
0x50, 0x57, 0x15, 0x6a, 0xde, 0x5e, 0x8d, 0x39, 0x07, 0x86, 0x31, 0x29, 0x3e, 0x75, 0xbb, 0xb1,
|
||||
0x78, 0x14, 0x02, 0xeb, 0x10, 0xae, 0xbe, 0xe5, 0x77, 0x5c, 0x29, 0x91, 0x3b, 0xe7, 0xed, 0x1e,
|
||||
0xc1, 0x11, 0x2f, 0xee, 0xe8, 0xd0, 0xfa, 0x25, 0x82, 0x92, 0x99, 0x8b, 0xcf, 0x68, 0x18, 0x12,
|
||||
0x8f, 0xe2, 0xbb, 0x90, 0x1d, 0x8e, 0x8e, 0xe3, 0x51, 0xf0, 0x78, 0xf5, 0xdf, 0x7f, 0xbb, 0x79,
|
||||
0x25, 0x0c, 0x5f, 0xdd, 0x97, 0x43, 0x65, 0xcf, 0xfa, 0x60, 0xd7, 0xb2, 0x8d, 0x00, 0x7e, 0x02,
|
||||
0x95, 0x53, 0x26, 0xba, 0x6e, 0x40, 0x4e, 0x49, 0x5f, 0xee, 0x08, 0x2e, 0xe5, 0x82, 0x91, 0x7e,
|
||||
0xa8, 0xd0, 0xbf, 0xa5, 0xfa, 0xa0, 0x69, 0xd9, 0x1b, 0x63, 0x85, 0xd6, 0x58, 0x1e, 0x57, 0x20,
|
||||
0x4b, 0x06, 0xb2, 0xcb, 0x55, 0xb2, 0x32, 0xb6, 0x39, 0x59, 0xbf, 0x49, 0xc1, 0xda, 0x8c, 0x65,
|
||||
0x02, 0xf7, 0x60, 0x35, 0x2a, 0x43, 0x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, 0x36,
|
||||
0xd1, 0x5f, 0xde, 0x6c, 0xa2, 0x7f, 0xbc, 0xd9, 0x44, 0xc7, 0x59, 0xa5, 0xfe, 0xe0, 0x3f, 0x01,
|
||||
0x00, 0x00, 0xff, 0xff, 0x8c, 0xff, 0xde, 0xba, 0xf2, 0x13, 0x00, 0x00,
|
||||
0x19, 0xa7, 0x6c, 0xc7, 0x63, 0x7f, 0x76, 0x3c, 0x4e, 0xcd, 0x8c, 0x63, 0x9c, 0x64, 0x32, 0xe9,
|
||||
0x65, 0x93, 0xc9, 0x64, 0x63, 0x2f, 0xce, 0xb2, 0x19, 0x0d, 0x07, 0x94, 0x78, 0xcc, 0x66, 0x34,
|
||||
0x79, 0xa9, 0x77, 0xc4, 0x8a, 0x03, 0xb4, 0x6a, 0xdc, 0x95, 0x76, 0x69, 0xdc, 0xd5, 0xa6, 0xbb,
|
||||
0x3c, 0x8f, 0x70, 0x5b, 0x21, 0x21, 0xf1, 0xb8, 0xb0, 0x07, 0xc4, 0x81, 0x03, 0x91, 0xb8, 0x70,
|
||||
0x02, 0x09, 0x89, 0x1b, 0x67, 0x8e, 0x48, 0xdc, 0x01, 0x45, 0x5c, 0xb9, 0xf0, 0x17, 0xa0, 0x7a,
|
||||
0x74, 0xb7, 0xed, 0xd8, 0x38, 0x13, 0xb4, 0x17, 0xcb, 0xf5, 0xd5, 0xf7, 0xf8, 0xd5, 0xf7, 0x6e,
|
||||
0xb8, 0x3d, 0x0c, 0x03, 0x11, 0xb4, 0x8e, 0xc9, 0x80, 0xb9, 0x44, 0x04, 0x61, 0x8b, 0xf4, 0x7a,
|
||||
0xc1, 0x88, 0x8b, 0xa8, 0x75, 0xdc, 0x6e, 0x9d, 0xd0, 0x43, 0x87, 0x0c, 0x59, 0x53, 0xf1, 0xe0,
|
||||
0x75, 0x2a, 0xfa, 0x34, 0xa4, 0x23, 0xbf, 0x99, 0x70, 0x37, 0x63, 0xee, 0xe6, 0x71, 0xbb, 0x71,
|
||||
0xd5,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d6, 0x4f, 0x10, 0x54,
|
||||
0xa6, 0x82, 0xb5, 0xb0, 0x78, 0x3e, 0x83, 0xe5, 0x34, 0xf5, 0x9d, 0x23, 0xc6, 0xdd, 0x77, 0xac,
|
||||
0xa0, 0xca, 0xd1, 0xc4, 0xd9, 0xfa, 0x05, 0x82, 0x95, 0xc7, 0x2c, 0x12, 0x71, 0xba, 0xc7, 0xae,
|
||||
0xbf, 0x0b, 0x2b, 0x1e, 0x15, 0x8e, 0xab, 0x43, 0xe8, 0x88, 0x53, 0xc7, 0x25, 0x82, 0x28, 0x64,
|
||||
0x05, 0xbb, 0xea, 0x51, 0x61, 0x82, 0x7b, 0x70, 0x2a, 0xc3, 0x8b, 0xaf, 0x40, 0x71, 0x48, 0x3c,
|
||||
0xea, 0x44, 0xec, 0x25, 0x55, 0xc8, 0x2e, 0xd8, 0x05, 0x49, 0xf8, 0x94, 0xbd, 0xa4, 0xf8, 0x1a,
|
||||
0x80, 0xba, 0x14, 0xc1, 0x11, 0xe5, 0xc6, 0xf1, 0x8a, 0xfd, 0x40, 0x12, 0x70, 0x15, 0xb2, 0x64,
|
||||
0x30, 0x50, 0x5e, 0x2e, 0xd8, 0xf2, 0xaf, 0xf5, 0x0a, 0xc1, 0xea, 0x24, 0x28, 0xe3, 0xa7, 0x0e,
|
||||
0x14, 0x92, 0x52, 0x45, 0x1b, 0xd9, 0xcd, 0x52, 0xfb, 0xd6, 0xa2, 0xf7, 0x1b, 0x1d, 0x76, 0x22,
|
||||
0x28, 0x93, 0x81, 0xd3, 0x53, 0xe9, 0xea, 0x04, 0x93, 0x49, 0x1a, 0x49, 0x7e, 0x9e, 0xe0, 0xba,
|
||||
0x06, 0x20, 0x02, 0x41, 0x06, 0xfa, 0x51, 0x59, 0xf5, 0xa8, 0xa2, 0xa2, 0xc8, 0x57, 0x59, 0x7f,
|
||||
0x40, 0xb0, 0x64, 0x94, 0xe3, 0x36, 0xac, 0x19, 0xeb, 0x8c, 0x7b, 0xce, 0x70, 0x74, 0x38, 0x60,
|
||||
0x3d, 0x99, 0x6a, 0xca, 0x5f, 0x65, 0x7b, 0x25, 0xbd, 0x7c, 0xae, 0xee, 0xf6, 0xe9, 0x99, 0x6c,
|
||||
0x3d, 0x06, 0x92, 0xc3, 0x89, 0x4f, 0x0d, 0x86, 0x92, 0xa1, 0x3d, 0x25, 0x3e, 0x95, 0x48, 0xa7,
|
||||
0x03, 0x90, 0x55, 0x0a, 0x2f, 0xba, 0x13, 0xde, 0xbf, 0x25, 0xf9, 0x42, 0x76, 0xac, 0x9a, 0xfe,
|
||||
0x78, 0xce, 0x56, 0x52, 0xb2, 0x4a, 0xd9, 0x7d, 0xa8, 0xc4, 0xfe, 0x48, 0x4b, 0x2c, 0x85, 0xab,
|
||||
0x9d, 0x5a, 0xb6, 0x61, 0x18, 0xa3, 0x8c, 0x70, 0x1d, 0x96, 0x18, 0x77, 0x59, 0x8f, 0x46, 0xf5,
|
||||
0xcc, 0x46, 0x76, 0x33, 0x67, 0xc7, 0x47, 0xeb, 0x11, 0x94, 0x1e, 0x8c, 0x44, 0x3f, 0xd6, 0xd4,
|
||||
0x80, 0x42, 0xd2, 0x88, 0x4d, 0xca, 0xc7, 0x67, 0xe9, 0x4a, 0x93, 0xdf, 0x2e, 0x0b, 0xcd, 0x4b,
|
||||
0x8b, 0x9a, 0xb2, 0xcb, 0x42, 0xeb, 0x19, 0x94, 0xb5, 0x26, 0x13, 0xe6, 0x55, 0xb8, 0xa0, 0xe3,
|
||||
0xa2, 0xf5, 0xe8, 0x03, 0xbe, 0x0d, 0x55, 0xf5, 0xc7, 0xa1, 0xa7, 0x43, 0x16, 0xaa, 0x47, 0x29,
|
||||
0x55, 0x39, 0x7b, 0x59, 0xd1, 0xbb, 0x09, 0xd9, 0xfa, 0x07, 0x82, 0xda, 0xd3, 0xc0, 0xa5, 0x9d,
|
||||
0x80, 0x73, 0xda, 0x93, 0xa4, 0x44, 0xf7, 0x87, 0xb0, 0x7a, 0x48, 0x49, 0x2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, 0x6b, 0x5d, 0x41, 0xaf, 0xe3, 0xda, 0x24, 0xf4, 0x64, 0x1b, 0xfe, 0x31,
|
||||
0x82, 0xca, 0xe4, 0x22, 0x81, 0xbf, 0xb1, 0xb0, 0xf6, 0x66, 0x2d, 0x1e, 0x8d, 0x39, 0x49, 0x32,
|
||||
0xaf, 0x28, 0xe3, 0xd9, 0x1c, 0xe7, 0x7b, 0xfb, 0x15, 0x82, 0xfc, 0x23, 0x4a, 0x06, 0xa2, 0x8f,
|
||||
0x7f, 0x89, 0xe0, 0xf2, 0x27, 0x54, 0x3c, 0x4c, 0x96, 0xb1, 0x74, 0x91, 0x9b, 0x9b, 0x8b, 0x0b,
|
||||
0x93, 0x62, 0xf6, 0x42, 0x68, 0x7d, 0xa0, 0xe0, 0xdd, 0xc4, 0x5f, 0x9b, 0x84, 0xd7, 0x57, 0x48,
|
||||
0x5a, 0x6a, 0x49, 0xec, 0x25, 0x52, 0xed, 0x7f, 0x67, 0x20, 0x27, 0x77, 0x55, 0xfc, 0x39, 0x82,
|
||||
0x0b, 0x8f, 0x03, 0x8f, 0x71, 0x7c, 0x67, 0xe1, 0x27, 0x48, 0xba, 0x25, 0x37, 0x3e, 0x78, 0x3b,
|
||||
0xe6, 0xc9, 0xe0, 0x59, 0x2b, 0x93, 0xd8, 0x06, 0xd2, 0xae, 0x6c, 0x11, 0x3f, 0x42, 0x90, 0xff,
|
||||
0x94, 0x79, 0x7c, 0x34, 0xfc, 0x32, 0x51, 0x5c, 0x57, 0x28, 0xbe, 0x6a, 0x4d, 0x35, 0x8c, 0x48,
|
||||
0x19, 0x96, 0x30, 0xbe, 0x0b, 0xf9, 0xc7, 0x81, 0x17, 0x8c, 0xe6, 0x0f, 0x9b, 0x79, 0xb9, 0x31,
|
||||
0x47, 0xf5, 0x40, 0x69, 0xdb, 0x41, 0x5b, 0x0f, 0xcb, 0x7f, 0x79, 0xbd, 0x8e, 0xfe, 0xfa, 0x7a,
|
||||
0x1d, 0xfd, 0xf3, 0xf5, 0x3a, 0x3a, 0xcc, 0x2b, 0xf1, 0x7b, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff,
|
||||
0x71, 0x7b, 0x7a, 0x3e, 0x3a, 0x13, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@@ -2298,25 +2287,6 @@ func (m *WalletResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i -= len(m.XXX_unrecognized)
|
||||
copy(dAtA[i:], m.XXX_unrecognized)
|
||||
}
|
||||
if len(m.KeymanagerConfig) > 0 {
|
||||
for k := range m.KeymanagerConfig {
|
||||
v := m.KeymanagerConfig[k]
|
||||
baseI := i
|
||||
i -= len(v)
|
||||
copy(dAtA[i:], v)
|
||||
i = encodeVarintWebApi(dAtA, i, uint64(len(v)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
i -= len(k)
|
||||
copy(dAtA[i:], k)
|
||||
i = encodeVarintWebApi(dAtA, i, uint64(len(k)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
i = encodeVarintWebApi(dAtA, i, uint64(baseI-i))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
}
|
||||
if m.KeymanagerKind != 0 {
|
||||
i = encodeVarintWebApi(dAtA, i, uint64(m.KeymanagerKind))
|
||||
i--
|
||||
@@ -3202,14 +3172,6 @@ func (m *WalletResponse) Size() (n int) {
|
||||
if m.KeymanagerKind != 0 {
|
||||
n += 1 + sovWebApi(uint64(m.KeymanagerKind))
|
||||
}
|
||||
if len(m.KeymanagerConfig) > 0 {
|
||||
for k, v := range m.KeymanagerConfig {
|
||||
_ = k
|
||||
_ = v
|
||||
mapEntrySize := 1 + len(k) + sovWebApi(uint64(len(k))) + 1 + len(v) + sovWebApi(uint64(len(v)))
|
||||
n += mapEntrySize + 1 + sovWebApi(uint64(mapEntrySize))
|
||||
}
|
||||
}
|
||||
if m.XXX_unrecognized != nil {
|
||||
n += len(m.XXX_unrecognized)
|
||||
}
|
||||
@@ -4359,133 +4321,6 @@ func (m *WalletResponse) Unmarshal(dAtA []byte) error {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field KeymanagerConfig", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowWebApi
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthWebApi
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthWebApi
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.KeymanagerConfig == nil {
|
||||
m.KeymanagerConfig = make(map[string]string)
|
||||
}
|
||||
var mapkey string
|
||||
var mapvalue string
|
||||
for iNdEx < postIndex {
|
||||
entryPreIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowWebApi
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
if fieldNum == 1 {
|
||||
var stringLenmapkey uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowWebApi
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapkey |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapkey := int(stringLenmapkey)
|
||||
if intStringLenmapkey < 0 {
|
||||
return ErrInvalidLengthWebApi
|
||||
}
|
||||
postStringIndexmapkey := iNdEx + intStringLenmapkey
|
||||
if postStringIndexmapkey < 0 {
|
||||
return ErrInvalidLengthWebApi
|
||||
}
|
||||
if postStringIndexmapkey > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
|
||||
iNdEx = postStringIndexmapkey
|
||||
} else if fieldNum == 2 {
|
||||
var stringLenmapvalue uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowWebApi
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapvalue |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapvalue := int(stringLenmapvalue)
|
||||
if intStringLenmapvalue < 0 {
|
||||
return ErrInvalidLengthWebApi
|
||||
}
|
||||
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
|
||||
if postStringIndexmapvalue < 0 {
|
||||
return ErrInvalidLengthWebApi
|
||||
}
|
||||
if postStringIndexmapvalue > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
|
||||
iNdEx = postStringIndexmapvalue
|
||||
} else {
|
||||
iNdEx = entryPreIndex
|
||||
skippy, err := skipWebApi(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthWebApi
|
||||
}
|
||||
if (iNdEx + skippy) > postIndex {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
m.KeymanagerConfig[mapkey] = mapvalue
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipWebApi(dAtA[iNdEx:])
|
||||
|
||||
@@ -132,12 +132,7 @@ message GenerateMnemonicResponse {
|
||||
|
||||
message WalletResponse {
|
||||
string wallet_path = 1;
|
||||
|
||||
KeymanagerKind keymanager_kind = 2;
|
||||
|
||||
// Key manager configs, this is meant to be some what generic.
|
||||
// It'll later be encoded with json to represent in front end UI.
|
||||
map<string, string> keymanager_config = 3;
|
||||
}
|
||||
|
||||
message ListAccountsRequest {
|
||||
|
||||
568
proto/validator/accounts/v2_gateway/web_api.pb.go
generated
568
proto/validator/accounts/v2_gateway/web_api.pb.go
generated
@@ -371,9 +371,8 @@ type WalletResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
WalletPath string `protobuf:"bytes,1,opt,name=wallet_path,json=walletPath,proto3" json:"wallet_path,omitempty"`
|
||||
KeymanagerKind KeymanagerKind `protobuf:"varint,2,opt,name=keymanager_kind,json=keymanagerKind,proto3,enum=ethereum.validator.accounts.v2.KeymanagerKind" json:"keymanager_kind,omitempty"`
|
||||
KeymanagerConfig map[string]string `protobuf:"bytes,3,rep,name=keymanager_config,json=keymanagerConfig,proto3" json:"keymanager_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
WalletPath string `protobuf:"bytes,1,opt,name=wallet_path,json=walletPath,proto3" json:"wallet_path,omitempty"`
|
||||
KeymanagerKind KeymanagerKind `protobuf:"varint,2,opt,name=keymanager_kind,json=keymanagerKind,proto3,enum=ethereum.validator.accounts.v2.KeymanagerKind" json:"keymanager_kind,omitempty"`
|
||||
}
|
||||
|
||||
func (x *WalletResponse) Reset() {
|
||||
@@ -422,13 +421,6 @@ func (x *WalletResponse) GetKeymanagerKind() KeymanagerKind {
|
||||
return KeymanagerKind_DERIVED
|
||||
}
|
||||
|
||||
func (x *WalletResponse) GetKeymanagerConfig() map[string]string {
|
||||
if x != nil {
|
||||
return x.KeymanagerConfig
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ListAccountsRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -1305,7 +1297,7 @@ type DepositDataResponse_DepositData struct {
|
||||
func (x *DepositDataResponse_DepositData) Reset() {
|
||||
*x = DepositDataResponse_DepositData{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_validator_accounts_v2_web_api_proto_msgTypes[21]
|
||||
mi := &file_proto_validator_accounts_v2_web_api_proto_msgTypes[20]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -1318,7 +1310,7 @@ func (x *DepositDataResponse_DepositData) String() string {
|
||||
func (*DepositDataResponse_DepositData) ProtoMessage() {}
|
||||
|
||||
func (x *DepositDataResponse_DepositData) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_validator_accounts_v2_web_api_proto_msgTypes[21]
|
||||
mi := &file_proto_validator_accounts_v2_web_api_proto_msgTypes[20]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -1407,7 +1399,7 @@ var file_proto_validator_accounts_v2_web_api_proto_rawDesc = []byte{
|
||||
0x36, 0x0a, 0x18, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4d, 0x6e, 0x65, 0x6d, 0x6f,
|
||||
0x6e, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d,
|
||||
0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d,
|
||||
0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x22, 0xc2, 0x02, 0x0a, 0x0e, 0x57, 0x61, 0x6c, 0x6c,
|
||||
0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x22, 0x8a, 0x01, 0x0a, 0x0e, 0x57, 0x61, 0x6c, 0x6c,
|
||||
0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x61,
|
||||
0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x57, 0x0a, 0x0f, 0x6b,
|
||||
@@ -1416,253 +1408,241 @@ var file_proto_validator_accounts_v2_web_api_proto_rawDesc = []byte{
|
||||
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4b, 0x65, 0x79, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72,
|
||||
0x4b, 0x69, 0x6e, 0x64, 0x52, 0x0e, 0x6b, 0x65, 0x79, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72,
|
||||
0x4b, 0x69, 0x6e, 0x64, 0x12, 0x71, 0x0a, 0x11, 0x6b, 0x65, 0x79, 0x6d, 0x61, 0x6e, 0x61, 0x67,
|
||||
0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x44, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64,
|
||||
0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e,
|
||||
0x4b, 0x65, 0x79, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x6b, 0x65, 0x79, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65,
|
||||
0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x43, 0x0a, 0x15, 0x4b, 0x65, 0x79, 0x6d, 0x61,
|
||||
0x6e, 0x61, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x92, 0x01, 0x0a,
|
||||
0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x67, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x70, 0x6f,
|
||||
0x73, 0x69, 0x74, 0x5f, 0x74, 0x78, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x10, 0x67, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x78, 0x44,
|
||||
0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
|
||||
0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c,
|
||||
0x6c, 0x22, 0xa2, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65,
|
||||
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f,
|
||||
0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12,
|
||||
0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b,
|
||||
0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61,
|
||||
0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c,
|
||||
0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74,
|
||||
0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6e, 0x67,
|
||||
0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0c, 0x52, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x75, 0x62,
|
||||
0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x64, 0x65, 0x70,
|
||||
0x6f, 0x73, 0x69, 0x74, 0x5f, 0x74, 0x78, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x0c, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x78, 0x44, 0x61, 0x74,
|
||||
0x61, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
|
||||
0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x72, 0x69,
|
||||
0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x22, 0x4b, 0x0a, 0x0e, 0x41, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b,
|
||||
0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||
0x0c, 0x52, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, 0x07,
|
||||
0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0x48, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
|
||||
0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
|
||||
0x72, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x64, 0x69, 0x72,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x44, 0x69,
|
||||
0x72, 0x22, 0x4f, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
|
||||
0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x04, 0x52, 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x22, 0xdf, 0x01, 0x0a, 0x16, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a,
|
||||
0x14, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x6e, 0x64,
|
||||
0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x62, 0x65, 0x61,
|
||||
0x63, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12,
|
||||
0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x73, 0x79, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07,
|
||||
0x73, 0x79, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73,
|
||||
0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67,
|
||||
0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x65,
|
||||
0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61,
|
||||
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, 0x64, 0x65,
|
||||
0x70, 0x6f, 0x73, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64,
|
||||
0x72, 0x65, 0x73, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50,
|
||||
0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29,
|
||||
0x0a, 0x10, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
|
||||
0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e,
|
||||
0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73,
|
||||
0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73,
|
||||
0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x33, 0x0a, 0x15, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
|
||||
0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x43, 0x6f,
|
||||
0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x38, 0x0a, 0x11, 0x48, 0x61,
|
||||
0x73, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x23, 0x0a, 0x0d, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x45, 0x78,
|
||||
0x69, 0x73, 0x74, 0x73, 0x22, 0x76, 0x0a, 0x16, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65,
|
||||
0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d,
|
||||
0x0a, 0x12, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x5f, 0x69, 0x6d, 0x70, 0x6f,
|
||||
0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x6b, 0x65, 0x79, 0x73,
|
||||
0x74, 0x6f, 0x72, 0x65, 0x73, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x2d, 0x0a,
|
||||
0x12, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77,
|
||||
0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6b, 0x65, 0x79, 0x73, 0x74,
|
||||
0x6f, 0x72, 0x65, 0x73, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x4b, 0x0a, 0x17,
|
||||
0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x6d, 0x70, 0x6f, 0x72,
|
||||
0x74, 0x65, 0x64, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x12, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x50,
|
||||
0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x0e, 0x44, 0x65,
|
||||
0x70, 0x6f, 0x73, 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x06,
|
||||
0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x11, 0xf2, 0xde,
|
||||
0x1f, 0x0d, 0x73, 0x73, 0x7a, 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x3a, 0x22, 0x34, 0x38, 0x22, 0x52,
|
||||
0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x48, 0x0a, 0x16, 0x77, 0x69, 0x74, 0x68, 0x64,
|
||||
0x72, 0x61, 0x77, 0x61, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c,
|
||||
0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x73, 0x73, 0x7a,
|
||||
0x2d, 0x73, 0x69, 0x7a, 0x65, 0x3a, 0x22, 0x33, 0x32, 0x22, 0x52, 0x15, 0x77, 0x69, 0x74, 0x68,
|
||||
0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c,
|
||||
0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xaa, 0x02, 0x0a, 0x13, 0x44, 0x65,
|
||||
0x70, 0x6f, 0x73, 0x69, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x6b, 0x0a, 0x11, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x64, 0x61, 0x74,
|
||||
0x61, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65,
|
||||
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f,
|
||||
0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65,
|
||||
0x70, 0x6f, 0x73, 0x69, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0f, 0x64,
|
||||
0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x1a, 0xa5,
|
||||
0x01, 0x0a, 0x0b, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x5d,
|
||||
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x65,
|
||||
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f,
|
||||
0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65,
|
||||
0x70, 0x6f, 0x73, 0x69, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x61,
|
||||
0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x37, 0x0a,
|
||||
0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
|
||||
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x38, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x1f, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73,
|
||||
0x22, 0x3b, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c,
|
||||
0x52, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x2a, 0x37, 0x0a,
|
||||
0x0e, 0x4b, 0x65, 0x79, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x4b, 0x69, 0x6e, 0x64, 0x12,
|
||||
0x0b, 0x0a, 0x07, 0x44, 0x45, 0x52, 0x49, 0x56, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08,
|
||||
0x49, 0x4d, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45,
|
||||
0x4d, 0x4f, 0x54, 0x45, 0x10, 0x02, 0x32, 0x8b, 0x07, 0x0a, 0x06, 0x57, 0x61, 0x6c, 0x6c, 0x65,
|
||||
0x74, 0x12, 0x7b, 0x0a, 0x09, 0x48, 0x61, 0x73, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x16,
|
||||
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x31, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75,
|
||||
0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x61, 0x73, 0x57, 0x61, 0x6c, 0x6c, 0x65,
|
||||
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||
0x1d, 0x12, 0x1b, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72,
|
||||
0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0xa1,
|
||||
0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12,
|
||||
0x33, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64,
|
||||
0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
|
||||
0x4b, 0x69, 0x6e, 0x64, 0x22, 0x92, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x13,
|
||||
0x67, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x74, 0x78, 0x5f, 0x64,
|
||||
0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x67, 0x65, 0x74, 0x44, 0x65,
|
||||
0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x78, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x70,
|
||||
0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
|
||||
0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65,
|
||||
0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61,
|
||||
0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x22, 0xa2, 0x01, 0x0a, 0x14, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
|
||||
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c,
|
||||
0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93,
|
||||
0x02, 0x20, 0x22, 0x1b, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f,
|
||||
0x72, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x3a,
|
||||
0x01, 0x2a, 0x12, 0xa2, 0x01, 0x0a, 0x0a, 0x45, 0x64, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x67, 0x12, 0x37, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c,
|
||||
0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e,
|
||||
0x76, 0x32, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e,
|
||||
0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x65, 0x74, 0x68,
|
||||
0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x61, 0x6c, 0x6c,
|
||||
0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93,
|
||||
0x02, 0x25, 0x22, 0x20, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f,
|
||||
0x72, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f,
|
||||
0x65, 0x64, 0x69, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x74, 0x0a, 0x0c, 0x57, 0x61, 0x6c, 0x6c, 0x65,
|
||||
0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a,
|
||||
0x2e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64,
|
||||
0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c,
|
||||
0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x8d, 0x01,
|
||||
0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e,
|
||||
0x69, 0x63, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x38, 0x2e, 0x65, 0x74, 0x68,
|
||||
0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x6e, 0x65,
|
||||
0x72, 0x61, 0x74, 0x65, 0x4d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x76,
|
||||
0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6d, 0x6e, 0x65, 0x6d,
|
||||
0x6f, 0x6e, 0x69, 0x63, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x12, 0xb4, 0x01,
|
||||
0x0a, 0x0f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65,
|
||||
0x73, 0x12, 0x36, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c,
|
||||
0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e,
|
||||
0x76, 0x32, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x65, 0x74, 0x68, 0x65,
|
||||
0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f,
|
||||
0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
|
||||
0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xb1,
|
||||
0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x76, 0x61,
|
||||
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f,
|
||||
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64,
|
||||
0x61, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x21,
|
||||
0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d,
|
||||
0x65, 0x12, 0x26, 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x74, 0x78, 0x5f,
|
||||
0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6f,
|
||||
0x73, 0x69, 0x74, 0x54, 0x78, 0x44, 0x61, 0x74, 0x61, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x72,
|
||||
0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61,
|
||||
0x74, 0x68, 0x22, 0x4b, 0x0a, 0x0e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b,
|
||||
0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69,
|
||||
0x63, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73,
|
||||
0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22,
|
||||
0x48, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x77, 0x61,
|
||||
0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
||||
0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x44, 0x69, 0x72, 0x22, 0x4f, 0x0a, 0x0c, 0x41, 0x75, 0x74,
|
||||
0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b,
|
||||
0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
|
||||
0x29, 0x0a, 0x10, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
|
||||
0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xdf, 0x01, 0x0a, 0x16, 0x4e,
|
||||
0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f,
|
||||
0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x12, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x45,
|
||||
0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
|
||||
0x63, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x6e,
|
||||
0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x79, 0x6e, 0x63, 0x69, 0x6e, 0x67,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x79, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x12,
|
||||
0x21, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x54, 0x69,
|
||||
0x6d, 0x65, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x43, 0x6f, 0x6e,
|
||||
0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x93, 0x01, 0x0a,
|
||||
0x15, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e,
|
||||
0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
|
||||
0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x33, 0x0a,
|
||||
0x15, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72,
|
||||
0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x70, 0x61,
|
||||
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x22, 0x38, 0x0a, 0x11, 0x48, 0x61, 0x73, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x61, 0x6c, 0x6c, 0x65,
|
||||
0x74, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c,
|
||||
0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x76, 0x0a, 0x16,
|
||||
0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f,
|
||||
0x72, 0x65, 0x73, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x09, 0x52, 0x11, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x49, 0x6d, 0x70,
|
||||
0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x2d, 0x0a, 0x12, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x65, 0x73, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x11, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x50, 0x61, 0x73, 0x73,
|
||||
0x77, 0x6f, 0x72, 0x64, 0x22, 0x4b, 0x0a, 0x17, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65,
|
||||
0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x30, 0x0a, 0x14, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x75, 0x62, 0x6c,
|
||||
0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x12, 0x69,
|
||||
0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79,
|
||||
0x73, 0x22, 0x9d, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x4d, 0x65, 0x73,
|
||||
0x73, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0c, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x73, 0x73, 0x7a, 0x2d, 0x73, 0x69,
|
||||
0x7a, 0x65, 0x3a, 0x22, 0x34, 0x38, 0x22, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12,
|
||||
0x48, 0x0a, 0x16, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x5f, 0x63, 0x72,
|
||||
0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42,
|
||||
0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x73, 0x73, 0x7a, 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x3a, 0x22, 0x33,
|
||||
0x32, 0x22, 0x52, 0x15, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x43, 0x72,
|
||||
0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x22, 0xaa, 0x02, 0x0a, 0x13, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x44, 0x61, 0x74,
|
||||
0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x11, 0x64, 0x65, 0x70,
|
||||
0x6f, 0x73, 0x69, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
|
||||
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x44, 0x61, 0x74,
|
||||
0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69,
|
||||
0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x44, 0x61,
|
||||
0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x1a, 0xa5, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x70, 0x6f, 0x73,
|
||||
0x69, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x5d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
|
||||
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x44, 0x61, 0x74,
|
||||
0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69,
|
||||
0x74, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
|
||||
0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x38,
|
||||
0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69,
|
||||
0x63, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x75,
|
||||
0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x3b, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65,
|
||||
0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x64, 0x4b, 0x65, 0x79, 0x73, 0x2a, 0x37, 0x0a, 0x0e, 0x4b, 0x65, 0x79, 0x6d, 0x61, 0x6e, 0x61,
|
||||
0x67, 0x65, 0x72, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x52, 0x49, 0x56,
|
||||
0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44,
|
||||
0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x10, 0x02, 0x32, 0x8b,
|
||||
0x07, 0x0a, 0x06, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x7b, 0x0a, 0x09, 0x48, 0x61, 0x73,
|
||||
0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x31,
|
||||
0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
|
||||
0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e,
|
||||
0x48, 0x61, 0x73, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x76, 0x32, 0x2f, 0x76,
|
||||
0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f,
|
||||
0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0xa1, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x33, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65,
|
||||
0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57,
|
||||
0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x65,
|
||||
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f,
|
||||
0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x76, 0x32, 0x2f,
|
||||
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74,
|
||||
0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0xa2, 0x01, 0x0a, 0x0a, 0x45,
|
||||
0x64, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x2e, 0x65, 0x74, 0x68, 0x65,
|
||||
0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x57,
|
||||
0x61, 0x6c, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61,
|
||||
0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x76, 0x32, 0x2f,
|
||||
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74,
|
||||
0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x65, 0x64, 0x69, 0x74, 0x3a, 0x01, 0x2a, 0x12,
|
||||
0x74, 0x0a, 0x0c, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
|
||||
0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||
0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x2e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65,
|
||||
0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12,
|
||||
0x14, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x77,
|
||||
0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x8d, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61,
|
||||
0x74, 0x65, 0x4d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
|
||||
0x74, 0x79, 0x1a, 0x38, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61,
|
||||
0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4d, 0x6e, 0x65, 0x6d,
|
||||
0x6f, 0x6e, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3,
|
||||
0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
|
||||
0x74, 0x6f, 0x72, 0x2f, 0x6d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x2f, 0x67, 0x65, 0x6e,
|
||||
0x65, 0x72, 0x61, 0x74, 0x65, 0x12, 0xb4, 0x01, 0x0a, 0x0f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74,
|
||||
0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x36, 0x2e, 0x65, 0x74, 0x68, 0x65,
|
||||
0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72,
|
||||
0x74, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x22, 0x25, 0x2f, 0x76, 0x32, 0x2f,
|
||||
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74,
|
||||
0x2f, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x2f, 0x69, 0x6d, 0x70, 0x6f, 0x72,
|
||||
0x74, 0x3a, 0x01, 0x2a, 0x32, 0xb0, 0x02, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x73, 0x12, 0x99, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x73, 0x12, 0x33, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61,
|
||||
0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65,
|
||||
0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82,
|
||||
0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64,
|
||||
0x61, 0x74, 0x6f, 0x72, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x87, 0x01,
|
||||
0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
|
||||
0x12, 0x35, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69,
|
||||
0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,
|
||||
0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c,
|
||||
0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2f,
|
||||
0x65, 0x64, 0x69, 0x74, 0x3a, 0x01, 0x2a, 0x32, 0xa2, 0x01, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x6c,
|
||||
0x74, 0x68, 0x12, 0x97, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16,
|
||||
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x36, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75,
|
||||
0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x6e,
|
||||
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69,
|
||||
0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2f, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xed, 0x02, 0x0a,
|
||||
0x04, 0x41, 0x75, 0x74, 0x68, 0x12, 0x82, 0x01, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12,
|
||||
0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64,
|
||||
0x74, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x37, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c,
|
||||
0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e,
|
||||
0x76, 0x32, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93,
|
||||
0x02, 0x2a, 0x22, 0x25, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f,
|
||||
0x72, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x65, 0x73, 0x2f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x3a, 0x01, 0x2a, 0x32, 0xb0, 0x02, 0x0a,
|
||||
0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x99, 0x01, 0x0a, 0x0c, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x33, 0x2e, 0x65, 0x74, 0x68,
|
||||
0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x34, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64,
|
||||
0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x65,
|
||||
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f,
|
||||
0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x75,
|
||||
0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93,
|
||||
0x02, 0x18, 0x22, 0x13, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f,
|
||||
0x72, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0x84, 0x01, 0x0a, 0x06, 0x53,
|
||||
0x69, 0x67, 0x6e, 0x75, 0x70, 0x12, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d,
|
||||
0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61,
|
||||
0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x22, 0x14, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61,
|
||||
0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x3a, 0x01,
|
||||
0x2a, 0x12, 0x59, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f,
|
||||
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f,
|
||||
0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x61, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
|
||||
0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x35, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72,
|
||||
0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
|
||||
0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||
0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22,
|
||||
0x1b, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x70,
|
||||
0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2f, 0x65, 0x64, 0x69, 0x74, 0x3a, 0x01, 0x2a, 0x32,
|
||||
0xa2, 0x01, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x97, 0x01, 0x0a, 0x17, 0x47,
|
||||
0x65, 0x74, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x6e,
|
||||
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x36,
|
||||
0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
|
||||
0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24,
|
||||
0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x68, 0x65,
|
||||
0x61, 0x6c, 0x74, 0x68, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x32, 0xed, 0x02, 0x0a, 0x04, 0x41, 0x75, 0x74, 0x68, 0x12, 0x82, 0x01,
|
||||
0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65,
|
||||
0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
|
||||
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x22, 0x13, 0x2f, 0x76, 0x32, 0x2f,
|
||||
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x3a,
|
||||
0x01, 0x2a, 0x12, 0x84, 0x01, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x12, 0x2b, 0x2e,
|
||||
0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
|
||||
0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x41,
|
||||
0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x65, 0x74, 0x68,
|
||||
0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x75, 0x74, 0x68,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19,
|
||||
0x22, 0x14, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f,
|
||||
0x73, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x3a, 0x01, 0x2a, 0x12, 0x59, 0x0a, 0x06, 0x4c, 0x6f, 0x67,
|
||||
0x6f, 0x75, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
|
||||
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
|
||||
0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1f, 0x82, 0xd3, 0xe4,
|
||||
0x93, 0x02, 0x19, 0x22, 0x14, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
|
||||
0x6f, 0x72, 0x2f, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x3a, 0x01, 0x2a, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
0x70, 0x74, 0x79, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x22, 0x14, 0x2f, 0x76, 0x32,
|
||||
0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6c, 0x6f, 0x67, 0x6f, 0x75,
|
||||
0x74, 0x3a, 0x01, 0x2a, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -1678,7 +1658,7 @@ func file_proto_validator_accounts_v2_web_api_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_proto_validator_accounts_v2_web_api_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_proto_validator_accounts_v2_web_api_proto_msgTypes = make([]protoimpl.MessageInfo, 23)
|
||||
var file_proto_validator_accounts_v2_web_api_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
|
||||
var file_proto_validator_accounts_v2_web_api_proto_goTypes = []interface{}{
|
||||
(KeymanagerKind)(0), // 0: ethereum.validator.accounts.v2.KeymanagerKind
|
||||
(*CreateWalletRequest)(nil), // 1: ethereum.validator.accounts.v2.CreateWalletRequest
|
||||
@@ -1701,49 +1681,47 @@ var file_proto_validator_accounts_v2_web_api_proto_goTypes = []interface{}{
|
||||
(*DepositDataResponse)(nil), // 18: ethereum.validator.accounts.v2.DepositDataResponse
|
||||
(*DeleteAccountsRequest)(nil), // 19: ethereum.validator.accounts.v2.DeleteAccountsRequest
|
||||
(*DeleteAccountsResponse)(nil), // 20: ethereum.validator.accounts.v2.DeleteAccountsResponse
|
||||
nil, // 21: ethereum.validator.accounts.v2.WalletResponse.KeymanagerConfigEntry
|
||||
(*DepositDataResponse_DepositData)(nil), // 22: ethereum.validator.accounts.v2.DepositDataResponse.DepositData
|
||||
nil, // 23: ethereum.validator.accounts.v2.DepositDataResponse.DepositData.DataEntry
|
||||
(*empty.Empty)(nil), // 24: google.protobuf.Empty
|
||||
(*DepositDataResponse_DepositData)(nil), // 21: ethereum.validator.accounts.v2.DepositDataResponse.DepositData
|
||||
nil, // 22: ethereum.validator.accounts.v2.DepositDataResponse.DepositData.DataEntry
|
||||
(*empty.Empty)(nil), // 23: google.protobuf.Empty
|
||||
}
|
||||
var file_proto_validator_accounts_v2_web_api_proto_depIdxs = []int32{
|
||||
0, // 0: ethereum.validator.accounts.v2.CreateWalletRequest.keymanager:type_name -> ethereum.validator.accounts.v2.KeymanagerKind
|
||||
5, // 1: ethereum.validator.accounts.v2.CreateWalletResponse.wallet:type_name -> ethereum.validator.accounts.v2.WalletResponse
|
||||
18, // 2: ethereum.validator.accounts.v2.CreateWalletResponse.accounts_created:type_name -> ethereum.validator.accounts.v2.DepositDataResponse
|
||||
0, // 3: ethereum.validator.accounts.v2.WalletResponse.keymanager_kind:type_name -> ethereum.validator.accounts.v2.KeymanagerKind
|
||||
21, // 4: ethereum.validator.accounts.v2.WalletResponse.keymanager_config:type_name -> ethereum.validator.accounts.v2.WalletResponse.KeymanagerConfigEntry
|
||||
8, // 5: ethereum.validator.accounts.v2.ListAccountsResponse.accounts:type_name -> ethereum.validator.accounts.v2.Account
|
||||
22, // 6: ethereum.validator.accounts.v2.DepositDataResponse.deposit_data_list:type_name -> ethereum.validator.accounts.v2.DepositDataResponse.DepositData
|
||||
23, // 7: ethereum.validator.accounts.v2.DepositDataResponse.DepositData.data:type_name -> ethereum.validator.accounts.v2.DepositDataResponse.DepositData.DataEntry
|
||||
24, // 8: ethereum.validator.accounts.v2.Wallet.HasWallet:input_type -> google.protobuf.Empty
|
||||
1, // 9: ethereum.validator.accounts.v2.Wallet.CreateWallet:input_type -> ethereum.validator.accounts.v2.CreateWalletRequest
|
||||
3, // 10: ethereum.validator.accounts.v2.Wallet.EditConfig:input_type -> ethereum.validator.accounts.v2.EditWalletConfigRequest
|
||||
24, // 11: ethereum.validator.accounts.v2.Wallet.WalletConfig:input_type -> google.protobuf.Empty
|
||||
24, // 12: ethereum.validator.accounts.v2.Wallet.GenerateMnemonic:input_type -> google.protobuf.Empty
|
||||
15, // 13: ethereum.validator.accounts.v2.Wallet.ImportKeystores:input_type -> ethereum.validator.accounts.v2.ImportKeystoresRequest
|
||||
6, // 14: ethereum.validator.accounts.v2.Accounts.ListAccounts:input_type -> ethereum.validator.accounts.v2.ListAccountsRequest
|
||||
13, // 15: ethereum.validator.accounts.v2.Accounts.ChangePassword:input_type -> ethereum.validator.accounts.v2.ChangePasswordRequest
|
||||
24, // 16: ethereum.validator.accounts.v2.Health.GetBeaconNodeConnection:input_type -> google.protobuf.Empty
|
||||
10, // 17: ethereum.validator.accounts.v2.Auth.Login:input_type -> ethereum.validator.accounts.v2.AuthRequest
|
||||
10, // 18: ethereum.validator.accounts.v2.Auth.Signup:input_type -> ethereum.validator.accounts.v2.AuthRequest
|
||||
24, // 19: ethereum.validator.accounts.v2.Auth.Logout:input_type -> google.protobuf.Empty
|
||||
14, // 20: ethereum.validator.accounts.v2.Wallet.HasWallet:output_type -> ethereum.validator.accounts.v2.HasWalletResponse
|
||||
2, // 21: ethereum.validator.accounts.v2.Wallet.CreateWallet:output_type -> ethereum.validator.accounts.v2.CreateWalletResponse
|
||||
5, // 22: ethereum.validator.accounts.v2.Wallet.EditConfig:output_type -> ethereum.validator.accounts.v2.WalletResponse
|
||||
5, // 23: ethereum.validator.accounts.v2.Wallet.WalletConfig:output_type -> ethereum.validator.accounts.v2.WalletResponse
|
||||
4, // 24: ethereum.validator.accounts.v2.Wallet.GenerateMnemonic:output_type -> ethereum.validator.accounts.v2.GenerateMnemonicResponse
|
||||
16, // 25: ethereum.validator.accounts.v2.Wallet.ImportKeystores:output_type -> ethereum.validator.accounts.v2.ImportKeystoresResponse
|
||||
7, // 26: ethereum.validator.accounts.v2.Accounts.ListAccounts:output_type -> ethereum.validator.accounts.v2.ListAccountsResponse
|
||||
24, // 27: ethereum.validator.accounts.v2.Accounts.ChangePassword:output_type -> google.protobuf.Empty
|
||||
12, // 28: ethereum.validator.accounts.v2.Health.GetBeaconNodeConnection:output_type -> ethereum.validator.accounts.v2.NodeConnectionResponse
|
||||
11, // 29: ethereum.validator.accounts.v2.Auth.Login:output_type -> ethereum.validator.accounts.v2.AuthResponse
|
||||
11, // 30: ethereum.validator.accounts.v2.Auth.Signup:output_type -> ethereum.validator.accounts.v2.AuthResponse
|
||||
24, // 31: ethereum.validator.accounts.v2.Auth.Logout:output_type -> google.protobuf.Empty
|
||||
20, // [20:32] is the sub-list for method output_type
|
||||
8, // [8:20] is the sub-list for method input_type
|
||||
8, // [8:8] is the sub-list for extension type_name
|
||||
8, // [8:8] is the sub-list for extension extendee
|
||||
0, // [0:8] is the sub-list for field type_name
|
||||
8, // 4: ethereum.validator.accounts.v2.ListAccountsResponse.accounts:type_name -> ethereum.validator.accounts.v2.Account
|
||||
21, // 5: ethereum.validator.accounts.v2.DepositDataResponse.deposit_data_list:type_name -> ethereum.validator.accounts.v2.DepositDataResponse.DepositData
|
||||
22, // 6: ethereum.validator.accounts.v2.DepositDataResponse.DepositData.data:type_name -> ethereum.validator.accounts.v2.DepositDataResponse.DepositData.DataEntry
|
||||
23, // 7: ethereum.validator.accounts.v2.Wallet.HasWallet:input_type -> google.protobuf.Empty
|
||||
1, // 8: ethereum.validator.accounts.v2.Wallet.CreateWallet:input_type -> ethereum.validator.accounts.v2.CreateWalletRequest
|
||||
3, // 9: ethereum.validator.accounts.v2.Wallet.EditConfig:input_type -> ethereum.validator.accounts.v2.EditWalletConfigRequest
|
||||
23, // 10: ethereum.validator.accounts.v2.Wallet.WalletConfig:input_type -> google.protobuf.Empty
|
||||
23, // 11: ethereum.validator.accounts.v2.Wallet.GenerateMnemonic:input_type -> google.protobuf.Empty
|
||||
15, // 12: ethereum.validator.accounts.v2.Wallet.ImportKeystores:input_type -> ethereum.validator.accounts.v2.ImportKeystoresRequest
|
||||
6, // 13: ethereum.validator.accounts.v2.Accounts.ListAccounts:input_type -> ethereum.validator.accounts.v2.ListAccountsRequest
|
||||
13, // 14: ethereum.validator.accounts.v2.Accounts.ChangePassword:input_type -> ethereum.validator.accounts.v2.ChangePasswordRequest
|
||||
23, // 15: ethereum.validator.accounts.v2.Health.GetBeaconNodeConnection:input_type -> google.protobuf.Empty
|
||||
10, // 16: ethereum.validator.accounts.v2.Auth.Login:input_type -> ethereum.validator.accounts.v2.AuthRequest
|
||||
10, // 17: ethereum.validator.accounts.v2.Auth.Signup:input_type -> ethereum.validator.accounts.v2.AuthRequest
|
||||
23, // 18: ethereum.validator.accounts.v2.Auth.Logout:input_type -> google.protobuf.Empty
|
||||
14, // 19: ethereum.validator.accounts.v2.Wallet.HasWallet:output_type -> ethereum.validator.accounts.v2.HasWalletResponse
|
||||
2, // 20: ethereum.validator.accounts.v2.Wallet.CreateWallet:output_type -> ethereum.validator.accounts.v2.CreateWalletResponse
|
||||
5, // 21: ethereum.validator.accounts.v2.Wallet.EditConfig:output_type -> ethereum.validator.accounts.v2.WalletResponse
|
||||
5, // 22: ethereum.validator.accounts.v2.Wallet.WalletConfig:output_type -> ethereum.validator.accounts.v2.WalletResponse
|
||||
4, // 23: ethereum.validator.accounts.v2.Wallet.GenerateMnemonic:output_type -> ethereum.validator.accounts.v2.GenerateMnemonicResponse
|
||||
16, // 24: ethereum.validator.accounts.v2.Wallet.ImportKeystores:output_type -> ethereum.validator.accounts.v2.ImportKeystoresResponse
|
||||
7, // 25: ethereum.validator.accounts.v2.Accounts.ListAccounts:output_type -> ethereum.validator.accounts.v2.ListAccountsResponse
|
||||
23, // 26: ethereum.validator.accounts.v2.Accounts.ChangePassword:output_type -> google.protobuf.Empty
|
||||
12, // 27: ethereum.validator.accounts.v2.Health.GetBeaconNodeConnection:output_type -> ethereum.validator.accounts.v2.NodeConnectionResponse
|
||||
11, // 28: ethereum.validator.accounts.v2.Auth.Login:output_type -> ethereum.validator.accounts.v2.AuthResponse
|
||||
11, // 29: ethereum.validator.accounts.v2.Auth.Signup:output_type -> ethereum.validator.accounts.v2.AuthResponse
|
||||
23, // 30: ethereum.validator.accounts.v2.Auth.Logout:output_type -> google.protobuf.Empty
|
||||
19, // [19:31] is the sub-list for method output_type
|
||||
7, // [7:19] is the sub-list for method input_type
|
||||
7, // [7:7] is the sub-list for extension type_name
|
||||
7, // [7:7] is the sub-list for extension extendee
|
||||
0, // [0:7] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_proto_validator_accounts_v2_web_api_proto_init() }
|
||||
@@ -1992,7 +1970,7 @@ func file_proto_validator_accounts_v2_web_api_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_validator_accounts_v2_web_api_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_proto_validator_accounts_v2_web_api_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DepositDataResponse_DepositData); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -2011,7 +1989,7 @@ func file_proto_validator_accounts_v2_web_api_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_proto_validator_accounts_v2_web_api_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 23,
|
||||
NumMessages: 22,
|
||||
NumExtensions: 0,
|
||||
NumServices: 4,
|
||||
},
|
||||
|
||||
@@ -64,7 +64,6 @@ func TestDeleteAccounts_Noninteractive(t *testing.T) {
|
||||
cliCtx.Context,
|
||||
&imported.SetupConfig{
|
||||
Wallet: w,
|
||||
Opts: imported.DefaultKeymanagerOpts(),
|
||||
},
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package accounts
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
@@ -12,7 +11,6 @@ import (
|
||||
"github.com/prysmaticlabs/prysm/validator/accounts/prompt"
|
||||
"github.com/prysmaticlabs/prysm/validator/accounts/wallet"
|
||||
"github.com/prysmaticlabs/prysm/validator/flags"
|
||||
"github.com/prysmaticlabs/prysm/validator/keymanager"
|
||||
"github.com/prysmaticlabs/prysm/validator/keymanager/imported"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
@@ -25,11 +23,11 @@ func DisableAccountsCli(cliCtx *cli.Context) error {
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not open wallet")
|
||||
}
|
||||
keymanager, err := w.InitializeKeymanager(cliCtx.Context)
|
||||
km, err := w.InitializeKeymanager(cliCtx.Context)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not initialize keymanager")
|
||||
}
|
||||
validatingPublicKeys, err := keymanager.FetchValidatingPublicKeys(cliCtx.Context)
|
||||
validatingPublicKeys, err := km.FetchValidatingPublicKeys(cliCtx.Context)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -83,11 +81,11 @@ func DisableAccountsCli(cliCtx *cli.Context) error {
|
||||
}
|
||||
}
|
||||
}
|
||||
if err := DisableAccounts(cliCtx.Context, &AccountsConfig{
|
||||
Wallet: w,
|
||||
Keymanager: keymanager,
|
||||
DisablePublicKeys: rawPublicKeys,
|
||||
}); err != nil {
|
||||
importedKM, ok := km.(*imported.Keymanager)
|
||||
if !ok {
|
||||
return errors.New("can only disable accounts for imported wallets")
|
||||
}
|
||||
if err := importedKM.DisableAccounts(cliCtx.Context, rawPublicKeys); err != nil {
|
||||
return err
|
||||
}
|
||||
log.WithField("publicKeys", allAccountStr).Info("Accounts disabled")
|
||||
@@ -102,169 +100,73 @@ func EnableAccountsCli(cliCtx *cli.Context) error {
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not open wallet")
|
||||
}
|
||||
ikeymanager, err := w.InitializeKeymanager(cliCtx.Context)
|
||||
km, err := w.InitializeKeymanager(cliCtx.Context)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not initialize keymanager")
|
||||
}
|
||||
switch w.KeymanagerKind() {
|
||||
case keymanager.Remote:
|
||||
return errors.New("cannot enable accounts for a remote keymanager")
|
||||
case keymanager.Imported:
|
||||
km, ok := ikeymanager.(*imported.Keymanager)
|
||||
if !ok {
|
||||
return errors.New("not a imported keymanager")
|
||||
}
|
||||
disabledPublicKeys := km.KeymanagerOpts().DisabledPublicKeys
|
||||
if len(disabledPublicKeys) == 0 {
|
||||
return errors.New("No accounts are disabled.")
|
||||
}
|
||||
disabledPublicKeys48 := make([][48]byte, len(disabledPublicKeys))
|
||||
for i := range disabledPublicKeys {
|
||||
disabledPublicKeys48[i] = bytesutil.ToBytes48(disabledPublicKeys[i])
|
||||
}
|
||||
importedKM, ok := km.(*imported.Keymanager)
|
||||
if !ok {
|
||||
return errors.New("can only enable/disable accounts for imported wallets")
|
||||
}
|
||||
disabledPublicKeys := importedKM.DisabledPublicKeys()
|
||||
if len(disabledPublicKeys) == 0 {
|
||||
return errors.New("No accounts are disabled.")
|
||||
}
|
||||
disabledPublicKeys48 := make([][48]byte, len(disabledPublicKeys))
|
||||
for i := range disabledPublicKeys {
|
||||
disabledPublicKeys48[i] = bytesutil.ToBytes48(disabledPublicKeys[i])
|
||||
}
|
||||
|
||||
// Allow the user to interactively select the accounts to enable or optionally
|
||||
// provide them via cli flags as a string of comma-separated, hex strings.
|
||||
filteredPubKeys, err := filterPublicKeysFromUserInput(
|
||||
cliCtx,
|
||||
flags.EnablePublicKeysFlag,
|
||||
disabledPublicKeys48,
|
||||
prompt.SelectAccountsEnablePromptText,
|
||||
)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not filter public keys for activation")
|
||||
}
|
||||
rawPublicKeys := make([][]byte, len(filteredPubKeys))
|
||||
formattedPubKeys := make([]string, len(filteredPubKeys))
|
||||
for i, pk := range filteredPubKeys {
|
||||
pubKeyBytes := pk.Marshal()
|
||||
rawPublicKeys[i] = pubKeyBytes
|
||||
formattedPubKeys[i] = fmt.Sprintf("%#x", bytesutil.Trunc(pubKeyBytes))
|
||||
}
|
||||
allAccountStr := strings.Join(formattedPubKeys, ", ")
|
||||
if !cliCtx.IsSet(flags.EnablePublicKeysFlag.Name) {
|
||||
if len(filteredPubKeys) == 1 {
|
||||
promptText := "Are you sure you want to enable 1 account? (%s) Y/N"
|
||||
resp, err := promptutil.ValidatePrompt(
|
||||
os.Stdin, fmt.Sprintf(promptText, au.BrightGreen(formattedPubKeys[0])), promptutil.ValidateYesOrNo,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if strings.ToLower(resp) == "n" {
|
||||
return nil
|
||||
}
|
||||
// Allow the user to interactively select the accounts to enable or optionally
|
||||
// provide them via cli flags as a string of comma-separated, hex strings.
|
||||
filteredPubKeys, err := filterPublicKeysFromUserInput(
|
||||
cliCtx,
|
||||
flags.EnablePublicKeysFlag,
|
||||
disabledPublicKeys48,
|
||||
prompt.SelectAccountsEnablePromptText,
|
||||
)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not filter public keys for activation")
|
||||
}
|
||||
rawPublicKeys := make([][]byte, len(filteredPubKeys))
|
||||
formattedPubKeys := make([]string, len(filteredPubKeys))
|
||||
for i, pk := range filteredPubKeys {
|
||||
pubKeyBytes := pk.Marshal()
|
||||
rawPublicKeys[i] = pubKeyBytes
|
||||
formattedPubKeys[i] = fmt.Sprintf("%#x", bytesutil.Trunc(pubKeyBytes))
|
||||
}
|
||||
allAccountStr := strings.Join(formattedPubKeys, ", ")
|
||||
if !cliCtx.IsSet(flags.EnablePublicKeysFlag.Name) {
|
||||
if len(filteredPubKeys) == 1 {
|
||||
promptText := "Are you sure you want to enable 1 account? (%s) Y/N"
|
||||
resp, err := promptutil.ValidatePrompt(
|
||||
os.Stdin, fmt.Sprintf(promptText, au.BrightGreen(formattedPubKeys[0])), promptutil.ValidateYesOrNo,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if strings.ToLower(resp) == "n" {
|
||||
return nil
|
||||
}
|
||||
} else {
|
||||
promptText := "Are you sure you want to enable %d accounts? (%s) Y/N"
|
||||
if len(filteredPubKeys) == len(disabledPublicKeys48) {
|
||||
promptText = fmt.Sprintf("Are you sure you want to enable all accounts? Y/N (%s)", au.BrightGreen(allAccountStr))
|
||||
} else {
|
||||
promptText := "Are you sure you want to enable %d accounts? (%s) Y/N"
|
||||
if len(filteredPubKeys) == len(disabledPublicKeys48) {
|
||||
promptText = fmt.Sprintf("Are you sure you want to enable all accounts? Y/N (%s)", au.BrightGreen(allAccountStr))
|
||||
} else {
|
||||
promptText = fmt.Sprintf(promptText, len(filteredPubKeys), au.BrightGreen(allAccountStr))
|
||||
}
|
||||
resp, err := promptutil.ValidatePrompt(os.Stdin, promptText, promptutil.ValidateYesOrNo)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if strings.ToLower(resp) == "n" {
|
||||
return nil
|
||||
}
|
||||
promptText = fmt.Sprintf(promptText, len(filteredPubKeys), au.BrightGreen(allAccountStr))
|
||||
}
|
||||
resp, err := promptutil.ValidatePrompt(os.Stdin, promptText, promptutil.ValidateYesOrNo)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if strings.ToLower(resp) == "n" {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
if err := EnableAccounts(cliCtx.Context, &AccountsConfig{
|
||||
Wallet: w,
|
||||
Keymanager: ikeymanager,
|
||||
EnablePublicKeys: rawPublicKeys,
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
log.WithField("publicKeys", allAccountStr).Info("Accounts enabled")
|
||||
return nil
|
||||
case keymanager.Derived:
|
||||
return errors.New("cannot enable accounts for a derived keymanager")
|
||||
default:
|
||||
return fmt.Errorf("keymanager kind %s not supported", w.KeymanagerKind())
|
||||
}
|
||||
}
|
||||
|
||||
// DisableAccount disables the accounts that the user requests to be disabled from the wallet
|
||||
func DisableAccounts(ctx context.Context, cfg *AccountsConfig) error {
|
||||
switch cfg.Wallet.KeymanagerKind() {
|
||||
case keymanager.Remote:
|
||||
return errors.New("cannot disable accounts for a remote keymanager")
|
||||
case keymanager.Imported:
|
||||
km, ok := cfg.Keymanager.(*imported.Keymanager)
|
||||
if !ok {
|
||||
return errors.New("not a imported keymanager")
|
||||
}
|
||||
if len(cfg.DisablePublicKeys) == 1 {
|
||||
log.Info("Disabling account...")
|
||||
} else {
|
||||
log.Info("Disabling accounts...")
|
||||
}
|
||||
updatedOpts := km.KeymanagerOpts()
|
||||
// updatedDisabledPubKeys := make([][48]byte, 0)
|
||||
existingDisabledPubKeys := make(map[[48]byte]bool, len(updatedOpts.DisabledPublicKeys))
|
||||
for _, pk := range updatedOpts.DisabledPublicKeys {
|
||||
existingDisabledPubKeys[bytesutil.ToBytes48(pk)] = true
|
||||
}
|
||||
for _, pk := range cfg.DisablePublicKeys {
|
||||
if _, ok := existingDisabledPubKeys[bytesutil.ToBytes48(pk)]; !ok {
|
||||
updatedOpts.DisabledPublicKeys = append(updatedOpts.DisabledPublicKeys, pk)
|
||||
}
|
||||
}
|
||||
keymanagerConfig, err := imported.MarshalOptionsFile(ctx, updatedOpts)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not marshal keymanager config file")
|
||||
}
|
||||
if err := cfg.Wallet.WriteKeymanagerConfigToDisk(ctx, keymanagerConfig); err != nil {
|
||||
return errors.Wrap(err, "could not write keymanager config to disk")
|
||||
}
|
||||
case keymanager.Derived:
|
||||
return errors.New("cannot disable accounts for a derived keymanager")
|
||||
default:
|
||||
return fmt.Errorf("keymanager kind %s not supported", cfg.Wallet.KeymanagerKind())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// EnableAccounts enables the accounts that the user requests to be enabled from the wallet
|
||||
func EnableAccounts(ctx context.Context, cfg *AccountsConfig) error {
|
||||
switch cfg.Wallet.KeymanagerKind() {
|
||||
case keymanager.Remote:
|
||||
return errors.New("cannot enable accounts for a remote keymanager")
|
||||
case keymanager.Imported:
|
||||
km, ok := cfg.Keymanager.(*imported.Keymanager)
|
||||
if !ok {
|
||||
return errors.New("not a imported keymanager")
|
||||
}
|
||||
if len(cfg.EnablePublicKeys) == 1 {
|
||||
log.Info("Enabling account...")
|
||||
} else {
|
||||
log.Info("Enabling accounts...")
|
||||
}
|
||||
updatedOpts := km.KeymanagerOpts()
|
||||
updatedDisabledPubKeys := make([][]byte, 0)
|
||||
setEnablePubKeys := make(map[[48]byte]bool, len(cfg.EnablePublicKeys))
|
||||
for _, pk := range cfg.EnablePublicKeys {
|
||||
setEnablePubKeys[bytesutil.ToBytes48(pk)] = true
|
||||
}
|
||||
for _, pk := range updatedOpts.DisabledPublicKeys {
|
||||
if _, ok := setEnablePubKeys[bytesutil.ToBytes48(pk)]; !ok {
|
||||
updatedDisabledPubKeys = append(updatedDisabledPubKeys, pk)
|
||||
}
|
||||
}
|
||||
updatedOpts.DisabledPublicKeys = updatedDisabledPubKeys
|
||||
keymanagerConfig, err := imported.MarshalOptionsFile(ctx, updatedOpts)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not marshal keymanager config file")
|
||||
}
|
||||
if err := cfg.Wallet.WriteKeymanagerConfigToDisk(ctx, keymanagerConfig); err != nil {
|
||||
return errors.Wrap(err, "could not write keymanager config to disk")
|
||||
}
|
||||
case keymanager.Derived:
|
||||
return errors.New("cannot enable accounts for a derived keymanager")
|
||||
default:
|
||||
return fmt.Errorf("keymanager kind %s not supported", cfg.Wallet.KeymanagerKind())
|
||||
if err := importedKM.EnableAccounts(cliCtx.Context, rawPublicKeys); err != nil {
|
||||
return err
|
||||
}
|
||||
log.WithField("publicKeys", allAccountStr).Info("Accounts enabled")
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -51,7 +51,6 @@ func TestImport_Noninteractive(t *testing.T) {
|
||||
cliCtx.Context,
|
||||
&imported.SetupConfig{
|
||||
Wallet: w,
|
||||
Opts: imported.DefaultKeymanagerOpts(),
|
||||
},
|
||||
)
|
||||
require.NoError(t, err)
|
||||
@@ -107,7 +106,6 @@ func TestImport_Noninteractive_RandomName(t *testing.T) {
|
||||
cliCtx.Context,
|
||||
&imported.SetupConfig{
|
||||
Wallet: w,
|
||||
Opts: imported.DefaultKeymanagerOpts(),
|
||||
},
|
||||
)
|
||||
require.NoError(t, err)
|
||||
@@ -164,7 +162,6 @@ func TestImport_Noninteractive_Filepath(t *testing.T) {
|
||||
cliCtx.Context,
|
||||
&imported.SetupConfig{
|
||||
Wallet: w,
|
||||
Opts: imported.DefaultKeymanagerOpts(),
|
||||
},
|
||||
)
|
||||
require.NoError(t, err)
|
||||
@@ -286,7 +283,6 @@ func Test_importPrivateKeyAsAccount(t *testing.T) {
|
||||
cliCtx.Context,
|
||||
&imported.SetupConfig{
|
||||
Wallet: wallet,
|
||||
Opts: imported.DefaultKeymanagerOpts(),
|
||||
},
|
||||
)
|
||||
require.NoError(t, err)
|
||||
@@ -297,7 +293,6 @@ func Test_importPrivateKeyAsAccount(t *testing.T) {
|
||||
cliCtx.Context,
|
||||
&imported.SetupConfig{
|
||||
Wallet: wallet,
|
||||
Opts: imported.DefaultKeymanagerOpts(),
|
||||
},
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -49,7 +49,7 @@ func ListAccountsCli(cliCtx *cli.Context) error {
|
||||
if !ok {
|
||||
return errors.New("could not assert keymanager interface to concrete type")
|
||||
}
|
||||
if err := listDerivedKeymanagerAccounts(cliCtx.Context, showDepositData, showPrivateKeys, km); err != nil {
|
||||
if err := listDerivedKeymanagerAccounts(cliCtx.Context, showPrivateKeys, km); err != nil {
|
||||
return errors.Wrap(err, "could not list validator accounts with derived keymanager")
|
||||
}
|
||||
case keymanager.Remote:
|
||||
@@ -124,13 +124,12 @@ func listImportedKeymanagerAccounts(
|
||||
|
||||
func listDerivedKeymanagerAccounts(
|
||||
ctx context.Context,
|
||||
showDepositData,
|
||||
showPrivateKeys bool,
|
||||
keymanager *derived.Keymanager,
|
||||
) error {
|
||||
au := aurora.NewAurora(true)
|
||||
fmt.Printf("(keymanager kind) %s\n", au.BrightGreen("derived, (HD) hierarchical-deterministic").Bold())
|
||||
fmt.Printf("(derivation format) %s\n", au.BrightGreen(keymanager.KeymanagerOpts().DerivedPathStructure).Bold())
|
||||
fmt.Printf("(derivation format) %s\n", au.BrightGreen(derived.DerivationPathFormat).Bold())
|
||||
validatingPubKeys, err := keymanager.FetchAllValidatingPublicKeys(ctx)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not fetch validating public keys")
|
||||
|
||||
@@ -79,7 +79,6 @@ func TestListAccounts_ImportedKeymanager(t *testing.T) {
|
||||
cliCtx.Context,
|
||||
&imported.SetupConfig{
|
||||
Wallet: w,
|
||||
Opts: imported.DefaultKeymanagerOpts(),
|
||||
},
|
||||
)
|
||||
require.NoError(t, err)
|
||||
@@ -232,7 +231,6 @@ func TestListAccounts_DerivedKeymanager(t *testing.T) {
|
||||
keymanager, err := derived.NewKeymanager(
|
||||
cliCtx.Context,
|
||||
&derived.SetupConfig{
|
||||
Opts: derived.DefaultKeymanagerOpts(),
|
||||
Wallet: w,
|
||||
},
|
||||
)
|
||||
@@ -248,7 +246,7 @@ func TestListAccounts_DerivedKeymanager(t *testing.T) {
|
||||
os.Stdout = writer
|
||||
|
||||
// We call the list imported keymanager accounts function.
|
||||
require.NoError(t, listDerivedKeymanagerAccounts(cliCtx.Context, true /* show deposit data */, true /*show private keys */, keymanager))
|
||||
require.NoError(t, listDerivedKeymanagerAccounts(cliCtx.Context, true, keymanager))
|
||||
|
||||
require.NoError(t, writer.Close())
|
||||
out, err := ioutil.ReadAll(r)
|
||||
|
||||
@@ -42,58 +42,6 @@ var AccountCommands = &cli.Command{
|
||||
return nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "disable",
|
||||
Description: "Disable the selected accounts from a users wallet.",
|
||||
Flags: cmd.WrapFlags([]cli.Flag{
|
||||
flags.WalletDirFlag,
|
||||
flags.WalletPasswordFileFlag,
|
||||
flags.DisablePublicKeysFlag,
|
||||
featureconfig.Mainnet,
|
||||
featureconfig.PyrmontTestnet,
|
||||
featureconfig.ToledoTestnet,
|
||||
cmd.AcceptTosFlag,
|
||||
}),
|
||||
Before: func(cliCtx *cli.Context) error {
|
||||
if err := cmd.LoadFlagsFromConfig(cliCtx, cliCtx.Command.Flags); err != nil {
|
||||
return err
|
||||
}
|
||||
return tos.VerifyTosAcceptedOrPrompt(cliCtx)
|
||||
},
|
||||
Action: func(cliCtx *cli.Context) error {
|
||||
featureconfig.ConfigureValidator(cliCtx)
|
||||
if err := DisableAccountsCli(cliCtx); err != nil {
|
||||
log.Fatalf("Could not disable account: %v", err)
|
||||
}
|
||||
return nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "enable",
|
||||
Description: "Enable the selected accounts from a users wallet.",
|
||||
Flags: cmd.WrapFlags([]cli.Flag{
|
||||
flags.WalletDirFlag,
|
||||
flags.WalletPasswordFileFlag,
|
||||
flags.EnablePublicKeysFlag,
|
||||
featureconfig.Mainnet,
|
||||
featureconfig.PyrmontTestnet,
|
||||
featureconfig.ToledoTestnet,
|
||||
cmd.AcceptTosFlag,
|
||||
}),
|
||||
Before: func(cliCtx *cli.Context) error {
|
||||
if err := cmd.LoadFlagsFromConfig(cliCtx, cliCtx.Command.Flags); err != nil {
|
||||
return err
|
||||
}
|
||||
return tos.VerifyTosAcceptedOrPrompt(cliCtx)
|
||||
},
|
||||
Action: func(cliCtx *cli.Context) error {
|
||||
featureconfig.ConfigureValidator(cliCtx)
|
||||
if err := EnableAccountsCli(cliCtx); err != nil {
|
||||
log.Fatalf("Could not enable account: %v", err)
|
||||
}
|
||||
return nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "list",
|
||||
Description: "Lists all validator accounts in a user's wallet directory",
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package mock
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
@@ -73,21 +70,6 @@ func (m *Wallet) ReadFileAtPath(_ context.Context, pathName, fileName string) ([
|
||||
return nil, errors.New("no files found")
|
||||
}
|
||||
|
||||
// ReadEncryptedSeedFromDisk --
|
||||
func (m *Wallet) ReadEncryptedSeedFromDisk(_ context.Context) (io.ReadCloser, error) {
|
||||
m.lock.Lock()
|
||||
defer m.lock.Unlock()
|
||||
return ioutil.NopCloser(bytes.NewReader(m.EncryptedSeedFile)), nil
|
||||
}
|
||||
|
||||
// WriteEncryptedSeedToDisk --
|
||||
func (m *Wallet) WriteEncryptedSeedToDisk(_ context.Context, encoded []byte) error {
|
||||
m.lock.Lock()
|
||||
defer m.lock.Unlock()
|
||||
m.EncryptedSeedFile = encoded
|
||||
return nil
|
||||
}
|
||||
|
||||
// InitializeKeymanager --
|
||||
func (m *Wallet) InitializeKeymanager(_ context.Context) (keymanager.IKeymanager, error) {
|
||||
return nil, nil
|
||||
|
||||
@@ -15,7 +15,6 @@ go_library(
|
||||
"//validator/keymanager/derived:go_default_library",
|
||||
"//validator/keymanager/imported:go_default_library",
|
||||
"//validator/keymanager/remote:go_default_library",
|
||||
"@com_github_gofrs_flock//:go_default_library",
|
||||
"@com_github_pkg_errors//:go_default_library",
|
||||
"@com_github_sirupsen_logrus//:go_default_library",
|
||||
"@com_github_urfave_cli_v2//:go_default_library",
|
||||
@@ -29,9 +28,7 @@ go_test(
|
||||
":go_default_library",
|
||||
"//shared/params:go_default_library",
|
||||
"//shared/testutil/assert:go_default_library",
|
||||
"//shared/testutil/assertions:go_default_library",
|
||||
"//shared/testutil/require:go_default_library",
|
||||
"//validator/accounts:go_default_library",
|
||||
"//validator/flags:go_default_library",
|
||||
"//validator/keymanager:go_default_library",
|
||||
"@com_github_sirupsen_logrus//:go_default_library",
|
||||
|
||||
@@ -9,7 +9,6 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/gofrs/flock"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/prysmaticlabs/prysm/shared/fileutil"
|
||||
"github.com/prysmaticlabs/prysm/shared/promptutil"
|
||||
@@ -28,8 +27,6 @@ var log = logrus.WithField("prefix", "wallet")
|
||||
const (
|
||||
// KeymanagerConfigFileName for the keymanager used by the wallet: imported, derived, or remote.
|
||||
KeymanagerConfigFileName = "keymanageropts.json"
|
||||
// DirectoryPermissions for directories created under the wallet path.
|
||||
DirectoryPermissions = os.ModePerm
|
||||
// NewWalletPasswordPromptText for wallet creation.
|
||||
NewWalletPasswordPromptText = "New wallet password"
|
||||
// WalletPasswordPromptText for wallet unlocking.
|
||||
@@ -83,7 +80,6 @@ type Wallet struct {
|
||||
accountsPath string
|
||||
configFilePath string
|
||||
walletPassword string
|
||||
walletFileLock *flock.Flock
|
||||
keymanagerKind keymanager.Kind
|
||||
}
|
||||
|
||||
@@ -258,37 +254,28 @@ func (w *Wallet) Password() string {
|
||||
// InitializeKeymanager reads a keymanager config from disk at the wallet path,
|
||||
// unmarshals it based on the wallet's keymanager kind, and returns its value.
|
||||
func (w *Wallet) InitializeKeymanager(ctx context.Context) (keymanager.IKeymanager, error) {
|
||||
configFile, err := w.ReadKeymanagerConfigFromDisk(ctx)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not read keymanager config")
|
||||
}
|
||||
var km keymanager.IKeymanager
|
||||
var err error
|
||||
switch w.KeymanagerKind() {
|
||||
case keymanager.Imported:
|
||||
opts, err := imported.UnmarshalOptionsFile(configFile)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not unmarshal keymanageropts file")
|
||||
}
|
||||
km, err = imported.NewKeymanager(ctx, &imported.SetupConfig{
|
||||
Wallet: w,
|
||||
Opts: opts,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not initialize imported keymanager")
|
||||
}
|
||||
case keymanager.Derived:
|
||||
opts, err := derived.UnmarshalOptionsFile(configFile)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not unmarshal keymanager config file")
|
||||
}
|
||||
km, err = derived.NewKeymanager(ctx, &derived.SetupConfig{
|
||||
Opts: opts,
|
||||
Wallet: w,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not initialize derived keymanager")
|
||||
}
|
||||
case keymanager.Remote:
|
||||
configFile, err := w.ReadKeymanagerConfigFromDisk(ctx)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not read keymanager config")
|
||||
}
|
||||
opts, err := remote.UnmarshalOptionsFile(configFile)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not unmarshal keymanager config file")
|
||||
@@ -387,30 +374,6 @@ func (w *Wallet) ReadKeymanagerConfigFromDisk(_ context.Context) (io.ReadCloser,
|
||||
|
||||
}
|
||||
|
||||
// LockWalletConfigFile lock read and write to wallet file in order to prevent
|
||||
// two validators from using the same keys.
|
||||
func (w *Wallet) LockWalletConfigFile(_ context.Context) error {
|
||||
fileLock := flock.New(w.configFilePath)
|
||||
locked, err := fileLock.TryLock()
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "failed to lock wallet config file: %s", w.configFilePath)
|
||||
}
|
||||
if !locked {
|
||||
return fmt.Errorf("failed to lock wallet config file: %s", w.configFilePath)
|
||||
}
|
||||
w.walletFileLock = fileLock
|
||||
return nil
|
||||
}
|
||||
|
||||
// UnlockWalletConfigFile unlock wallet file.
|
||||
// should be called before client is closing in order to remove the file lock.
|
||||
func (w *Wallet) UnlockWalletConfigFile() error {
|
||||
if w.walletFileLock == nil {
|
||||
return errors.New("trying to unlock a nil lock")
|
||||
}
|
||||
return w.walletFileLock.Unlock()
|
||||
}
|
||||
|
||||
// WriteKeymanagerConfigToDisk takes an encoded keymanager config file
|
||||
// and writes it to the wallet path.
|
||||
func (w *Wallet) WriteKeymanagerConfigToDisk(_ context.Context, encoded []byte) error {
|
||||
|
||||
@@ -10,9 +10,7 @@ import (
|
||||
|
||||
"github.com/prysmaticlabs/prysm/shared/params"
|
||||
"github.com/prysmaticlabs/prysm/shared/testutil/assert"
|
||||
"github.com/prysmaticlabs/prysm/shared/testutil/assertions"
|
||||
"github.com/prysmaticlabs/prysm/shared/testutil/require"
|
||||
"github.com/prysmaticlabs/prysm/validator/accounts"
|
||||
"github.com/prysmaticlabs/prysm/validator/accounts/wallet"
|
||||
"github.com/prysmaticlabs/prysm/validator/flags"
|
||||
"github.com/prysmaticlabs/prysm/validator/keymanager"
|
||||
@@ -127,44 +125,3 @@ func Test_IsValid_RandomFiles(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, true, valid)
|
||||
}
|
||||
|
||||
func Test_LockUnlockFile(t *testing.T) {
|
||||
walletDir, passwordsDir, passwordFile := setupWalletAndPasswordsDir(t)
|
||||
numAccounts := int64(5)
|
||||
cliCtx := setupWalletCtx(t, &testWalletConfig{
|
||||
walletDir: walletDir,
|
||||
passwordsDir: passwordsDir,
|
||||
walletPasswordFile: passwordFile,
|
||||
accountPasswordFile: passwordFile,
|
||||
keymanagerKind: keymanager.Imported,
|
||||
numAccounts: numAccounts,
|
||||
})
|
||||
|
||||
// We attempt to create the wallet.
|
||||
_, err := accounts.CreateAndSaveWalletCli(cliCtx)
|
||||
require.NoError(t, err)
|
||||
|
||||
// We attempt to open the newly created wallet.
|
||||
w, err := wallet.OpenWallet(cliCtx.Context, &wallet.Config{
|
||||
WalletDir: walletDir,
|
||||
WalletPassword: password,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
defer unlock(t, w)
|
||||
_, err = w.InitializeKeymanager(cliCtx.Context)
|
||||
require.NoError(t, err)
|
||||
assert.NoError(t, err)
|
||||
err = w.LockWalletConfigFile(cliCtx.Context)
|
||||
assert.NoError(t, err)
|
||||
err = w.LockWalletConfigFile(cliCtx.Context)
|
||||
assert.ErrorContains(t, "failed to lock wallet config file", err)
|
||||
unlock(t, w)
|
||||
err = w.LockWalletConfigFile(cliCtx.Context)
|
||||
assert.NoError(t, err)
|
||||
|
||||
}
|
||||
|
||||
func unlock(tb assertions.AssertionTestingTB, wallet *wallet.Wallet) {
|
||||
err := wallet.UnlockWalletConfigFile()
|
||||
require.NoError(tb, err)
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ import (
|
||||
"github.com/prysmaticlabs/prysm/validator/flags"
|
||||
"github.com/prysmaticlabs/prysm/validator/keymanager"
|
||||
"github.com/prysmaticlabs/prysm/validator/keymanager/derived"
|
||||
"github.com/prysmaticlabs/prysm/validator/keymanager/imported"
|
||||
"github.com/prysmaticlabs/prysm/validator/keymanager/remote"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
@@ -181,14 +180,6 @@ func createImportedKeymanagerWallet(ctx context.Context, wallet *wallet.Wallet)
|
||||
if err := wallet.SaveWallet(); err != nil {
|
||||
return errors.Wrap(err, "could not save wallet to disk")
|
||||
}
|
||||
defaultOpts := imported.DefaultKeymanagerOpts()
|
||||
keymanagerConfig, err := imported.MarshalOptionsFile(ctx, defaultOpts)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not marshal keymanager config file")
|
||||
}
|
||||
if err := wallet.WriteKeymanagerConfigToDisk(ctx, keymanagerConfig); err != nil {
|
||||
return errors.Wrap(err, "could not write keymanager config to disk")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -205,16 +196,7 @@ func createDerivedKeymanagerWallet(
|
||||
if err := wallet.SaveWallet(); err != nil {
|
||||
return errors.Wrap(err, "could not save wallet to disk")
|
||||
}
|
||||
opts := derived.DefaultKeymanagerOpts()
|
||||
keymanagerConfig, err := derived.MarshalOptionsFile(ctx, opts)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not marshal keymanager config file")
|
||||
}
|
||||
if err := wallet.WriteKeymanagerConfigToDisk(ctx, keymanagerConfig); err != nil {
|
||||
return errors.Wrap(err, "could not write keymanager config to disk")
|
||||
}
|
||||
km, err := derived.NewKeymanager(ctx, &derived.SetupConfig{
|
||||
Opts: opts,
|
||||
Wallet: wallet,
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
@@ -16,8 +16,6 @@ import (
|
||||
"github.com/prysmaticlabs/prysm/validator/accounts/wallet"
|
||||
"github.com/prysmaticlabs/prysm/validator/flags"
|
||||
"github.com/prysmaticlabs/prysm/validator/keymanager"
|
||||
"github.com/prysmaticlabs/prysm/validator/keymanager/derived"
|
||||
"github.com/prysmaticlabs/prysm/validator/keymanager/imported"
|
||||
"github.com/prysmaticlabs/prysm/validator/keymanager/remote"
|
||||
"github.com/sirupsen/logrus"
|
||||
logTest "github.com/sirupsen/logrus/hooks/test"
|
||||
@@ -161,20 +159,10 @@ func TestCreateWallet_Imported(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
// We attempt to open the newly created wallet.
|
||||
w, err := wallet.OpenWallet(cliCtx.Context, &wallet.Config{
|
||||
_, err = wallet.OpenWallet(cliCtx.Context, &wallet.Config{
|
||||
WalletDir: walletDir,
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
|
||||
// We read the keymanager config for the newly created wallet.
|
||||
encoded, err := w.ReadKeymanagerConfigFromDisk(cliCtx.Context)
|
||||
assert.NoError(t, err)
|
||||
cfg, err := imported.UnmarshalOptionsFile(encoded)
|
||||
assert.NoError(t, err)
|
||||
|
||||
// We assert the created configuration was as desired.
|
||||
wantedCfg := imported.DefaultKeymanagerOpts()
|
||||
assert.DeepEqual(t, wantedCfg, cfg)
|
||||
}
|
||||
|
||||
func TestCreateWallet_Derived(t *testing.T) {
|
||||
@@ -192,20 +180,10 @@ func TestCreateWallet_Derived(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
// We attempt to open the newly created wallet.
|
||||
ctx := context.Background()
|
||||
w, err := wallet.OpenWallet(cliCtx.Context, &wallet.Config{
|
||||
_, err = wallet.OpenWallet(cliCtx.Context, &wallet.Config{
|
||||
WalletDir: walletDir,
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
|
||||
// We read the keymanager config for the newly created wallet.
|
||||
encoded, err := w.ReadKeymanagerConfigFromDisk(ctx)
|
||||
assert.NoError(t, err)
|
||||
cfg, err := derived.UnmarshalOptionsFile(encoded)
|
||||
assert.NoError(t, err)
|
||||
|
||||
// We assert the created configuration was as desired.
|
||||
assert.DeepEqual(t, derived.DefaultKeymanagerOpts(), cfg)
|
||||
}
|
||||
|
||||
// TestCreateWallet_WalletAlreadyExists checks for expected error if trying to create a wallet when there is one already.
|
||||
|
||||
@@ -125,18 +125,10 @@ func RecoverWallet(ctx context.Context, cfg *RecoverWalletConfig) (*wallet.Walle
|
||||
KeymanagerKind: keymanager.Derived,
|
||||
WalletPassword: cfg.WalletPassword,
|
||||
})
|
||||
keymanagerConfig, err := derived.MarshalOptionsFile(ctx, derived.DefaultKeymanagerOpts())
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not marshal keymanager config file")
|
||||
}
|
||||
if err := w.SaveWallet(); err != nil {
|
||||
return nil, errors.Wrap(err, "could not save wallet to disk")
|
||||
}
|
||||
if err := w.WriteKeymanagerConfigToDisk(ctx, keymanagerConfig); err != nil {
|
||||
return nil, errors.Wrap(err, "could not write keymanager config to disk")
|
||||
}
|
||||
km, err := derived.NewKeymanager(ctx, &derived.SetupConfig{
|
||||
Opts: derived.DefaultKeymanagerOpts(),
|
||||
Wallet: w,
|
||||
})
|
||||
if err != nil {
|
||||
@@ -212,7 +204,7 @@ func inputNumAccounts(cliCtx *cli.Context) (int64, error) {
|
||||
}
|
||||
return numAccounts, nil
|
||||
}
|
||||
numAccounts, err := promptutil.ValidatePrompt(os.Stdin, "Enter how many accounts you would like to recover", promptutil.ValidateNumber)
|
||||
numAccounts, err := promptutil.ValidatePrompt(os.Stdin, "Enter how many accounts you would like to generate from the mnemonic", promptutil.ValidateNumber)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
@@ -71,21 +71,13 @@ func TestRecoverDerivedWallet(t *testing.T) {
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
|
||||
encoded, err := w.ReadKeymanagerConfigFromDisk(ctx)
|
||||
assert.NoError(t, err)
|
||||
walletCfg, err := derived.UnmarshalOptionsFile(encoded)
|
||||
assert.NoError(t, err)
|
||||
// We assert the created configuration was as desired.
|
||||
wantCfg := derived.DefaultKeymanagerOpts()
|
||||
assert.DeepEqual(t, wantCfg, walletCfg)
|
||||
|
||||
keymanager, err := w.InitializeKeymanager(cliCtx.Context)
|
||||
km, err := w.InitializeKeymanager(cliCtx.Context)
|
||||
require.NoError(t, err)
|
||||
km, ok := keymanager.(*derived.Keymanager)
|
||||
derivedKM, ok := km.(*derived.Keymanager)
|
||||
if !ok {
|
||||
t.Fatal("not a derived keymanager")
|
||||
}
|
||||
names, err := km.ValidatingAccountNames(ctx)
|
||||
names, err := derivedKM.ValidatingAccountNames(ctx)
|
||||
assert.NoError(t, err)
|
||||
require.Equal(t, len(names), int(cfg.numAccounts))
|
||||
}
|
||||
|
||||
@@ -2,10 +2,7 @@ package derived
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
validatorpb "github.com/prysmaticlabs/prysm/proto/validator/accounts/v2"
|
||||
@@ -22,42 +19,23 @@ var (
|
||||
)
|
||||
|
||||
const (
|
||||
// EIPVersion used by this derived keymanager implementation.
|
||||
EIPVersion = "EIP-2334"
|
||||
// DerivationPathFormat describes the structure of how keys are derived from a master key.
|
||||
DerivationPathFormat = "m / purpose / coin_type / account_index / withdrawal_key / validating_key"
|
||||
// ValidatingKeyDerivationPathTemplate defining the hierarchical path for validating
|
||||
// keys for Prysm eth2 validators. According to EIP-2334, the format is as follows:
|
||||
// m / purpose / coin_type / account_index / withdrawal_key / validating_key
|
||||
ValidatingKeyDerivationPathTemplate = "m/12381/3600/%d/0/0"
|
||||
)
|
||||
|
||||
// KeymanagerOpts defines options for the keymanager that
|
||||
// are stored to disk in the wallet.
|
||||
type KeymanagerOpts struct {
|
||||
DerivedPathStructure string `json:"derived_path_structure"`
|
||||
DerivedEIPNumber string `json:"derived_eip_number"`
|
||||
DerivedVersion string `json:"derived_version"`
|
||||
}
|
||||
|
||||
// SetupConfig includes configuration values for initializing
|
||||
// a keymanager, such as passwords, the wallet, and more.
|
||||
type SetupConfig struct {
|
||||
Opts *KeymanagerOpts
|
||||
Wallet iface.Wallet
|
||||
}
|
||||
|
||||
// Keymanager implementation for derived, HD keymanager using EIP-2333 and EIP-2334.
|
||||
type Keymanager struct {
|
||||
importedKM *imported.Keymanager
|
||||
opts *KeymanagerOpts
|
||||
}
|
||||
|
||||
// DefaultKeymanagerOpts for a derived keymanager implementation.
|
||||
func DefaultKeymanagerOpts() *KeymanagerOpts {
|
||||
return &KeymanagerOpts{
|
||||
DerivedPathStructure: "m / purpose / coin_type / account_index / withdrawal_key / validating_key",
|
||||
DerivedEIPNumber: EIPVersion,
|
||||
DerivedVersion: "2",
|
||||
}
|
||||
}
|
||||
|
||||
// NewKeymanager instantiates a new derived keymanager from configuration options.
|
||||
@@ -67,46 +45,15 @@ func NewKeymanager(
|
||||
) (*Keymanager, error) {
|
||||
importedKM, err := imported.NewKeymanager(ctx, &imported.SetupConfig{
|
||||
Wallet: cfg.Wallet,
|
||||
Opts: imported.DefaultKeymanagerOpts(),
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &Keymanager{
|
||||
importedKM: importedKM,
|
||||
opts: cfg.Opts,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// UnmarshalOptionsFile attempts to JSON unmarshal a derived keymanager
|
||||
// options file into the *Config{} struct.
|
||||
func UnmarshalOptionsFile(r io.ReadCloser) (*KeymanagerOpts, error) {
|
||||
enc, err := ioutil.ReadAll(r)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
if err := r.Close(); err != nil {
|
||||
log.Errorf("Could not close keymanager config file: %v", err)
|
||||
}
|
||||
}()
|
||||
opts := &KeymanagerOpts{}
|
||||
if err := json.Unmarshal(enc, opts); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return opts, nil
|
||||
}
|
||||
|
||||
// MarshalOptionsFile returns a marshaled options file for a keymanager.
|
||||
func MarshalOptionsFile(_ context.Context, opts *KeymanagerOpts) ([]byte, error) {
|
||||
return json.MarshalIndent(opts, "", "\t")
|
||||
}
|
||||
|
||||
// KeymanagerOpts returns the derived keymanager options.
|
||||
func (dr *Keymanager) KeymanagerOpts() *KeymanagerOpts {
|
||||
return dr.opts
|
||||
}
|
||||
|
||||
// RecoverAccountsFromMnemonic given a mnemonic phrase, is able to regenerate N accounts
|
||||
// from a derived seed, encrypt them according to the EIP-2334 JSON standard, and write them
|
||||
// to disk. Then, the mnemonic is never stored nor used by the validator.
|
||||
|
||||
@@ -26,7 +26,6 @@ func TestDerivedKeymanager_MnemnonicPassphrase_DifferentResults(t *testing.T) {
|
||||
WalletPassword: "secretPassw0rd$1999",
|
||||
}
|
||||
km, err := NewKeymanager(ctx, &SetupConfig{
|
||||
Opts: DefaultKeymanagerOpts(),
|
||||
Wallet: wallet,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
@@ -41,7 +40,6 @@ func TestDerivedKeymanager_MnemnonicPassphrase_DifferentResults(t *testing.T) {
|
||||
WalletPassword: "secretPassw0rd$1999",
|
||||
}
|
||||
km, err = NewKeymanager(ctx, &SetupConfig{
|
||||
Opts: DefaultKeymanagerOpts(),
|
||||
Wallet: wallet,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
@@ -82,7 +80,6 @@ func TestDerivedKeymanager_FetchValidatingPublicKeys(t *testing.T) {
|
||||
}
|
||||
ctx := context.Background()
|
||||
dr, err := NewKeymanager(ctx, &SetupConfig{
|
||||
Opts: DefaultKeymanagerOpts(),
|
||||
Wallet: wallet,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
@@ -122,7 +119,6 @@ func TestDerivedKeymanager_FetchValidatingPrivateKeys(t *testing.T) {
|
||||
}
|
||||
ctx := context.Background()
|
||||
dr, err := NewKeymanager(ctx, &SetupConfig{
|
||||
Opts: DefaultKeymanagerOpts(),
|
||||
Wallet: wallet,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
@@ -160,7 +156,6 @@ func TestDerivedKeymanager_Sign(t *testing.T) {
|
||||
}
|
||||
ctx := context.Background()
|
||||
dr, err := NewKeymanager(ctx, &SetupConfig{
|
||||
Opts: DefaultKeymanagerOpts(),
|
||||
Wallet: wallet,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -6,6 +6,7 @@ go_library(
|
||||
srcs = [
|
||||
"backup.go",
|
||||
"doc.go",
|
||||
"enable_disable.go",
|
||||
"import.go",
|
||||
"keymanager.go",
|
||||
"refresh.go",
|
||||
@@ -30,7 +31,6 @@ go_library(
|
||||
"@com_github_fsnotify_fsnotify//:go_default_library",
|
||||
"@com_github_google_uuid//:go_default_library",
|
||||
"@com_github_k0kubun_go_ansi//:go_default_library",
|
||||
"@com_github_logrusorgru_aurora//:go_default_library",
|
||||
"@com_github_pkg_errors//:go_default_library",
|
||||
"@com_github_schollz_progressbar_v3//:go_default_library",
|
||||
"@com_github_sirupsen_logrus//:go_default_library",
|
||||
@@ -43,6 +43,7 @@ go_test(
|
||||
name = "go_default_test",
|
||||
srcs = [
|
||||
"backup_test.go",
|
||||
"enable_disable_test.go",
|
||||
"import_test.go",
|
||||
"keymanager_test.go",
|
||||
"refresh_test.go",
|
||||
|
||||
@@ -13,7 +13,6 @@ import (
|
||||
|
||||
func TestImportedKeymanager_ExtractKeystores(t *testing.T) {
|
||||
secretKeysCache = make(map[[48]byte]bls.SecretKey)
|
||||
lock.Lock()
|
||||
dr := &Keymanager{}
|
||||
validatingKeys := make([]bls.SecretKey, 10)
|
||||
for i := 0; i < len(validatingKeys); i++ {
|
||||
@@ -22,7 +21,6 @@ func TestImportedKeymanager_ExtractKeystores(t *testing.T) {
|
||||
validatingKeys[i] = secretKey
|
||||
secretKeysCache[bytesutil.ToBytes48(secretKey.PublicKey().Marshal())] = secretKey
|
||||
}
|
||||
lock.Unlock()
|
||||
ctx := context.Background()
|
||||
password := "password"
|
||||
|
||||
|
||||
62
validator/keymanager/imported/enable_disable.go
Normal file
62
validator/keymanager/imported/enable_disable.go
Normal file
@@ -0,0 +1,62 @@
|
||||
package imported
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/prysmaticlabs/prysm/shared/bytesutil"
|
||||
)
|
||||
|
||||
// DisableAccounts disables public keys from the user's wallet.
|
||||
func (dr *Keymanager) DisableAccounts(ctx context.Context, pubKeys [][]byte) error {
|
||||
if pubKeys == nil || len(pubKeys) < 1 {
|
||||
return errors.New("no public keys specified to disable")
|
||||
}
|
||||
lock.Lock()
|
||||
defer lock.Unlock()
|
||||
for _, pk := range pubKeys {
|
||||
if _, ok := dr.disabledPublicKeys[bytesutil.ToBytes48(pk)]; !ok {
|
||||
dr.disabledPublicKeys[bytesutil.ToBytes48(pk)] = true
|
||||
}
|
||||
}
|
||||
return dr.rewriteDisabledKeysToDisk(ctx)
|
||||
}
|
||||
|
||||
// EnableAccounts enables public keys from a user's wallet if they are disabled.
|
||||
func (dr *Keymanager) EnableAccounts(ctx context.Context, pubKeys [][]byte) error {
|
||||
if pubKeys == nil || len(pubKeys) < 1 {
|
||||
return errors.New("no public keys specified to enable")
|
||||
}
|
||||
lock.Lock()
|
||||
defer lock.Unlock()
|
||||
for _, pk := range pubKeys {
|
||||
delete(dr.disabledPublicKeys, bytesutil.ToBytes48(pk))
|
||||
}
|
||||
return dr.rewriteDisabledKeysToDisk(ctx)
|
||||
}
|
||||
|
||||
func (dr *Keymanager) rewriteDisabledKeysToDisk(ctx context.Context) error {
|
||||
encoded, err := dr.wallet.ReadFileAtPath(ctx, AccountsPath, accountsKeystoreFileName)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not read keystore file for accounts")
|
||||
}
|
||||
keystore := &accountsKeystoreRepresentation{}
|
||||
if err := json.Unmarshal(encoded, keystore); err != nil {
|
||||
return err
|
||||
}
|
||||
disabledKeysStrings := make([]string, 0)
|
||||
for pk := range dr.disabledPublicKeys {
|
||||
disabledKeysStrings = append(disabledKeysStrings, fmt.Sprintf("%x", pk))
|
||||
}
|
||||
keystore.DisabledPublicKeys = disabledKeysStrings
|
||||
encoded, err = json.MarshalIndent(keystore, "", "\t")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := dr.wallet.WriteFileAtPath(ctx, AccountsPath, accountsKeystoreFileName, encoded); err != nil {
|
||||
return errors.Wrap(err, "could not write keystore file for accounts")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
242
validator/keymanager/imported/enable_disable_test.go
Normal file
242
validator/keymanager/imported/enable_disable_test.go
Normal file
@@ -0,0 +1,242 @@
|
||||
package imported
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/prysmaticlabs/prysm/shared/bls"
|
||||
"github.com/prysmaticlabs/prysm/shared/bytesutil"
|
||||
"github.com/prysmaticlabs/prysm/shared/testutil/require"
|
||||
mock "github.com/prysmaticlabs/prysm/validator/accounts/testing"
|
||||
)
|
||||
|
||||
func TestKeymanager_DisableAccounts(t *testing.T) {
|
||||
numKeys := 5
|
||||
randomPrivateKeys := make([][]byte, numKeys)
|
||||
randomPublicKeys := make([][]byte, numKeys)
|
||||
for i := 0; i < numKeys; i++ {
|
||||
key, err := bls.RandKey()
|
||||
require.NoError(t, err)
|
||||
randomPrivateKeys[i] = key.Marshal()
|
||||
randomPublicKeys[i] = key.PublicKey().Marshal()
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
existingDisabledKeys [][]byte
|
||||
keysToDisable [][]byte
|
||||
expectedDisabledKeys [][]byte
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
name: "Trying to disable already disabled keys fails silently",
|
||||
existingDisabledKeys: randomPublicKeys,
|
||||
keysToDisable: randomPublicKeys,
|
||||
wantErr: false,
|
||||
expectedDisabledKeys: randomPublicKeys,
|
||||
},
|
||||
{
|
||||
name: "Trying to disable a subset of keys works",
|
||||
existingDisabledKeys: randomPublicKeys[0:2],
|
||||
keysToDisable: randomPublicKeys[2:],
|
||||
wantErr: false,
|
||||
expectedDisabledKeys: randomPublicKeys,
|
||||
},
|
||||
{
|
||||
name: "Nil input keys to disable returns error",
|
||||
existingDisabledKeys: randomPublicKeys,
|
||||
keysToDisable: nil,
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "No input keys to disable returns error",
|
||||
existingDisabledKeys: randomPublicKeys,
|
||||
keysToDisable: make([][]byte, 0),
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "No existing disabled keys updates after disabling",
|
||||
existingDisabledKeys: make([][]byte, 0),
|
||||
keysToDisable: randomPublicKeys,
|
||||
expectedDisabledKeys: randomPublicKeys,
|
||||
},
|
||||
{
|
||||
name: "Disjoint sets of already disabled + newly disabled leads to whole set",
|
||||
existingDisabledKeys: randomPublicKeys[0:2],
|
||||
keysToDisable: randomPublicKeys[2:],
|
||||
wantErr: false,
|
||||
expectedDisabledKeys: randomPublicKeys,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
wallet := &mock.Wallet{
|
||||
Files: make(map[string]map[string][]byte),
|
||||
}
|
||||
disabledPubKeys := make(map[[48]byte]bool)
|
||||
for _, pubKey := range tt.existingDisabledKeys {
|
||||
disabledPubKeys[bytesutil.ToBytes48(pubKey)] = true
|
||||
}
|
||||
dr := &Keymanager{
|
||||
disabledPublicKeys: disabledPubKeys,
|
||||
wallet: wallet,
|
||||
}
|
||||
// First we write the accounts store file.
|
||||
ctx := context.Background()
|
||||
store, err := dr.createAccountsKeystore(ctx, randomPrivateKeys, randomPublicKeys)
|
||||
require.NoError(t, err)
|
||||
existingDisabledKeysStr := make([]string, len(tt.existingDisabledKeys))
|
||||
for i := 0; i < len(tt.existingDisabledKeys); i++ {
|
||||
existingDisabledKeysStr[i] = fmt.Sprintf("%x", tt.existingDisabledKeys[i])
|
||||
}
|
||||
store.DisabledPublicKeys = existingDisabledKeysStr
|
||||
encoded, err := json.Marshal(store)
|
||||
require.NoError(t, err)
|
||||
err = dr.wallet.WriteFileAtPath(ctx, AccountsPath, accountsKeystoreFileName, encoded)
|
||||
require.NoError(t, err)
|
||||
|
||||
if err := dr.DisableAccounts(ctx, tt.keysToDisable); (err != nil) != tt.wantErr {
|
||||
t.Errorf("DisableAccounts() error = %v, wantErr %v", err, tt.wantErr)
|
||||
}
|
||||
if !tt.wantErr {
|
||||
wanted := make(map[[48]byte]bool)
|
||||
for _, pubKey := range tt.expectedDisabledKeys {
|
||||
wanted[bytesutil.ToBytes48(pubKey)] = true
|
||||
}
|
||||
// We verify that the updated disabled keys are reflected on disk as well.
|
||||
encoded, err := wallet.ReadFileAtPath(ctx, AccountsPath, accountsKeystoreFileName)
|
||||
require.NoError(t, err)
|
||||
keystore := &accountsKeystoreRepresentation{}
|
||||
require.NoError(t, json.Unmarshal(encoded, keystore))
|
||||
|
||||
require.Equal(t, len(wanted), len(keystore.DisabledPublicKeys))
|
||||
for _, pubKey := range keystore.DisabledPublicKeys {
|
||||
pubKeyBytes, err := hex.DecodeString(strings.TrimPrefix(pubKey, "0x"))
|
||||
require.NoError(t, err)
|
||||
if _, ok := wanted[bytesutil.ToBytes48(pubKeyBytes)]; !ok {
|
||||
t.Errorf("Expected %#x in disabled keys, but not found", pubKeyBytes)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestKeymanager_EnableAccounts(t *testing.T) {
|
||||
numKeys := 5
|
||||
randomPrivateKeys := make([][]byte, numKeys)
|
||||
randomPublicKeys := make([][]byte, numKeys)
|
||||
for i := 0; i < numKeys; i++ {
|
||||
key, err := bls.RandKey()
|
||||
require.NoError(t, err)
|
||||
randomPrivateKeys[i] = key.Marshal()
|
||||
randomPublicKeys[i] = key.PublicKey().Marshal()
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
existingDisabledKeys [][]byte
|
||||
keysToEnable [][]byte
|
||||
expectedDisabledKeys [][]byte
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
name: "Trying to enable already enabled keys fails silently",
|
||||
existingDisabledKeys: make([][]byte, 0),
|
||||
keysToEnable: randomPublicKeys,
|
||||
wantErr: false,
|
||||
expectedDisabledKeys: nil,
|
||||
},
|
||||
{
|
||||
name: "Trying to enable a subset of keys works",
|
||||
existingDisabledKeys: randomPublicKeys[0:2],
|
||||
keysToEnable: randomPublicKeys[0:1],
|
||||
wantErr: false,
|
||||
expectedDisabledKeys: randomPublicKeys[1:2],
|
||||
},
|
||||
{
|
||||
name: "Nil input keys to enable returns error",
|
||||
existingDisabledKeys: randomPublicKeys,
|
||||
keysToEnable: nil,
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "No input keys to enable returns error",
|
||||
existingDisabledKeys: randomPublicKeys,
|
||||
keysToEnable: make([][]byte, 0),
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "No existing enabled keys updates after enablng",
|
||||
existingDisabledKeys: randomPublicKeys,
|
||||
keysToEnable: randomPublicKeys,
|
||||
expectedDisabledKeys: make([][]byte, 0),
|
||||
},
|
||||
{
|
||||
name: "Disjoint sets of already enabled + newly enabled leads to whole set",
|
||||
existingDisabledKeys: randomPublicKeys[0:2],
|
||||
keysToEnable: randomPublicKeys[0:2],
|
||||
wantErr: false,
|
||||
expectedDisabledKeys: make([][]byte, 0),
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
wallet := &mock.Wallet{
|
||||
Files: make(map[string]map[string][]byte),
|
||||
}
|
||||
disabledPubKeys := make(map[[48]byte]bool)
|
||||
for _, pubKey := range tt.existingDisabledKeys {
|
||||
disabledPubKeys[bytesutil.ToBytes48(pubKey)] = true
|
||||
}
|
||||
dr := &Keymanager{
|
||||
disabledPublicKeys: disabledPubKeys,
|
||||
wallet: wallet,
|
||||
}
|
||||
// First we write the accounts store file.
|
||||
ctx := context.Background()
|
||||
store, err := dr.createAccountsKeystore(ctx, randomPrivateKeys, randomPublicKeys)
|
||||
require.NoError(t, err)
|
||||
existingDisabledKeysStr := make([]string, len(tt.existingDisabledKeys))
|
||||
for i := 0; i < len(tt.existingDisabledKeys); i++ {
|
||||
existingDisabledKeysStr[i] = fmt.Sprintf("%x", tt.existingDisabledKeys[i])
|
||||
}
|
||||
store.DisabledPublicKeys = existingDisabledKeysStr
|
||||
encoded, err := json.Marshal(store)
|
||||
require.NoError(t, err)
|
||||
err = dr.wallet.WriteFileAtPath(ctx, AccountsPath, accountsKeystoreFileName, encoded)
|
||||
require.NoError(t, err)
|
||||
|
||||
if err := dr.EnableAccounts(ctx, tt.keysToEnable); (err != nil) != tt.wantErr {
|
||||
t.Errorf("EnableAccounts() error = %v, wantErr %v", err, tt.wantErr)
|
||||
}
|
||||
if !tt.wantErr {
|
||||
wanted := make(map[[48]byte]bool)
|
||||
for _, pubKey := range tt.expectedDisabledKeys {
|
||||
wanted[bytesutil.ToBytes48(pubKey)] = true
|
||||
}
|
||||
for pubKey := range dr.disabledPublicKeys {
|
||||
if _, ok := wanted[pubKey]; !ok {
|
||||
t.Errorf("Expected %#x in disabled keys, but not found", pubKey)
|
||||
}
|
||||
}
|
||||
// We verify that the updated disabled keys are reflected on disk as well.
|
||||
encoded, err := wallet.ReadFileAtPath(ctx, AccountsPath, accountsKeystoreFileName)
|
||||
require.NoError(t, err)
|
||||
keystore := &accountsKeystoreRepresentation{}
|
||||
require.NoError(t, json.Unmarshal(encoded, keystore))
|
||||
|
||||
require.Equal(t, len(wanted), len(keystore.DisabledPublicKeys))
|
||||
for _, pubKey := range keystore.DisabledPublicKeys {
|
||||
pubKeyBytes, err := hex.DecodeString(strings.TrimPrefix(pubKey, "0x"))
|
||||
require.NoError(t, err)
|
||||
if _, ok := wanted[bytesutil.ToBytes48(pubKeyBytes)]; !ok {
|
||||
t.Errorf("Expected %#x in disabled keys, but not found", pubKeyBytes)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -100,7 +100,7 @@ func TestImportedKeymanager_ImportKeystores(t *testing.T) {
|
||||
}
|
||||
dr := &Keymanager{
|
||||
wallet: wallet,
|
||||
accountsStore: &AccountStore{},
|
||||
accountsStore: &accountStore{},
|
||||
}
|
||||
|
||||
// Create a duplicate keystore and attempt to import it.
|
||||
@@ -139,7 +139,7 @@ func TestImportedKeymanager_ImportKeystores(t *testing.T) {
|
||||
decryptor := keystorev4.New()
|
||||
encodedAccounts, err := decryptor.Decrypt(keystoreFile.Crypto, password)
|
||||
require.NoError(t, err, "Could not decrypt validator accounts")
|
||||
store := &AccountStore{}
|
||||
store := &accountStore{}
|
||||
require.NoError(t, json.Unmarshal(encodedAccounts, store))
|
||||
|
||||
// We should have successfully imported all accounts
|
||||
|
||||
@@ -3,15 +3,13 @@ package imported
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/logrusorgru/aurora"
|
||||
"github.com/pkg/errors"
|
||||
validatorpb "github.com/prysmaticlabs/prysm/proto/validator/accounts/v2"
|
||||
"github.com/prysmaticlabs/prysm/shared/bls"
|
||||
@@ -20,7 +18,6 @@ import (
|
||||
"github.com/prysmaticlabs/prysm/shared/interop"
|
||||
"github.com/prysmaticlabs/prysm/shared/petnames"
|
||||
"github.com/prysmaticlabs/prysm/validator/accounts/iface"
|
||||
"github.com/prysmaticlabs/prysm/validator/keymanager"
|
||||
"github.com/sirupsen/logrus"
|
||||
keystorev4 "github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4"
|
||||
"go.opencensus.io/trace"
|
||||
@@ -39,47 +36,38 @@ const (
|
||||
// AccountsPath where all imported keymanager keystores are kept.
|
||||
AccountsPath = "accounts"
|
||||
accountsKeystoreFileName = "all-accounts.keystore.json"
|
||||
eipVersion = "EIP-2335"
|
||||
)
|
||||
|
||||
// KeymanagerOpts for a imported keymanager.
|
||||
type KeymanagerOpts struct {
|
||||
EIPVersion string `json:"direct_eip_version"`
|
||||
Version string `json:"direct_version"`
|
||||
DisabledPublicKeys [][]byte `json:"disabled_public_keys"`
|
||||
}
|
||||
|
||||
// Keymanager implementation for imported keystores utilizing EIP-2335.
|
||||
type Keymanager struct {
|
||||
wallet iface.Wallet
|
||||
opts *KeymanagerOpts
|
||||
accountsStore *AccountStore
|
||||
accountsStore *accountStore
|
||||
disabledPublicKeys map[[48]byte]bool
|
||||
accountsChangedFeed *event.Feed
|
||||
}
|
||||
|
||||
// AccountStore defines a struct containing 1-to-1 corresponding
|
||||
// private keys and public keys for eth2 validators.
|
||||
type AccountStore struct {
|
||||
PrivateKeys [][]byte `json:"private_keys"`
|
||||
PublicKeys [][]byte `json:"public_keys"`
|
||||
}
|
||||
|
||||
// DefaultKeymanagerOpts for a imported keymanager implementation.
|
||||
func DefaultKeymanagerOpts() *KeymanagerOpts {
|
||||
return &KeymanagerOpts{
|
||||
EIPVersion: eipVersion,
|
||||
Version: "2",
|
||||
DisabledPublicKeys: [][]byte{},
|
||||
}
|
||||
}
|
||||
|
||||
// SetupConfig includes configuration values for initializing
|
||||
// a keymanager, such as passwords, the wallet, and more.
|
||||
type SetupConfig struct {
|
||||
Wallet iface.Wallet
|
||||
Opts *KeymanagerOpts
|
||||
SkipMnemonicConfirm bool
|
||||
Mnemonic string
|
||||
Wallet iface.Wallet
|
||||
}
|
||||
|
||||
// Defines a struct containing 1-to-1 corresponding
|
||||
// private keys and public keys for eth2 validators.
|
||||
type accountStore struct {
|
||||
PrivateKeys [][]byte `json:"private_keys"`
|
||||
PublicKeys [][]byte `json:"public_keys"`
|
||||
}
|
||||
|
||||
// Defines an internal Prysm representation
|
||||
// of validator accounts, encrypted according to the EIP-2334 standard
|
||||
// but containing extra fields such as markers for disabled public keys.
|
||||
type accountsKeystoreRepresentation struct {
|
||||
Crypto map[string]interface{} `json:"crypto"`
|
||||
ID string `json:"uuid"`
|
||||
Version uint `json:"version"`
|
||||
Name string `json:"name"`
|
||||
DisabledPublicKeys []string `json:"disabled_public_keys"`
|
||||
}
|
||||
|
||||
// ResetCaches for the keymanager.
|
||||
@@ -94,9 +82,9 @@ func ResetCaches() {
|
||||
func NewKeymanager(ctx context.Context, cfg *SetupConfig) (*Keymanager, error) {
|
||||
k := &Keymanager{
|
||||
wallet: cfg.Wallet,
|
||||
opts: cfg.Opts,
|
||||
accountsStore: &AccountStore{},
|
||||
accountsStore: &accountStore{},
|
||||
accountsChangedFeed: new(event.Feed),
|
||||
disabledPublicKeys: make(map[[48]byte]bool),
|
||||
}
|
||||
|
||||
if err := k.initializeAccountKeystore(ctx); err != nil {
|
||||
@@ -113,7 +101,6 @@ func NewKeymanager(ctx context.Context, cfg *SetupConfig) (*Keymanager, error) {
|
||||
func NewInteropKeymanager(_ context.Context, offset, numValidatorKeys uint64) (*Keymanager, error) {
|
||||
k := &Keymanager{
|
||||
accountsChangedFeed: new(event.Feed),
|
||||
opts: DefaultKeymanagerOpts(),
|
||||
}
|
||||
if numValidatorKeys == 0 {
|
||||
return k, nil
|
||||
@@ -134,47 +121,6 @@ func NewInteropKeymanager(_ context.Context, offset, numValidatorKeys uint64) (*
|
||||
return k, nil
|
||||
}
|
||||
|
||||
// UnmarshalOptionsFile attempts to JSON unmarshal a imported keymanager
|
||||
// options file into a struct.
|
||||
func UnmarshalOptionsFile(r io.ReadCloser) (*KeymanagerOpts, error) {
|
||||
enc, err := ioutil.ReadAll(r)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
if err := r.Close(); err != nil {
|
||||
log.Errorf("Could not close keymanager config file: %v", err)
|
||||
}
|
||||
}()
|
||||
opts := &KeymanagerOpts{}
|
||||
if err := json.Unmarshal(enc, opts); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return opts, nil
|
||||
}
|
||||
|
||||
// MarshalOptionsFile returns a marshaled options file for a keymanager.
|
||||
func MarshalOptionsFile(_ context.Context, opts *KeymanagerOpts) ([]byte, error) {
|
||||
return json.MarshalIndent(opts, "", "\t")
|
||||
}
|
||||
|
||||
// KeymanagerOpts for the imported keymanager.
|
||||
func (dr *Keymanager) KeymanagerOpts() *KeymanagerOpts {
|
||||
return dr.opts
|
||||
}
|
||||
|
||||
// String pretty-print of a imported keymanager options.
|
||||
func (opts *KeymanagerOpts) String() string {
|
||||
au := aurora.NewAurora(true)
|
||||
var b strings.Builder
|
||||
strAddr := fmt.Sprintf("%s: %s\n", au.BrightMagenta("EIP Version"), opts.EIPVersion)
|
||||
if _, err := b.WriteString(strAddr); err != nil {
|
||||
log.Error(err)
|
||||
return ""
|
||||
}
|
||||
return b.String()
|
||||
}
|
||||
|
||||
// SubscribeAccountChanges creates an event subscription for a channel
|
||||
// to listen for public key changes at runtime, such as when new validator accounts
|
||||
// are imported into the keymanager while the validator process is running.
|
||||
@@ -193,6 +139,17 @@ func (dr *Keymanager) ValidatingAccountNames() ([]string, error) {
|
||||
return names, nil
|
||||
}
|
||||
|
||||
// DisabledPublicKeys returns the currently disabled public keys in the keymanager.
|
||||
func (dr *Keymanager) DisabledPublicKeys() [][]byte {
|
||||
disabledPubKeys := make([][]byte, 0)
|
||||
for pubKey := range dr.disabledPublicKeys {
|
||||
pubKeyBytes := make([]byte, 48)
|
||||
copy(pubKeyBytes, pubKey[:])
|
||||
disabledPubKeys = append(disabledPubKeys, pubKeyBytes)
|
||||
}
|
||||
return disabledPubKeys
|
||||
}
|
||||
|
||||
// Initialize public and secret key caches that are used to speed up the functions
|
||||
// FetchValidatingPublicKeys and Sign
|
||||
func (dr *Keymanager) initializeKeysCachesFromKeystore() error {
|
||||
@@ -266,14 +223,9 @@ func (dr *Keymanager) FetchValidatingPublicKeys(ctx context.Context) ([][48]byte
|
||||
|
||||
lock.RLock()
|
||||
keys := orderedPublicKeys
|
||||
disabledPublicKeys := dr.KeymanagerOpts().DisabledPublicKeys
|
||||
result := make([][48]byte, 0)
|
||||
existingDisabledPubKeys := make(map[[48]byte]bool, len(disabledPublicKeys))
|
||||
for _, pk := range disabledPublicKeys {
|
||||
existingDisabledPubKeys[bytesutil.ToBytes48(pk)] = true
|
||||
}
|
||||
for _, pk := range keys {
|
||||
if _, ok := existingDisabledPubKeys[pk]; !ok {
|
||||
if _, ok := dr.disabledPublicKeys[pk]; !ok {
|
||||
result = append(result, pk)
|
||||
}
|
||||
}
|
||||
@@ -303,13 +255,8 @@ func (dr *Keymanager) FetchValidatingPrivateKeys(ctx context.Context) ([][32]byt
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not retrieve public keys")
|
||||
}
|
||||
disabledPublicKeys := dr.KeymanagerOpts().DisabledPublicKeys
|
||||
existingDisabledPubKeys := make(map[[48]byte]bool, len(disabledPublicKeys))
|
||||
for _, pk := range disabledPublicKeys {
|
||||
existingDisabledPubKeys[bytesutil.ToBytes48(pk)] = true
|
||||
}
|
||||
for i, pk := range pubKeys {
|
||||
if _, ok := existingDisabledPubKeys[pk]; !ok {
|
||||
if _, ok := dr.disabledPublicKeys[pk]; !ok {
|
||||
seckey, ok := secretKeysCache[pk]
|
||||
if !ok {
|
||||
return nil, errors.New("Could not fetch private key")
|
||||
@@ -346,7 +293,7 @@ func (dr *Keymanager) initializeAccountKeystore(ctx context.Context) error {
|
||||
} else if err != nil {
|
||||
return errors.Wrapf(err, "could not read keystore file for accounts %s", accountsKeystoreFileName)
|
||||
}
|
||||
keystoreFile := &keymanager.Keystore{}
|
||||
keystoreFile := &accountsKeystoreRepresentation{}
|
||||
if err := json.Unmarshal(encoded, keystoreFile); err != nil {
|
||||
return errors.Wrapf(err, "could not decode keystore file for accounts %s", accountsKeystoreFileName)
|
||||
}
|
||||
@@ -362,7 +309,7 @@ func (dr *Keymanager) initializeAccountKeystore(ctx context.Context) error {
|
||||
return errors.Wrap(err, "could not decrypt keystore")
|
||||
}
|
||||
|
||||
store := &AccountStore{}
|
||||
store := &accountStore{}
|
||||
if err := json.Unmarshal(enc, store); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -373,6 +320,17 @@ func (dr *Keymanager) initializeAccountKeystore(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
dr.accountsStore = store
|
||||
|
||||
lock.Lock()
|
||||
for _, pubKey := range keystoreFile.DisabledPublicKeys {
|
||||
pubKeyBytes, err := hex.DecodeString(pubKey)
|
||||
if err != nil {
|
||||
lock.Unlock()
|
||||
return err
|
||||
}
|
||||
dr.disabledPublicKeys[bytesutil.ToBytes48(pubKeyBytes)] = true
|
||||
}
|
||||
lock.Unlock()
|
||||
err = dr.initializeKeysCachesFromKeystore()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to initialize keys caches")
|
||||
@@ -383,7 +341,7 @@ func (dr *Keymanager) initializeAccountKeystore(ctx context.Context) error {
|
||||
func (dr *Keymanager) createAccountsKeystore(
|
||||
_ context.Context,
|
||||
privateKeys, publicKeys [][]byte,
|
||||
) (*keymanager.Keystore, error) {
|
||||
) (*accountsKeystoreRepresentation, error) {
|
||||
encryptor := keystorev4.New()
|
||||
id, err := uuid.NewRandom()
|
||||
if err != nil {
|
||||
@@ -395,7 +353,7 @@ func (dr *Keymanager) createAccountsKeystore(
|
||||
)
|
||||
}
|
||||
if dr.accountsStore == nil {
|
||||
dr.accountsStore = &AccountStore{
|
||||
dr.accountsStore = &accountStore{
|
||||
PrivateKeys: privateKeys,
|
||||
PublicKeys: publicKeys,
|
||||
}
|
||||
@@ -432,10 +390,17 @@ func (dr *Keymanager) createAccountsKeystore(
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not encrypt accounts")
|
||||
}
|
||||
return &keymanager.Keystore{
|
||||
Crypto: cryptoFields,
|
||||
ID: id.String(),
|
||||
Version: encryptor.Version(),
|
||||
Name: encryptor.Name(),
|
||||
disabledPubKeys := make([]string, 0)
|
||||
lock.Lock()
|
||||
defer lock.Unlock()
|
||||
for pubKey := range dr.disabledPublicKeys {
|
||||
disabledPubKeys = append(disabledPubKeys, fmt.Sprintf("%x", pubKey))
|
||||
}
|
||||
return &accountsKeystoreRepresentation{
|
||||
Crypto: cryptoFields,
|
||||
ID: id.String(),
|
||||
Version: encryptor.Version(),
|
||||
Name: encryptor.Name(),
|
||||
DisabledPublicKeys: disabledPubKeys,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -27,8 +27,7 @@ func TestImportedKeymanager_RemoveAccounts(t *testing.T) {
|
||||
}
|
||||
dr := &Keymanager{
|
||||
wallet: wallet,
|
||||
accountsStore: &AccountStore{},
|
||||
opts: DefaultKeymanagerOpts(),
|
||||
accountsStore: &accountStore{},
|
||||
}
|
||||
numAccounts := 5
|
||||
ctx := context.Background()
|
||||
@@ -61,7 +60,7 @@ func TestImportedKeymanager_RemoveAccounts(t *testing.T) {
|
||||
decryptor := keystorev4.New()
|
||||
encodedAccounts, err := decryptor.Decrypt(keystoreFile.Crypto, password)
|
||||
require.NoError(t, err, "Could not decrypt validator accounts")
|
||||
store := &AccountStore{}
|
||||
store := &accountStore{}
|
||||
require.NoError(t, json.Unmarshal(encodedAccounts, store))
|
||||
|
||||
require.Equal(t, numAccounts-1, len(store.PublicKeys))
|
||||
@@ -77,9 +76,9 @@ func TestImportedKeymanager_FetchValidatingPublicKeys(t *testing.T) {
|
||||
WalletPassword: password,
|
||||
}
|
||||
dr := &Keymanager{
|
||||
wallet: wallet,
|
||||
accountsStore: &AccountStore{},
|
||||
opts: DefaultKeymanagerOpts(),
|
||||
wallet: wallet,
|
||||
accountsStore: &accountStore{},
|
||||
disabledPublicKeys: make(map[[48]byte]bool),
|
||||
}
|
||||
// First, generate accounts and their keystore.json files.
|
||||
ctx := context.Background()
|
||||
@@ -91,7 +90,7 @@ func TestImportedKeymanager_FetchValidatingPublicKeys(t *testing.T) {
|
||||
pubKey := bytesutil.ToBytes48(privKey.PublicKey().Marshal())
|
||||
if i == 0 {
|
||||
// Manually disable the first public key by adding it to the keymanager options
|
||||
dr.opts.DisabledPublicKeys = append(dr.opts.DisabledPublicKeys, pubKey[:])
|
||||
dr.disabledPublicKeys[pubKey] = true
|
||||
} else {
|
||||
wantedPubKeys = append(wantedPubKeys, pubKey)
|
||||
}
|
||||
@@ -116,9 +115,9 @@ func TestImportedKeymanager_FetchAllValidatingPublicKeys(t *testing.T) {
|
||||
WalletPassword: password,
|
||||
}
|
||||
dr := &Keymanager{
|
||||
wallet: wallet,
|
||||
accountsStore: &AccountStore{},
|
||||
opts: DefaultKeymanagerOpts(),
|
||||
wallet: wallet,
|
||||
accountsStore: &accountStore{},
|
||||
disabledPublicKeys: make(map[[48]byte]bool),
|
||||
}
|
||||
// First, generate accounts and their keystore.json files.
|
||||
ctx := context.Background()
|
||||
@@ -150,9 +149,9 @@ func TestImportedKeymanager_FetchValidatingPrivateKeys(t *testing.T) {
|
||||
WalletPassword: password,
|
||||
}
|
||||
dr := &Keymanager{
|
||||
wallet: wallet,
|
||||
accountsStore: &AccountStore{},
|
||||
opts: DefaultKeymanagerOpts(),
|
||||
wallet: wallet,
|
||||
accountsStore: &accountStore{},
|
||||
disabledPublicKeys: make(map[[48]byte]bool),
|
||||
}
|
||||
// First, generate accounts and their keystore.json files.
|
||||
ctx := context.Background()
|
||||
@@ -186,9 +185,9 @@ func TestImportedKeymanager_Sign(t *testing.T) {
|
||||
WalletPassword: password,
|
||||
}
|
||||
dr := &Keymanager{
|
||||
wallet: wallet,
|
||||
accountsStore: &AccountStore{},
|
||||
opts: DefaultKeymanagerOpts(),
|
||||
wallet: wallet,
|
||||
accountsStore: &accountStore{},
|
||||
disabledPublicKeys: make(map[[48]byte]bool),
|
||||
}
|
||||
|
||||
// First, generate accounts and their keystore.json files.
|
||||
@@ -215,7 +214,7 @@ func TestImportedKeymanager_Sign(t *testing.T) {
|
||||
decryptor := keystorev4.New()
|
||||
enc, err := decryptor.Decrypt(keystoreFile.Crypto, dr.wallet.Password())
|
||||
require.NoError(t, err)
|
||||
store := &AccountStore{}
|
||||
store := &accountStore{}
|
||||
require.NoError(t, json.Unmarshal(enc, store))
|
||||
require.Equal(t, len(store.PublicKeys), len(store.PrivateKeys))
|
||||
require.NotEqual(t, 0, len(store.PublicKeys))
|
||||
|
||||
@@ -2,9 +2,12 @@ package imported
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/fsnotify/fsnotify"
|
||||
@@ -13,7 +16,6 @@ import (
|
||||
"github.com/prysmaticlabs/prysm/shared/bls"
|
||||
"github.com/prysmaticlabs/prysm/shared/bytesutil"
|
||||
"github.com/prysmaticlabs/prysm/shared/fileutil"
|
||||
"github.com/prysmaticlabs/prysm/validator/keymanager"
|
||||
keystorev4 "github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4"
|
||||
)
|
||||
|
||||
@@ -63,7 +65,7 @@ func (dr *Keymanager) listenForAccountChanges(ctx context.Context) {
|
||||
log.WithError(err).Errorf("Could not read file at path: %s", ev.Name)
|
||||
return
|
||||
}
|
||||
accountsKeystore := &keymanager.Keystore{}
|
||||
accountsKeystore := &accountsKeystoreRepresentation{}
|
||||
if err := json.Unmarshal(fileBytes, accountsKeystore); err != nil {
|
||||
log.WithError(
|
||||
err,
|
||||
@@ -94,17 +96,16 @@ func (dr *Keymanager) listenForAccountChanges(ctx context.Context) {
|
||||
|
||||
// Replaces the accounts store struct in the imported keymanager with
|
||||
// the contents of a keystore file by decrypting it with the accounts password.
|
||||
func (dr *Keymanager) reloadAccountsFromKeystore(keystore *keymanager.Keystore) error {
|
||||
func (dr *Keymanager) reloadAccountsFromKeystore(keystore *accountsKeystoreRepresentation) error {
|
||||
decryptor := keystorev4.New()
|
||||
encodedAccounts, err := decryptor.Decrypt(keystore.Crypto, dr.wallet.Password())
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "could not decrypt keystore file with public key %s", keystore.Pubkey)
|
||||
return errors.Wrap(err, "could not decrypt keystore file")
|
||||
}
|
||||
newAccountsStore := &AccountStore{}
|
||||
newAccountsStore := &accountStore{}
|
||||
if err := json.Unmarshal(encodedAccounts, newAccountsStore); err != nil {
|
||||
return err
|
||||
}
|
||||
dr.accountsStore = newAccountsStore
|
||||
pubKeys := make([][48]byte, len(dr.accountsStore.PublicKeys))
|
||||
for i := 0; i < len(dr.accountsStore.PrivateKeys); i++ {
|
||||
privKey, err := bls.SecretKeyFromBytes(dr.accountsStore.PrivateKeys[i])
|
||||
@@ -114,6 +115,21 @@ func (dr *Keymanager) reloadAccountsFromKeystore(keystore *keymanager.Keystore)
|
||||
pubKeyBytes := privKey.PublicKey().Marshal()
|
||||
pubKeys[i] = bytesutil.ToBytes48(pubKeyBytes)
|
||||
}
|
||||
lock.Lock()
|
||||
for _, pubKey := range keystore.DisabledPublicKeys {
|
||||
pubKeyBytes, err := hex.DecodeString(strings.TrimPrefix(pubKey, "0x"))
|
||||
if err != nil {
|
||||
lock.Unlock()
|
||||
return err
|
||||
}
|
||||
if len(pubKeyBytes) != 48 {
|
||||
lock.Unlock()
|
||||
return fmt.Errorf("public key %s has wrong length", pubKey)
|
||||
}
|
||||
dr.disabledPublicKeys[bytesutil.ToBytes48(pubKeyBytes)] = true
|
||||
}
|
||||
lock.Unlock()
|
||||
dr.accountsStore = newAccountsStore
|
||||
if err := dr.initializeKeysCachesFromKeystore(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -151,11 +151,6 @@ func (s *ValidatorClient) Close() {
|
||||
|
||||
s.services.StopAll()
|
||||
log.Info("Stopping Prysm validator")
|
||||
if !s.cliCtx.IsSet(flags.InteropNumValidators.Name) {
|
||||
if err := s.wallet.UnlockWalletConfigFile(); err != nil {
|
||||
log.WithError(err).Errorf("Failed to unlock wallet config file.")
|
||||
}
|
||||
}
|
||||
close(s.stop)
|
||||
}
|
||||
|
||||
@@ -186,9 +181,6 @@ func (s *ValidatorClient) initializeFromCLI(cliCtx *cli.Context) error {
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not read keymanager for wallet")
|
||||
}
|
||||
if err := w.LockWalletConfigFile(cliCtx.Context); err != nil {
|
||||
log.Fatalf("Could not get a lock on wallet file. Please check if you have another validator instance running and using the same wallet: %v", err)
|
||||
}
|
||||
}
|
||||
dataDir := cliCtx.String(flags.WalletDirFlag.Name)
|
||||
if s.wallet != nil {
|
||||
@@ -272,9 +264,6 @@ func (s *ValidatorClient) initializeForWeb(cliCtx *cli.Context) error {
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not read keymanager for wallet")
|
||||
}
|
||||
if err := w.LockWalletConfigFile(cliCtx.Context); err != nil {
|
||||
log.Fatalf("Could not get a lock on wallet file. Please check if you have another validator instance running and using the same wallet: %v", err)
|
||||
}
|
||||
}
|
||||
dataDir := cliCtx.String(flags.WalletDirFlag.Name)
|
||||
if s.wallet != nil {
|
||||
|
||||
@@ -4,9 +4,6 @@ import (
|
||||
"context"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
ptypes "github.com/gogo/protobuf/types"
|
||||
@@ -139,7 +136,7 @@ func (s *Server) CreateWallet(ctx context.Context, req *pb.CreateWalletRequest)
|
||||
}
|
||||
}
|
||||
|
||||
// EditConfig allows the user to edit their wallet's keymanageropts.
|
||||
// EditConfig allows the user to edit their wallet's configuration.
|
||||
func (s *Server) EditConfig(_ context.Context, _ *pb.EditWalletConfigRequest) (*pb.WalletResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "Unimplemented")
|
||||
}
|
||||
@@ -178,49 +175,12 @@ func (s *Server) WalletConfig(ctx context.Context, _ *ptypes.Empty) (*pb.WalletR
|
||||
case keymanager.Remote:
|
||||
keymanagerKind = pb.KeymanagerKind_REMOTE
|
||||
}
|
||||
f, err := s.wallet.ReadKeymanagerConfigFromDisk(ctx)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "Could not read keymanager config from disk: %v", err)
|
||||
}
|
||||
encoded, err := ioutil.ReadAll(f)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "Could not parse keymanager config: %v", err)
|
||||
}
|
||||
kmOpts := &imported.KeymanagerOpts{}
|
||||
if err := json.Unmarshal(encoded, kmOpts); err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "Could not JSON unmarshal keymanager config: %v", err)
|
||||
}
|
||||
config := KmOptsToConfig(kmOpts)
|
||||
|
||||
return &pb.WalletResponse{
|
||||
WalletPath: s.walletDir,
|
||||
KeymanagerKind: keymanagerKind,
|
||||
KeymanagerConfig: config,
|
||||
WalletPath: s.walletDir,
|
||||
KeymanagerKind: keymanagerKind,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// Convert KeymanagerOpts struct to a map[string]string
|
||||
func KmOptsToConfig(opts *imported.KeymanagerOpts) map[string]string {
|
||||
val := reflect.ValueOf(opts).Elem()
|
||||
var config = make(map[string]string, val.NumField())
|
||||
for i := 0; i < val.NumField(); i++ {
|
||||
f := val.Type().Field(i)
|
||||
v := val.Field(i)
|
||||
jsonName := strings.Split(f.Tag.Get("json"), ",")[0] // use split to ignore tag "options" like omitempty, etc.
|
||||
|
||||
if keys, ok := v.Interface().([][]byte); ok {
|
||||
str := make([]string, len(keys))
|
||||
for i, key := range keys {
|
||||
str[i] = fmt.Sprintf("%q", key)
|
||||
}
|
||||
config[jsonName] = strings.Join(str, ",")
|
||||
} else {
|
||||
config[jsonName] = fmt.Sprint(v)
|
||||
}
|
||||
}
|
||||
return config
|
||||
}
|
||||
|
||||
// GenerateMnemonic creates a new, random bip39 mnemonic phrase.
|
||||
func (s *Server) GenerateMnemonic(_ context.Context, _ *ptypes.Empty) (*pb.GenerateMnemonicResponse, error) {
|
||||
mnemonicRandomness := make([]byte, 32)
|
||||
|
||||
@@ -21,62 +21,6 @@ import (
|
||||
keystorev4 "github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4"
|
||||
)
|
||||
|
||||
func createImportedWalletWithAccounts(t testing.TB, numAccounts int) (*Server, [][]byte) {
|
||||
localWalletDir := setupWalletDir(t)
|
||||
defaultWalletPath = localWalletDir
|
||||
ctx := context.Background()
|
||||
strongPass := "29384283xasjasd32%%&*@*#*"
|
||||
w, err := accounts.CreateWalletWithKeymanager(ctx, &accounts.CreateWalletConfig{
|
||||
WalletCfg: &wallet.Config{
|
||||
WalletDir: defaultWalletPath,
|
||||
KeymanagerKind: keymanager.Imported,
|
||||
WalletPassword: strongPass,
|
||||
},
|
||||
SkipMnemonicConfirm: true,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
km, err := w.InitializeKeymanager(ctx)
|
||||
require.NoError(t, err)
|
||||
ss := &Server{
|
||||
keymanager: km,
|
||||
wallet: w,
|
||||
walletDir: defaultWalletPath,
|
||||
walletInitializedFeed: new(event.Feed),
|
||||
}
|
||||
// First we import accounts into the wallet.
|
||||
encryptor := keystorev4.New()
|
||||
keystores := make([]string, numAccounts)
|
||||
pubKeys := make([][]byte, len(keystores))
|
||||
for i := 0; i < len(keystores); i++ {
|
||||
privKey, err := bls.RandKey()
|
||||
require.NoError(t, err)
|
||||
pubKey := fmt.Sprintf("%x", privKey.PublicKey().Marshal())
|
||||
id, err := uuid.NewRandom()
|
||||
require.NoError(t, err)
|
||||
cryptoFields, err := encryptor.Encrypt(privKey.Marshal(), strongPass)
|
||||
require.NoError(t, err)
|
||||
item := &keymanager.Keystore{
|
||||
Crypto: cryptoFields,
|
||||
ID: id.String(),
|
||||
Version: encryptor.Version(),
|
||||
Pubkey: pubKey,
|
||||
Name: encryptor.Name(),
|
||||
}
|
||||
encodedFile, err := json.MarshalIndent(item, "", "\t")
|
||||
require.NoError(t, err)
|
||||
keystores[i] = string(encodedFile)
|
||||
pubKeys[i] = privKey.PublicKey().Marshal()
|
||||
}
|
||||
_, err = ss.ImportKeystores(ctx, &pb.ImportKeystoresRequest{
|
||||
KeystoresImported: keystores,
|
||||
KeystoresPassword: strongPass,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
ss.keymanager, err = ss.wallet.InitializeKeymanager(ctx)
|
||||
require.NoError(t, err)
|
||||
return ss, pubKeys
|
||||
}
|
||||
|
||||
func TestServer_CreateWallet_Imported(t *testing.T) {
|
||||
localWalletDir := setupWalletDir(t)
|
||||
defaultWalletPath = localWalletDir
|
||||
@@ -200,12 +144,9 @@ func TestServer_WalletConfig(t *testing.T) {
|
||||
resp, err := s.WalletConfig(ctx, &ptypes.Empty{})
|
||||
require.NoError(t, err)
|
||||
|
||||
expectedConfig := imported.DefaultKeymanagerOpts()
|
||||
jsonMap := KmOptsToConfig(expectedConfig)
|
||||
assert.DeepEqual(t, resp, &pb.WalletResponse{
|
||||
WalletPath: localWalletDir,
|
||||
KeymanagerKind: pb.KeymanagerKind_IMPORTED,
|
||||
KeymanagerConfig: jsonMap,
|
||||
WalletPath: localWalletDir,
|
||||
KeymanagerKind: pb.KeymanagerKind_IMPORTED,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user