From 7dcdbe7d2bc5a1cfba22d28f319481e991040f92 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Wed, 16 Sep 2020 00:00:09 +0000 Subject: [PATCH] fix golint Signed-off-by: Leo Chen --- api/proto/message/message.pb.go | 1491 ++++++----------- .../syncing/downloader/proto/downloader.pb.go | 492 ++---- consensus/debug.go | 8 +- rpc/debug.go | 2 + 4 files changed, 730 insertions(+), 1263 deletions(-) diff --git a/api/proto/message/message.pb.go b/api/proto/message/message.pb.go index 601bce19f..cbcddebbb 100644 --- a/api/proto/message/message.pb.go +++ b/api/proto/message/message.pb.go @@ -1,95 +1,67 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v3.6.1 // source: message.proto package message import ( context "context" + fmt "fmt" + math "math" + proto "github.com/golang/protobuf/proto" 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" - reflect "reflect" - sync "sync" ) -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) -) +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // ServiceType indicates which service used to generate this message. type ServiceType int32 const ( - ServiceType_CONSENSUS ServiceType = 0 - // Deprecated: Do not use. - ServiceType_STAKING ServiceType = 1 - // Deprecated: Do not use. - ServiceType_DRAND ServiceType = 2 + ServiceType_CONSENSUS ServiceType = 0 + ServiceType_STAKING ServiceType = 1 // Deprecated: Do not use. + ServiceType_DRAND ServiceType = 2 // Deprecated: Do not use. ServiceType_CLIENT_SUPPORT ServiceType = 3 ) -// Enum value maps for ServiceType. -var ( - ServiceType_name = map[int32]string{ - 0: "CONSENSUS", - 1: "STAKING", - 2: "DRAND", - 3: "CLIENT_SUPPORT", - } - ServiceType_value = map[string]int32{ - "CONSENSUS": 0, - "STAKING": 1, - "DRAND": 2, - "CLIENT_SUPPORT": 3, - } -) - -func (x ServiceType) Enum() *ServiceType { - p := new(ServiceType) - *p = x - return p -} - -func (x ServiceType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ServiceType) Descriptor() protoreflect.EnumDescriptor { - return file_message_proto_enumTypes[0].Descriptor() +var ServiceType_name = map[int32]string{ + 0: "CONSENSUS", + 1: "STAKING", + 2: "DRAND", + 3: "CLIENT_SUPPORT", } -func (ServiceType) Type() protoreflect.EnumType { - return &file_message_proto_enumTypes[0] +var ServiceType_value = map[string]int32{ + "CONSENSUS": 0, + "STAKING": 1, + "DRAND": 2, + "CLIENT_SUPPORT": 3, } -func (x ServiceType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) +func (x ServiceType) String() string { + return proto.EnumName(ServiceType_name, int32(x)) } -// Deprecated: Use ServiceType.Descriptor instead. func (ServiceType) EnumDescriptor() ([]byte, []int) { - return file_message_proto_rawDescGZIP(), []int{0} + return fileDescriptor_33c57e4bae7b9afd, []int{0} } // MessageType indicates what is the type of this message. type MessageType int32 const ( - // Deprecated: Do not use. - MessageType_NEWNODE_BEACON_STAKING MessageType = 0 + MessageType_NEWNODE_BEACON_STAKING MessageType = 0 // Deprecated: Do not use. MessageType_ANNOUNCE MessageType = 1 MessageType_PREPARE MessageType = 2 MessageType_PREPARED MessageType = 3 @@ -97,121 +69,73 @@ const ( MessageType_COMMITTED MessageType = 5 MessageType_VIEWCHANGE MessageType = 6 MessageType_NEWVIEW MessageType = 7 - // Deprecated: Do not use. - MessageType_DRAND_INIT MessageType = 10 - // Deprecated: Do not use. - MessageType_DRAND_COMMIT MessageType = 11 - // Deprecated: Do not use. - MessageType_LOTTERY_REQUEST MessageType = 12 // it should be either ENTER or GETPLAYERS but it will be removed later. -) - -// Enum value maps for MessageType. -var ( - MessageType_name = map[int32]string{ - 0: "NEWNODE_BEACON_STAKING", - 1: "ANNOUNCE", - 2: "PREPARE", - 3: "PREPARED", - 4: "COMMIT", - 5: "COMMITTED", - 6: "VIEWCHANGE", - 7: "NEWVIEW", - 10: "DRAND_INIT", - 11: "DRAND_COMMIT", - 12: "LOTTERY_REQUEST", - } - MessageType_value = map[string]int32{ - "NEWNODE_BEACON_STAKING": 0, - "ANNOUNCE": 1, - "PREPARE": 2, - "PREPARED": 3, - "COMMIT": 4, - "COMMITTED": 5, - "VIEWCHANGE": 6, - "NEWVIEW": 7, - "DRAND_INIT": 10, - "DRAND_COMMIT": 11, - "LOTTERY_REQUEST": 12, - } + MessageType_DRAND_INIT MessageType = 10 // Deprecated: Do not use. + MessageType_DRAND_COMMIT MessageType = 11 // Deprecated: Do not use. + MessageType_LOTTERY_REQUEST MessageType = 12 // Deprecated: Do not use. ) -func (x MessageType) Enum() *MessageType { - p := new(MessageType) - *p = x - return p +var MessageType_name = map[int32]string{ + 0: "NEWNODE_BEACON_STAKING", + 1: "ANNOUNCE", + 2: "PREPARE", + 3: "PREPARED", + 4: "COMMIT", + 5: "COMMITTED", + 6: "VIEWCHANGE", + 7: "NEWVIEW", + 10: "DRAND_INIT", + 11: "DRAND_COMMIT", + 12: "LOTTERY_REQUEST", +} + +var MessageType_value = map[string]int32{ + "NEWNODE_BEACON_STAKING": 0, + "ANNOUNCE": 1, + "PREPARE": 2, + "PREPARED": 3, + "COMMIT": 4, + "COMMITTED": 5, + "VIEWCHANGE": 6, + "NEWVIEW": 7, + "DRAND_INIT": 10, + "DRAND_COMMIT": 11, + "LOTTERY_REQUEST": 12, } func (x MessageType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (MessageType) Descriptor() protoreflect.EnumDescriptor { - return file_message_proto_enumTypes[1].Descriptor() -} - -func (MessageType) Type() protoreflect.EnumType { - return &file_message_proto_enumTypes[1] -} - -func (x MessageType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) + return proto.EnumName(MessageType_name, int32(x)) } -// Deprecated: Use MessageType.Descriptor instead. func (MessageType) EnumDescriptor() ([]byte, []int) { - return file_message_proto_rawDescGZIP(), []int{1} + return fileDescriptor_33c57e4bae7b9afd, []int{1} } type LotteryRequest_Type int32 const ( - // Deprecated: Do not use. - LotteryRequest_ENTER LotteryRequest_Type = 0 - // Deprecated: Do not use. - LotteryRequest_RESULT LotteryRequest_Type = 1 - // Deprecated: Do not use. - LotteryRequest_PICK_WINNER LotteryRequest_Type = 2 -) - -// Enum value maps for LotteryRequest_Type. -var ( - LotteryRequest_Type_name = map[int32]string{ - 0: "ENTER", - 1: "RESULT", - 2: "PICK_WINNER", - } - LotteryRequest_Type_value = map[string]int32{ - "ENTER": 0, - "RESULT": 1, - "PICK_WINNER": 2, - } + LotteryRequest_ENTER LotteryRequest_Type = 0 // Deprecated: Do not use. + LotteryRequest_RESULT LotteryRequest_Type = 1 // Deprecated: Do not use. + LotteryRequest_PICK_WINNER LotteryRequest_Type = 2 // Deprecated: Do not use. ) -func (x LotteryRequest_Type) Enum() *LotteryRequest_Type { - p := new(LotteryRequest_Type) - *p = x - return p -} - -func (x LotteryRequest_Type) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (LotteryRequest_Type) Descriptor() protoreflect.EnumDescriptor { - return file_message_proto_enumTypes[2].Descriptor() +var LotteryRequest_Type_name = map[int32]string{ + 0: "ENTER", + 1: "RESULT", + 2: "PICK_WINNER", } -func (LotteryRequest_Type) Type() protoreflect.EnumType { - return &file_message_proto_enumTypes[2] +var LotteryRequest_Type_value = map[string]int32{ + "ENTER": 0, + "RESULT": 1, + "PICK_WINNER": 2, } -func (x LotteryRequest_Type) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) +func (x LotteryRequest_Type) String() string { + return proto.EnumName(LotteryRequest_Type_name, int32(x)) } -// Deprecated: Use LotteryRequest_Type.Descriptor instead. func (LotteryRequest_Type) EnumDescriptor() ([]byte, []int) { - return file_message_proto_rawDescGZIP(), []int{3, 0} + return fileDescriptor_33c57e4bae7b9afd, []int{3, 0} } // This is universal message for all communication protocols. @@ -220,116 +144,63 @@ func (LotteryRequest_Type) EnumDescriptor() ([]byte, []int) { // // The request field will be either one of the structure corresponding to the MessageType type. type Message struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - ServiceType ServiceType `protobuf:"varint,1,opt,name=service_type,json=serviceType,proto3,enum=message.ServiceType" json:"service_type,omitempty"` Type MessageType `protobuf:"varint,2,opt,name=type,proto3,enum=message.MessageType" json:"type,omitempty"` Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` - // Types that are assignable to Request: + // Types that are valid to be assigned to Request: // *Message_Staking // *Message_Consensus // *Message_Drand // *Message_Viewchange // *Message_LotteryRequest - Request isMessage_Request `protobuf_oneof:"request"` -} - -func (x *Message) Reset() { - *x = Message{} - if protoimpl.UnsafeEnabled { - mi := &file_message_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Message) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Message) ProtoMessage() {} - -func (x *Message) ProtoReflect() protoreflect.Message { - mi := &file_message_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) + Request isMessage_Request `protobuf_oneof:"request"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -// Deprecated: Use Message.ProtoReflect.Descriptor instead. +func (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} func (*Message) Descriptor() ([]byte, []int) { - return file_message_proto_rawDescGZIP(), []int{0} + return fileDescriptor_33c57e4bae7b9afd, []int{0} } -func (x *Message) GetServiceType() ServiceType { - if x != nil { - return x.ServiceType - } - return ServiceType_CONSENSUS +func (m *Message) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Message.Unmarshal(m, b) } - -func (x *Message) GetType() MessageType { - if x != nil { - return x.Type - } - return MessageType_NEWNODE_BEACON_STAKING +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) } - -func (x *Message) GetSignature() []byte { - if x != nil { - return x.Signature - } - return nil +func (m *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(m, src) } - -func (m *Message) GetRequest() isMessage_Request { - if m != nil { - return m.Request - } - return nil +func (m *Message) XXX_Size() int { + return xxx_messageInfo_Message.Size(m) } - -// Deprecated: Do not use. -func (x *Message) GetStaking() *StakingRequest { - if x, ok := x.GetRequest().(*Message_Staking); ok { - return x.Staking - } - return nil +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) } -func (x *Message) GetConsensus() *ConsensusRequest { - if x, ok := x.GetRequest().(*Message_Consensus); ok { - return x.Consensus - } - return nil -} +var xxx_messageInfo_Message proto.InternalMessageInfo -// Deprecated: Do not use. -func (x *Message) GetDrand() *DrandRequest { - if x, ok := x.GetRequest().(*Message_Drand); ok { - return x.Drand +func (m *Message) GetServiceType() ServiceType { + if m != nil { + return m.ServiceType } - return nil + return ServiceType_CONSENSUS } -func (x *Message) GetViewchange() *ViewChangeRequest { - if x, ok := x.GetRequest().(*Message_Viewchange); ok { - return x.Viewchange +func (m *Message) GetType() MessageType { + if m != nil { + return m.Type } - return nil + return MessageType_NEWNODE_BEACON_STAKING } -// Deprecated: Do not use. -func (x *Message) GetLotteryRequest() *LotteryRequest { - if x, ok := x.GetRequest().(*Message_LotteryRequest); ok { - return x.LotteryRequest +func (m *Message) GetSignature() []byte { + if m != nil { + return m.Signature } return nil } @@ -339,7 +210,6 @@ type isMessage_Request interface { } type Message_Staking struct { - // Deprecated: Do not use. Staking *StakingRequest `protobuf:"bytes,4,opt,name=staking,proto3,oneof"` } @@ -348,7 +218,6 @@ type Message_Consensus struct { } type Message_Drand struct { - // Deprecated: Do not use. Drand *DrandRequest `protobuf:"bytes,6,opt,name=drand,proto3,oneof"` } @@ -357,9 +226,6 @@ type Message_Viewchange struct { } type Message_LotteryRequest struct { - // Refactor this later after demo. - // - // Deprecated: Do not use. LotteryRequest *LotteryRequest `protobuf:"bytes,8,opt,name=lottery_request,json=lotteryRequest,proto3,oneof"` } @@ -373,77 +239,110 @@ func (*Message_Viewchange) isMessage_Request() {} func (*Message_LotteryRequest) isMessage_Request() {} -type Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ServiceType ServiceType `protobuf:"varint,1,opt,name=service_type,json=serviceType,proto3,enum=message.ServiceType" json:"service_type,omitempty"` - Type MessageType `protobuf:"varint,2,opt,name=type,proto3,enum=message.MessageType" json:"type,omitempty"` - // Types that are assignable to Response: - // *Response_LotteryResponse - Response isResponse_Response `protobuf_oneof:"response"` +func (m *Message) GetRequest() isMessage_Request { + if m != nil { + return m.Request + } + return nil } -func (x *Response) Reset() { - *x = Response{} - if protoimpl.UnsafeEnabled { - mi := &file_message_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +// Deprecated: Do not use. +func (m *Message) GetStaking() *StakingRequest { + if x, ok := m.GetRequest().(*Message_Staking); ok { + return x.Staking } + return nil } -func (x *Response) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *Message) GetConsensus() *ConsensusRequest { + if x, ok := m.GetRequest().(*Message_Consensus); ok { + return x.Consensus + } + return nil } -func (*Response) ProtoMessage() {} - -func (x *Response) ProtoReflect() protoreflect.Message { - mi := &file_message_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +// Deprecated: Do not use. +func (m *Message) GetDrand() *DrandRequest { + if x, ok := m.GetRequest().(*Message_Drand); ok { + return x.Drand } - return mi.MessageOf(x) + return nil } -// Deprecated: Use Response.ProtoReflect.Descriptor instead. -func (*Response) Descriptor() ([]byte, []int) { - return file_message_proto_rawDescGZIP(), []int{1} +func (m *Message) GetViewchange() *ViewChangeRequest { + if x, ok := m.GetRequest().(*Message_Viewchange); ok { + return x.Viewchange + } + return nil } -func (x *Response) GetServiceType() ServiceType { - if x != nil { - return x.ServiceType +// Deprecated: Do not use. +func (m *Message) GetLotteryRequest() *LotteryRequest { + if x, ok := m.GetRequest().(*Message_LotteryRequest); ok { + return x.LotteryRequest } - return ServiceType_CONSENSUS + return nil } -func (x *Response) GetType() MessageType { - if x != nil { - return x.Type +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Message) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Message_Staking)(nil), + (*Message_Consensus)(nil), + (*Message_Drand)(nil), + (*Message_Viewchange)(nil), + (*Message_LotteryRequest)(nil), } - return MessageType_NEWNODE_BEACON_STAKING } -func (m *Response) GetResponse() isResponse_Response { +type Response struct { + ServiceType ServiceType `protobuf:"varint,1,opt,name=service_type,json=serviceType,proto3,enum=message.ServiceType" json:"service_type,omitempty"` + Type MessageType `protobuf:"varint,2,opt,name=type,proto3,enum=message.MessageType" json:"type,omitempty"` + // Types that are valid to be assigned to Response: + // *Response_LotteryResponse + Response isResponse_Response `protobuf_oneof:"response"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Response) Reset() { *m = Response{} } +func (m *Response) String() string { return proto.CompactTextString(m) } +func (*Response) ProtoMessage() {} +func (*Response) Descriptor() ([]byte, []int) { + return fileDescriptor_33c57e4bae7b9afd, []int{1} +} + +func (m *Response) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Response.Unmarshal(m, b) +} +func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Response.Marshal(b, m, deterministic) +} +func (m *Response) XXX_Merge(src proto.Message) { + xxx_messageInfo_Response.Merge(m, src) +} +func (m *Response) XXX_Size() int { + return xxx_messageInfo_Response.Size(m) +} +func (m *Response) XXX_DiscardUnknown() { + xxx_messageInfo_Response.DiscardUnknown(m) +} + +var xxx_messageInfo_Response proto.InternalMessageInfo + +func (m *Response) GetServiceType() ServiceType { if m != nil { - return m.Response + return m.ServiceType } - return nil + return ServiceType_CONSENSUS } -// Deprecated: Do not use. -func (x *Response) GetLotteryResponse() *LotteryResponse { - if x, ok := x.GetResponse().(*Response_LotteryResponse); ok { - return x.LotteryResponse +func (m *Response) GetType() MessageType { + if m != nil { + return m.Type } - return nil + return MessageType_NEWNODE_BEACON_STAKING } type isResponse_Response interface { @@ -451,854 +350,574 @@ type isResponse_Response interface { } type Response_LotteryResponse struct { - // Deprecated: Do not use. LotteryResponse *LotteryResponse `protobuf:"bytes,3,opt,name=lottery_response,json=lotteryResponse,proto3,oneof"` } func (*Response_LotteryResponse) isResponse_Response() {} -type LotteryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Deprecated: Do not use. - Players []string `protobuf:"bytes,2,rep,name=players,proto3" json:"players,omitempty"` - // Deprecated: Do not use. - Balances []string `protobuf:"bytes,3,rep,name=balances,proto3" json:"balances,omitempty"` -} - -func (x *LotteryResponse) Reset() { - *x = LotteryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_message_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (m *Response) GetResponse() isResponse_Response { + if m != nil { + return m.Response } + return nil } -func (x *LotteryResponse) String() string { - return protoimpl.X.MessageStringOf(x) +// Deprecated: Do not use. +func (m *Response) GetLotteryResponse() *LotteryResponse { + if x, ok := m.GetResponse().(*Response_LotteryResponse); ok { + return x.LotteryResponse + } + return nil } -func (*LotteryResponse) ProtoMessage() {} - -func (x *LotteryResponse) ProtoReflect() protoreflect.Message { - mi := &file_message_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Response) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Response_LotteryResponse)(nil), } - return mi.MessageOf(x) } -// Deprecated: Use LotteryResponse.ProtoReflect.Descriptor instead. +type LotteryResponse struct { + Players []string `protobuf:"bytes,2,rep,name=players,proto3" json:"players,omitempty"` // Deprecated: Do not use. + Balances []string `protobuf:"bytes,3,rep,name=balances,proto3" json:"balances,omitempty"` // Deprecated: Do not use. + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LotteryResponse) Reset() { *m = LotteryResponse{} } +func (m *LotteryResponse) String() string { return proto.CompactTextString(m) } +func (*LotteryResponse) ProtoMessage() {} func (*LotteryResponse) Descriptor() ([]byte, []int) { - return file_message_proto_rawDescGZIP(), []int{2} + return fileDescriptor_33c57e4bae7b9afd, []int{2} +} + +func (m *LotteryResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LotteryResponse.Unmarshal(m, b) +} +func (m *LotteryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LotteryResponse.Marshal(b, m, deterministic) } +func (m *LotteryResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_LotteryResponse.Merge(m, src) +} +func (m *LotteryResponse) XXX_Size() int { + return xxx_messageInfo_LotteryResponse.Size(m) +} +func (m *LotteryResponse) XXX_DiscardUnknown() { + xxx_messageInfo_LotteryResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_LotteryResponse proto.InternalMessageInfo // Deprecated: Do not use. -func (x *LotteryResponse) GetPlayers() []string { - if x != nil { - return x.Players +func (m *LotteryResponse) GetPlayers() []string { + if m != nil { + return m.Players } return nil } // Deprecated: Do not use. -func (x *LotteryResponse) GetBalances() []string { - if x != nil { - return x.Balances +func (m *LotteryResponse) GetBalances() []string { + if m != nil { + return m.Balances } return nil } type LotteryRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Deprecated: Do not use. - Type LotteryRequest_Type `protobuf:"varint,1,opt,name=type,proto3,enum=message.LotteryRequest_Type" json:"type,omitempty"` - // Deprecated: Do not use. - PrivateKey string `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` - // Deprecated: Do not use. - Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *LotteryRequest) Reset() { - *x = LotteryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_message_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + Type LotteryRequest_Type `protobuf:"varint,1,opt,name=type,proto3,enum=message.LotteryRequest_Type" json:"type,omitempty"` // Deprecated: Do not use. + PrivateKey string `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` // Deprecated: Do not use. + Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` // Deprecated: Do not use. + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *LotteryRequest) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *LotteryRequest) Reset() { *m = LotteryRequest{} } +func (m *LotteryRequest) String() string { return proto.CompactTextString(m) } +func (*LotteryRequest) ProtoMessage() {} +func (*LotteryRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_33c57e4bae7b9afd, []int{3} } -func (*LotteryRequest) ProtoMessage() {} - -func (x *LotteryRequest) ProtoReflect() protoreflect.Message { - mi := &file_message_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) +func (m *LotteryRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LotteryRequest.Unmarshal(m, b) } - -// Deprecated: Use LotteryRequest.ProtoReflect.Descriptor instead. -func (*LotteryRequest) Descriptor() ([]byte, []int) { - return file_message_proto_rawDescGZIP(), []int{3} +func (m *LotteryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LotteryRequest.Marshal(b, m, deterministic) } +func (m *LotteryRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_LotteryRequest.Merge(m, src) +} +func (m *LotteryRequest) XXX_Size() int { + return xxx_messageInfo_LotteryRequest.Size(m) +} +func (m *LotteryRequest) XXX_DiscardUnknown() { + xxx_messageInfo_LotteryRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_LotteryRequest proto.InternalMessageInfo // Deprecated: Do not use. -func (x *LotteryRequest) GetType() LotteryRequest_Type { - if x != nil { - return x.Type +func (m *LotteryRequest) GetType() LotteryRequest_Type { + if m != nil { + return m.Type } return LotteryRequest_ENTER } // Deprecated: Do not use. -func (x *LotteryRequest) GetPrivateKey() string { - if x != nil { - return x.PrivateKey +func (m *LotteryRequest) GetPrivateKey() string { + if m != nil { + return m.PrivateKey } return "" } // Deprecated: Do not use. -func (x *LotteryRequest) GetAmount() int64 { - if x != nil { - return x.Amount +func (m *LotteryRequest) GetAmount() int64 { + if m != nil { + return m.Amount } return 0 } // Staking Request from new node to beacon node. type StakingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Deprecated: Do not use. - Transaction []byte `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` - // Deprecated: Do not use. - NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` -} - -func (x *StakingRequest) Reset() { - *x = StakingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_message_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + Transaction []byte `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` // Deprecated: Do not use. + NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` // Deprecated: Do not use. + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *StakingRequest) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *StakingRequest) Reset() { *m = StakingRequest{} } +func (m *StakingRequest) String() string { return proto.CompactTextString(m) } +func (*StakingRequest) ProtoMessage() {} +func (*StakingRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_33c57e4bae7b9afd, []int{4} } -func (*StakingRequest) ProtoMessage() {} - -func (x *StakingRequest) ProtoReflect() protoreflect.Message { - mi := &file_message_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) +func (m *StakingRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StakingRequest.Unmarshal(m, b) } - -// Deprecated: Use StakingRequest.ProtoReflect.Descriptor instead. -func (*StakingRequest) Descriptor() ([]byte, []int) { - return file_message_proto_rawDescGZIP(), []int{4} +func (m *StakingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StakingRequest.Marshal(b, m, deterministic) +} +func (m *StakingRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_StakingRequest.Merge(m, src) +} +func (m *StakingRequest) XXX_Size() int { + return xxx_messageInfo_StakingRequest.Size(m) +} +func (m *StakingRequest) XXX_DiscardUnknown() { + xxx_messageInfo_StakingRequest.DiscardUnknown(m) } +var xxx_messageInfo_StakingRequest proto.InternalMessageInfo + // Deprecated: Do not use. -func (x *StakingRequest) GetTransaction() []byte { - if x != nil { - return x.Transaction +func (m *StakingRequest) GetTransaction() []byte { + if m != nil { + return m.Transaction } return nil } // Deprecated: Do not use. -func (x *StakingRequest) GetNodeId() string { - if x != nil { - return x.NodeId +func (m *StakingRequest) GetNodeId() string { + if m != nil { + return m.NodeId } return "" } type ConsensusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ViewId uint64 `protobuf:"varint,1,opt,name=view_id,json=viewId,proto3" json:"view_id,omitempty"` - BlockNum uint64 `protobuf:"varint,2,opt,name=block_num,json=blockNum,proto3" json:"block_num,omitempty"` - ShardId uint32 `protobuf:"varint,3,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` - BlockHash []byte `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - Block []byte `protobuf:"bytes,5,opt,name=block,proto3" json:"block,omitempty"` - SenderPubkey []byte `protobuf:"bytes,6,opt,name=sender_pubkey,json=senderPubkey,proto3" json:"sender_pubkey,omitempty"` - Payload []byte `protobuf:"bytes,7,opt,name=payload,proto3" json:"payload,omitempty"` - SenderPubkeyBitmap []byte `protobuf:"bytes,8,opt,name=sender_pubkey_bitmap,json=senderPubkeyBitmap,proto3" json:"sender_pubkey_bitmap,omitempty"` -} - -func (x *ConsensusRequest) Reset() { - *x = ConsensusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_message_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + ViewId uint64 `protobuf:"varint,1,opt,name=view_id,json=viewId,proto3" json:"view_id,omitempty"` + BlockNum uint64 `protobuf:"varint,2,opt,name=block_num,json=blockNum,proto3" json:"block_num,omitempty"` + ShardId uint32 `protobuf:"varint,3,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` + BlockHash []byte `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + Block []byte `protobuf:"bytes,5,opt,name=block,proto3" json:"block,omitempty"` + SenderPubkey []byte `protobuf:"bytes,6,opt,name=sender_pubkey,json=senderPubkey,proto3" json:"sender_pubkey,omitempty"` + Payload []byte `protobuf:"bytes,7,opt,name=payload,proto3" json:"payload,omitempty"` + SenderPubkeyBitmap []byte `protobuf:"bytes,8,opt,name=sender_pubkey_bitmap,json=senderPubkeyBitmap,proto3" json:"sender_pubkey_bitmap,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ConsensusRequest) Reset() { *m = ConsensusRequest{} } +func (m *ConsensusRequest) String() string { return proto.CompactTextString(m) } +func (*ConsensusRequest) ProtoMessage() {} +func (*ConsensusRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_33c57e4bae7b9afd, []int{5} } -func (x *ConsensusRequest) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *ConsensusRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ConsensusRequest.Unmarshal(m, b) } - -func (*ConsensusRequest) ProtoMessage() {} - -func (x *ConsensusRequest) ProtoReflect() protoreflect.Message { - mi := &file_message_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) +func (m *ConsensusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ConsensusRequest.Marshal(b, m, deterministic) } - -// Deprecated: Use ConsensusRequest.ProtoReflect.Descriptor instead. -func (*ConsensusRequest) Descriptor() ([]byte, []int) { - return file_message_proto_rawDescGZIP(), []int{5} +func (m *ConsensusRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConsensusRequest.Merge(m, src) +} +func (m *ConsensusRequest) XXX_Size() int { + return xxx_messageInfo_ConsensusRequest.Size(m) +} +func (m *ConsensusRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ConsensusRequest.DiscardUnknown(m) } -func (x *ConsensusRequest) GetViewId() uint64 { - if x != nil { - return x.ViewId +var xxx_messageInfo_ConsensusRequest proto.InternalMessageInfo + +func (m *ConsensusRequest) GetViewId() uint64 { + if m != nil { + return m.ViewId } return 0 } -func (x *ConsensusRequest) GetBlockNum() uint64 { - if x != nil { - return x.BlockNum +func (m *ConsensusRequest) GetBlockNum() uint64 { + if m != nil { + return m.BlockNum } return 0 } -func (x *ConsensusRequest) GetShardId() uint32 { - if x != nil { - return x.ShardId +func (m *ConsensusRequest) GetShardId() uint32 { + if m != nil { + return m.ShardId } return 0 } -func (x *ConsensusRequest) GetBlockHash() []byte { - if x != nil { - return x.BlockHash +func (m *ConsensusRequest) GetBlockHash() []byte { + if m != nil { + return m.BlockHash } return nil } -func (x *ConsensusRequest) GetBlock() []byte { - if x != nil { - return x.Block +func (m *ConsensusRequest) GetBlock() []byte { + if m != nil { + return m.Block } return nil } -func (x *ConsensusRequest) GetSenderPubkey() []byte { - if x != nil { - return x.SenderPubkey +func (m *ConsensusRequest) GetSenderPubkey() []byte { + if m != nil { + return m.SenderPubkey } return nil } -func (x *ConsensusRequest) GetPayload() []byte { - if x != nil { - return x.Payload +func (m *ConsensusRequest) GetPayload() []byte { + if m != nil { + return m.Payload } return nil } -func (x *ConsensusRequest) GetSenderPubkeyBitmap() []byte { - if x != nil { - return x.SenderPubkeyBitmap +func (m *ConsensusRequest) GetSenderPubkeyBitmap() []byte { + if m != nil { + return m.SenderPubkeyBitmap } return nil } type DrandRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Deprecated: Do not use. - ShardId uint32 `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` - // Deprecated: Do not use. - SenderPubkey []byte `protobuf:"bytes,2,opt,name=sender_pubkey,json=senderPubkey,proto3" json:"sender_pubkey,omitempty"` - // Deprecated: Do not use. - BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - // Deprecated: Do not use. - Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` -} - -func (x *DrandRequest) Reset() { - *x = DrandRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_message_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + ShardId uint32 `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` // Deprecated: Do not use. + SenderPubkey []byte `protobuf:"bytes,2,opt,name=sender_pubkey,json=senderPubkey,proto3" json:"sender_pubkey,omitempty"` // Deprecated: Do not use. + BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // Deprecated: Do not use. + Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` // Deprecated: Do not use. + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DrandRequest) Reset() { *m = DrandRequest{} } +func (m *DrandRequest) String() string { return proto.CompactTextString(m) } +func (*DrandRequest) ProtoMessage() {} +func (*DrandRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_33c57e4bae7b9afd, []int{6} } -func (x *DrandRequest) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *DrandRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DrandRequest.Unmarshal(m, b) } - -func (*DrandRequest) ProtoMessage() {} - -func (x *DrandRequest) ProtoReflect() protoreflect.Message { - mi := &file_message_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) +func (m *DrandRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DrandRequest.Marshal(b, m, deterministic) } - -// Deprecated: Use DrandRequest.ProtoReflect.Descriptor instead. -func (*DrandRequest) Descriptor() ([]byte, []int) { - return file_message_proto_rawDescGZIP(), []int{6} +func (m *DrandRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DrandRequest.Merge(m, src) +} +func (m *DrandRequest) XXX_Size() int { + return xxx_messageInfo_DrandRequest.Size(m) +} +func (m *DrandRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DrandRequest.DiscardUnknown(m) } +var xxx_messageInfo_DrandRequest proto.InternalMessageInfo + // Deprecated: Do not use. -func (x *DrandRequest) GetShardId() uint32 { - if x != nil { - return x.ShardId +func (m *DrandRequest) GetShardId() uint32 { + if m != nil { + return m.ShardId } return 0 } // Deprecated: Do not use. -func (x *DrandRequest) GetSenderPubkey() []byte { - if x != nil { - return x.SenderPubkey +func (m *DrandRequest) GetSenderPubkey() []byte { + if m != nil { + return m.SenderPubkey } return nil } // Deprecated: Do not use. -func (x *DrandRequest) GetBlockHash() []byte { - if x != nil { - return x.BlockHash +func (m *DrandRequest) GetBlockHash() []byte { + if m != nil { + return m.BlockHash } return nil } // Deprecated: Do not use. -func (x *DrandRequest) GetPayload() []byte { - if x != nil { - return x.Payload +func (m *DrandRequest) GetPayload() []byte { + if m != nil { + return m.Payload } return nil } type ViewChangeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - ViewId uint64 `protobuf:"varint,1,opt,name=view_id,json=viewId,proto3" json:"view_id,omitempty"` BlockNum uint64 `protobuf:"varint,2,opt,name=block_num,json=blockNum,proto3" json:"block_num,omitempty"` ShardId uint32 `protobuf:"varint,3,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` SenderPubkey []byte `protobuf:"bytes,4,opt,name=sender_pubkey,json=senderPubkey,proto3" json:"sender_pubkey,omitempty"` LeaderPubkey []byte `protobuf:"bytes,5,opt,name=leader_pubkey,json=leaderPubkey,proto3" json:"leader_pubkey,omitempty"` - Payload []byte `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` // message payload: either m1 type or m2 type - ViewchangeSig []byte `protobuf:"bytes,7,opt,name=viewchange_sig,json=viewchangeSig,proto3" json:"viewchange_sig,omitempty"` // signature on payload - ViewidSig []byte `protobuf:"bytes,8,opt,name=viewid_sig,json=viewidSig,proto3" json:"viewid_sig,omitempty"` // signature on view_id + Payload []byte `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` + ViewchangeSig []byte `protobuf:"bytes,7,opt,name=viewchange_sig,json=viewchangeSig,proto3" json:"viewchange_sig,omitempty"` + ViewidSig []byte `protobuf:"bytes,8,opt,name=viewid_sig,json=viewidSig,proto3" json:"viewid_sig,omitempty"` // below is for newview message only // only need 1 valid m1 type message which is in payload - M2Aggsigs []byte `protobuf:"bytes,9,opt,name=m2_aggsigs,json=m2Aggsigs,proto3" json:"m2_aggsigs,omitempty"` // m2: |nil| - M2Bitmap []byte `protobuf:"bytes,10,opt,name=m2_bitmap,json=m2Bitmap,proto3" json:"m2_bitmap,omitempty"` - M3Aggsigs []byte `protobuf:"bytes,11,opt,name=m3_aggsigs,json=m3Aggsigs,proto3" json:"m3_aggsigs,omitempty"` // m3: |viewID| - M3Bitmap []byte `protobuf:"bytes,12,opt,name=m3_bitmap,json=m3Bitmap,proto3" json:"m3_bitmap,omitempty"` - PreparedBlock []byte `protobuf:"bytes,13,opt,name=prepared_block,json=preparedBlock,proto3" json:"prepared_block,omitempty"` -} - -func (x *ViewChangeRequest) Reset() { - *x = ViewChangeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_message_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + M2Aggsigs []byte `protobuf:"bytes,9,opt,name=m2_aggsigs,json=m2Aggsigs,proto3" json:"m2_aggsigs,omitempty"` + M2Bitmap []byte `protobuf:"bytes,10,opt,name=m2_bitmap,json=m2Bitmap,proto3" json:"m2_bitmap,omitempty"` + M3Aggsigs []byte `protobuf:"bytes,11,opt,name=m3_aggsigs,json=m3Aggsigs,proto3" json:"m3_aggsigs,omitempty"` + M3Bitmap []byte `protobuf:"bytes,12,opt,name=m3_bitmap,json=m3Bitmap,proto3" json:"m3_bitmap,omitempty"` + PreparedBlock []byte `protobuf:"bytes,13,opt,name=prepared_block,json=preparedBlock,proto3" json:"prepared_block,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ViewChangeRequest) Reset() { *m = ViewChangeRequest{} } +func (m *ViewChangeRequest) String() string { return proto.CompactTextString(m) } +func (*ViewChangeRequest) ProtoMessage() {} +func (*ViewChangeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_33c57e4bae7b9afd, []int{7} } -func (x *ViewChangeRequest) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *ViewChangeRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ViewChangeRequest.Unmarshal(m, b) } - -func (*ViewChangeRequest) ProtoMessage() {} - -func (x *ViewChangeRequest) ProtoReflect() protoreflect.Message { - mi := &file_message_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) +func (m *ViewChangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ViewChangeRequest.Marshal(b, m, deterministic) } - -// Deprecated: Use ViewChangeRequest.ProtoReflect.Descriptor instead. -func (*ViewChangeRequest) Descriptor() ([]byte, []int) { - return file_message_proto_rawDescGZIP(), []int{7} +func (m *ViewChangeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ViewChangeRequest.Merge(m, src) +} +func (m *ViewChangeRequest) XXX_Size() int { + return xxx_messageInfo_ViewChangeRequest.Size(m) } +func (m *ViewChangeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ViewChangeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ViewChangeRequest proto.InternalMessageInfo -func (x *ViewChangeRequest) GetViewId() uint64 { - if x != nil { - return x.ViewId +func (m *ViewChangeRequest) GetViewId() uint64 { + if m != nil { + return m.ViewId } return 0 } -func (x *ViewChangeRequest) GetBlockNum() uint64 { - if x != nil { - return x.BlockNum +func (m *ViewChangeRequest) GetBlockNum() uint64 { + if m != nil { + return m.BlockNum } return 0 } -func (x *ViewChangeRequest) GetShardId() uint32 { - if x != nil { - return x.ShardId +func (m *ViewChangeRequest) GetShardId() uint32 { + if m != nil { + return m.ShardId } return 0 } -func (x *ViewChangeRequest) GetSenderPubkey() []byte { - if x != nil { - return x.SenderPubkey +func (m *ViewChangeRequest) GetSenderPubkey() []byte { + if m != nil { + return m.SenderPubkey } return nil } -func (x *ViewChangeRequest) GetLeaderPubkey() []byte { - if x != nil { - return x.LeaderPubkey +func (m *ViewChangeRequest) GetLeaderPubkey() []byte { + if m != nil { + return m.LeaderPubkey } return nil } -func (x *ViewChangeRequest) GetPayload() []byte { - if x != nil { - return x.Payload +func (m *ViewChangeRequest) GetPayload() []byte { + if m != nil { + return m.Payload } return nil } -func (x *ViewChangeRequest) GetViewchangeSig() []byte { - if x != nil { - return x.ViewchangeSig +func (m *ViewChangeRequest) GetViewchangeSig() []byte { + if m != nil { + return m.ViewchangeSig } return nil } -func (x *ViewChangeRequest) GetViewidSig() []byte { - if x != nil { - return x.ViewidSig +func (m *ViewChangeRequest) GetViewidSig() []byte { + if m != nil { + return m.ViewidSig } return nil } -func (x *ViewChangeRequest) GetM2Aggsigs() []byte { - if x != nil { - return x.M2Aggsigs +func (m *ViewChangeRequest) GetM2Aggsigs() []byte { + if m != nil { + return m.M2Aggsigs } return nil } -func (x *ViewChangeRequest) GetM2Bitmap() []byte { - if x != nil { - return x.M2Bitmap +func (m *ViewChangeRequest) GetM2Bitmap() []byte { + if m != nil { + return m.M2Bitmap } return nil } -func (x *ViewChangeRequest) GetM3Aggsigs() []byte { - if x != nil { - return x.M3Aggsigs +func (m *ViewChangeRequest) GetM3Aggsigs() []byte { + if m != nil { + return m.M3Aggsigs } return nil } -func (x *ViewChangeRequest) GetM3Bitmap() []byte { - if x != nil { - return x.M3Bitmap +func (m *ViewChangeRequest) GetM3Bitmap() []byte { + if m != nil { + return m.M3Bitmap } return nil } -func (x *ViewChangeRequest) GetPreparedBlock() []byte { - if x != nil { - return x.PreparedBlock +func (m *ViewChangeRequest) GetPreparedBlock() []byte { + if m != nil { + return m.PreparedBlock } return nil } -var File_message_proto protoreflect.FileDescriptor - -var file_message_proto_rawDesc = []byte{ - 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xc2, 0x03, 0x0a, 0x07, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, - 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x07, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x39, - 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x73, - 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, - 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x05, 0x64, 0x72, 0x61, - 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x2e, 0x44, 0x72, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, - 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x05, 0x64, 0x72, 0x61, 0x6e, 0x64, 0x12, 0x3c, 0x0a, 0x0a, - 0x76, 0x69, 0x65, 0x77, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0a, - 0x76, 0x69, 0x65, 0x77, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x6c, 0x6f, - 0x74, 0x74, 0x65, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4c, 0x6f, - 0x74, 0x74, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x02, 0x18, 0x01, - 0x48, 0x00, 0x52, 0x0e, 0x6c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xc4, 0x01, - 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x49, 0x0a, - 0x10, 0x6c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x2e, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0f, 0x6c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x0a, 0x0f, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x70, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x0a, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x62, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x73, 0x22, 0xc3, 0x01, 0x0a, 0x0e, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x2e, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x54, 0x79, 0x70, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, - 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x3a, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x05, 0x45, 0x4e, 0x54, 0x45, 0x52, - 0x10, 0x00, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0e, 0x0a, 0x06, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, - 0x10, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x13, 0x0a, 0x0b, 0x50, 0x49, 0x43, 0x4b, 0x5f, 0x57, - 0x49, 0x4e, 0x4e, 0x45, 0x52, 0x10, 0x02, 0x1a, 0x02, 0x08, 0x01, 0x22, 0x53, 0x0a, 0x0e, 0x53, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, - 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, - 0x22, 0x89, 0x02, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x76, 0x69, 0x65, 0x77, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x76, 0x69, 0x65, 0x77, 0x49, 0x64, 0x12, 0x1b, - 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x12, 0x19, 0x0a, 0x08, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x23, 0x0a, 0x0d, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0c, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, - 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x69, 0x74, 0x6d, - 0x61, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x42, 0x69, 0x74, 0x6d, 0x61, 0x70, 0x22, 0x97, 0x01, 0x0a, - 0x0c, 0x44, 0x72, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, - 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, - 0x02, 0x18, 0x01, 0x52, 0x07, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0d, - 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, - 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, - 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x70, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xad, 0x03, 0x0a, 0x11, 0x56, 0x69, 0x65, 0x77, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, - 0x76, 0x69, 0x65, 0x77, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x76, - 0x69, 0x65, 0x77, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, - 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, - 0x75, 0x6d, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x12, 0x23, 0x0a, - 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, - 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x75, 0x62, - 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6c, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x76, 0x69, 0x65, 0x77, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, - 0x73, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x76, 0x69, 0x65, 0x77, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x69, 0x65, 0x77, - 0x69, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x76, 0x69, - 0x65, 0x77, 0x69, 0x64, 0x53, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x32, 0x5f, 0x61, 0x67, - 0x67, 0x73, 0x69, 0x67, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6d, 0x32, 0x41, - 0x67, 0x67, 0x73, 0x69, 0x67, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x32, 0x5f, 0x62, 0x69, 0x74, - 0x6d, 0x61, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x32, 0x42, 0x69, 0x74, - 0x6d, 0x61, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x33, 0x5f, 0x61, 0x67, 0x67, 0x73, 0x69, 0x67, - 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6d, 0x33, 0x41, 0x67, 0x67, 0x73, 0x69, - 0x67, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x33, 0x5f, 0x62, 0x69, 0x74, 0x6d, 0x61, 0x70, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x33, 0x42, 0x69, 0x74, 0x6d, 0x61, 0x70, 0x12, - 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, - 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2a, 0x50, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x4e, 0x53, 0x45, 0x4e, 0x53, - 0x55, 0x53, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x07, 0x53, 0x54, 0x41, 0x4b, 0x49, 0x4e, 0x47, 0x10, - 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0d, 0x0a, 0x05, 0x44, 0x52, 0x41, 0x4e, 0x44, 0x10, 0x02, - 0x1a, 0x02, 0x08, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x53, - 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x03, 0x2a, 0xd1, 0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x16, 0x4e, 0x45, 0x57, 0x4e, - 0x4f, 0x44, 0x45, 0x5f, 0x42, 0x45, 0x41, 0x43, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x4b, 0x49, - 0x4e, 0x47, 0x10, 0x00, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x4e, 0x4e, 0x4f, - 0x55, 0x4e, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, - 0x45, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x45, 0x44, 0x10, - 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x04, 0x12, 0x0d, 0x0a, - 0x09, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x54, 0x45, 0x44, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, - 0x56, 0x49, 0x45, 0x57, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, - 0x4e, 0x45, 0x57, 0x56, 0x49, 0x45, 0x57, 0x10, 0x07, 0x12, 0x12, 0x0a, 0x0a, 0x44, 0x52, 0x41, - 0x4e, 0x44, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x10, 0x0a, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x14, 0x0a, - 0x0c, 0x44, 0x52, 0x41, 0x4e, 0x44, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x0b, 0x1a, - 0x02, 0x08, 0x01, 0x12, 0x17, 0x0a, 0x0f, 0x4c, 0x4f, 0x54, 0x54, 0x45, 0x52, 0x59, 0x5f, 0x52, - 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x0c, 0x1a, 0x02, 0x08, 0x01, 0x32, 0x41, 0x0a, 0x0d, - 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x30, 0x0a, - 0x07, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x11, 0x2e, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_message_proto_rawDescOnce sync.Once - file_message_proto_rawDescData = file_message_proto_rawDesc -) - -func file_message_proto_rawDescGZIP() []byte { - file_message_proto_rawDescOnce.Do(func() { - file_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_proto_rawDescData) - }) - return file_message_proto_rawDescData -} - -var file_message_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_message_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_message_proto_goTypes = []interface{}{ - (ServiceType)(0), // 0: message.ServiceType - (MessageType)(0), // 1: message.MessageType - (LotteryRequest_Type)(0), // 2: message.LotteryRequest.Type - (*Message)(nil), // 3: message.Message - (*Response)(nil), // 4: message.Response - (*LotteryResponse)(nil), // 5: message.LotteryResponse - (*LotteryRequest)(nil), // 6: message.LotteryRequest - (*StakingRequest)(nil), // 7: message.StakingRequest - (*ConsensusRequest)(nil), // 8: message.ConsensusRequest - (*DrandRequest)(nil), // 9: message.DrandRequest - (*ViewChangeRequest)(nil), // 10: message.ViewChangeRequest -} -var file_message_proto_depIdxs = []int32{ - 0, // 0: message.Message.service_type:type_name -> message.ServiceType - 1, // 1: message.Message.type:type_name -> message.MessageType - 7, // 2: message.Message.staking:type_name -> message.StakingRequest - 8, // 3: message.Message.consensus:type_name -> message.ConsensusRequest - 9, // 4: message.Message.drand:type_name -> message.DrandRequest - 10, // 5: message.Message.viewchange:type_name -> message.ViewChangeRequest - 6, // 6: message.Message.lottery_request:type_name -> message.LotteryRequest - 0, // 7: message.Response.service_type:type_name -> message.ServiceType - 1, // 8: message.Response.type:type_name -> message.MessageType - 5, // 9: message.Response.lottery_response:type_name -> message.LotteryResponse - 2, // 10: message.LotteryRequest.type:type_name -> message.LotteryRequest.Type - 3, // 11: message.ClientService.Process:input_type -> message.Message - 4, // 12: message.ClientService.Process:output_type -> message.Response - 12, // [12:13] is the sub-list for method output_type - 11, // [11:12] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name -} - -func init() { file_message_proto_init() } -func file_message_proto_init() { - if File_message_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_message_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_message_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LotteryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_message_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LotteryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_message_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StakingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_message_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConsensusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_message_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DrandRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_message_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ViewChangeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_message_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Message_Staking)(nil), - (*Message_Consensus)(nil), - (*Message_Drand)(nil), - (*Message_Viewchange)(nil), - (*Message_LotteryRequest)(nil), - } - file_message_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*Response_LotteryResponse)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_message_proto_rawDesc, - NumEnums: 3, - NumMessages: 8, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_message_proto_goTypes, - DependencyIndexes: file_message_proto_depIdxs, - EnumInfos: file_message_proto_enumTypes, - MessageInfos: file_message_proto_msgTypes, - }.Build() - File_message_proto = out.File - file_message_proto_rawDesc = nil - file_message_proto_goTypes = nil - file_message_proto_depIdxs = nil +func init() { + proto.RegisterEnum("message.ServiceType", ServiceType_name, ServiceType_value) + proto.RegisterEnum("message.MessageType", MessageType_name, MessageType_value) + proto.RegisterEnum("message.LotteryRequest_Type", LotteryRequest_Type_name, LotteryRequest_Type_value) + proto.RegisterType((*Message)(nil), "message.Message") + proto.RegisterType((*Response)(nil), "message.Response") + proto.RegisterType((*LotteryResponse)(nil), "message.LotteryResponse") + proto.RegisterType((*LotteryRequest)(nil), "message.LotteryRequest") + proto.RegisterType((*StakingRequest)(nil), "message.StakingRequest") + proto.RegisterType((*ConsensusRequest)(nil), "message.ConsensusRequest") + proto.RegisterType((*DrandRequest)(nil), "message.DrandRequest") + proto.RegisterType((*ViewChangeRequest)(nil), "message.ViewChangeRequest") +} + +func init() { + proto.RegisterFile("message.proto", fileDescriptor_33c57e4bae7b9afd) +} + +var fileDescriptor_33c57e4bae7b9afd = []byte{ + // 1031 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x5d, 0x6e, 0xdb, 0x46, + 0x10, 0x36, 0xf5, 0x47, 0x69, 0x48, 0xca, 0xcc, 0xd6, 0xad, 0x19, 0xc7, 0x09, 0x5c, 0xb9, 0x41, + 0x8d, 0x3c, 0x18, 0xa9, 0x5c, 0x20, 0x68, 0xd1, 0x17, 0x59, 0x62, 0x63, 0xc2, 0x36, 0xa5, 0xae, + 0xe8, 0x18, 0x7d, 0x22, 0xd6, 0xe2, 0x42, 0x26, 0x2c, 0x51, 0x2c, 0x97, 0x72, 0xa0, 0x23, 0xf4, + 0x04, 0x3d, 0x45, 0x2f, 0xd1, 0xf6, 0x02, 0xbd, 0x51, 0xb1, 0xbb, 0x24, 0x45, 0xc9, 0xed, 0x5b, + 0x91, 0x37, 0xcd, 0xf7, 0xcd, 0x37, 0xb3, 0x33, 0xb3, 0xb3, 0x14, 0x18, 0x73, 0xca, 0x18, 0x99, + 0xd2, 0xd3, 0x38, 0x59, 0xa4, 0x0b, 0xa4, 0x66, 0x66, 0xe7, 0x8f, 0x2a, 0xa8, 0xd7, 0xf2, 0x37, + 0x7a, 0x07, 0x3a, 0xa3, 0xc9, 0x63, 0x38, 0xa1, 0x7e, 0xba, 0x8a, 0xa9, 0xa5, 0x1c, 0x29, 0x27, + 0xed, 0xee, 0xde, 0x69, 0x2e, 0x1d, 0x4b, 0xd2, 0x5b, 0xc5, 0x14, 0x6b, 0x6c, 0x6d, 0xa0, 0x13, + 0xa8, 0x09, 0x41, 0x65, 0x4b, 0x90, 0x05, 0x16, 0x02, 0xe1, 0x81, 0x0e, 0xa1, 0xc5, 0xc2, 0x69, + 0x44, 0xd2, 0x65, 0x42, 0xad, 0xea, 0x91, 0x72, 0xa2, 0xe3, 0x35, 0x80, 0xde, 0x81, 0xca, 0x52, + 0xf2, 0x10, 0x46, 0x53, 0xab, 0x76, 0xa4, 0x9c, 0x68, 0xdd, 0xfd, 0x75, 0x6e, 0x89, 0x63, 0xfa, + 0xcb, 0x92, 0xb2, 0xf4, 0xbc, 0x62, 0x29, 0x17, 0x3b, 0x38, 0xf7, 0x46, 0xdf, 0x41, 0x6b, 0xb2, + 0x88, 0x18, 0x8d, 0xd8, 0x92, 0x59, 0x75, 0x21, 0x7d, 0x5e, 0x48, 0xfb, 0x39, 0x93, 0x89, 0x2f, + 0x76, 0xf0, 0xda, 0x1b, 0x7d, 0x03, 0xf5, 0x20, 0x21, 0x51, 0x60, 0x35, 0x84, 0xec, 0xf3, 0x42, + 0x36, 0xe0, 0xe8, 0x66, 0x3e, 0xe9, 0x89, 0x7e, 0x00, 0x78, 0x0c, 0xe9, 0xc7, 0xc9, 0x3d, 0x89, + 0xa6, 0xd4, 0x52, 0x85, 0xee, 0xa0, 0xd0, 0x7d, 0x08, 0xe9, 0xc7, 0xbe, 0xa0, 0xd6, 0xf9, 0x4a, + 0xfe, 0xe8, 0x47, 0xd8, 0x9d, 0x2d, 0xd2, 0x94, 0x26, 0x2b, 0x3f, 0x91, 0x0e, 0x56, 0x73, 0xab, + 0xd8, 0x2b, 0xc9, 0x6f, 0x26, 0x6f, 0xcf, 0x36, 0xd1, 0x16, 0xa8, 0x99, 0xbe, 0xf3, 0x97, 0x02, + 0x4d, 0x4c, 0x59, 0xcc, 0x8b, 0xfa, 0x14, 0x53, 0x74, 0xc0, 0x5c, 0x97, 0x20, 0xd3, 0x8a, 0x61, + 0x6a, 0x5d, 0xeb, 0x69, 0x0d, 0x92, 0xcf, 0x8a, 0xd8, 0x9d, 0x6d, 0xc1, 0x00, 0xcd, 0x3c, 0x44, + 0x67, 0x08, 0xbb, 0x5b, 0x2a, 0x74, 0x08, 0x6a, 0x3c, 0x23, 0x2b, 0x9a, 0x30, 0xab, 0x72, 0x54, + 0x3d, 0x69, 0xf1, 0x30, 0x38, 0x87, 0xd0, 0x2b, 0x68, 0xde, 0x91, 0x19, 0x89, 0x26, 0x94, 0x59, + 0xd5, 0x82, 0x2e, 0xb0, 0xce, 0x9f, 0x0a, 0xb4, 0x37, 0x7b, 0x89, 0xbe, 0xcd, 0x8a, 0x94, 0x5d, + 0x39, 0xfc, 0x8f, 0x96, 0x9f, 0xf2, 0x62, 0x45, 0x30, 0x59, 0xf0, 0x31, 0x68, 0x71, 0x12, 0x3e, + 0x92, 0x94, 0xfa, 0x0f, 0x74, 0x25, 0x3a, 0x24, 0x73, 0x41, 0x06, 0x5f, 0xd2, 0x15, 0x3a, 0x80, + 0x06, 0x99, 0x2f, 0x96, 0x51, 0x2a, 0x7a, 0x51, 0x15, 0x7c, 0x86, 0x74, 0xbe, 0x87, 0x9a, 0xe8, + 0xb1, 0x01, 0x75, 0xdb, 0xf5, 0x6c, 0x6c, 0xee, 0x1c, 0x54, 0x9a, 0x0a, 0x6a, 0x43, 0x03, 0xdb, + 0xe3, 0x9b, 0x2b, 0xcf, 0x54, 0x84, 0xfd, 0x19, 0x68, 0x23, 0xa7, 0x7f, 0xe9, 0xdf, 0x3a, 0xae, + 0x6b, 0x63, 0xb3, 0xc2, 0xc1, 0xce, 0x18, 0xda, 0x9b, 0xb7, 0x1f, 0x7d, 0x05, 0x5a, 0x9a, 0x90, + 0x88, 0x91, 0x49, 0x1a, 0x2e, 0x22, 0x51, 0x8b, 0x2e, 0xd2, 0x95, 0x61, 0xf4, 0x02, 0xd4, 0x68, + 0x11, 0x50, 0x3f, 0x0c, 0x4a, 0x07, 0x6e, 0x70, 0xc8, 0x09, 0x3a, 0xbf, 0x56, 0xc0, 0xdc, 0x5e, + 0x0c, 0xb4, 0x0f, 0x2a, 0xbf, 0xa8, 0x5c, 0xc1, 0x63, 0xd6, 0x70, 0x83, 0x9b, 0x4e, 0x80, 0x5e, + 0x40, 0xeb, 0x6e, 0xb6, 0x98, 0x3c, 0xf8, 0xd1, 0x72, 0x2e, 0x82, 0xd5, 0x70, 0x53, 0x00, 0xee, + 0x72, 0x8e, 0x9e, 0x43, 0x93, 0xdd, 0x93, 0x24, 0xe0, 0x32, 0x5e, 0xb9, 0x81, 0x55, 0x61, 0x3b, + 0x01, 0x7a, 0x09, 0x20, 0x75, 0xf7, 0x84, 0xdd, 0x8b, 0x9d, 0xd6, 0xb1, 0x8c, 0x74, 0x41, 0xd8, + 0x3d, 0xda, 0x83, 0xba, 0x30, 0xc4, 0xca, 0xea, 0x58, 0x1a, 0xe8, 0x18, 0x0c, 0x46, 0xa3, 0x80, + 0x26, 0x7e, 0xbc, 0xbc, 0xe3, 0xed, 0x6e, 0x08, 0x56, 0x97, 0xe0, 0x48, 0x60, 0xc8, 0x02, 0x35, + 0x26, 0xab, 0xd9, 0x82, 0x04, 0x62, 0x01, 0x75, 0x9c, 0x9b, 0xe8, 0x2d, 0xec, 0x6d, 0xc8, 0xfd, + 0xbb, 0x30, 0x9d, 0x93, 0x58, 0x2c, 0x99, 0x8e, 0x51, 0x39, 0xca, 0xb9, 0x60, 0x3a, 0xbf, 0x29, + 0xa0, 0x97, 0xb7, 0x1d, 0xbd, 0x2c, 0x55, 0xc4, 0x1b, 0x61, 0xc8, 0x6b, 0x97, 0x57, 0xf5, 0xf5, + 0xf6, 0x01, 0x2b, 0xc5, 0x00, 0x36, 0x0f, 0xf9, 0xe5, 0x46, 0xf9, 0xd5, 0xc2, 0xab, 0xd4, 0x82, + 0xc3, 0x75, 0x1d, 0xb5, 0x82, 0xcf, 0xa1, 0xce, 0xef, 0x55, 0x78, 0xf6, 0xe4, 0x3d, 0xf9, 0xff, + 0xc7, 0xf4, 0xa4, 0xe3, 0xb5, 0x7f, 0xe9, 0xf8, 0x31, 0x18, 0x33, 0x4a, 0x4a, 0x4e, 0x72, 0x68, + 0xba, 0x04, 0x9f, 0x8e, 0xa5, 0xb1, 0x39, 0x96, 0xd7, 0xd0, 0x5e, 0x3f, 0x82, 0x3e, 0x0b, 0xa7, + 0xd9, 0xdc, 0x8c, 0x35, 0x3a, 0x0e, 0xa7, 0xfc, 0xc6, 0x70, 0x20, 0x0c, 0x84, 0x8b, 0x9c, 0x59, + 0x4b, 0x22, 0x19, 0x3d, 0xef, 0xfa, 0x64, 0x3a, 0x65, 0xe1, 0x94, 0x59, 0x2d, 0x49, 0xcf, 0xbb, + 0x3d, 0x09, 0xf0, 0x06, 0xcc, 0xbb, 0xf9, 0xc0, 0x41, 0xb0, 0xcd, 0x79, 0x57, 0x8e, 0x59, 0x68, + 0xcf, 0x0a, 0xad, 0x96, 0x69, 0xcf, 0xca, 0xda, 0xb3, 0x5c, 0xab, 0x67, 0xda, 0xb3, 0x4c, 0xfb, + 0x1a, 0xda, 0x71, 0x42, 0x63, 0x92, 0xd0, 0xc0, 0x97, 0x57, 0xd6, 0x90, 0xa7, 0xcf, 0xd1, 0x73, + 0x0e, 0xbe, 0x19, 0x81, 0x56, 0x7a, 0x5e, 0x91, 0x01, 0xad, 0xfe, 0xd0, 0x1d, 0xdb, 0xee, 0xf8, + 0x66, 0x6c, 0xee, 0xa0, 0x5d, 0x50, 0xc7, 0x5e, 0xef, 0xd2, 0x71, 0xdf, 0x67, 0xeb, 0x6e, 0x40, + 0x7d, 0x80, 0x7b, 0xee, 0x40, 0x2e, 0x3a, 0x42, 0xd0, 0xee, 0x5f, 0x39, 0xb6, 0xeb, 0xf9, 0xe3, + 0x9b, 0xd1, 0x68, 0x88, 0x3d, 0xb3, 0xfa, 0xe6, 0x6f, 0x05, 0xb4, 0xd2, 0x03, 0x8c, 0x5e, 0xc1, + 0x17, 0xae, 0x7d, 0xeb, 0x0e, 0x07, 0xb6, 0x7f, 0x6e, 0xf7, 0xfa, 0x43, 0xd7, 0xcf, 0x43, 0xca, + 0x17, 0x45, 0x87, 0x66, 0xcf, 0x75, 0x87, 0x37, 0x6e, 0xdf, 0x36, 0x15, 0xa4, 0x81, 0x3a, 0xc2, + 0xf6, 0xa8, 0x87, 0x6d, 0xb3, 0xc2, 0xa9, 0xcc, 0x18, 0x98, 0x55, 0x04, 0xd0, 0xe8, 0x0f, 0xaf, + 0xaf, 0x1d, 0xcf, 0xac, 0xc9, 0x73, 0xf2, 0xdf, 0x9e, 0x3d, 0x30, 0xeb, 0xa8, 0x0d, 0xf0, 0xc1, + 0xb1, 0x6f, 0xfb, 0x17, 0x3d, 0xf7, 0xbd, 0x6d, 0x36, 0x78, 0x14, 0xd7, 0xbe, 0xe5, 0x90, 0xa9, + 0x22, 0x04, 0x20, 0xce, 0xec, 0x3b, 0xae, 0xe3, 0x99, 0x20, 0x92, 0xee, 0x81, 0x2e, 0xb1, 0x2c, + 0xa2, 0x26, 0xd0, 0x7d, 0xd8, 0xbd, 0x1a, 0x7a, 0x9e, 0x8d, 0x7f, 0xf6, 0xb1, 0xfd, 0xd3, 0x8d, + 0x3d, 0xf6, 0x4c, 0x9d, 0x13, 0xdd, 0x1e, 0x18, 0xfd, 0x59, 0x48, 0xa3, 0x34, 0xeb, 0x15, 0x7a, + 0x0b, 0xea, 0x28, 0x59, 0x4c, 0x28, 0x63, 0xc8, 0xdc, 0xfe, 0xec, 0x1c, 0x3c, 0x2b, 0x90, 0xfc, + 0xab, 0xd0, 0xd9, 0xb9, 0x6b, 0x88, 0xbf, 0x31, 0x67, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x2a, + 0x95, 0x21, 0x3b, 0xd7, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1342,7 +961,7 @@ type ClientServiceServer interface { type UnimplementedClientServiceServer struct { } -func (*UnimplementedClientServiceServer) Process(context.Context, *Message) (*Response, error) { +func (*UnimplementedClientServiceServer) Process(ctx context.Context, req *Message) (*Response, error) { return nil, status.Errorf(codes.Unimplemented, "method Process not implemented") } diff --git a/api/service/syncing/downloader/proto/downloader.pb.go b/api/service/syncing/downloader/proto/downloader.pb.go index 108f70e33..1470801dd 100644 --- a/api/service/syncing/downloader/proto/downloader.pb.go +++ b/api/service/syncing/downloader/proto/downloader.pb.go @@ -1,33 +1,29 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v3.6.1 // source: downloader.proto package downloader import ( context "context" + fmt "fmt" + math "math" + proto "github.com/golang/protobuf/proto" 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" - reflect "reflect" - sync "sync" ) -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) -) +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type DownloaderRequest_RequestType int32 @@ -42,55 +38,34 @@ const ( DownloaderRequest_BLOCKHEADER DownloaderRequest_RequestType = 7 ) -// Enum value maps for DownloaderRequest_RequestType. -var ( - DownloaderRequest_RequestType_name = map[int32]string{ - 0: "BLOCKHASH", - 1: "BLOCK", - 2: "NEWBLOCK", - 3: "BLOCKHEIGHT", - 4: "REGISTER", - 5: "REGISTERTIMEOUT", - 6: "UNKNOWN", - 7: "BLOCKHEADER", - } - DownloaderRequest_RequestType_value = map[string]int32{ - "BLOCKHASH": 0, - "BLOCK": 1, - "NEWBLOCK": 2, - "BLOCKHEIGHT": 3, - "REGISTER": 4, - "REGISTERTIMEOUT": 5, - "UNKNOWN": 6, - "BLOCKHEADER": 7, - } -) - -func (x DownloaderRequest_RequestType) Enum() *DownloaderRequest_RequestType { - p := new(DownloaderRequest_RequestType) - *p = x - return p -} - -func (x DownloaderRequest_RequestType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DownloaderRequest_RequestType) Descriptor() protoreflect.EnumDescriptor { - return file_downloader_proto_enumTypes[0].Descriptor() +var DownloaderRequest_RequestType_name = map[int32]string{ + 0: "BLOCKHASH", + 1: "BLOCK", + 2: "NEWBLOCK", + 3: "BLOCKHEIGHT", + 4: "REGISTER", + 5: "REGISTERTIMEOUT", + 6: "UNKNOWN", + 7: "BLOCKHEADER", } -func (DownloaderRequest_RequestType) Type() protoreflect.EnumType { - return &file_downloader_proto_enumTypes[0] +var DownloaderRequest_RequestType_value = map[string]int32{ + "BLOCKHASH": 0, + "BLOCK": 1, + "NEWBLOCK": 2, + "BLOCKHEIGHT": 3, + "REGISTER": 4, + "REGISTERTIMEOUT": 5, + "UNKNOWN": 6, + "BLOCKHEADER": 7, } -func (x DownloaderRequest_RequestType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) +func (x DownloaderRequest_RequestType) String() string { + return proto.EnumName(DownloaderRequest_RequestType_name, int32(x)) } -// Deprecated: Use DownloaderRequest_RequestType.Descriptor instead. func (DownloaderRequest_RequestType) EnumDescriptor() ([]byte, []int) { - return file_downloader_proto_rawDescGZIP(), []int{0, 0} + return fileDescriptor_6a99ec95c7ab1ff1, []int{0, 0} } type DownloaderResponse_RegisterResponseType int32 @@ -98,345 +73,216 @@ type DownloaderResponse_RegisterResponseType int32 const ( DownloaderResponse_SUCCESS DownloaderResponse_RegisterResponseType = 0 DownloaderResponse_FAIL DownloaderResponse_RegisterResponseType = 1 - DownloaderResponse_INSYNC DownloaderResponse_RegisterResponseType = 2 // node is now in sync, remove it from the broadcast list + DownloaderResponse_INSYNC DownloaderResponse_RegisterResponseType = 2 ) -// Enum value maps for DownloaderResponse_RegisterResponseType. -var ( - DownloaderResponse_RegisterResponseType_name = map[int32]string{ - 0: "SUCCESS", - 1: "FAIL", - 2: "INSYNC", - } - DownloaderResponse_RegisterResponseType_value = map[string]int32{ - "SUCCESS": 0, - "FAIL": 1, - "INSYNC": 2, - } -) - -func (x DownloaderResponse_RegisterResponseType) Enum() *DownloaderResponse_RegisterResponseType { - p := new(DownloaderResponse_RegisterResponseType) - *p = x - return p +var DownloaderResponse_RegisterResponseType_name = map[int32]string{ + 0: "SUCCESS", + 1: "FAIL", + 2: "INSYNC", } -func (x DownloaderResponse_RegisterResponseType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +var DownloaderResponse_RegisterResponseType_value = map[string]int32{ + "SUCCESS": 0, + "FAIL": 1, + "INSYNC": 2, } -func (DownloaderResponse_RegisterResponseType) Descriptor() protoreflect.EnumDescriptor { - return file_downloader_proto_enumTypes[1].Descriptor() -} - -func (DownloaderResponse_RegisterResponseType) Type() protoreflect.EnumType { - return &file_downloader_proto_enumTypes[1] -} - -func (x DownloaderResponse_RegisterResponseType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) +func (x DownloaderResponse_RegisterResponseType) String() string { + return proto.EnumName(DownloaderResponse_RegisterResponseType_name, int32(x)) } -// Deprecated: Use DownloaderResponse_RegisterResponseType.Descriptor instead. func (DownloaderResponse_RegisterResponseType) EnumDescriptor() ([]byte, []int) { - return file_downloader_proto_rawDescGZIP(), []int{1, 0} + return fileDescriptor_6a99ec95c7ab1ff1, []int{1, 0} } // DownloaderRequest is the generic download request. type DownloaderRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - // Request type. Type DownloaderRequest_RequestType `protobuf:"varint,1,opt,name=type,proto3,enum=downloader.DownloaderRequest_RequestType" json:"type,omitempty"` // The hashes of the blocks we want to download. - Hashes [][]byte `protobuf:"bytes,2,rep,name=hashes,proto3" json:"hashes,omitempty"` - PeerHash []byte `protobuf:"bytes,3,opt,name=peerHash,proto3" json:"peerHash,omitempty"` - BlockHash []byte `protobuf:"bytes,4,opt,name=blockHash,proto3" json:"blockHash,omitempty"` - Ip string `protobuf:"bytes,5,opt,name=ip,proto3" json:"ip,omitempty"` - Port string `protobuf:"bytes,6,opt,name=port,proto3" json:"port,omitempty"` - Size uint32 `protobuf:"varint,7,opt,name=size,proto3" json:"size,omitempty"` -} - -func (x *DownloaderRequest) Reset() { - *x = DownloaderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_downloader_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + Hashes [][]byte `protobuf:"bytes,2,rep,name=hashes,proto3" json:"hashes,omitempty"` + PeerHash []byte `protobuf:"bytes,3,opt,name=peerHash,proto3" json:"peerHash,omitempty"` + BlockHash []byte `protobuf:"bytes,4,opt,name=blockHash,proto3" json:"blockHash,omitempty"` + Ip string `protobuf:"bytes,5,opt,name=ip,proto3" json:"ip,omitempty"` + Port string `protobuf:"bytes,6,opt,name=port,proto3" json:"port,omitempty"` + Size uint32 `protobuf:"varint,7,opt,name=size,proto3" json:"size,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DownloaderRequest) Reset() { *m = DownloaderRequest{} } +func (m *DownloaderRequest) String() string { return proto.CompactTextString(m) } +func (*DownloaderRequest) ProtoMessage() {} +func (*DownloaderRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_6a99ec95c7ab1ff1, []int{0} } -func (x *DownloaderRequest) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *DownloaderRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DownloaderRequest.Unmarshal(m, b) } - -func (*DownloaderRequest) ProtoMessage() {} - -func (x *DownloaderRequest) ProtoReflect() protoreflect.Message { - mi := &file_downloader_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) +func (m *DownloaderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DownloaderRequest.Marshal(b, m, deterministic) } - -// Deprecated: Use DownloaderRequest.ProtoReflect.Descriptor instead. -func (*DownloaderRequest) Descriptor() ([]byte, []int) { - return file_downloader_proto_rawDescGZIP(), []int{0} +func (m *DownloaderRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DownloaderRequest.Merge(m, src) } +func (m *DownloaderRequest) XXX_Size() int { + return xxx_messageInfo_DownloaderRequest.Size(m) +} +func (m *DownloaderRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DownloaderRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DownloaderRequest proto.InternalMessageInfo -func (x *DownloaderRequest) GetType() DownloaderRequest_RequestType { - if x != nil { - return x.Type +func (m *DownloaderRequest) GetType() DownloaderRequest_RequestType { + if m != nil { + return m.Type } return DownloaderRequest_BLOCKHASH } -func (x *DownloaderRequest) GetHashes() [][]byte { - if x != nil { - return x.Hashes +func (m *DownloaderRequest) GetHashes() [][]byte { + if m != nil { + return m.Hashes } return nil } -func (x *DownloaderRequest) GetPeerHash() []byte { - if x != nil { - return x.PeerHash +func (m *DownloaderRequest) GetPeerHash() []byte { + if m != nil { + return m.PeerHash } return nil } -func (x *DownloaderRequest) GetBlockHash() []byte { - if x != nil { - return x.BlockHash +func (m *DownloaderRequest) GetBlockHash() []byte { + if m != nil { + return m.BlockHash } return nil } -func (x *DownloaderRequest) GetIp() string { - if x != nil { - return x.Ip +func (m *DownloaderRequest) GetIp() string { + if m != nil { + return m.Ip } return "" } -func (x *DownloaderRequest) GetPort() string { - if x != nil { - return x.Port +func (m *DownloaderRequest) GetPort() string { + if m != nil { + return m.Port } return "" } -func (x *DownloaderRequest) GetSize() uint32 { - if x != nil { - return x.Size +func (m *DownloaderRequest) GetSize() uint32 { + if m != nil { + return m.Size } return 0 } // DownloaderResponse is the generic response of DownloaderRequest. type DownloaderResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - // payload of Block. Payload [][]byte `protobuf:"bytes,1,rep,name=payload,proto3" json:"payload,omitempty"` // response of registration request - Type DownloaderResponse_RegisterResponseType `protobuf:"varint,2,opt,name=type,proto3,enum=downloader.DownloaderResponse_RegisterResponseType" json:"type,omitempty"` - BlockHeight uint64 `protobuf:"varint,3,opt,name=blockHeight,proto3" json:"blockHeight,omitempty"` + Type DownloaderResponse_RegisterResponseType `protobuf:"varint,2,opt,name=type,proto3,enum=downloader.DownloaderResponse_RegisterResponseType" json:"type,omitempty"` + BlockHeight uint64 `protobuf:"varint,3,opt,name=blockHeight,proto3" json:"blockHeight,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *DownloaderResponse) Reset() { - *x = DownloaderResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_downloader_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (m *DownloaderResponse) Reset() { *m = DownloaderResponse{} } +func (m *DownloaderResponse) String() string { return proto.CompactTextString(m) } +func (*DownloaderResponse) ProtoMessage() {} +func (*DownloaderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_6a99ec95c7ab1ff1, []int{1} } -func (x *DownloaderResponse) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *DownloaderResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DownloaderResponse.Unmarshal(m, b) } - -func (*DownloaderResponse) ProtoMessage() {} - -func (x *DownloaderResponse) ProtoReflect() protoreflect.Message { - mi := &file_downloader_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) +func (m *DownloaderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DownloaderResponse.Marshal(b, m, deterministic) } - -// Deprecated: Use DownloaderResponse.ProtoReflect.Descriptor instead. -func (*DownloaderResponse) Descriptor() ([]byte, []int) { - return file_downloader_proto_rawDescGZIP(), []int{1} +func (m *DownloaderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DownloaderResponse.Merge(m, src) +} +func (m *DownloaderResponse) XXX_Size() int { + return xxx_messageInfo_DownloaderResponse.Size(m) +} +func (m *DownloaderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DownloaderResponse.DiscardUnknown(m) } -func (x *DownloaderResponse) GetPayload() [][]byte { - if x != nil { - return x.Payload +var xxx_messageInfo_DownloaderResponse proto.InternalMessageInfo + +func (m *DownloaderResponse) GetPayload() [][]byte { + if m != nil { + return m.Payload } return nil } -func (x *DownloaderResponse) GetType() DownloaderResponse_RegisterResponseType { - if x != nil { - return x.Type +func (m *DownloaderResponse) GetType() DownloaderResponse_RegisterResponseType { + if m != nil { + return m.Type } return DownloaderResponse_SUCCESS } -func (x *DownloaderResponse) GetBlockHeight() uint64 { - if x != nil { - return x.BlockHeight +func (m *DownloaderResponse) GetBlockHeight() uint64 { + if m != nil { + return m.BlockHeight } return 0 } -var File_downloader_proto protoreflect.FileDescriptor - -var file_downloader_proto_rawDesc = []byte{ - 0x0a, 0x10, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x0a, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x22, 0xe6, - 0x02, 0x0a, 0x11, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x2e, - 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0c, 0x52, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x65, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, - 0x65, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x48, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x87, 0x01, - 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, - 0x09, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x48, 0x41, 0x53, 0x48, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, - 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x45, 0x57, 0x42, 0x4c, - 0x4f, 0x43, 0x4b, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x48, 0x45, - 0x49, 0x47, 0x48, 0x54, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, - 0x45, 0x52, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, - 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x48, - 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x07, 0x22, 0xd4, 0x01, 0x0a, 0x12, 0x44, 0x6f, 0x77, 0x6e, - 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, - 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x47, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, - 0x64, 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x22, 0x39, 0x0a, 0x14, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53, - 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x41, 0x49, 0x4c, - 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x49, 0x4e, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x02, 0x32, 0x56, - 0x0a, 0x0a, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x05, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, - 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x65, - 0x72, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_downloader_proto_rawDescOnce sync.Once - file_downloader_proto_rawDescData = file_downloader_proto_rawDesc -) - -func file_downloader_proto_rawDescGZIP() []byte { - file_downloader_proto_rawDescOnce.Do(func() { - file_downloader_proto_rawDescData = protoimpl.X.CompressGZIP(file_downloader_proto_rawDescData) - }) - return file_downloader_proto_rawDescData -} - -var file_downloader_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_downloader_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_downloader_proto_goTypes = []interface{}{ - (DownloaderRequest_RequestType)(0), // 0: downloader.DownloaderRequest.RequestType - (DownloaderResponse_RegisterResponseType)(0), // 1: downloader.DownloaderResponse.RegisterResponseType - (*DownloaderRequest)(nil), // 2: downloader.DownloaderRequest - (*DownloaderResponse)(nil), // 3: downloader.DownloaderResponse -} -var file_downloader_proto_depIdxs = []int32{ - 0, // 0: downloader.DownloaderRequest.type:type_name -> downloader.DownloaderRequest.RequestType - 1, // 1: downloader.DownloaderResponse.type:type_name -> downloader.DownloaderResponse.RegisterResponseType - 2, // 2: downloader.Downloader.Query:input_type -> downloader.DownloaderRequest - 3, // 3: downloader.Downloader.Query:output_type -> downloader.DownloaderResponse - 3, // [3:4] is the sub-list for method output_type - 2, // [2:3] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_downloader_proto_init() } -func file_downloader_proto_init() { - if File_downloader_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_downloader_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DownloaderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_downloader_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DownloaderResponse); 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_downloader_proto_rawDesc, - NumEnums: 2, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_downloader_proto_goTypes, - DependencyIndexes: file_downloader_proto_depIdxs, - EnumInfos: file_downloader_proto_enumTypes, - MessageInfos: file_downloader_proto_msgTypes, - }.Build() - File_downloader_proto = out.File - file_downloader_proto_rawDesc = nil - file_downloader_proto_goTypes = nil - file_downloader_proto_depIdxs = nil +func init() { + proto.RegisterEnum("downloader.DownloaderRequest_RequestType", DownloaderRequest_RequestType_name, DownloaderRequest_RequestType_value) + proto.RegisterEnum("downloader.DownloaderResponse_RegisterResponseType", DownloaderResponse_RegisterResponseType_name, DownloaderResponse_RegisterResponseType_value) + proto.RegisterType((*DownloaderRequest)(nil), "downloader.DownloaderRequest") + proto.RegisterType((*DownloaderResponse)(nil), "downloader.DownloaderResponse") +} + +func init() { + proto.RegisterFile("downloader.proto", fileDescriptor_6a99ec95c7ab1ff1) +} + +var fileDescriptor_6a99ec95c7ab1ff1 = []byte{ + // 410 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0xce, 0x3a, 0x8e, 0x93, 0x4c, 0xd2, 0x76, 0x19, 0x10, 0x5a, 0x55, 0x80, 0x2c, 0x9f, 0xcc, + 0xc5, 0x87, 0xf6, 0xc4, 0x81, 0x43, 0x70, 0x4d, 0x6c, 0xb5, 0x38, 0x62, 0xed, 0x50, 0x71, 0x74, + 0xe9, 0xaa, 0xb6, 0xa8, 0xea, 0xc5, 0xeb, 0x0a, 0x99, 0x17, 0xe0, 0x05, 0x79, 0x06, 0x9e, 0x03, + 0x79, 0x9d, 0xd6, 0x96, 0x80, 0x9c, 0x76, 0xbf, 0x6f, 0x7e, 0x34, 0xf3, 0x7d, 0x03, 0xf4, 0xba, + 0xfc, 0x7e, 0x77, 0x5b, 0x66, 0xd7, 0xa2, 0xf2, 0x64, 0x55, 0xd6, 0x25, 0x42, 0xcf, 0x38, 0xbf, + 0x0d, 0x78, 0x72, 0xf6, 0x08, 0xb9, 0xf8, 0x76, 0x2f, 0x54, 0x8d, 0x6f, 0xc1, 0xac, 0x1b, 0x29, + 0x18, 0xb1, 0x89, 0x7b, 0x78, 0xf2, 0xda, 0x1b, 0xb4, 0xf8, 0x2b, 0xd9, 0xdb, 0xbd, 0x69, 0x23, + 0x05, 0xd7, 0x65, 0xf8, 0x1c, 0xac, 0x3c, 0x53, 0xb9, 0x50, 0xcc, 0xb0, 0xc7, 0xee, 0x92, 0xef, + 0x10, 0x1e, 0xc3, 0x4c, 0x0a, 0x51, 0x85, 0x99, 0xca, 0xd9, 0xd8, 0x26, 0xee, 0x92, 0x3f, 0x62, + 0x7c, 0x01, 0xf3, 0xab, 0xdb, 0xf2, 0xcb, 0x57, 0x1d, 0x34, 0x75, 0xb0, 0x27, 0xf0, 0x10, 0x8c, + 0x42, 0xb2, 0x89, 0x4d, 0xdc, 0x39, 0x37, 0x0a, 0x89, 0x08, 0xa6, 0x2c, 0xab, 0x9a, 0x59, 0x9a, + 0xd1, 0xff, 0x96, 0x53, 0xc5, 0x0f, 0xc1, 0xa6, 0x36, 0x71, 0x0f, 0xb8, 0xfe, 0x3b, 0x3f, 0x09, + 0x2c, 0x06, 0xf3, 0xe1, 0x01, 0xcc, 0xdf, 0x5d, 0x6c, 0xfc, 0xf3, 0x70, 0x95, 0x84, 0x74, 0x84, + 0x73, 0x98, 0x68, 0x48, 0x09, 0x2e, 0x61, 0x16, 0x07, 0x97, 0x1d, 0x32, 0xf0, 0x08, 0x16, 0x5d, + 0x5e, 0x10, 0xad, 0xc3, 0x94, 0x8e, 0xdb, 0x30, 0x0f, 0xd6, 0x51, 0x92, 0x06, 0x9c, 0x9a, 0xf8, + 0x14, 0x8e, 0x1e, 0x50, 0x1a, 0x7d, 0x08, 0x36, 0xdb, 0x94, 0x4e, 0x70, 0x01, 0xd3, 0x6d, 0x7c, + 0x1e, 0x6f, 0x2e, 0x63, 0x6a, 0x0d, 0x1a, 0xac, 0xce, 0x02, 0x4e, 0xa7, 0xce, 0x2f, 0x02, 0x38, + 0xd4, 0x4e, 0xc9, 0xf2, 0x4e, 0x09, 0x64, 0x30, 0x95, 0x59, 0xd3, 0x92, 0x8c, 0x68, 0xad, 0x1e, + 0x20, 0xae, 0x77, 0x1e, 0x18, 0xda, 0x83, 0xd3, 0xff, 0x79, 0xd0, 0xf5, 0xf1, 0xb8, 0xb8, 0x29, + 0x54, 0xdd, 0x13, 0x03, 0x37, 0x6c, 0x58, 0x74, 0x42, 0x8a, 0xe2, 0x26, 0xaf, 0xb5, 0xf0, 0x26, + 0x1f, 0x52, 0xce, 0x1b, 0x78, 0xf6, 0xaf, 0xfa, 0x76, 0xa3, 0x64, 0xeb, 0xfb, 0x41, 0x92, 0xd0, + 0x11, 0xce, 0xc0, 0x7c, 0xbf, 0x8a, 0x2e, 0x28, 0x41, 0x00, 0x2b, 0x8a, 0x93, 0xcf, 0xb1, 0x4f, + 0x8d, 0x93, 0x4f, 0x00, 0xfd, 0x34, 0x18, 0xc2, 0xe4, 0xe3, 0xbd, 0xa8, 0x1a, 0x7c, 0xb9, 0xf7, + 0x64, 0x8e, 0x5f, 0xed, 0xdf, 0xc6, 0x19, 0x5d, 0x59, 0xfa, 0x54, 0x4f, 0xff, 0x04, 0x00, 0x00, + 0xff, 0xff, 0x00, 0xaf, 0x33, 0x33, 0xbe, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -480,7 +326,7 @@ type DownloaderServer interface { type UnimplementedDownloaderServer struct { } -func (*UnimplementedDownloaderServer) Query(context.Context, *DownloaderRequest) (*DownloaderResponse, error) { +func (*UnimplementedDownloaderServer) Query(ctx context.Context, req *DownloaderRequest) (*DownloaderResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Query not implemented") } diff --git a/consensus/debug.go b/consensus/debug.go index 85b7e0d82..4045bd90c 100644 --- a/consensus/debug.go +++ b/consensus/debug.go @@ -1,21 +1,21 @@ package consensus -// GetConsensusPhase .. +// GetConsensusPhase returns the current phase of the consensus func (c *Consensus) GetConsensusPhase() string { return c.phase.String() } -// GetConsensusMode .. +// GetConsensusMode returns the current mode of the consensus func (c *Consensus) GetConsensusMode() string { return c.current.mode.String() } -// GetCurViewID .. +// GetCurViewID returns the current view ID of the consensus func (c *Consensus) GetCurViewID() uint64 { return c.current.GetCurViewID() } -// GetViewID .. +// GetViewChangingID returns the current view changing ID of the consensus func (c *Consensus) GetViewChangingID() uint64 { return c.current.GetViewChangingID() } diff --git a/rpc/debug.go b/rpc/debug.go index 769290060..4d7c86d70 100644 --- a/rpc/debug.go +++ b/rpc/debug.go @@ -39,12 +39,14 @@ func (*PrivateDebugService) SetLogVerbosity(ctx context.Context, level int) (map return map[string]interface{}{"verbosity": verbosity.String()}, nil } +// ConsensusViewChangingID return the current view changing ID to RPC func (s *PrivateDebugService) ConsensusViewChangingID( ctx context.Context, ) uint64 { return s.hmy.NodeAPI.GetConsensusViewChangingID() } +// ConsensusCurViewID return the current view ID to RPC func (s *PrivateDebugService) ConsensusCurViewID( ctx context.Context, ) uint64 {