diff --git a/gointerfaces/sentry/mocks.go b/gointerfaces/sentry/mocks.go index 9edb63f53..ae078d7c8 100644 --- a/gointerfaces/sentry/mocks.go +++ b/gointerfaces/sentry/mocks.go @@ -20,6 +20,9 @@ var _ SentryServer = &SentryServerMock{} // // // make and configure a mocked SentryServer // mockedSentryServer := &SentryServerMock{ +// HandShakeFunc: func(contextMoqParam context.Context, empty *emptypb.Empty) (*HandShakeReply, error) { +// panic("mock out the HandShake method") +// }, // MessagesFunc: func(messagesRequest *MessagesRequest, sentry_MessagesServer Sentry_MessagesServer) error { // panic("mock out the Messages method") // }, @@ -60,6 +63,9 @@ var _ SentryServer = &SentryServerMock{} // // } type SentryServerMock struct { + // HandShakeFunc mocks the HandShake method. + HandShakeFunc func(contextMoqParam context.Context, empty *emptypb.Empty) (*HandShakeReply, error) + // MessagesFunc mocks the Messages method. MessagesFunc func(messagesRequest *MessagesRequest, sentry_MessagesServer Sentry_MessagesServer) error @@ -95,6 +101,13 @@ type SentryServerMock struct { // calls tracks calls to the methods. calls struct { + // HandShake holds details about calls to the HandShake method. + HandShake []struct { + // ContextMoqParam is the contextMoqParam argument value. + ContextMoqParam context.Context + // Empty is the empty argument value. + Empty *emptypb.Empty + } // Messages holds details about calls to the Messages method. Messages []struct { // MessagesRequest is the messagesRequest argument value. @@ -169,6 +182,7 @@ type SentryServerMock struct { mustEmbedUnimplementedSentryServer []struct { } } + lockHandShake sync.RWMutex lockMessages sync.RWMutex lockPeerCount sync.RWMutex lockPeerMinBlock sync.RWMutex @@ -182,6 +196,45 @@ type SentryServerMock struct { lockmustEmbedUnimplementedSentryServer sync.RWMutex } +// HandShake calls HandShakeFunc. +func (mock *SentryServerMock) HandShake(contextMoqParam context.Context, empty *emptypb.Empty) (*HandShakeReply, error) { + callInfo := struct { + ContextMoqParam context.Context + Empty *emptypb.Empty + }{ + ContextMoqParam: contextMoqParam, + Empty: empty, + } + mock.lockHandShake.Lock() + mock.calls.HandShake = append(mock.calls.HandShake, callInfo) + mock.lockHandShake.Unlock() + if mock.HandShakeFunc == nil { + var ( + handShakeReplyOut *HandShakeReply + errOut error + ) + return handShakeReplyOut, errOut + } + return mock.HandShakeFunc(contextMoqParam, empty) +} + +// HandShakeCalls gets all the calls that were made to HandShake. +// Check the length with: +// len(mockedSentryServer.HandShakeCalls()) +func (mock *SentryServerMock) HandShakeCalls() []struct { + ContextMoqParam context.Context + Empty *emptypb.Empty +} { + var calls []struct { + ContextMoqParam context.Context + Empty *emptypb.Empty + } + mock.lockHandShake.RLock() + calls = mock.calls.HandShake + mock.lockHandShake.RUnlock() + return calls +} + // Messages calls MessagesFunc. func (mock *SentryServerMock) Messages(messagesRequest *MessagesRequest, sentry_MessagesServer Sentry_MessagesServer) error { callInfo := struct { @@ -606,6 +659,9 @@ var _ SentryClient = &SentryClientMock{} // // // make and configure a mocked SentryClient // mockedSentryClient := &SentryClientMock{ +// HandShakeFunc: func(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HandShakeReply, error) { +// panic("mock out the HandShake method") +// }, // MessagesFunc: func(ctx context.Context, in *MessagesRequest, opts ...grpc.CallOption) (Sentry_MessagesClient, error) { // panic("mock out the Messages method") // }, @@ -643,6 +699,9 @@ var _ SentryClient = &SentryClientMock{} // // } type SentryClientMock struct { + // HandShakeFunc mocks the HandShake method. + HandShakeFunc func(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HandShakeReply, error) + // MessagesFunc mocks the Messages method. MessagesFunc func(ctx context.Context, in *MessagesRequest, opts ...grpc.CallOption) (Sentry_MessagesClient, error) @@ -675,6 +734,15 @@ type SentryClientMock struct { // calls tracks calls to the methods. calls struct { + // HandShake holds details about calls to the HandShake method. + HandShake []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // In is the in argument value. + In *emptypb.Empty + // Opts is the opts argument value. + Opts []grpc.CallOption + } // Messages holds details about calls to the Messages method. Messages []struct { // Ctx is the ctx argument value. @@ -766,6 +834,7 @@ type SentryClientMock struct { Opts []grpc.CallOption } } + lockHandShake sync.RWMutex lockMessages sync.RWMutex lockPeerCount sync.RWMutex lockPeerMinBlock sync.RWMutex @@ -778,6 +847,49 @@ type SentryClientMock struct { lockSetStatus sync.RWMutex } +// HandShake calls HandShakeFunc. +func (mock *SentryClientMock) HandShake(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HandShakeReply, error) { + callInfo := struct { + Ctx context.Context + In *emptypb.Empty + Opts []grpc.CallOption + }{ + Ctx: ctx, + In: in, + Opts: opts, + } + mock.lockHandShake.Lock() + mock.calls.HandShake = append(mock.calls.HandShake, callInfo) + mock.lockHandShake.Unlock() + if mock.HandShakeFunc == nil { + var ( + handShakeReplyOut *HandShakeReply + errOut error + ) + return handShakeReplyOut, errOut + } + return mock.HandShakeFunc(ctx, in, opts...) +} + +// HandShakeCalls gets all the calls that were made to HandShake. +// Check the length with: +// len(mockedSentryClient.HandShakeCalls()) +func (mock *SentryClientMock) HandShakeCalls() []struct { + Ctx context.Context + In *emptypb.Empty + Opts []grpc.CallOption +} { + var calls []struct { + Ctx context.Context + In *emptypb.Empty + Opts []grpc.CallOption + } + mock.lockHandShake.RLock() + calls = mock.calls.HandShake + mock.lockHandShake.RUnlock() + return calls +} + // Messages calls MessagesFunc. func (mock *SentryClientMock) Messages(ctx context.Context, in *MessagesRequest, opts ...grpc.CallOption) (Sentry_MessagesClient, error) { callInfo := struct { diff --git a/gointerfaces/sentry/sentry.pb.go b/gointerfaces/sentry/sentry.pb.go index f602a343c..dd1f7a7d5 100644 --- a/gointerfaces/sentry/sentry.pb.go +++ b/gointerfaces/sentry/sentry.pb.go @@ -290,7 +290,7 @@ func (x PeersReply_PeerEvent) Number() protoreflect.EnumNumber { // Deprecated: Use PeersReply_PeerEvent.Descriptor instead. func (PeersReply_PeerEvent) EnumDescriptor() ([]byte, []int) { - return file_p2psentry_sentry_proto_rawDescGZIP(), []int{15, 0} + return file_p2psentry_sentry_proto_rawDescGZIP(), []int{16, 0} } type OutboundMessageData struct { @@ -871,8 +871,6 @@ type SetStatusReply struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Protocol Protocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=sentry.Protocol" json:"protocol,omitempty"` } func (x *SetStatusReply) Reset() { @@ -907,7 +905,47 @@ func (*SetStatusReply) Descriptor() ([]byte, []int) { return file_p2psentry_sentry_proto_rawDescGZIP(), []int{10} } -func (x *SetStatusReply) GetProtocol() Protocol { +type HandShakeReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Protocol Protocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=sentry.Protocol" json:"protocol,omitempty"` +} + +func (x *HandShakeReply) Reset() { + *x = HandShakeReply{} + if protoimpl.UnsafeEnabled { + mi := &file_p2psentry_sentry_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HandShakeReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HandShakeReply) ProtoMessage() {} + +func (x *HandShakeReply) ProtoReflect() protoreflect.Message { + mi := &file_p2psentry_sentry_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HandShakeReply.ProtoReflect.Descriptor instead. +func (*HandShakeReply) Descriptor() ([]byte, []int) { + return file_p2psentry_sentry_proto_rawDescGZIP(), []int{11} +} + +func (x *HandShakeReply) GetProtocol() Protocol { if x != nil { return x.Protocol } @@ -925,7 +963,7 @@ type MessagesRequest struct { func (x *MessagesRequest) Reset() { *x = MessagesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_p2psentry_sentry_proto_msgTypes[11] + mi := &file_p2psentry_sentry_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -938,7 +976,7 @@ func (x *MessagesRequest) String() string { func (*MessagesRequest) ProtoMessage() {} func (x *MessagesRequest) ProtoReflect() protoreflect.Message { - mi := &file_p2psentry_sentry_proto_msgTypes[11] + mi := &file_p2psentry_sentry_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -951,7 +989,7 @@ func (x *MessagesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MessagesRequest.ProtoReflect.Descriptor instead. func (*MessagesRequest) Descriptor() ([]byte, []int) { - return file_p2psentry_sentry_proto_rawDescGZIP(), []int{11} + return file_p2psentry_sentry_proto_rawDescGZIP(), []int{12} } func (x *MessagesRequest) GetIds() []MessageId { @@ -970,7 +1008,7 @@ type PeerCountRequest struct { func (x *PeerCountRequest) Reset() { *x = PeerCountRequest{} if protoimpl.UnsafeEnabled { - mi := &file_p2psentry_sentry_proto_msgTypes[12] + mi := &file_p2psentry_sentry_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -983,7 +1021,7 @@ func (x *PeerCountRequest) String() string { func (*PeerCountRequest) ProtoMessage() {} func (x *PeerCountRequest) ProtoReflect() protoreflect.Message { - mi := &file_p2psentry_sentry_proto_msgTypes[12] + mi := &file_p2psentry_sentry_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -996,7 +1034,7 @@ func (x *PeerCountRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PeerCountRequest.ProtoReflect.Descriptor instead. func (*PeerCountRequest) Descriptor() ([]byte, []int) { - return file_p2psentry_sentry_proto_rawDescGZIP(), []int{12} + return file_p2psentry_sentry_proto_rawDescGZIP(), []int{13} } type PeerCountReply struct { @@ -1010,7 +1048,7 @@ type PeerCountReply struct { func (x *PeerCountReply) Reset() { *x = PeerCountReply{} if protoimpl.UnsafeEnabled { - mi := &file_p2psentry_sentry_proto_msgTypes[13] + mi := &file_p2psentry_sentry_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1023,7 +1061,7 @@ func (x *PeerCountReply) String() string { func (*PeerCountReply) ProtoMessage() {} func (x *PeerCountReply) ProtoReflect() protoreflect.Message { - mi := &file_p2psentry_sentry_proto_msgTypes[13] + mi := &file_p2psentry_sentry_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1036,7 +1074,7 @@ func (x *PeerCountReply) ProtoReflect() protoreflect.Message { // Deprecated: Use PeerCountReply.ProtoReflect.Descriptor instead. func (*PeerCountReply) Descriptor() ([]byte, []int) { - return file_p2psentry_sentry_proto_rawDescGZIP(), []int{13} + return file_p2psentry_sentry_proto_rawDescGZIP(), []int{14} } func (x *PeerCountReply) GetCount() uint64 { @@ -1055,7 +1093,7 @@ type PeersRequest struct { func (x *PeersRequest) Reset() { *x = PeersRequest{} if protoimpl.UnsafeEnabled { - mi := &file_p2psentry_sentry_proto_msgTypes[14] + mi := &file_p2psentry_sentry_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1068,7 +1106,7 @@ func (x *PeersRequest) String() string { func (*PeersRequest) ProtoMessage() {} func (x *PeersRequest) ProtoReflect() protoreflect.Message { - mi := &file_p2psentry_sentry_proto_msgTypes[14] + mi := &file_p2psentry_sentry_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1081,7 +1119,7 @@ func (x *PeersRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PeersRequest.ProtoReflect.Descriptor instead. func (*PeersRequest) Descriptor() ([]byte, []int) { - return file_p2psentry_sentry_proto_rawDescGZIP(), []int{14} + return file_p2psentry_sentry_proto_rawDescGZIP(), []int{15} } type PeersReply struct { @@ -1096,7 +1134,7 @@ type PeersReply struct { func (x *PeersReply) Reset() { *x = PeersReply{} if protoimpl.UnsafeEnabled { - mi := &file_p2psentry_sentry_proto_msgTypes[15] + mi := &file_p2psentry_sentry_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1109,7 +1147,7 @@ func (x *PeersReply) String() string { func (*PeersReply) ProtoMessage() {} func (x *PeersReply) ProtoReflect() protoreflect.Message { - mi := &file_p2psentry_sentry_proto_msgTypes[15] + mi := &file_p2psentry_sentry_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1122,7 +1160,7 @@ func (x *PeersReply) ProtoReflect() protoreflect.Message { // Deprecated: Use PeersReply.ProtoReflect.Descriptor instead. func (*PeersReply) Descriptor() ([]byte, []int) { - return file_p2psentry_sentry_proto_rawDescGZIP(), []int{15} + return file_p2psentry_sentry_proto_rawDescGZIP(), []int{16} } func (x *PeersReply) GetPeerId() *types.H512 { @@ -1213,123 +1251,127 @@ var file_p2psentry_sentry_proto_rawDesc = []byte{ 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x08, 0x66, 0x6f, 0x72, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x22, 0x3e, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2c, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x22, 0x36, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x49, 0x64, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x12, 0x0a, 0x10, 0x50, 0x65, - 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x26, - 0x0a, 0x0e, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x90, 0x01, 0x0a, 0x0a, 0x50, 0x65, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x24, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, - 0x35, 0x31, 0x32, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x05, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x73, 0x65, 0x6e, - 0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x50, - 0x65, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, - 0x28, 0x0a, 0x09, 0x50, 0x65, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0b, 0x0a, 0x07, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x10, 0x01, 0x2a, 0xda, 0x05, 0x0a, 0x09, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x36, 0x35, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x47, 0x45, 0x54, 0x5f, 0x42, 0x4c, - 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x01, - 0x12, 0x14, 0x0a, 0x10, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, - 0x53, 0x5f, 0x36, 0x35, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, - 0x48, 0x41, 0x53, 0x48, 0x45, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x47, - 0x45, 0x54, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x42, 0x4f, 0x44, 0x49, 0x45, 0x53, 0x5f, - 0x36, 0x35, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x42, 0x4f, - 0x44, 0x49, 0x45, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x45, 0x54, - 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x36, 0x35, 0x10, 0x06, 0x12, - 0x10, 0x0a, 0x0c, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x36, 0x35, 0x10, - 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x45, 0x54, 0x5f, 0x52, 0x45, 0x43, 0x45, 0x49, 0x50, 0x54, - 0x53, 0x5f, 0x36, 0x35, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45, 0x43, 0x45, 0x49, 0x50, - 0x54, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x4e, 0x45, 0x57, 0x5f, 0x42, - 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x45, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x0a, - 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x45, 0x57, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x36, 0x35, - 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, - 0x4e, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x0c, 0x12, 0x24, 0x0a, 0x20, 0x4e, 0x45, 0x57, 0x5f, 0x50, - 0x4f, 0x4f, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x45, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x0d, 0x12, 0x1e, 0x0a, - 0x1a, 0x47, 0x45, 0x54, 0x5f, 0x50, 0x4f, 0x4f, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, - 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x0e, 0x12, 0x1a, 0x0a, - 0x16, 0x50, 0x4f, 0x4f, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, - 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x0f, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x11, 0x12, 0x17, 0x0a, 0x13, 0x4e, 0x45, 0x57, 0x5f, - 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x45, 0x53, 0x5f, 0x36, 0x36, 0x10, - 0x12, 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x45, 0x57, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x36, - 0x36, 0x10, 0x13, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, - 0x4f, 0x4e, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x14, 0x12, 0x24, 0x0a, 0x20, 0x4e, 0x45, 0x57, 0x5f, + 0x63, 0x6b, 0x22, 0x10, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x22, 0x3e, 0x0a, 0x0e, 0x48, 0x61, 0x6e, 0x64, 0x53, 0x68, 0x61, 0x6b, + 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2c, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x36, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x12, 0x0a, 0x10, + 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x26, 0x0a, 0x0e, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x65, 0x65, 0x72, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x90, 0x01, 0x0a, 0x0a, 0x50, 0x65, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x24, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x48, 0x35, 0x31, 0x32, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x32, 0x0a, + 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x73, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x2e, 0x50, 0x65, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x22, 0x28, 0x0a, 0x09, 0x50, 0x65, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0b, + 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x10, 0x01, 0x2a, 0xda, 0x05, 0x0a, 0x09, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x47, 0x45, 0x54, 0x5f, + 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x53, 0x5f, 0x36, 0x35, + 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x45, 0x41, 0x44, + 0x45, 0x52, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x42, 0x4c, 0x4f, 0x43, + 0x4b, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x45, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x03, 0x12, 0x17, 0x0a, + 0x13, 0x47, 0x45, 0x54, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x42, 0x4f, 0x44, 0x49, 0x45, + 0x53, 0x5f, 0x36, 0x35, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, + 0x42, 0x4f, 0x44, 0x49, 0x45, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x47, + 0x45, 0x54, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x36, 0x35, 0x10, + 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x36, + 0x35, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x45, 0x54, 0x5f, 0x52, 0x45, 0x43, 0x45, 0x49, + 0x50, 0x54, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45, 0x43, 0x45, + 0x49, 0x50, 0x54, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x4e, 0x45, 0x57, + 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x45, 0x53, 0x5f, 0x36, 0x35, + 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x45, 0x57, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, + 0x36, 0x35, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x0c, 0x12, 0x24, 0x0a, 0x20, 0x4e, 0x45, 0x57, + 0x5f, 0x50, 0x4f, 0x4f, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x45, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x0d, 0x12, + 0x1e, 0x0a, 0x1a, 0x47, 0x45, 0x54, 0x5f, 0x50, 0x4f, 0x4f, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, + 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x0e, 0x12, + 0x1a, 0x0a, 0x16, 0x50, 0x4f, 0x4f, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x0f, 0x12, 0x0d, 0x0a, 0x09, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x11, 0x12, 0x17, 0x0a, 0x13, 0x4e, 0x45, + 0x57, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x45, 0x53, 0x5f, 0x36, + 0x36, 0x10, 0x12, 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x45, 0x57, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, + 0x5f, 0x36, 0x36, 0x10, 0x13, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x14, 0x12, 0x24, 0x0a, 0x20, 0x4e, 0x45, + 0x57, 0x5f, 0x50, 0x4f, 0x4f, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x45, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x15, + 0x12, 0x18, 0x0a, 0x14, 0x47, 0x45, 0x54, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x45, + 0x41, 0x44, 0x45, 0x52, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x16, 0x12, 0x17, 0x0a, 0x13, 0x47, 0x45, + 0x54, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x42, 0x4f, 0x44, 0x49, 0x45, 0x53, 0x5f, 0x36, + 0x36, 0x10, 0x17, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, + 0x44, 0x41, 0x54, 0x41, 0x5f, 0x36, 0x36, 0x10, 0x18, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x45, 0x54, + 0x5f, 0x52, 0x45, 0x43, 0x45, 0x49, 0x50, 0x54, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x19, 0x12, 0x1e, + 0x0a, 0x1a, 0x47, 0x45, 0x54, 0x5f, 0x50, 0x4f, 0x4f, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, + 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x1a, 0x12, 0x14, + 0x0a, 0x10, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x53, 0x5f, + 0x36, 0x36, 0x10, 0x1b, 0x12, 0x13, 0x0a, 0x0f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x42, 0x4f, + 0x44, 0x49, 0x45, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x1c, 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x4f, 0x44, + 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x36, 0x36, 0x10, 0x1d, 0x12, 0x0f, 0x0a, 0x0b, 0x52, + 0x45, 0x43, 0x45, 0x49, 0x50, 0x54, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x1e, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x4f, 0x4f, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x45, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x15, 0x12, 0x18, - 0x0a, 0x14, 0x47, 0x45, 0x54, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x45, 0x41, 0x44, - 0x45, 0x52, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x16, 0x12, 0x17, 0x0a, 0x13, 0x47, 0x45, 0x54, 0x5f, - 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x42, 0x4f, 0x44, 0x49, 0x45, 0x53, 0x5f, 0x36, 0x36, 0x10, - 0x17, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x41, - 0x54, 0x41, 0x5f, 0x36, 0x36, 0x10, 0x18, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x45, 0x54, 0x5f, 0x52, - 0x45, 0x43, 0x45, 0x49, 0x50, 0x54, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x19, 0x12, 0x1e, 0x0a, 0x1a, - 0x47, 0x45, 0x54, 0x5f, 0x50, 0x4f, 0x4f, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, - 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x1a, 0x12, 0x14, 0x0a, 0x10, - 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x53, 0x5f, 0x36, 0x36, - 0x10, 0x1b, 0x12, 0x13, 0x0a, 0x0f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x42, 0x4f, 0x44, 0x49, - 0x45, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x1c, 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x4f, 0x44, 0x45, 0x5f, - 0x44, 0x41, 0x54, 0x41, 0x5f, 0x36, 0x36, 0x10, 0x1d, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45, 0x43, - 0x45, 0x49, 0x50, 0x54, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x1e, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x4f, - 0x4f, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, - 0x53, 0x5f, 0x36, 0x36, 0x10, 0x1f, 0x2a, 0x17, 0x0a, 0x0b, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, - 0x79, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x08, 0x0a, 0x04, 0x4b, 0x69, 0x63, 0x6b, 0x10, 0x00, 0x2a, - 0x20, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x45, - 0x54, 0x48, 0x36, 0x35, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x54, 0x48, 0x36, 0x36, 0x10, - 0x01, 0x32, 0xb2, 0x05, 0x0a, 0x06, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x43, 0x0a, 0x0c, - 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x65, 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x73, - 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x65, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x4f, 0x4e, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x1f, 0x2a, 0x17, 0x0a, 0x0b, 0x50, 0x65, 0x6e, 0x61, + 0x6c, 0x74, 0x79, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x08, 0x0a, 0x04, 0x4b, 0x69, 0x63, 0x6b, 0x10, + 0x00, 0x2a, 0x20, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x09, 0x0a, + 0x05, 0x45, 0x54, 0x48, 0x36, 0x35, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x54, 0x48, 0x36, + 0x36, 0x10, 0x01, 0x32, 0xef, 0x05, 0x0a, 0x06, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x37, + 0x0a, 0x09, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x2e, 0x73, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x61, 0x74, 0x61, 0x1a, + 0x16, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x43, 0x0a, 0x0c, 0x50, 0x65, 0x6e, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x50, 0x65, 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x2e, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x43, 0x0a, 0x0c, + 0x50, 0x65, 0x65, 0x72, 0x4d, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1b, 0x2e, 0x73, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x4d, 0x69, 0x6e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x12, 0x43, 0x0a, 0x0c, 0x50, 0x65, 0x65, 0x72, 0x4d, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x1b, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x4d, - 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x79, 0x12, 0x3b, 0x0a, 0x09, 0x48, 0x61, 0x6e, 0x64, 0x53, 0x68, 0x61, 0x6b, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x50, 0x0a, 0x15, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x4d, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, - 0x24, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x4d, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, - 0x65, 0x6e, 0x74, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x44, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x49, 0x64, 0x12, 0x1e, 0x2e, 0x73, 0x65, - 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x73, 0x65, - 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x56, - 0x0a, 0x18, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x52, - 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x27, 0x2e, 0x73, 0x65, 0x6e, - 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, - 0x6f, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, + 0x48, 0x61, 0x6e, 0x64, 0x53, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x50, + 0x0a, 0x15, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x4d, + 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x4d, 0x69, + 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, + 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x50, 0x65, 0x65, 0x72, 0x73, + 0x12, 0x44, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, + 0x79, 0x49, 0x64, 0x12, 0x1e, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x6e, + 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x6e, - 0x74, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x42, 0x0a, 0x10, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x41, 0x6c, 0x6c, 0x12, 0x1b, 0x2e, 0x73, 0x65, 0x6e, - 0x74, 0x72, 0x79, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x11, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, - 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x09, 0x53, 0x65, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x16, 0x2e, 0x73, 0x65, - 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x70, 0x6c, 0x79, 0x12, 0x3d, 0x0a, 0x08, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, - 0x17, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, - 0x79, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x30, 0x01, 0x12, 0x3d, 0x0a, 0x09, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x18, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x12, 0x33, 0x0a, 0x05, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x14, 0x2e, 0x73, 0x65, 0x6e, - 0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x12, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x30, 0x01, 0x42, 0x11, 0x5a, 0x0f, 0x2e, 0x2f, 0x73, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x3b, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x74, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x56, 0x0a, 0x18, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x65, 0x65, + 0x72, 0x73, 0x12, 0x27, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x6e, 0x64, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, + 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x73, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x42, + 0x0a, 0x10, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x41, + 0x6c, 0x6c, 0x12, 0x1b, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4f, 0x75, 0x74, 0x62, + 0x6f, 0x75, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x1a, + 0x11, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x50, 0x65, 0x65, + 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x08, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x17, + 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x30, + 0x01, 0x12, 0x3d, 0x0a, 0x09, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, + 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x12, 0x33, 0x0a, 0x05, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x14, 0x2e, 0x73, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x12, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x30, 0x01, 0x42, 0x11, 0x5a, 0x0f, 0x2e, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x3b, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1345,7 +1387,7 @@ func file_p2psentry_sentry_proto_rawDescGZIP() []byte { } var file_p2psentry_sentry_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_p2psentry_sentry_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_p2psentry_sentry_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_p2psentry_sentry_proto_goTypes = []interface{}{ (MessageId)(0), // 0: sentry.MessageId (PenaltyKind)(0), // 1: sentry.PenaltyKind @@ -1362,57 +1404,60 @@ var file_p2psentry_sentry_proto_goTypes = []interface{}{ (*Forks)(nil), // 12: sentry.Forks (*StatusData)(nil), // 13: sentry.StatusData (*SetStatusReply)(nil), // 14: sentry.SetStatusReply - (*MessagesRequest)(nil), // 15: sentry.MessagesRequest - (*PeerCountRequest)(nil), // 16: sentry.PeerCountRequest - (*PeerCountReply)(nil), // 17: sentry.PeerCountReply - (*PeersRequest)(nil), // 18: sentry.PeersRequest - (*PeersReply)(nil), // 19: sentry.PeersReply - (*types.H512)(nil), // 20: types.H512 - (*types.H256)(nil), // 21: types.H256 - (*emptypb.Empty)(nil), // 22: google.protobuf.Empty + (*HandShakeReply)(nil), // 15: sentry.HandShakeReply + (*MessagesRequest)(nil), // 16: sentry.MessagesRequest + (*PeerCountRequest)(nil), // 17: sentry.PeerCountRequest + (*PeerCountReply)(nil), // 18: sentry.PeerCountReply + (*PeersRequest)(nil), // 19: sentry.PeersRequest + (*PeersReply)(nil), // 20: sentry.PeersReply + (*types.H512)(nil), // 21: types.H512 + (*types.H256)(nil), // 22: types.H256 + (*emptypb.Empty)(nil), // 23: google.protobuf.Empty } var file_p2psentry_sentry_proto_depIdxs = []int32{ 0, // 0: sentry.OutboundMessageData.id:type_name -> sentry.MessageId 4, // 1: sentry.SendMessageByMinBlockRequest.data:type_name -> sentry.OutboundMessageData 4, // 2: sentry.SendMessageByIdRequest.data:type_name -> sentry.OutboundMessageData - 20, // 3: sentry.SendMessageByIdRequest.peer_id:type_name -> types.H512 + 21, // 3: sentry.SendMessageByIdRequest.peer_id:type_name -> types.H512 4, // 4: sentry.SendMessageToRandomPeersRequest.data:type_name -> sentry.OutboundMessageData - 20, // 5: sentry.SentPeers.peers:type_name -> types.H512 - 20, // 6: sentry.PenalizePeerRequest.peer_id:type_name -> types.H512 + 21, // 5: sentry.SentPeers.peers:type_name -> types.H512 + 21, // 6: sentry.PenalizePeerRequest.peer_id:type_name -> types.H512 1, // 7: sentry.PenalizePeerRequest.penalty:type_name -> sentry.PenaltyKind - 20, // 8: sentry.PeerMinBlockRequest.peer_id:type_name -> types.H512 + 21, // 8: sentry.PeerMinBlockRequest.peer_id:type_name -> types.H512 0, // 9: sentry.InboundMessage.id:type_name -> sentry.MessageId - 20, // 10: sentry.InboundMessage.peer_id:type_name -> types.H512 - 21, // 11: sentry.Forks.genesis:type_name -> types.H256 - 21, // 12: sentry.StatusData.total_difficulty:type_name -> types.H256 - 21, // 13: sentry.StatusData.best_hash:type_name -> types.H256 + 21, // 10: sentry.InboundMessage.peer_id:type_name -> types.H512 + 22, // 11: sentry.Forks.genesis:type_name -> types.H256 + 22, // 12: sentry.StatusData.total_difficulty:type_name -> types.H256 + 22, // 13: sentry.StatusData.best_hash:type_name -> types.H256 12, // 14: sentry.StatusData.fork_data:type_name -> sentry.Forks - 2, // 15: sentry.SetStatusReply.protocol:type_name -> sentry.Protocol + 2, // 15: sentry.HandShakeReply.protocol:type_name -> sentry.Protocol 0, // 16: sentry.MessagesRequest.ids:type_name -> sentry.MessageId - 20, // 17: sentry.PeersReply.peer_id:type_name -> types.H512 + 21, // 17: sentry.PeersReply.peer_id:type_name -> types.H512 3, // 18: sentry.PeersReply.event:type_name -> sentry.PeersReply.PeerEvent - 9, // 19: sentry.Sentry.PenalizePeer:input_type -> sentry.PenalizePeerRequest - 10, // 20: sentry.Sentry.PeerMinBlock:input_type -> sentry.PeerMinBlockRequest - 5, // 21: sentry.Sentry.SendMessageByMinBlock:input_type -> sentry.SendMessageByMinBlockRequest - 6, // 22: sentry.Sentry.SendMessageById:input_type -> sentry.SendMessageByIdRequest - 7, // 23: sentry.Sentry.SendMessageToRandomPeers:input_type -> sentry.SendMessageToRandomPeersRequest - 4, // 24: sentry.Sentry.SendMessageToAll:input_type -> sentry.OutboundMessageData - 13, // 25: sentry.Sentry.SetStatus:input_type -> sentry.StatusData - 15, // 26: sentry.Sentry.Messages:input_type -> sentry.MessagesRequest - 16, // 27: sentry.Sentry.PeerCount:input_type -> sentry.PeerCountRequest - 18, // 28: sentry.Sentry.Peers:input_type -> sentry.PeersRequest - 22, // 29: sentry.Sentry.PenalizePeer:output_type -> google.protobuf.Empty - 22, // 30: sentry.Sentry.PeerMinBlock:output_type -> google.protobuf.Empty - 8, // 31: sentry.Sentry.SendMessageByMinBlock:output_type -> sentry.SentPeers - 8, // 32: sentry.Sentry.SendMessageById:output_type -> sentry.SentPeers - 8, // 33: sentry.Sentry.SendMessageToRandomPeers:output_type -> sentry.SentPeers - 8, // 34: sentry.Sentry.SendMessageToAll:output_type -> sentry.SentPeers - 14, // 35: sentry.Sentry.SetStatus:output_type -> sentry.SetStatusReply - 11, // 36: sentry.Sentry.Messages:output_type -> sentry.InboundMessage - 17, // 37: sentry.Sentry.PeerCount:output_type -> sentry.PeerCountReply - 19, // 38: sentry.Sentry.Peers:output_type -> sentry.PeersReply - 29, // [29:39] is the sub-list for method output_type - 19, // [19:29] is the sub-list for method input_type + 13, // 19: sentry.Sentry.SetStatus:input_type -> sentry.StatusData + 9, // 20: sentry.Sentry.PenalizePeer:input_type -> sentry.PenalizePeerRequest + 10, // 21: sentry.Sentry.PeerMinBlock:input_type -> sentry.PeerMinBlockRequest + 23, // 22: sentry.Sentry.HandShake:input_type -> google.protobuf.Empty + 5, // 23: sentry.Sentry.SendMessageByMinBlock:input_type -> sentry.SendMessageByMinBlockRequest + 6, // 24: sentry.Sentry.SendMessageById:input_type -> sentry.SendMessageByIdRequest + 7, // 25: sentry.Sentry.SendMessageToRandomPeers:input_type -> sentry.SendMessageToRandomPeersRequest + 4, // 26: sentry.Sentry.SendMessageToAll:input_type -> sentry.OutboundMessageData + 16, // 27: sentry.Sentry.Messages:input_type -> sentry.MessagesRequest + 17, // 28: sentry.Sentry.PeerCount:input_type -> sentry.PeerCountRequest + 19, // 29: sentry.Sentry.Peers:input_type -> sentry.PeersRequest + 14, // 30: sentry.Sentry.SetStatus:output_type -> sentry.SetStatusReply + 23, // 31: sentry.Sentry.PenalizePeer:output_type -> google.protobuf.Empty + 23, // 32: sentry.Sentry.PeerMinBlock:output_type -> google.protobuf.Empty + 15, // 33: sentry.Sentry.HandShake:output_type -> sentry.HandShakeReply + 8, // 34: sentry.Sentry.SendMessageByMinBlock:output_type -> sentry.SentPeers + 8, // 35: sentry.Sentry.SendMessageById:output_type -> sentry.SentPeers + 8, // 36: sentry.Sentry.SendMessageToRandomPeers:output_type -> sentry.SentPeers + 8, // 37: sentry.Sentry.SendMessageToAll:output_type -> sentry.SentPeers + 11, // 38: sentry.Sentry.Messages:output_type -> sentry.InboundMessage + 18, // 39: sentry.Sentry.PeerCount:output_type -> sentry.PeerCountReply + 20, // 40: sentry.Sentry.Peers:output_type -> sentry.PeersReply + 30, // [30:41] is the sub-list for method output_type + 19, // [19:30] is the sub-list for method input_type 19, // [19:19] is the sub-list for extension type_name 19, // [19:19] is the sub-list for extension extendee 0, // [0:19] is the sub-list for field type_name @@ -1557,7 +1602,7 @@ func file_p2psentry_sentry_proto_init() { } } file_p2psentry_sentry_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MessagesRequest); i { + switch v := v.(*HandShakeReply); i { case 0: return &v.state case 1: @@ -1569,7 +1614,7 @@ func file_p2psentry_sentry_proto_init() { } } file_p2psentry_sentry_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeerCountRequest); i { + switch v := v.(*MessagesRequest); i { case 0: return &v.state case 1: @@ -1581,7 +1626,7 @@ func file_p2psentry_sentry_proto_init() { } } file_p2psentry_sentry_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeerCountReply); i { + switch v := v.(*PeerCountRequest); i { case 0: return &v.state case 1: @@ -1593,7 +1638,7 @@ func file_p2psentry_sentry_proto_init() { } } file_p2psentry_sentry_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeersRequest); i { + switch v := v.(*PeerCountReply); i { case 0: return &v.state case 1: @@ -1605,6 +1650,18 @@ func file_p2psentry_sentry_proto_init() { } } file_p2psentry_sentry_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PeersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_p2psentry_sentry_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PeersReply); i { case 0: return &v.state @@ -1623,7 +1680,7 @@ func file_p2psentry_sentry_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_p2psentry_sentry_proto_rawDesc, NumEnums: 4, - NumMessages: 16, + NumMessages: 17, NumExtensions: 0, NumServices: 1, }, diff --git a/gointerfaces/sentry/sentry_grpc.pb.go b/gointerfaces/sentry/sentry_grpc.pb.go index baba40266..a603777a0 100644 --- a/gointerfaces/sentry/sentry_grpc.pb.go +++ b/gointerfaces/sentry/sentry_grpc.pb.go @@ -19,13 +19,17 @@ const _ = grpc.SupportPackageIsVersion7 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type SentryClient interface { + // SetStatus - force new ETH client state of sentry - network_id, max_block, etc... + SetStatus(ctx context.Context, in *StatusData, opts ...grpc.CallOption) (*SetStatusReply, error) PenalizePeer(ctx context.Context, in *PenalizePeerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) PeerMinBlock(ctx context.Context, in *PeerMinBlockRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // HandShake - pre-requirement for all Send* methods - returns ETH protocol version, + // without knowledge of protocol - impossible encode correct P2P message + HandShake(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HandShakeReply, error) SendMessageByMinBlock(ctx context.Context, in *SendMessageByMinBlockRequest, opts ...grpc.CallOption) (*SentPeers, error) SendMessageById(ctx context.Context, in *SendMessageByIdRequest, opts ...grpc.CallOption) (*SentPeers, error) SendMessageToRandomPeers(ctx context.Context, in *SendMessageToRandomPeersRequest, opts ...grpc.CallOption) (*SentPeers, error) SendMessageToAll(ctx context.Context, in *OutboundMessageData, opts ...grpc.CallOption) (*SentPeers, error) - SetStatus(ctx context.Context, in *StatusData, opts ...grpc.CallOption) (*SetStatusReply, error) // Subscribe to receive messages. // Calling multiple times with a different set of ids starts separate streams. // It is possible to subscribe to the same set if ids more than once. @@ -43,6 +47,15 @@ func NewSentryClient(cc grpc.ClientConnInterface) SentryClient { return &sentryClient{cc} } +func (c *sentryClient) SetStatus(ctx context.Context, in *StatusData, opts ...grpc.CallOption) (*SetStatusReply, error) { + out := new(SetStatusReply) + err := c.cc.Invoke(ctx, "/sentry.Sentry/SetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *sentryClient) PenalizePeer(ctx context.Context, in *PenalizePeerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/sentry.Sentry/PenalizePeer", in, out, opts...) @@ -61,6 +74,15 @@ func (c *sentryClient) PeerMinBlock(ctx context.Context, in *PeerMinBlockRequest return out, nil } +func (c *sentryClient) HandShake(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HandShakeReply, error) { + out := new(HandShakeReply) + err := c.cc.Invoke(ctx, "/sentry.Sentry/HandShake", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *sentryClient) SendMessageByMinBlock(ctx context.Context, in *SendMessageByMinBlockRequest, opts ...grpc.CallOption) (*SentPeers, error) { out := new(SentPeers) err := c.cc.Invoke(ctx, "/sentry.Sentry/SendMessageByMinBlock", in, out, opts...) @@ -97,15 +119,6 @@ func (c *sentryClient) SendMessageToAll(ctx context.Context, in *OutboundMessage return out, nil } -func (c *sentryClient) SetStatus(ctx context.Context, in *StatusData, opts ...grpc.CallOption) (*SetStatusReply, error) { - out := new(SetStatusReply) - err := c.cc.Invoke(ctx, "/sentry.Sentry/SetStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *sentryClient) Messages(ctx context.Context, in *MessagesRequest, opts ...grpc.CallOption) (Sentry_MessagesClient, error) { stream, err := c.cc.NewStream(ctx, &Sentry_ServiceDesc.Streams[0], "/sentry.Sentry/Messages", opts...) if err != nil { @@ -183,13 +196,17 @@ func (x *sentryPeersClient) Recv() (*PeersReply, error) { // All implementations must embed UnimplementedSentryServer // for forward compatibility type SentryServer interface { + // SetStatus - force new ETH client state of sentry - network_id, max_block, etc... + SetStatus(context.Context, *StatusData) (*SetStatusReply, error) PenalizePeer(context.Context, *PenalizePeerRequest) (*emptypb.Empty, error) PeerMinBlock(context.Context, *PeerMinBlockRequest) (*emptypb.Empty, error) + // HandShake - pre-requirement for all Send* methods - returns ETH protocol version, + // without knowledge of protocol - impossible encode correct P2P message + HandShake(context.Context, *emptypb.Empty) (*HandShakeReply, error) SendMessageByMinBlock(context.Context, *SendMessageByMinBlockRequest) (*SentPeers, error) SendMessageById(context.Context, *SendMessageByIdRequest) (*SentPeers, error) SendMessageToRandomPeers(context.Context, *SendMessageToRandomPeersRequest) (*SentPeers, error) SendMessageToAll(context.Context, *OutboundMessageData) (*SentPeers, error) - SetStatus(context.Context, *StatusData) (*SetStatusReply, error) // Subscribe to receive messages. // Calling multiple times with a different set of ids starts separate streams. // It is possible to subscribe to the same set if ids more than once. @@ -204,12 +221,18 @@ type SentryServer interface { type UnimplementedSentryServer struct { } +func (UnimplementedSentryServer) SetStatus(context.Context, *StatusData) (*SetStatusReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetStatus not implemented") +} func (UnimplementedSentryServer) PenalizePeer(context.Context, *PenalizePeerRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method PenalizePeer not implemented") } func (UnimplementedSentryServer) PeerMinBlock(context.Context, *PeerMinBlockRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method PeerMinBlock not implemented") } +func (UnimplementedSentryServer) HandShake(context.Context, *emptypb.Empty) (*HandShakeReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method HandShake not implemented") +} func (UnimplementedSentryServer) SendMessageByMinBlock(context.Context, *SendMessageByMinBlockRequest) (*SentPeers, error) { return nil, status.Errorf(codes.Unimplemented, "method SendMessageByMinBlock not implemented") } @@ -222,9 +245,6 @@ func (UnimplementedSentryServer) SendMessageToRandomPeers(context.Context, *Send func (UnimplementedSentryServer) SendMessageToAll(context.Context, *OutboundMessageData) (*SentPeers, error) { return nil, status.Errorf(codes.Unimplemented, "method SendMessageToAll not implemented") } -func (UnimplementedSentryServer) SetStatus(context.Context, *StatusData) (*SetStatusReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetStatus not implemented") -} func (UnimplementedSentryServer) Messages(*MessagesRequest, Sentry_MessagesServer) error { return status.Errorf(codes.Unimplemented, "method Messages not implemented") } @@ -247,6 +267,24 @@ func RegisterSentryServer(s grpc.ServiceRegistrar, srv SentryServer) { s.RegisterService(&Sentry_ServiceDesc, srv) } +func _Sentry_SetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StatusData) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SentryServer).SetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentry.Sentry/SetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SentryServer).SetStatus(ctx, req.(*StatusData)) + } + return interceptor(ctx, in, info, handler) +} + func _Sentry_PenalizePeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PenalizePeerRequest) if err := dec(in); err != nil { @@ -283,6 +321,24 @@ func _Sentry_PeerMinBlock_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Sentry_HandShake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SentryServer).HandShake(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentry.Sentry/HandShake", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SentryServer).HandShake(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + func _Sentry_SendMessageByMinBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SendMessageByMinBlockRequest) if err := dec(in); err != nil { @@ -355,24 +411,6 @@ func _Sentry_SendMessageToAll_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _Sentry_SetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StatusData) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SentryServer).SetStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/sentry.Sentry/SetStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SentryServer).SetStatus(ctx, req.(*StatusData)) - } - return interceptor(ctx, in, info, handler) -} - func _Sentry_Messages_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(MessagesRequest) if err := stream.RecvMsg(m); err != nil { @@ -440,6 +478,10 @@ var Sentry_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sentry.Sentry", HandlerType: (*SentryServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "SetStatus", + Handler: _Sentry_SetStatus_Handler, + }, { MethodName: "PenalizePeer", Handler: _Sentry_PenalizePeer_Handler, @@ -448,6 +490,10 @@ var Sentry_ServiceDesc = grpc.ServiceDesc{ MethodName: "PeerMinBlock", Handler: _Sentry_PeerMinBlock_Handler, }, + { + MethodName: "HandShake", + Handler: _Sentry_HandShake_Handler, + }, { MethodName: "SendMessageByMinBlock", Handler: _Sentry_SendMessageByMinBlock_Handler, @@ -464,10 +510,6 @@ var Sentry_ServiceDesc = grpc.ServiceDesc{ MethodName: "SendMessageToAll", Handler: _Sentry_SendMessageToAll_Handler, }, - { - MethodName: "SetStatus", - Handler: _Sentry_SetStatus_Handler, - }, { MethodName: "PeerCount", Handler: _Sentry_PeerCount_Handler, diff --git a/txpool/mocks_test.go b/txpool/mocks_test.go index afbfe311c..f683e4c7a 100644 --- a/txpool/mocks_test.go +++ b/txpool/mocks_test.go @@ -4,9 +4,8 @@ package txpool import ( - "sync" - "github.com/ledgerwatch/erigon-lib/kv" + "sync" ) // Ensure, that PoolMock does implement Pool. diff --git a/txpool/test_util.go b/txpool/test_util.go index 37fe53ede..ec02130bb 100644 --- a/txpool/test_util.go +++ b/txpool/test_util.go @@ -23,6 +23,7 @@ import ( "github.com/ledgerwatch/erigon-lib/gointerfaces" "github.com/ledgerwatch/erigon-lib/gointerfaces/sentry" + "google.golang.org/protobuf/types/known/emptypb" ) //go:generate moq -stub -out mocks_test.go . Pool @@ -54,7 +55,10 @@ func (ms *MockSentry) Send(req *sentry.InboundMessage) (errs []error) { } func (ms *MockSentry) SetStatus(context.Context, *sentry.StatusData) (*sentry.SetStatusReply, error) { - return &sentry.SetStatusReply{Protocol: sentry.Protocol_ETH66}, nil + return &sentry.SetStatusReply{}, nil +} +func (ms *MockSentry) HandShake(context.Context, *emptypb.Empty) (*sentry.HandShakeReply, error) { + return &sentry.HandShakeReply{Protocol: sentry.Protocol_ETH66}, nil } func (ms *MockSentry) Messages(req *sentry.MessagesRequest, stream sentry.Sentry_MessagesServer) error { ms.lock.Lock()