From d4726f28663fb0475cd8e893bcd646660b274656 Mon Sep 17 00:00:00 2001 From: james-prysm <90280386+james-prysm@users.noreply.github.com> Date: Wed, 15 Nov 2023 11:35:22 -0600 Subject: [PATCH] HTTP Validator API: slashing protection import and export (#13165) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * adding migration for import and export slashing protection * Update validator/rpc/handle_slashing.go Co-authored-by: Radosław Kapka * Update validator/rpc/handle_slashing.go Co-authored-by: Radosław Kapka * Update validator/rpc/handle_slashing.go Co-authored-by: Radosław Kapka * Update validator/rpc/handle_slashing.go Co-authored-by: Radosław Kapka * addressing comments * fixing unit test errors after view comments --------- Co-authored-by: Radosław Kapka --- proto/eth/service/key_management.pb.go | 1054 +++++++++++++++++ proto/eth/service/key_management.pb.gw.go | 317 +++++ .../v1alpha1/validator-client/web_api.pb.go | 789 ++++-------- .../validator-client/web_api.pb.gw.go | 200 ---- .../v1alpha1/validator-client/web_api.proto | 35 +- validator/node/node.go | 1 - validator/rpc/BUILD.bazel | 4 +- validator/rpc/handlers_keymanager_test.go | 12 +- validator/rpc/handlers_slashing.go | 84 ++ ...hing_test.go => handlers_slashing_test.go} | 75 +- validator/rpc/server.go | 4 +- validator/rpc/server_test.go | 2 + validator/rpc/slashing.go | 69 -- validator/rpc/structs.go | 7 + 14 files changed, 1787 insertions(+), 866 deletions(-) create mode 100755 proto/eth/service/key_management.pb.go create mode 100755 proto/eth/service/key_management.pb.gw.go create mode 100644 validator/rpc/handlers_slashing.go rename validator/rpc/{slashing_test.go => handlers_slashing_test.go} (68%) delete mode 100644 validator/rpc/slashing.go diff --git a/proto/eth/service/key_management.pb.go b/proto/eth/service/key_management.pb.go new file mode 100755 index 000000000..d56f64fb6 --- /dev/null +++ b/proto/eth/service/key_management.pb.go @@ -0,0 +1,1054 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v4.23.3 +// source: proto/eth/service/key_management.proto + +package service + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/descriptorpb" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ImportedKeystoreStatus_Status int32 + +const ( + ImportedKeystoreStatus_IMPORTED ImportedKeystoreStatus_Status = 0 + ImportedKeystoreStatus_DUPLICATE ImportedKeystoreStatus_Status = 1 + ImportedKeystoreStatus_ERROR ImportedKeystoreStatus_Status = 2 +) + +// Enum value maps for ImportedKeystoreStatus_Status. +var ( + ImportedKeystoreStatus_Status_name = map[int32]string{ + 0: "IMPORTED", + 1: "DUPLICATE", + 2: "ERROR", + } + ImportedKeystoreStatus_Status_value = map[string]int32{ + "IMPORTED": 0, + "DUPLICATE": 1, + "ERROR": 2, + } +) + +func (x ImportedKeystoreStatus_Status) Enum() *ImportedKeystoreStatus_Status { + p := new(ImportedKeystoreStatus_Status) + *p = x + return p +} + +func (x ImportedKeystoreStatus_Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ImportedKeystoreStatus_Status) Descriptor() protoreflect.EnumDescriptor { + return file_proto_eth_service_key_management_proto_enumTypes[0].Descriptor() +} + +func (ImportedKeystoreStatus_Status) Type() protoreflect.EnumType { + return &file_proto_eth_service_key_management_proto_enumTypes[0] +} + +func (x ImportedKeystoreStatus_Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ImportedKeystoreStatus_Status.Descriptor instead. +func (ImportedKeystoreStatus_Status) EnumDescriptor() ([]byte, []int) { + return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{5, 0} +} + +type DeletedKeystoreStatus_Status int32 + +const ( + DeletedKeystoreStatus_DELETED DeletedKeystoreStatus_Status = 0 + DeletedKeystoreStatus_NOT_FOUND DeletedKeystoreStatus_Status = 1 + DeletedKeystoreStatus_NOT_ACTIVE DeletedKeystoreStatus_Status = 2 + DeletedKeystoreStatus_ERROR DeletedKeystoreStatus_Status = 3 +) + +// Enum value maps for DeletedKeystoreStatus_Status. +var ( + DeletedKeystoreStatus_Status_name = map[int32]string{ + 0: "DELETED", + 1: "NOT_FOUND", + 2: "NOT_ACTIVE", + 3: "ERROR", + } + DeletedKeystoreStatus_Status_value = map[string]int32{ + "DELETED": 0, + "NOT_FOUND": 1, + "NOT_ACTIVE": 2, + "ERROR": 3, + } +) + +func (x DeletedKeystoreStatus_Status) Enum() *DeletedKeystoreStatus_Status { + p := new(DeletedKeystoreStatus_Status) + *p = x + return p +} + +func (x DeletedKeystoreStatus_Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DeletedKeystoreStatus_Status) Descriptor() protoreflect.EnumDescriptor { + return file_proto_eth_service_key_management_proto_enumTypes[1].Descriptor() +} + +func (DeletedKeystoreStatus_Status) Type() protoreflect.EnumType { + return &file_proto_eth_service_key_management_proto_enumTypes[1] +} + +func (x DeletedKeystoreStatus_Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DeletedKeystoreStatus_Status.Descriptor instead. +func (DeletedKeystoreStatus_Status) EnumDescriptor() ([]byte, []int) { + return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{6, 0} +} + +type ListKeystoresResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []*ListKeystoresResponse_Keystore `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` +} + +func (x *ListKeystoresResponse) Reset() { + *x = ListKeystoresResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_eth_service_key_management_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListKeystoresResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListKeystoresResponse) ProtoMessage() {} + +func (x *ListKeystoresResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_eth_service_key_management_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListKeystoresResponse.ProtoReflect.Descriptor instead. +func (*ListKeystoresResponse) Descriptor() ([]byte, []int) { + return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{0} +} + +func (x *ListKeystoresResponse) GetData() []*ListKeystoresResponse_Keystore { + if x != nil { + return x.Data + } + return nil +} + +type ImportKeystoresRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Keystores []string `protobuf:"bytes,1,rep,name=keystores,proto3" json:"keystores,omitempty"` + Passwords []string `protobuf:"bytes,2,rep,name=passwords,proto3" json:"passwords,omitempty"` + SlashingProtection string `protobuf:"bytes,3,opt,name=slashing_protection,json=slashingProtection,proto3" json:"slashing_protection,omitempty"` +} + +func (x *ImportKeystoresRequest) Reset() { + *x = ImportKeystoresRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_eth_service_key_management_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportKeystoresRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportKeystoresRequest) ProtoMessage() {} + +func (x *ImportKeystoresRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_eth_service_key_management_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportKeystoresRequest.ProtoReflect.Descriptor instead. +func (*ImportKeystoresRequest) Descriptor() ([]byte, []int) { + return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{1} +} + +func (x *ImportKeystoresRequest) GetKeystores() []string { + if x != nil { + return x.Keystores + } + return nil +} + +func (x *ImportKeystoresRequest) GetPasswords() []string { + if x != nil { + return x.Passwords + } + return nil +} + +func (x *ImportKeystoresRequest) GetSlashingProtection() string { + if x != nil { + return x.SlashingProtection + } + return "" +} + +type ImportKeystoresResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []*ImportedKeystoreStatus `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` +} + +func (x *ImportKeystoresResponse) Reset() { + *x = ImportKeystoresResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_eth_service_key_management_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportKeystoresResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportKeystoresResponse) ProtoMessage() {} + +func (x *ImportKeystoresResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_eth_service_key_management_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportKeystoresResponse.ProtoReflect.Descriptor instead. +func (*ImportKeystoresResponse) Descriptor() ([]byte, []int) { + return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{2} +} + +func (x *ImportKeystoresResponse) GetData() []*ImportedKeystoreStatus { + if x != nil { + return x.Data + } + return nil +} + +type DeleteKeystoresRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pubkeys [][]byte `protobuf:"bytes,1,rep,name=pubkeys,proto3" json:"pubkeys,omitempty"` +} + +func (x *DeleteKeystoresRequest) Reset() { + *x = DeleteKeystoresRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_eth_service_key_management_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteKeystoresRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteKeystoresRequest) ProtoMessage() {} + +func (x *DeleteKeystoresRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_eth_service_key_management_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteKeystoresRequest.ProtoReflect.Descriptor instead. +func (*DeleteKeystoresRequest) Descriptor() ([]byte, []int) { + return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{3} +} + +func (x *DeleteKeystoresRequest) GetPubkeys() [][]byte { + if x != nil { + return x.Pubkeys + } + return nil +} + +type DeleteKeystoresResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []*DeletedKeystoreStatus `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` + SlashingProtection string `protobuf:"bytes,2,opt,name=slashing_protection,json=slashingProtection,proto3" json:"slashing_protection,omitempty"` +} + +func (x *DeleteKeystoresResponse) Reset() { + *x = DeleteKeystoresResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_eth_service_key_management_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteKeystoresResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteKeystoresResponse) ProtoMessage() {} + +func (x *DeleteKeystoresResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_eth_service_key_management_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteKeystoresResponse.ProtoReflect.Descriptor instead. +func (*DeleteKeystoresResponse) Descriptor() ([]byte, []int) { + return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteKeystoresResponse) GetData() []*DeletedKeystoreStatus { + if x != nil { + return x.Data + } + return nil +} + +func (x *DeleteKeystoresResponse) GetSlashingProtection() string { + if x != nil { + return x.SlashingProtection + } + return "" +} + +type ImportedKeystoreStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status ImportedKeystoreStatus_Status `protobuf:"varint,1,opt,name=status,proto3,enum=ethereum.eth.service.ImportedKeystoreStatus_Status" json:"status,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *ImportedKeystoreStatus) Reset() { + *x = ImportedKeystoreStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_eth_service_key_management_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportedKeystoreStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportedKeystoreStatus) ProtoMessage() {} + +func (x *ImportedKeystoreStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_eth_service_key_management_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportedKeystoreStatus.ProtoReflect.Descriptor instead. +func (*ImportedKeystoreStatus) Descriptor() ([]byte, []int) { + return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{5} +} + +func (x *ImportedKeystoreStatus) GetStatus() ImportedKeystoreStatus_Status { + if x != nil { + return x.Status + } + return ImportedKeystoreStatus_IMPORTED +} + +func (x *ImportedKeystoreStatus) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type DeletedKeystoreStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status DeletedKeystoreStatus_Status `protobuf:"varint,1,opt,name=status,proto3,enum=ethereum.eth.service.DeletedKeystoreStatus_Status" json:"status,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *DeletedKeystoreStatus) Reset() { + *x = DeletedKeystoreStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_eth_service_key_management_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeletedKeystoreStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletedKeystoreStatus) ProtoMessage() {} + +func (x *DeletedKeystoreStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_eth_service_key_management_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletedKeystoreStatus.ProtoReflect.Descriptor instead. +func (*DeletedKeystoreStatus) Descriptor() ([]byte, []int) { + return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{6} +} + +func (x *DeletedKeystoreStatus) GetStatus() DeletedKeystoreStatus_Status { + if x != nil { + return x.Status + } + return DeletedKeystoreStatus_DELETED +} + +func (x *DeletedKeystoreStatus) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type PubkeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` +} + +func (x *PubkeyRequest) Reset() { + *x = PubkeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_eth_service_key_management_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PubkeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PubkeyRequest) ProtoMessage() {} + +func (x *PubkeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_eth_service_key_management_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PubkeyRequest.ProtoReflect.Descriptor instead. +func (*PubkeyRequest) Descriptor() ([]byte, []int) { + return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{7} +} + +func (x *PubkeyRequest) GetPubkey() []byte { + if x != nil { + return x.Pubkey + } + return nil +} + +type ListKeystoresResponse_Keystore struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ValidatingPubkey []byte `protobuf:"bytes,1,opt,name=validating_pubkey,json=validatingPubkey,proto3" json:"validating_pubkey,omitempty"` + DerivationPath string `protobuf:"bytes,2,opt,name=derivation_path,json=derivationPath,proto3" json:"derivation_path,omitempty"` +} + +func (x *ListKeystoresResponse_Keystore) Reset() { + *x = ListKeystoresResponse_Keystore{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_eth_service_key_management_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListKeystoresResponse_Keystore) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListKeystoresResponse_Keystore) ProtoMessage() {} + +func (x *ListKeystoresResponse_Keystore) ProtoReflect() protoreflect.Message { + mi := &file_proto_eth_service_key_management_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListKeystoresResponse_Keystore.ProtoReflect.Descriptor instead. +func (*ListKeystoresResponse_Keystore) Descriptor() ([]byte, []int) { + return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *ListKeystoresResponse_Keystore) GetValidatingPubkey() []byte { + if x != nil { + return x.ValidatingPubkey + } + return nil +} + +func (x *ListKeystoresResponse_Keystore) GetDerivationPath() string { + if x != nil { + return x.DerivationPath + } + return "" +} + +var File_proto_eth_service_key_management_proto protoreflect.FileDescriptor + +var file_proto_eth_service_key_management_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc3, 0x01, 0x0a, 0x15, + 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, + 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, + 0x60, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6e, 0x67, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x74, + 0x68, 0x22, 0x85, 0x01, 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, 0x1c, 0x0a, 0x09, + 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x09, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x73, 0x6c, 0x61, 0x73, + 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x50, + 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5b, 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, 0x40, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x32, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0c, 0x52, 0x07, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x73, 0x22, 0x8b, 0x01, 0x0a, 0x17, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x13, 0x73, 0x6c, 0x61, 0x73, 0x68, + 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x50, 0x72, + 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb1, 0x01, 0x0a, 0x16, 0x49, 0x6d, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x4b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x30, 0x0a, 0x06, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x55, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, 0x10, + 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x22, 0xbe, 0x01, 0x0a, + 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3f, 0x0a, 0x06, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, + 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, + 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x22, 0x27, 0x0a, + 0x0d, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, + 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x32, 0xb9, 0x03, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x78, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, + 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 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, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x0f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x6d, + 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 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, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, + 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x0f, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x2c, + 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x2a, 0x1a, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x73, 0x42, 0x9a, 0x01, 0x0a, 0x18, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, + 0x19, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, + 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x34, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0xaa, 0x02, 0x14, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xca, 0x02, 0x14, 0x45, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_eth_service_key_management_proto_rawDescOnce sync.Once + file_proto_eth_service_key_management_proto_rawDescData = file_proto_eth_service_key_management_proto_rawDesc +) + +func file_proto_eth_service_key_management_proto_rawDescGZIP() []byte { + file_proto_eth_service_key_management_proto_rawDescOnce.Do(func() { + file_proto_eth_service_key_management_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_eth_service_key_management_proto_rawDescData) + }) + return file_proto_eth_service_key_management_proto_rawDescData +} + +var file_proto_eth_service_key_management_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_proto_eth_service_key_management_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_proto_eth_service_key_management_proto_goTypes = []interface{}{ + (ImportedKeystoreStatus_Status)(0), // 0: ethereum.eth.service.ImportedKeystoreStatus.Status + (DeletedKeystoreStatus_Status)(0), // 1: ethereum.eth.service.DeletedKeystoreStatus.Status + (*ListKeystoresResponse)(nil), // 2: ethereum.eth.service.ListKeystoresResponse + (*ImportKeystoresRequest)(nil), // 3: ethereum.eth.service.ImportKeystoresRequest + (*ImportKeystoresResponse)(nil), // 4: ethereum.eth.service.ImportKeystoresResponse + (*DeleteKeystoresRequest)(nil), // 5: ethereum.eth.service.DeleteKeystoresRequest + (*DeleteKeystoresResponse)(nil), // 6: ethereum.eth.service.DeleteKeystoresResponse + (*ImportedKeystoreStatus)(nil), // 7: ethereum.eth.service.ImportedKeystoreStatus + (*DeletedKeystoreStatus)(nil), // 8: ethereum.eth.service.DeletedKeystoreStatus + (*PubkeyRequest)(nil), // 9: ethereum.eth.service.PubkeyRequest + (*ListKeystoresResponse_Keystore)(nil), // 10: ethereum.eth.service.ListKeystoresResponse.Keystore + (*emptypb.Empty)(nil), // 11: google.protobuf.Empty +} +var file_proto_eth_service_key_management_proto_depIdxs = []int32{ + 10, // 0: ethereum.eth.service.ListKeystoresResponse.data:type_name -> ethereum.eth.service.ListKeystoresResponse.Keystore + 7, // 1: ethereum.eth.service.ImportKeystoresResponse.data:type_name -> ethereum.eth.service.ImportedKeystoreStatus + 8, // 2: ethereum.eth.service.DeleteKeystoresResponse.data:type_name -> ethereum.eth.service.DeletedKeystoreStatus + 0, // 3: ethereum.eth.service.ImportedKeystoreStatus.status:type_name -> ethereum.eth.service.ImportedKeystoreStatus.Status + 1, // 4: ethereum.eth.service.DeletedKeystoreStatus.status:type_name -> ethereum.eth.service.DeletedKeystoreStatus.Status + 11, // 5: ethereum.eth.service.KeyManagement.ListKeystores:input_type -> google.protobuf.Empty + 3, // 6: ethereum.eth.service.KeyManagement.ImportKeystores:input_type -> ethereum.eth.service.ImportKeystoresRequest + 5, // 7: ethereum.eth.service.KeyManagement.DeleteKeystores:input_type -> ethereum.eth.service.DeleteKeystoresRequest + 2, // 8: ethereum.eth.service.KeyManagement.ListKeystores:output_type -> ethereum.eth.service.ListKeystoresResponse + 4, // 9: ethereum.eth.service.KeyManagement.ImportKeystores:output_type -> ethereum.eth.service.ImportKeystoresResponse + 6, // 10: ethereum.eth.service.KeyManagement.DeleteKeystores:output_type -> ethereum.eth.service.DeleteKeystoresResponse + 8, // [8:11] is the sub-list for method output_type + 5, // [5:8] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_proto_eth_service_key_management_proto_init() } +func file_proto_eth_service_key_management_proto_init() { + if File_proto_eth_service_key_management_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_eth_service_key_management_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListKeystoresResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_eth_service_key_management_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportKeystoresRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_eth_service_key_management_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportKeystoresResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_eth_service_key_management_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteKeystoresRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_eth_service_key_management_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteKeystoresResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_eth_service_key_management_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportedKeystoreStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_eth_service_key_management_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeletedKeystoreStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_eth_service_key_management_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PubkeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_eth_service_key_management_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListKeystoresResponse_Keystore); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_eth_service_key_management_proto_rawDesc, + NumEnums: 2, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_eth_service_key_management_proto_goTypes, + DependencyIndexes: file_proto_eth_service_key_management_proto_depIdxs, + EnumInfos: file_proto_eth_service_key_management_proto_enumTypes, + MessageInfos: file_proto_eth_service_key_management_proto_msgTypes, + }.Build() + File_proto_eth_service_key_management_proto = out.File + file_proto_eth_service_key_management_proto_rawDesc = nil + file_proto_eth_service_key_management_proto_goTypes = nil + file_proto_eth_service_key_management_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// KeyManagementClient is the client API for KeyManagement service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type KeyManagementClient interface { + ListKeystores(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListKeystoresResponse, error) + ImportKeystores(ctx context.Context, in *ImportKeystoresRequest, opts ...grpc.CallOption) (*ImportKeystoresResponse, error) + DeleteKeystores(ctx context.Context, in *DeleteKeystoresRequest, opts ...grpc.CallOption) (*DeleteKeystoresResponse, error) +} + +type keyManagementClient struct { + cc grpc.ClientConnInterface +} + +func NewKeyManagementClient(cc grpc.ClientConnInterface) KeyManagementClient { + return &keyManagementClient{cc} +} + +func (c *keyManagementClient) ListKeystores(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListKeystoresResponse, error) { + out := new(ListKeystoresResponse) + err := c.cc.Invoke(ctx, "/ethereum.eth.service.KeyManagement/ListKeystores", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementClient) ImportKeystores(ctx context.Context, in *ImportKeystoresRequest, opts ...grpc.CallOption) (*ImportKeystoresResponse, error) { + out := new(ImportKeystoresResponse) + err := c.cc.Invoke(ctx, "/ethereum.eth.service.KeyManagement/ImportKeystores", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementClient) DeleteKeystores(ctx context.Context, in *DeleteKeystoresRequest, opts ...grpc.CallOption) (*DeleteKeystoresResponse, error) { + out := new(DeleteKeystoresResponse) + err := c.cc.Invoke(ctx, "/ethereum.eth.service.KeyManagement/DeleteKeystores", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// KeyManagementServer is the server API for KeyManagement service. +type KeyManagementServer interface { + ListKeystores(context.Context, *emptypb.Empty) (*ListKeystoresResponse, error) + ImportKeystores(context.Context, *ImportKeystoresRequest) (*ImportKeystoresResponse, error) + DeleteKeystores(context.Context, *DeleteKeystoresRequest) (*DeleteKeystoresResponse, error) +} + +// UnimplementedKeyManagementServer can be embedded to have forward compatible implementations. +type UnimplementedKeyManagementServer struct { +} + +func (*UnimplementedKeyManagementServer) ListKeystores(context.Context, *emptypb.Empty) (*ListKeystoresResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListKeystores not implemented") +} +func (*UnimplementedKeyManagementServer) ImportKeystores(context.Context, *ImportKeystoresRequest) (*ImportKeystoresResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ImportKeystores not implemented") +} +func (*UnimplementedKeyManagementServer) DeleteKeystores(context.Context, *DeleteKeystoresRequest) (*DeleteKeystoresResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteKeystores not implemented") +} + +func RegisterKeyManagementServer(s *grpc.Server, srv KeyManagementServer) { + s.RegisterService(&_KeyManagement_serviceDesc, srv) +} + +func _KeyManagement_ListKeystores_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServer).ListKeystores(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethereum.eth.service.KeyManagement/ListKeystores", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServer).ListKeystores(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagement_ImportKeystores_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ImportKeystoresRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServer).ImportKeystores(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethereum.eth.service.KeyManagement/ImportKeystores", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServer).ImportKeystores(ctx, req.(*ImportKeystoresRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagement_DeleteKeystores_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteKeystoresRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServer).DeleteKeystores(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethereum.eth.service.KeyManagement/DeleteKeystores", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServer).DeleteKeystores(ctx, req.(*DeleteKeystoresRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _KeyManagement_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ethereum.eth.service.KeyManagement", + HandlerType: (*KeyManagementServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListKeystores", + Handler: _KeyManagement_ListKeystores_Handler, + }, + { + MethodName: "ImportKeystores", + Handler: _KeyManagement_ImportKeystores_Handler, + }, + { + MethodName: "DeleteKeystores", + Handler: _KeyManagement_DeleteKeystores_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/eth/service/key_management.proto", +} diff --git a/proto/eth/service/key_management.pb.gw.go b/proto/eth/service/key_management.pb.gw.go new file mode 100755 index 000000000..54a76e36e --- /dev/null +++ b/proto/eth/service/key_management.pb.gw.go @@ -0,0 +1,317 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: proto/eth/service/key_management.proto + +/* +Package service is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package service + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + github_com_prysmaticlabs_prysm_v4_consensus_types_primitives "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/emptypb" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join +var _ = github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch(0) +var _ = emptypb.Empty{} + +func request_KeyManagement_ListKeystores_0(ctx context.Context, marshaler runtime.Marshaler, client KeyManagementClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq emptypb.Empty + var metadata runtime.ServerMetadata + + msg, err := client.ListKeystores(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KeyManagement_ListKeystores_0(ctx context.Context, marshaler runtime.Marshaler, server KeyManagementServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq emptypb.Empty + var metadata runtime.ServerMetadata + + msg, err := server.ListKeystores(ctx, &protoReq) + return msg, metadata, err + +} + +func request_KeyManagement_ImportKeystores_0(ctx context.Context, marshaler runtime.Marshaler, client KeyManagementClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ImportKeystoresRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ImportKeystores(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KeyManagement_ImportKeystores_0(ctx context.Context, marshaler runtime.Marshaler, server KeyManagementServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ImportKeystoresRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ImportKeystores(ctx, &protoReq) + return msg, metadata, err + +} + +func request_KeyManagement_DeleteKeystores_0(ctx context.Context, marshaler runtime.Marshaler, client KeyManagementClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteKeystoresRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DeleteKeystores(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KeyManagement_DeleteKeystores_0(ctx context.Context, marshaler runtime.Marshaler, server KeyManagementServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteKeystoresRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DeleteKeystores(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterKeyManagementHandlerServer registers the http handlers for service KeyManagement to "mux". +// UnaryRPC :call KeyManagementServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterKeyManagementHandlerFromEndpoint instead. +func RegisterKeyManagementHandlerServer(ctx context.Context, mux *runtime.ServeMux, server KeyManagementServer) error { + + mux.Handle("GET", pattern_KeyManagement_ListKeystores_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.service.KeyManagement/ListKeystores") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KeyManagement_ListKeystores_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KeyManagement_ListKeystores_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_KeyManagement_ImportKeystores_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.service.KeyManagement/ImportKeystores") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KeyManagement_ImportKeystores_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KeyManagement_ImportKeystores_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_KeyManagement_DeleteKeystores_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.service.KeyManagement/DeleteKeystores") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KeyManagement_DeleteKeystores_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KeyManagement_DeleteKeystores_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterKeyManagementHandlerFromEndpoint is same as RegisterKeyManagementHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterKeyManagementHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterKeyManagementHandler(ctx, mux, conn) +} + +// RegisterKeyManagementHandler registers the http handlers for service KeyManagement to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterKeyManagementHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterKeyManagementHandlerClient(ctx, mux, NewKeyManagementClient(conn)) +} + +// RegisterKeyManagementHandlerClient registers the http handlers for service KeyManagement +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "KeyManagementClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "KeyManagementClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "KeyManagementClient" to call the correct interceptors. +func RegisterKeyManagementHandlerClient(ctx context.Context, mux *runtime.ServeMux, client KeyManagementClient) error { + + mux.Handle("GET", pattern_KeyManagement_ListKeystores_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.service.KeyManagement/ListKeystores") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KeyManagement_ListKeystores_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KeyManagement_ListKeystores_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_KeyManagement_ImportKeystores_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.service.KeyManagement/ImportKeystores") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KeyManagement_ImportKeystores_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KeyManagement_ImportKeystores_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_KeyManagement_DeleteKeystores_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.service.KeyManagement/DeleteKeystores") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KeyManagement_DeleteKeystores_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KeyManagement_DeleteKeystores_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_KeyManagement_ListKeystores_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"internal", "eth", "v1", "keystores"}, "")) + + pattern_KeyManagement_ImportKeystores_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"internal", "eth", "v1", "keystores"}, "")) + + pattern_KeyManagement_DeleteKeystores_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"internal", "eth", "v1", "keystores"}, "")) +) + +var ( + forward_KeyManagement_ListKeystores_0 = runtime.ForwardResponseMessage + + forward_KeyManagement_ImportKeystores_0 = runtime.ForwardResponseMessage + + forward_KeyManagement_DeleteKeystores_0 = runtime.ForwardResponseMessage +) diff --git a/proto/prysm/v1alpha1/validator-client/web_api.pb.go b/proto/prysm/v1alpha1/validator-client/web_api.pb.go index 69b8fa425..d7a3b6bdf 100755 --- a/proto/prysm/v1alpha1/validator-client/web_api.pb.go +++ b/proto/prysm/v1alpha1/validator-client/web_api.pb.go @@ -1456,102 +1456,6 @@ func (x *DeleteAccountsResponse) GetDeletedKeys() [][]byte { return nil } -// Deprecated: Marked as deprecated in proto/prysm/v1alpha1/validator-client/web_api.proto. -type ExportSlashingProtectionResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"` -} - -func (x *ExportSlashingProtectionResponse) Reset() { - *x = ExportSlashingProtectionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_client_web_api_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExportSlashingProtectionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExportSlashingProtectionResponse) ProtoMessage() {} - -func (x *ExportSlashingProtectionResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_client_web_api_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExportSlashingProtectionResponse.ProtoReflect.Descriptor instead. -func (*ExportSlashingProtectionResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_client_web_api_proto_rawDescGZIP(), []int{23} -} - -func (x *ExportSlashingProtectionResponse) GetFile() string { - if x != nil { - return x.File - } - return "" -} - -// Deprecated: Marked as deprecated in proto/prysm/v1alpha1/validator-client/web_api.proto. -type ImportSlashingProtectionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SlashingProtectionJson string `protobuf:"bytes,1,opt,name=slashing_protection_json,json=slashingProtectionJson,proto3" json:"slashing_protection_json,omitempty"` -} - -func (x *ImportSlashingProtectionRequest) Reset() { - *x = ImportSlashingProtectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_client_web_api_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ImportSlashingProtectionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ImportSlashingProtectionRequest) ProtoMessage() {} - -func (x *ImportSlashingProtectionRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_client_web_api_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ImportSlashingProtectionRequest.ProtoReflect.Descriptor instead. -func (*ImportSlashingProtectionRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_client_web_api_proto_rawDescGZIP(), []int{24} -} - -func (x *ImportSlashingProtectionRequest) GetSlashingProtectionJson() string { - if x != nil { - return x.SlashingProtectionJson - } - return "" -} - var File_proto_prysm_v1alpha1_validator_client_web_api_proto protoreflect.FileDescriptor var file_proto_prysm_v1alpha1_validator_client_web_api_proto_rawDesc = []byte{ @@ -1560,211 +1464,199 @@ var file_proto_prysm_v1alpha1_validator_client_web_api_proto_rawDesc = []byte{ 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x77, 0x65, 0x62, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 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, 0x1a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, - 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x62, - 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x03, - 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x0a, 0x6b, 0x65, 0x79, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 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, 0x4b, 0x65, 0x79, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x0a, 0x6b, 0x65, 0x79, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, - 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1a, - 0x0a, 0x08, 0x6d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, - 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x1f, 0x0a, - 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x12, 0x26, - 0x0a, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x63, 0x72, 0x74, 0x5f, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, - 0x72, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, - 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2b, - 0x0a, 0x12, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x5f, 0x63, 0x72, 0x74, 0x5f, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x6d, 0x6f, - 0x74, 0x65, 0x43, 0x61, 0x43, 0x72, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2b, 0x0a, 0x11, 0x6d, - 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, - 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x62, 0x0a, 0x14, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x06, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 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, 0x52, 0x06, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x3a, 0x02, 0x18, 0x01, - 0x22, 0xbb, 0x01, 0x0a, 0x17, 0x45, 0x64, 0x69, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, - 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x12, 0x26, 0x0a, - 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x63, 0x72, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x72, - 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, - 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2b, 0x0a, - 0x12, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x5f, 0x63, 0x72, 0x74, 0x5f, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x74, - 0x65, 0x43, 0x61, 0x43, 0x72, 0x74, 0x50, 0x61, 0x74, 0x68, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x3a, - 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, 0x3a, 0x02, 0x18, 0x01, 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, 0x65, 0x79, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x6b, 0x69, 0x6e, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 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, 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, 0x22, 0xcb, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 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, 0x12, 0x21, 0x0a, 0x0c, - 0x6e, 0x75, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, - 0x27, 0x0a, 0x0f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, - 0x75, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, - 0x75, 0x61, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x6d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, - 0x32, 0x35, 0x74, 0x68, 0x5f, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x6d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x32, 0x35, 0x74, 0x68, 0x57, 0x6f, 0x72, - 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x6b, 0x0a, 0x18, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 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, 0x3a, 0x02, - 0x18, 0x01, 0x22, 0x96, 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, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xa6, 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, + 0x74, 0x73, 0x2e, 0x76, 0x32, 0x1a, 0x27, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, + 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, + 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, + 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x03, 0x0a, 0x13, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x0a, 0x6b, 0x65, 0x79, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 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, 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, - 0x3a, 0x02, 0x18, 0x01, 0x22, 0xb5, 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, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x4f, 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, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x3c, 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, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x79, 0x0a, 0x15, 0x49, - 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x4e, 0x0a, 0x16, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x31, 0x0a, 0x15, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x5f, 0x0a, 0x16, 0x49, 0x6e, 0x69, - 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x5f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, 0x53, - 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x68, 0x61, 0x73, 0x5f, 0x77, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x68, 0x61, 0x73, - 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xa2, 0x02, 0x0a, 0x14, 0x42, - 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x12, 0x3f, 0x0a, 0x0a, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x65, 0x61, 0x64, - 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, - 0x3b, 0x0a, 0x14, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 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, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x3c, 0x0a, 0x15, - 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x5f, - 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x65, 0x78, 0x69, 0x74, - 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x65, 0x0a, 0x15, 0x42, 0x61, - 0x63, 0x6b, 0x75, 0x70, 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, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, - 0x61, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x3a, 0x02, 0x18, - 0x01, 0x22, 0x37, 0x0a, 0x16, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x7a, - 0x69, 0x70, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x7a, - 0x69, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x4e, 0x0a, 0x15, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x15, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, - 0x79, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0c, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x54, 0x6f, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x3f, 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, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x3a, 0x0a, 0x20, 0x45, - 0x78, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, - 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, - 0x69, 0x6c, 0x65, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x5f, 0x0a, 0x1f, 0x49, 0x6d, 0x70, 0x6f, 0x72, - 0x74, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x18, 0x73, 0x6c, - 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x73, 0x6c, - 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x4a, 0x73, 0x6f, 0x6e, 0x3a, 0x02, 0x18, 0x01, 0x2a, 0x4b, 0x0a, 0x0e, 0x4b, 0x65, 0x79, 0x6d, + 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4b, 0x65, 0x79, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x0a, 0x6b, 0x65, 0x79, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, + 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, + 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6e, + 0x75, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x12, 0x26, 0x0a, 0x0f, 0x72, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x63, 0x72, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x72, 0x74, 0x50, + 0x61, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x6b, 0x65, + 0x79, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2b, 0x0a, 0x12, 0x72, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x5f, 0x63, 0x72, 0x74, 0x5f, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, + 0x61, 0x43, 0x72, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2b, 0x0a, 0x11, 0x6d, 0x6e, 0x65, 0x6d, + 0x6f, 0x6e, 0x69, 0x63, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x4c, 0x61, 0x6e, + 0x67, 0x75, 0x61, 0x67, 0x65, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x62, 0x0a, 0x14, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x46, 0x0a, 0x06, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 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, 0x52, 0x06, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xbb, 0x01, + 0x0a, 0x17, 0x45, 0x64, 0x69, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x63, 0x72, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x72, 0x74, 0x50, 0x61, + 0x74, 0x68, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2b, 0x0a, 0x12, 0x72, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x5f, 0x63, 0x72, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x61, + 0x43, 0x72, 0x74, 0x50, 0x61, 0x74, 0x68, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x3a, 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, 0x3a, 0x02, 0x18, 0x01, 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, + 0x65, 0x79, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 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, 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, 0x22, 0xcb, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, + 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0b, 0x6e, 0x75, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x0f, + 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x50, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, + 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x6d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x32, 0x35, 0x74, + 0x68, 0x5f, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x6e, + 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x32, 0x35, 0x74, 0x68, 0x57, 0x6f, 0x72, 0x64, 0x3a, 0x02, + 0x18, 0x01, 0x22, 0x6b, 0x0a, 0x18, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, + 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 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, 0x3a, 0x02, 0x18, 0x01, 0x22, + 0x96, 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, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xa6, 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, 0x3a, 0x02, 0x18, + 0x01, 0x22, 0xb5, 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, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x4f, 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, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x3c, 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, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x79, 0x0a, 0x15, 0x49, 0x6d, 0x70, 0x6f, + 0x72, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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, 0x3a, + 0x02, 0x18, 0x01, 0x22, 0x4e, 0x0a, 0x16, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 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, 0x3a, + 0x02, 0x18, 0x01, 0x22, 0x31, 0x0a, 0x15, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x5f, 0x0a, 0x16, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, + 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x55, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x68, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x68, 0x61, 0x73, 0x57, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xa2, 0x02, 0x0a, 0x14, 0x42, 0x65, 0x61, 0x63, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x12, 0x3f, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x52, 0x09, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x3b, 0x0a, 0x14, + 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 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, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x3c, 0x0a, 0x15, 0x56, 0x6f, 0x6c, + 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x4b, + 0x65, 0x79, 0x73, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x65, 0x0a, 0x15, 0x42, 0x61, 0x63, 0x6b, 0x75, + 0x70, 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, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x70, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x61, 0x63, 0x6b, + 0x75, 0x70, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x37, + 0x0a, 0x16, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x7a, 0x69, 0x70, 0x5f, + 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x7a, 0x69, 0x70, 0x46, + 0x69, 0x6c, 0x65, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x4e, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x31, 0x0a, 0x15, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x5f, + 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, + 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x54, 0x6f, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x3f, 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, 0x3a, 0x02, 0x18, 0x01, 0x2a, 0x4b, 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, @@ -1906,52 +1798,29 @@ var file_proto_prysm_v1alpha1_validator_client_web_api_proto_rawDesc = []byte{ 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x73, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x62, 0x65, - 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x70, 0x65, 0x65, 0x72, 0x73, 0x88, 0x02, 0x01, 0x32, 0xee, 0x02, - 0x0a, 0x12, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xa9, 0x01, 0x0a, 0x18, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x53, - 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 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, 0x40, 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, 0x78, 0x70, 0x6f, 0x72, - 0x74, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2d, 0x70, 0x72, 0x6f, 0x74, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x88, 0x02, 0x01, - 0x12, 0xab, 0x01, 0x0a, 0x18, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6c, 0x61, 0x73, 0x68, - 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 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, 0x49, - 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, - 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 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, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x01, - 0x2a, 0x22, 0x28, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x88, 0x02, 0x01, 0x32, 0x86, - 0x01, 0x0a, 0x04, 0x41, 0x75, 0x74, 0x68, 0x12, 0x7e, 0x0a, 0x0a, 0x49, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 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, 0x49, - 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, - 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x42, 0xc7, 0x01, 0x0a, 0x22, 0x6f, 0x72, 0x67, 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, 0x42, 0x08, - 0x57, 0x65, 0x62, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, - 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x34, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x3b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xaa, - 0x02, 0x1e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x56, 0x32, - 0xca, 0x02, 0x1e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, - 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x70, 0x65, 0x65, 0x72, 0x73, 0x88, 0x02, 0x01, 0x32, 0x86, 0x01, + 0x0a, 0x04, 0x41, 0x75, 0x74, 0x68, 0x12, 0x7e, 0x0a, 0x0a, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 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, 0x49, 0x6e, + 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x76, + 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x42, 0xc7, 0x01, 0x0a, 0x22, 0x6f, 0x72, 0x67, 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, 0x42, 0x08, 0x57, + 0x65, 0x62, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, + 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x3b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xaa, 0x02, + 0x1e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x56, 0x32, 0xca, + 0x02, 0x1e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x32, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1967,7 +1836,7 @@ func file_proto_prysm_v1alpha1_validator_client_web_api_proto_rawDescGZIP() []by } var file_proto_prysm_v1alpha1_validator_client_web_api_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_proto_prysm_v1alpha1_validator_client_web_api_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_proto_prysm_v1alpha1_validator_client_web_api_proto_msgTypes = make([]protoimpl.MessageInfo, 23) var file_proto_prysm_v1alpha1_validator_client_web_api_proto_goTypes = []interface{}{ (KeymanagerKind)(0), // 0: ethereum.validator.accounts.v2.KeymanagerKind (*CreateWalletRequest)(nil), // 1: ethereum.validator.accounts.v2.CreateWalletRequest @@ -1993,63 +1862,57 @@ var file_proto_prysm_v1alpha1_validator_client_web_api_proto_goTypes = []interfa (*BackupAccountsResponse)(nil), // 21: ethereum.validator.accounts.v2.BackupAccountsResponse (*DeleteAccountsRequest)(nil), // 22: ethereum.validator.accounts.v2.DeleteAccountsRequest (*DeleteAccountsResponse)(nil), // 23: ethereum.validator.accounts.v2.DeleteAccountsResponse - (*ExportSlashingProtectionResponse)(nil), // 24: ethereum.validator.accounts.v2.ExportSlashingProtectionResponse - (*ImportSlashingProtectionRequest)(nil), // 25: ethereum.validator.accounts.v2.ImportSlashingProtectionRequest - (*v1alpha1.ChainHead)(nil), // 26: ethereum.eth.v1alpha1.ChainHead - (*emptypb.Empty)(nil), // 27: google.protobuf.Empty - (*v1alpha1.GetValidatorParticipationRequest)(nil), // 28: ethereum.eth.v1alpha1.GetValidatorParticipationRequest - (*v1alpha1.ValidatorPerformanceRequest)(nil), // 29: ethereum.eth.v1alpha1.ValidatorPerformanceRequest - (*v1alpha1.ListValidatorsRequest)(nil), // 30: ethereum.eth.v1alpha1.ListValidatorsRequest - (*v1alpha1.ListValidatorBalancesRequest)(nil), // 31: ethereum.eth.v1alpha1.ListValidatorBalancesRequest - (*v1alpha1.ValidatorParticipationResponse)(nil), // 32: ethereum.eth.v1alpha1.ValidatorParticipationResponse - (*v1alpha1.ValidatorPerformanceResponse)(nil), // 33: ethereum.eth.v1alpha1.ValidatorPerformanceResponse - (*v1alpha1.Validators)(nil), // 34: ethereum.eth.v1alpha1.Validators - (*v1alpha1.ValidatorBalances)(nil), // 35: ethereum.eth.v1alpha1.ValidatorBalances - (*v1alpha1.ValidatorQueue)(nil), // 36: ethereum.eth.v1alpha1.ValidatorQueue - (*v1alpha1.Peers)(nil), // 37: ethereum.eth.v1alpha1.Peers + (*v1alpha1.ChainHead)(nil), // 24: ethereum.eth.v1alpha1.ChainHead + (*emptypb.Empty)(nil), // 25: google.protobuf.Empty + (*v1alpha1.GetValidatorParticipationRequest)(nil), // 26: ethereum.eth.v1alpha1.GetValidatorParticipationRequest + (*v1alpha1.ValidatorPerformanceRequest)(nil), // 27: ethereum.eth.v1alpha1.ValidatorPerformanceRequest + (*v1alpha1.ListValidatorsRequest)(nil), // 28: ethereum.eth.v1alpha1.ListValidatorsRequest + (*v1alpha1.ListValidatorBalancesRequest)(nil), // 29: ethereum.eth.v1alpha1.ListValidatorBalancesRequest + (*v1alpha1.ValidatorParticipationResponse)(nil), // 30: ethereum.eth.v1alpha1.ValidatorParticipationResponse + (*v1alpha1.ValidatorPerformanceResponse)(nil), // 31: ethereum.eth.v1alpha1.ValidatorPerformanceResponse + (*v1alpha1.Validators)(nil), // 32: ethereum.eth.v1alpha1.Validators + (*v1alpha1.ValidatorBalances)(nil), // 33: ethereum.eth.v1alpha1.ValidatorBalances + (*v1alpha1.ValidatorQueue)(nil), // 34: ethereum.eth.v1alpha1.ValidatorQueue + (*v1alpha1.Peers)(nil), // 35: ethereum.eth.v1alpha1.Peers } var file_proto_prysm_v1alpha1_validator_client_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 0, // 2: ethereum.validator.accounts.v2.WalletResponse.keymanager_kind:type_name -> ethereum.validator.accounts.v2.KeymanagerKind 10, // 3: ethereum.validator.accounts.v2.ListAccountsResponse.accounts:type_name -> ethereum.validator.accounts.v2.Account - 26, // 4: ethereum.validator.accounts.v2.BeaconStatusResponse.chain_head:type_name -> ethereum.eth.v1alpha1.ChainHead + 24, // 4: ethereum.validator.accounts.v2.BeaconStatusResponse.chain_head:type_name -> ethereum.eth.v1alpha1.ChainHead 1, // 5: ethereum.validator.accounts.v2.Wallet.CreateWallet:input_type -> ethereum.validator.accounts.v2.CreateWalletRequest - 27, // 6: ethereum.validator.accounts.v2.Wallet.WalletConfig:input_type -> google.protobuf.Empty + 25, // 6: ethereum.validator.accounts.v2.Wallet.WalletConfig:input_type -> google.protobuf.Empty 7, // 7: ethereum.validator.accounts.v2.Wallet.ValidateKeystores:input_type -> ethereum.validator.accounts.v2.ValidateKeystoresRequest 6, // 8: ethereum.validator.accounts.v2.Wallet.RecoverWallet:input_type -> ethereum.validator.accounts.v2.RecoverWalletRequest 8, // 9: ethereum.validator.accounts.v2.Accounts.ListAccounts:input_type -> ethereum.validator.accounts.v2.ListAccountsRequest 20, // 10: ethereum.validator.accounts.v2.Accounts.BackupAccounts:input_type -> ethereum.validator.accounts.v2.BackupAccountsRequest 18, // 11: ethereum.validator.accounts.v2.Accounts.VoluntaryExit:input_type -> ethereum.validator.accounts.v2.VoluntaryExitRequest - 27, // 12: ethereum.validator.accounts.v2.Beacon.GetBeaconStatus:input_type -> google.protobuf.Empty - 28, // 13: ethereum.validator.accounts.v2.Beacon.GetValidatorParticipation:input_type -> ethereum.eth.v1alpha1.GetValidatorParticipationRequest - 29, // 14: ethereum.validator.accounts.v2.Beacon.GetValidatorPerformance:input_type -> ethereum.eth.v1alpha1.ValidatorPerformanceRequest - 30, // 15: ethereum.validator.accounts.v2.Beacon.GetValidators:input_type -> ethereum.eth.v1alpha1.ListValidatorsRequest - 31, // 16: ethereum.validator.accounts.v2.Beacon.GetValidatorBalances:input_type -> ethereum.eth.v1alpha1.ListValidatorBalancesRequest - 27, // 17: ethereum.validator.accounts.v2.Beacon.GetValidatorQueue:input_type -> google.protobuf.Empty - 27, // 18: ethereum.validator.accounts.v2.Beacon.GetPeers:input_type -> google.protobuf.Empty - 27, // 19: ethereum.validator.accounts.v2.SlashingProtection.ExportSlashingProtection:input_type -> google.protobuf.Empty - 25, // 20: ethereum.validator.accounts.v2.SlashingProtection.ImportSlashingProtection:input_type -> ethereum.validator.accounts.v2.ImportSlashingProtectionRequest - 27, // 21: ethereum.validator.accounts.v2.Auth.Initialize:input_type -> google.protobuf.Empty - 2, // 22: ethereum.validator.accounts.v2.Wallet.CreateWallet:output_type -> ethereum.validator.accounts.v2.CreateWalletResponse - 5, // 23: ethereum.validator.accounts.v2.Wallet.WalletConfig:output_type -> ethereum.validator.accounts.v2.WalletResponse - 27, // 24: ethereum.validator.accounts.v2.Wallet.ValidateKeystores:output_type -> google.protobuf.Empty - 2, // 25: ethereum.validator.accounts.v2.Wallet.RecoverWallet:output_type -> ethereum.validator.accounts.v2.CreateWalletResponse - 9, // 26: ethereum.validator.accounts.v2.Accounts.ListAccounts:output_type -> ethereum.validator.accounts.v2.ListAccountsResponse - 21, // 27: ethereum.validator.accounts.v2.Accounts.BackupAccounts:output_type -> ethereum.validator.accounts.v2.BackupAccountsResponse - 19, // 28: ethereum.validator.accounts.v2.Accounts.VoluntaryExit:output_type -> ethereum.validator.accounts.v2.VoluntaryExitResponse - 17, // 29: ethereum.validator.accounts.v2.Beacon.GetBeaconStatus:output_type -> ethereum.validator.accounts.v2.BeaconStatusResponse - 32, // 30: ethereum.validator.accounts.v2.Beacon.GetValidatorParticipation:output_type -> ethereum.eth.v1alpha1.ValidatorParticipationResponse - 33, // 31: ethereum.validator.accounts.v2.Beacon.GetValidatorPerformance:output_type -> ethereum.eth.v1alpha1.ValidatorPerformanceResponse - 34, // 32: ethereum.validator.accounts.v2.Beacon.GetValidators:output_type -> ethereum.eth.v1alpha1.Validators - 35, // 33: ethereum.validator.accounts.v2.Beacon.GetValidatorBalances:output_type -> ethereum.eth.v1alpha1.ValidatorBalances - 36, // 34: ethereum.validator.accounts.v2.Beacon.GetValidatorQueue:output_type -> ethereum.eth.v1alpha1.ValidatorQueue - 37, // 35: ethereum.validator.accounts.v2.Beacon.GetPeers:output_type -> ethereum.eth.v1alpha1.Peers - 24, // 36: ethereum.validator.accounts.v2.SlashingProtection.ExportSlashingProtection:output_type -> ethereum.validator.accounts.v2.ExportSlashingProtectionResponse - 27, // 37: ethereum.validator.accounts.v2.SlashingProtection.ImportSlashingProtection:output_type -> google.protobuf.Empty - 16, // 38: ethereum.validator.accounts.v2.Auth.Initialize:output_type -> ethereum.validator.accounts.v2.InitializeAuthResponse - 22, // [22:39] is the sub-list for method output_type - 5, // [5:22] is the sub-list for method input_type + 25, // 12: ethereum.validator.accounts.v2.Beacon.GetBeaconStatus:input_type -> google.protobuf.Empty + 26, // 13: ethereum.validator.accounts.v2.Beacon.GetValidatorParticipation:input_type -> ethereum.eth.v1alpha1.GetValidatorParticipationRequest + 27, // 14: ethereum.validator.accounts.v2.Beacon.GetValidatorPerformance:input_type -> ethereum.eth.v1alpha1.ValidatorPerformanceRequest + 28, // 15: ethereum.validator.accounts.v2.Beacon.GetValidators:input_type -> ethereum.eth.v1alpha1.ListValidatorsRequest + 29, // 16: ethereum.validator.accounts.v2.Beacon.GetValidatorBalances:input_type -> ethereum.eth.v1alpha1.ListValidatorBalancesRequest + 25, // 17: ethereum.validator.accounts.v2.Beacon.GetValidatorQueue:input_type -> google.protobuf.Empty + 25, // 18: ethereum.validator.accounts.v2.Beacon.GetPeers:input_type -> google.protobuf.Empty + 25, // 19: ethereum.validator.accounts.v2.Auth.Initialize:input_type -> google.protobuf.Empty + 2, // 20: ethereum.validator.accounts.v2.Wallet.CreateWallet:output_type -> ethereum.validator.accounts.v2.CreateWalletResponse + 5, // 21: ethereum.validator.accounts.v2.Wallet.WalletConfig:output_type -> ethereum.validator.accounts.v2.WalletResponse + 25, // 22: ethereum.validator.accounts.v2.Wallet.ValidateKeystores:output_type -> google.protobuf.Empty + 2, // 23: ethereum.validator.accounts.v2.Wallet.RecoverWallet:output_type -> ethereum.validator.accounts.v2.CreateWalletResponse + 9, // 24: ethereum.validator.accounts.v2.Accounts.ListAccounts:output_type -> ethereum.validator.accounts.v2.ListAccountsResponse + 21, // 25: ethereum.validator.accounts.v2.Accounts.BackupAccounts:output_type -> ethereum.validator.accounts.v2.BackupAccountsResponse + 19, // 26: ethereum.validator.accounts.v2.Accounts.VoluntaryExit:output_type -> ethereum.validator.accounts.v2.VoluntaryExitResponse + 17, // 27: ethereum.validator.accounts.v2.Beacon.GetBeaconStatus:output_type -> ethereum.validator.accounts.v2.BeaconStatusResponse + 30, // 28: ethereum.validator.accounts.v2.Beacon.GetValidatorParticipation:output_type -> ethereum.eth.v1alpha1.ValidatorParticipationResponse + 31, // 29: ethereum.validator.accounts.v2.Beacon.GetValidatorPerformance:output_type -> ethereum.eth.v1alpha1.ValidatorPerformanceResponse + 32, // 30: ethereum.validator.accounts.v2.Beacon.GetValidators:output_type -> ethereum.eth.v1alpha1.Validators + 33, // 31: ethereum.validator.accounts.v2.Beacon.GetValidatorBalances:output_type -> ethereum.eth.v1alpha1.ValidatorBalances + 34, // 32: ethereum.validator.accounts.v2.Beacon.GetValidatorQueue:output_type -> ethereum.eth.v1alpha1.ValidatorQueue + 35, // 33: ethereum.validator.accounts.v2.Beacon.GetPeers:output_type -> ethereum.eth.v1alpha1.Peers + 16, // 34: ethereum.validator.accounts.v2.Auth.Initialize:output_type -> ethereum.validator.accounts.v2.InitializeAuthResponse + 20, // [20:35] is the sub-list for method output_type + 5, // [5:20] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name 5, // [5:5] is the sub-list for extension extendee 0, // [0:5] is the sub-list for field type_name @@ -2337,30 +2200,6 @@ func file_proto_prysm_v1alpha1_validator_client_web_api_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_client_web_api_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExportSlashingProtectionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_prysm_v1alpha1_validator_client_web_api_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ImportSlashingProtectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2368,9 +2207,9 @@ func file_proto_prysm_v1alpha1_validator_client_web_api_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_prysm_v1alpha1_validator_client_web_api_proto_rawDesc, NumEnums: 1, - NumMessages: 25, + NumMessages: 23, NumExtensions: 0, - NumServices: 5, + NumServices: 4, }, GoTypes: file_proto_prysm_v1alpha1_validator_client_web_api_proto_goTypes, DependencyIndexes: file_proto_prysm_v1alpha1_validator_client_web_api_proto_depIdxs, @@ -3045,120 +2884,6 @@ var _Beacon_serviceDesc = grpc.ServiceDesc{ Metadata: "proto/prysm/v1alpha1/validator-client/web_api.proto", } -// SlashingProtectionClient is the client API for SlashingProtection service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type SlashingProtectionClient interface { - // Deprecated: Do not use. - ExportSlashingProtection(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ExportSlashingProtectionResponse, error) - // Deprecated: Do not use. - ImportSlashingProtection(ctx context.Context, in *ImportSlashingProtectionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type slashingProtectionClient struct { - cc grpc.ClientConnInterface -} - -func NewSlashingProtectionClient(cc grpc.ClientConnInterface) SlashingProtectionClient { - return &slashingProtectionClient{cc} -} - -// Deprecated: Do not use. -func (c *slashingProtectionClient) ExportSlashingProtection(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ExportSlashingProtectionResponse, error) { - out := new(ExportSlashingProtectionResponse) - err := c.cc.Invoke(ctx, "/ethereum.validator.accounts.v2.SlashingProtection/ExportSlashingProtection", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Deprecated: Do not use. -func (c *slashingProtectionClient) ImportSlashingProtection(ctx context.Context, in *ImportSlashingProtectionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/ethereum.validator.accounts.v2.SlashingProtection/ImportSlashingProtection", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// SlashingProtectionServer is the server API for SlashingProtection service. -type SlashingProtectionServer interface { - // Deprecated: Do not use. - ExportSlashingProtection(context.Context, *emptypb.Empty) (*ExportSlashingProtectionResponse, error) - // Deprecated: Do not use. - ImportSlashingProtection(context.Context, *ImportSlashingProtectionRequest) (*emptypb.Empty, error) -} - -// UnimplementedSlashingProtectionServer can be embedded to have forward compatible implementations. -type UnimplementedSlashingProtectionServer struct { -} - -func (*UnimplementedSlashingProtectionServer) ExportSlashingProtection(context.Context, *emptypb.Empty) (*ExportSlashingProtectionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ExportSlashingProtection not implemented") -} -func (*UnimplementedSlashingProtectionServer) ImportSlashingProtection(context.Context, *ImportSlashingProtectionRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method ImportSlashingProtection not implemented") -} - -func RegisterSlashingProtectionServer(s *grpc.Server, srv SlashingProtectionServer) { - s.RegisterService(&_SlashingProtection_serviceDesc, srv) -} - -func _SlashingProtection_ExportSlashingProtection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SlashingProtectionServer).ExportSlashingProtection(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.validator.accounts.v2.SlashingProtection/ExportSlashingProtection", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SlashingProtectionServer).ExportSlashingProtection(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _SlashingProtection_ImportSlashingProtection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ImportSlashingProtectionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SlashingProtectionServer).ImportSlashingProtection(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.validator.accounts.v2.SlashingProtection/ImportSlashingProtection", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SlashingProtectionServer).ImportSlashingProtection(ctx, req.(*ImportSlashingProtectionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _SlashingProtection_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ethereum.validator.accounts.v2.SlashingProtection", - HandlerType: (*SlashingProtectionServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ExportSlashingProtection", - Handler: _SlashingProtection_ExportSlashingProtection_Handler, - }, - { - MethodName: "ImportSlashingProtection", - Handler: _SlashingProtection_ImportSlashingProtection_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/prysm/v1alpha1/validator-client/web_api.proto", -} - // AuthClient is the client API for Auth service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. diff --git a/proto/prysm/v1alpha1/validator-client/web_api.pb.gw.go b/proto/prysm/v1alpha1/validator-client/web_api.pb.gw.go index f66f4f0e8..fcc09587a 100755 --- a/proto/prysm/v1alpha1/validator-client/web_api.pb.gw.go +++ b/proto/prysm/v1alpha1/validator-client/web_api.pb.gw.go @@ -458,58 +458,6 @@ func local_request_Beacon_GetPeers_0(ctx context.Context, marshaler runtime.Mars } -func request_SlashingProtection_ExportSlashingProtection_0(ctx context.Context, marshaler runtime.Marshaler, client SlashingProtectionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq emptypb.Empty - var metadata runtime.ServerMetadata - - msg, err := client.ExportSlashingProtection(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SlashingProtection_ExportSlashingProtection_0(ctx context.Context, marshaler runtime.Marshaler, server SlashingProtectionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq emptypb.Empty - var metadata runtime.ServerMetadata - - msg, err := server.ExportSlashingProtection(ctx, &protoReq) - return msg, metadata, err - -} - -func request_SlashingProtection_ImportSlashingProtection_0(ctx context.Context, marshaler runtime.Marshaler, client SlashingProtectionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ImportSlashingProtectionRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ImportSlashingProtection(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SlashingProtection_ImportSlashingProtection_0(ctx context.Context, marshaler runtime.Marshaler, server SlashingProtectionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ImportSlashingProtectionRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ImportSlashingProtection(ctx, &protoReq) - return msg, metadata, err - -} - func request_Auth_Initialize_0(ctx context.Context, marshaler runtime.Marshaler, client AuthClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq emptypb.Empty var metadata runtime.ServerMetadata @@ -877,61 +825,6 @@ func RegisterBeaconHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser return nil } -// RegisterSlashingProtectionHandlerServer registers the http handlers for service SlashingProtection to "mux". -// UnaryRPC :call SlashingProtectionServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSlashingProtectionHandlerFromEndpoint instead. -func RegisterSlashingProtectionHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SlashingProtectionServer) error { - - mux.Handle("GET", pattern_SlashingProtection_ExportSlashingProtection_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.validator.accounts.v2.SlashingProtection/ExportSlashingProtection") - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SlashingProtection_ExportSlashingProtection_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SlashingProtection_ExportSlashingProtection_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_SlashingProtection_ImportSlashingProtection_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.validator.accounts.v2.SlashingProtection/ImportSlashingProtection") - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SlashingProtection_ImportSlashingProtection_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SlashingProtection_ImportSlashingProtection_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - // RegisterAuthHandlerServer registers the http handlers for service Auth to "mux". // UnaryRPC :call AuthServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -1435,99 +1328,6 @@ var ( forward_Beacon_GetPeers_0 = runtime.ForwardResponseMessage ) -// RegisterSlashingProtectionHandlerFromEndpoint is same as RegisterSlashingProtectionHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterSlashingProtectionHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterSlashingProtectionHandler(ctx, mux, conn) -} - -// RegisterSlashingProtectionHandler registers the http handlers for service SlashingProtection to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterSlashingProtectionHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterSlashingProtectionHandlerClient(ctx, mux, NewSlashingProtectionClient(conn)) -} - -// RegisterSlashingProtectionHandlerClient registers the http handlers for service SlashingProtection -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SlashingProtectionClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SlashingProtectionClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "SlashingProtectionClient" to call the correct interceptors. -func RegisterSlashingProtectionHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SlashingProtectionClient) error { - - mux.Handle("GET", pattern_SlashingProtection_ExportSlashingProtection_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.validator.accounts.v2.SlashingProtection/ExportSlashingProtection") - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SlashingProtection_ExportSlashingProtection_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SlashingProtection_ExportSlashingProtection_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_SlashingProtection_ImportSlashingProtection_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.validator.accounts.v2.SlashingProtection/ImportSlashingProtection") - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SlashingProtection_ImportSlashingProtection_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SlashingProtection_ImportSlashingProtection_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_SlashingProtection_ExportSlashingProtection_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "validator", "slashing-protection", "export"}, "")) - - pattern_SlashingProtection_ImportSlashingProtection_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "validator", "slashing-protection", "import"}, "")) -) - -var ( - forward_SlashingProtection_ExportSlashingProtection_0 = runtime.ForwardResponseMessage - - forward_SlashingProtection_ImportSlashingProtection_0 = runtime.ForwardResponseMessage -) - // RegisterAuthHandlerFromEndpoint is same as RegisterAuthHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterAuthHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { diff --git a/proto/prysm/v1alpha1/validator-client/web_api.proto b/proto/prysm/v1alpha1/validator-client/web_api.proto index ac2c8a6f3..907b9d0c0 100644 --- a/proto/prysm/v1alpha1/validator-client/web_api.proto +++ b/proto/prysm/v1alpha1/validator-client/web_api.proto @@ -1,7 +1,6 @@ syntax = "proto3"; package ethereum.validator.accounts.v2; -import "proto/prysm/v1alpha1/health.proto"; import "proto/prysm/v1alpha1/beacon_chain.proto"; import "proto/prysm/v1alpha1/node.proto"; import "google/api/annotations.proto"; @@ -129,24 +128,6 @@ service Beacon { } } -// Slashing Protection imports and exports can be provided through validator CLI command as well as Keymanager API https://ethereum.github.io/keymanager-APIs/ import and delete. -// DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork. -service SlashingProtection { - rpc ExportSlashingProtection(google.protobuf.Empty) returns (ExportSlashingProtectionResponse) { - option deprecated = true; - option (google.api.http) = { - get: "/v2/validator/slashing-protection/export" - }; - } - rpc ImportSlashingProtection(ImportSlashingProtectionRequest) returns (google.protobuf.Empty) { - option deprecated = true; - option (google.api.http) = { - post: "/v2/validator/slashing-protection/import" - body: "*" - }; - } -} - // Web APIs such as the Keymanager APIs will no longer validate JWTs on the endpoint. Users should no longer expose the validator APIs to the public. // option deprecated = true; can't be added yet as it's used for keymanager API // DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork. @@ -391,18 +372,4 @@ message DeleteAccountsResponse { option deprecated = true; // List of public keys successfully deleted. repeated bytes deleted_keys = 1; -} - -// DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork. -message ExportSlashingProtectionResponse { - option deprecated = true; - // JSON representation of the slash protection - string file = 1; -} - -// DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork. -message ImportSlashingProtectionRequest { - option deprecated = true; - // JSON representation of the slash protection - string slashing_protection_json = 1; -} +} \ No newline at end of file diff --git a/validator/node/node.go b/validator/node/node.go index 9f367e5a7..274247fcf 100644 --- a/validator/node/node.go +++ b/validator/node/node.go @@ -798,7 +798,6 @@ func (c *ValidatorClient) registerRPCGatewayService(router *mux.Router) error { pb.RegisterHealthHandler, validatorpb.RegisterAccountsHandler, validatorpb.RegisterBeaconHandler, - validatorpb.RegisterSlashingProtectionHandler, } gwmux := gwruntime.NewServeMux( gwruntime.WithMarshalerOption(gwruntime.MIMEWildcard, &gwruntime.HTTPBodyMarshaler{ diff --git a/validator/rpc/BUILD.bazel b/validator/rpc/BUILD.bazel index 7bcd83c1b..d4173c79a 100644 --- a/validator/rpc/BUILD.bazel +++ b/validator/rpc/BUILD.bazel @@ -8,10 +8,10 @@ go_library( "beacon.go", "handlers_health.go", "handlers_keymanager.go", + "handlers_slashing.go", "intercepter.go", "log.go", "server.go", - "slashing.go", "structs.go", "wallet.go", ], @@ -93,9 +93,9 @@ go_test( "beacon_test.go", "handlers_health_test.go", "handlers_keymanager_test.go", + "handlers_slashing_test.go", "intercepter_test.go", "server_test.go", - "slashing_test.go", "wallet_test.go", ], embed = [":go_default_library"], diff --git a/validator/rpc/handlers_keymanager_test.go b/validator/rpc/handlers_keymanager_test.go index 1f00cb436..f843e50ab 100644 --- a/validator/rpc/handlers_keymanager_test.go +++ b/validator/rpc/handlers_keymanager_test.go @@ -22,7 +22,6 @@ import ( "github.com/prysmaticlabs/prysm/v4/consensus-types/validator" "github.com/prysmaticlabs/prysm/v4/encoding/bytesutil" eth "github.com/prysmaticlabs/prysm/v4/proto/prysm/v1alpha1" - validatorpb "github.com/prysmaticlabs/prysm/v4/proto/prysm/v1alpha1/validator-client" "github.com/prysmaticlabs/prysm/v4/testing/assert" "github.com/prysmaticlabs/prysm/v4/testing/require" validatormock "github.com/prysmaticlabs/prysm/v4/testing/validator-mock" @@ -411,12 +410,17 @@ func TestServer_DeleteKeystores(t *testing.T) { // JSON encode the protection JSON and save it. encoded, err := json.Marshal(mockJSON) require.NoError(t, err) - - _, err = srv.ImportSlashingProtection(ctx, &validatorpb.ImportSlashingProtectionRequest{ + request := &ImportSlashingProtectionRequest{ SlashingProtectionJson: string(encoded), - }) + } + var buf bytes.Buffer + err = json.NewEncoder(&buf).Encode(request) require.NoError(t, err) + req := httptest.NewRequest(http.MethodPost, "/v2/validator/slashing-protection/import", &buf) + wr := httptest.NewRecorder() + srv.ImportSlashingProtection(wr, req) + require.Equal(t, http.StatusOK, wr.Code) t.Run("no slashing protection response if no keys in request even if we have a history in DB", func(t *testing.T) { request := &DeleteKeystoresRequest{ Pubkeys: nil, diff --git a/validator/rpc/handlers_slashing.go b/validator/rpc/handlers_slashing.go new file mode 100644 index 000000000..245ff3e03 --- /dev/null +++ b/validator/rpc/handlers_slashing.go @@ -0,0 +1,84 @@ +package rpc + +import ( + "bytes" + "encoding/json" + "io" + "net/http" + + "github.com/pkg/errors" + httputil "github.com/prysmaticlabs/prysm/v4/network/http" + slashing "github.com/prysmaticlabs/prysm/v4/validator/slashing-protection-history" + "go.opencensus.io/trace" +) + +// ExportSlashingProtection handles the rpc call returning the json slashing history. +// The format of the export follows the EIP-3076 standard which makes it +// easy to migrate machines or Ethereum consensus clients. +// +// Steps: +// 1. Call the function which exports the data from +// the validator's db into an EIP standard slashing protection format. +// 2. Format and send JSON in the response. +func (s *Server) ExportSlashingProtection(w http.ResponseWriter, r *http.Request) { + ctx, span := trace.StartSpan(r.Context(), "validator.ExportSlashingProtection") + defer span.End() + + if s.valDB == nil { + httputil.HandleError(w, "could not find validator database", http.StatusInternalServerError) + return + } + + eipJSON, err := slashing.ExportStandardProtectionJSON(ctx, s.valDB) + if err != nil { + httputil.HandleError(w, errors.Wrap(err, "could not export slashing protection history").Error(), http.StatusInternalServerError) + return + } + + encoded, err := json.MarshalIndent(eipJSON, "", "\t") + if err != nil { + httputil.HandleError(w, errors.Wrap(err, "could not JSON marshal slashing protection history").Error(), http.StatusInternalServerError) + return + } + httputil.WriteJson(w, &ExportSlashingProtectionResponse{ + File: string(encoded), + }) +} + +// ImportSlashingProtection reads an input slashing protection EIP-3076 +// standard JSON string and inserts the data into validator DB. +// +// Read the JSON string passed through rpc, then call the func +// which actually imports the data from the JSON file into our database. Use the Keymanager APIs if an API is required. +func (s *Server) ImportSlashingProtection(w http.ResponseWriter, r *http.Request) { + ctx, span := trace.StartSpan(r.Context(), "validator.ImportSlashingProtection") + defer span.End() + + if s.valDB == nil { + httputil.HandleError(w, "could not find validator database", http.StatusInternalServerError) + return + } + + var req ImportSlashingProtectionRequest + err := json.NewDecoder(r.Body).Decode(&req) + switch { + case err == io.EOF: + httputil.HandleError(w, "No data submitted", http.StatusBadRequest) + return + case err != nil: + httputil.HandleError(w, "Could not decode request body: "+err.Error(), http.StatusBadRequest) + return + } + + if req.SlashingProtectionJson == "" { + httputil.HandleError(w, "empty slashing_protection_json specified", http.StatusBadRequest) + return + } + enc := []byte(req.SlashingProtectionJson) + buf := bytes.NewBuffer(enc) + if err := slashing.ImportStandardProtectionJSON(ctx, s.valDB, buf); err != nil { + httputil.HandleError(w, errors.Wrap(err, "could not import slashing protection history").Error(), http.StatusInternalServerError) + return + } + log.Info("Slashing protection JSON successfully imported") +} diff --git a/validator/rpc/slashing_test.go b/validator/rpc/handlers_slashing_test.go similarity index 68% rename from validator/rpc/slashing_test.go rename to validator/rpc/handlers_slashing_test.go index f0af3822c..3c63bbe90 100644 --- a/validator/rpc/slashing_test.go +++ b/validator/rpc/handlers_slashing_test.go @@ -1,12 +1,13 @@ package rpc import ( + "bytes" "context" "encoding/json" + "net/http" + "net/http/httptest" "testing" - "github.com/golang/protobuf/ptypes/empty" - pb "github.com/prysmaticlabs/prysm/v4/proto/prysm/v1alpha1/validator-client" "github.com/prysmaticlabs/prysm/v4/testing/require" "github.com/prysmaticlabs/prysm/v4/validator/accounts" "github.com/prysmaticlabs/prysm/v4/validator/db/kv" @@ -21,16 +22,24 @@ func TestImportSlashingProtection_Preconditions(t *testing.T) { defaultWalletPath = localWalletDir // Empty JSON. - req := &pb.ImportSlashingProtectionRequest{ - SlashingProtectionJson: "", - } s := &Server{ walletDir: defaultWalletPath, } + request := &ImportSlashingProtectionRequest{ + SlashingProtectionJson: "", + } + var buf bytes.Buffer + err := json.NewEncoder(&buf).Encode(request) + require.NoError(t, err) + + req := httptest.NewRequest(http.MethodPost, "/v2/validator/slashing-protection/import", &buf) + wr := httptest.NewRecorder() + wr.Body = &bytes.Buffer{} // No validator DB provided. - _, err := s.ImportSlashingProtection(ctx, req) - require.ErrorContains(t, "err finding validator database at path", err) + s.ImportSlashingProtection(wr, req) + require.Equal(t, http.StatusInternalServerError, wr.Code) + require.StringContains(t, "could not find validator database", wr.Body.String()) // Create Wallet and add to server for more realistic testing. opts := []accounts.Option{ @@ -63,8 +72,11 @@ func TestImportSlashingProtection_Preconditions(t *testing.T) { }() // Test empty JSON. - _, err = s.ImportSlashingProtection(ctx, req) - require.ErrorContains(t, "empty slashing_protection json specified", err) + wr = httptest.NewRecorder() + wr.Body = &bytes.Buffer{} + s.ImportSlashingProtection(wr, req) + require.Equal(t, http.StatusBadRequest, wr.Code) + require.StringContains(t, "empty slashing_protection_json specified", wr.Body.String()) // Generate mock slashing history. attestingHistory := make([][]*kv.AttestationRecord, 0) @@ -78,10 +90,15 @@ func TestImportSlashingProtection_Preconditions(t *testing.T) { // JSON encode the protection JSON and save it in rpc req. encoded, err := json.Marshal(mockJSON) require.NoError(t, err) - req.SlashingProtectionJson = string(encoded) - - _, err = s.ImportSlashingProtection(ctx, req) + request.SlashingProtectionJson = string(encoded) + err = json.NewEncoder(&buf).Encode(request) require.NoError(t, err) + + req = httptest.NewRequest(http.MethodPost, "/v2/validator/slashing-protection/import", &buf) + wr = httptest.NewRecorder() + wr.Body = &bytes.Buffer{} + s.ImportSlashingProtection(wr, req) + require.Equal(t, http.StatusOK, wr.Code) } func TestExportSlashingProtection_Preconditions(t *testing.T) { @@ -92,9 +109,13 @@ func TestExportSlashingProtection_Preconditions(t *testing.T) { s := &Server{ walletDir: defaultWalletPath, } + req := httptest.NewRequest(http.MethodGet, "/v2/validator/slashing-protection/export", nil) + wr := httptest.NewRecorder() + wr.Body = &bytes.Buffer{} // No validator DB provided. - _, err := s.ExportSlashingProtection(ctx, &empty.Empty{}) - require.ErrorContains(t, "err finding validator database at path", err) + s.ExportSlashingProtection(wr, req) + require.Equal(t, http.StatusInternalServerError, wr.Code) + require.StringContains(t, "could not find validator database", wr.Body.String()) numValidators := 10 // Create public keys for the mock validator DB. @@ -115,9 +136,10 @@ func TestExportSlashingProtection_Preconditions(t *testing.T) { genesisValidatorsRoot := [32]byte{1} err = validatorDB.SaveGenesisValidatorsRoot(ctx, genesisValidatorsRoot[:]) require.NoError(t, err) - - _, err = s.ExportSlashingProtection(ctx, &empty.Empty{}) - require.NoError(t, err) + wr = httptest.NewRecorder() + wr.Body = &bytes.Buffer{} + s.ExportSlashingProtection(wr, req) + require.Equal(t, http.StatusOK, wr.Code) } func TestImportExportSlashingProtection_RoundTrip(t *testing.T) { @@ -158,18 +180,25 @@ func TestImportExportSlashingProtection_RoundTrip(t *testing.T) { // JSON encode the protection JSON and save it in rpc req. encoded, err := json.Marshal(mockJSON) require.NoError(t, err) - req := &pb.ImportSlashingProtectionRequest{ + request := &ImportSlashingProtectionRequest{ SlashingProtectionJson: string(encoded), } - - _, err = s.ImportSlashingProtection(ctx, req) + var buf bytes.Buffer + err = json.NewEncoder(&buf).Encode(request) require.NoError(t, err) - reqE, err := s.ExportSlashingProtection(ctx, &empty.Empty{}) - require.NoError(t, err) + req := httptest.NewRequest(http.MethodPost, "/v2/validator/slashing-protection/import", &buf) + wr := httptest.NewRecorder() + s.ImportSlashingProtection(wr, req) + req = httptest.NewRequest(http.MethodGet, "/v2/validator/slashing-protection/export", nil) + wr = httptest.NewRecorder() + s.ExportSlashingProtection(wr, req) + require.Equal(t, http.StatusOK, wr.Code) + resp := &ExportSlashingProtectionResponse{} + require.NoError(t, json.Unmarshal(wr.Body.Bytes(), resp)) // Attempt to read the exported data and convert from string to EIP-3076. - enc := []byte(reqE.File) + enc := []byte(resp.File) receivedJSON := &format.EIPSlashingProtectionFormat{} err = json.Unmarshal(enc, receivedJSON) diff --git a/validator/rpc/server.go b/validator/rpc/server.go index 983d70149..7ca4f1dca 100644 --- a/validator/rpc/server.go +++ b/validator/rpc/server.go @@ -187,7 +187,6 @@ func (s *Server) Start() { validatorpb.RegisterWalletServer(s.grpcServer, s) validatorpb.RegisterBeaconServer(s.grpcServer, s) validatorpb.RegisterAccountsServer(s.grpcServer, s) - validatorpb.RegisterSlashingProtectionServer(s.grpcServer, s) // routes needs to be set before the server calls the server function go func() { @@ -237,6 +236,9 @@ func (s *Server) InitializeRoutes() error { s.router.HandleFunc("/v2/validator/health/version", s.GetVersion).Methods(http.MethodGet) s.router.HandleFunc("/v2/validator/health/logs/validator/stream", s.StreamValidatorLogs).Methods(http.MethodGet) s.router.HandleFunc("/v2/validator/health/logs/beacon/stream", s.StreamBeaconLogs).Methods(http.MethodGet) + // slashing protection endpoints + s.router.HandleFunc("/v2/validator/slashing-protection/export", s.ExportSlashingProtection).Methods(http.MethodGet) + s.router.HandleFunc("/v2/validator/slashing-protection/import", s.ImportSlashingProtection).Methods(http.MethodPost) log.Info("Initialized REST API routes") return nil } diff --git a/validator/rpc/server_test.go b/validator/rpc/server_test.go index b9b74a7f7..d91ab9a2b 100644 --- a/validator/rpc/server_test.go +++ b/validator/rpc/server_test.go @@ -27,6 +27,8 @@ func TestServer_InitializeRoutes(t *testing.T) { "/v2/validator/health/version": {http.MethodGet}, "/v2/validator/health/logs/validator/stream": {http.MethodGet}, "/v2/validator/health/logs/beacon/stream": {http.MethodGet}, + "/v2/validator/slashing-protection/export": {http.MethodGet}, + "/v2/validator/slashing-protection/import": {http.MethodPost}, } gotRouteList := make(map[string][]string) err = s.router.Walk(func(route *mux.Route, router *mux.Router, ancestors []*mux.Route) error { diff --git a/validator/rpc/slashing.go b/validator/rpc/slashing.go deleted file mode 100644 index 8c078c176..000000000 --- a/validator/rpc/slashing.go +++ /dev/null @@ -1,69 +0,0 @@ -package rpc - -import ( - "bytes" - "context" - "encoding/json" - - "github.com/golang/protobuf/ptypes/empty" - "github.com/pkg/errors" - pb "github.com/prysmaticlabs/prysm/v4/proto/prysm/v1alpha1/validator-client" - slashing "github.com/prysmaticlabs/prysm/v4/validator/slashing-protection-history" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/types/known/emptypb" -) - -// ExportSlashingProtection handles the rpc call returning the json slashing history. -// The format of the export follows the EIP-3076 standard which makes it -// easy to migrate machines or Ethereum consensus clients. -// -// Steps: -// 1. Call the function which exports the data from -// the validator's db into an EIP standard slashing protection format. -// 2. Format and send JSON in the response. -// -// DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork. Use the Keymanager APIs if an API is required. -func (s *Server) ExportSlashingProtection(ctx context.Context, _ *empty.Empty) (*pb.ExportSlashingProtectionResponse, error) { - if s.valDB == nil { - return nil, errors.New("err finding validator database at path") - } - - eipJSON, err := slashing.ExportStandardProtectionJSON(ctx, s.valDB) - if err != nil { - return nil, errors.Wrap(err, "could not export slashing protection history") - } - - encoded, err := json.MarshalIndent(eipJSON, "", "\t") - if err != nil { - return nil, errors.Wrap(err, "could not JSON marshal slashing protection history") - } - - return &pb.ExportSlashingProtectionResponse{ - File: string(encoded), - }, nil -} - -// ImportSlashingProtection reads an input slashing protection EIP-3076 -// standard JSON string and inserts the data into validator DB. -// -// Read the JSON string passed through rpc, then call the func -// which actually imports the data from the JSON file into our database. Use the Keymanager APIs if an API is required. -// DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork. -func (s *Server) ImportSlashingProtection(ctx context.Context, req *pb.ImportSlashingProtectionRequest) (*emptypb.Empty, error) { - if s.valDB == nil { - return nil, errors.New("err finding validator database at path") - } - - if req.SlashingProtectionJson == "" { - return nil, status.Errorf(codes.InvalidArgument, "empty slashing_protection json specified") - } - enc := []byte(req.SlashingProtectionJson) - - buf := bytes.NewBuffer(enc) - if err := slashing.ImportStandardProtectionJSON(ctx, s.valDB, buf); err != nil { - return nil, err - } - log.Info("Slashing protection JSON successfully imported") - return &empty.Empty{}, nil -} diff --git a/validator/rpc/structs.go b/validator/rpc/structs.go index aa95a0800..f07fad661 100644 --- a/validator/rpc/structs.go +++ b/validator/rpc/structs.go @@ -89,3 +89,10 @@ type GetFeeRecipientByPubkeyResponse struct { type SetFeeRecipientByPubkeyRequest struct { Ethaddress string `json:"ethaddress"` } + +type ImportSlashingProtectionRequest struct { + SlashingProtectionJson string `json:"slashing_protection_json"` +} +type ExportSlashingProtectionResponse struct { + File string `json:"file"` +}