diff --git a/release/go/spacemesh/v2alpha1/activation.pb.go b/release/go/spacemesh/v2alpha1/activation.pb.go index 376bedb1..f97a9ed7 100644 --- a/release/go/spacemesh/v2alpha1/activation.pb.go +++ b/release/go/spacemesh/v2alpha1/activation.pb.go @@ -439,6 +439,91 @@ func (x *ActivationsCountResponse) GetCount() uint32 { return 0 } +type HighestRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *HighestRequest) Reset() { + *x = HighestRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v2alpha1_activation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HighestRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HighestRequest) ProtoMessage() {} + +func (x *HighestRequest) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v2alpha1_activation_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HighestRequest.ProtoReflect.Descriptor instead. +func (*HighestRequest) Descriptor() ([]byte, []int) { + return file_spacemesh_v2alpha1_activation_proto_rawDescGZIP(), []int{6} +} + +type HighestResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Activation *Activation `protobuf:"bytes,1,opt,name=activation,proto3" json:"activation,omitempty"` +} + +func (x *HighestResponse) Reset() { + *x = HighestResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v2alpha1_activation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HighestResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HighestResponse) ProtoMessage() {} + +func (x *HighestResponse) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v2alpha1_activation_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HighestResponse.ProtoReflect.Descriptor instead. +func (*HighestResponse) Descriptor() ([]byte, []int) { + return file_spacemesh_v2alpha1_activation_proto_rawDescGZIP(), []int{7} +} + +func (x *HighestResponse) GetActivation() *Activation { + if x != nil { + return x.Activation + } + return nil +} + var File_spacemesh_v2alpha1_activation_proto protoreflect.FileDescriptor var file_spacemesh_v2alpha1_activation_proto_rawDesc = []byte{ @@ -497,44 +582,55 @@ var file_spacemesh_v2alpha1_activation_proto_rawDesc = []byte{ 0x0a, 0x18, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x32, 0x84, 0x01, 0x0a, 0x17, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x57, 0x0a, 0x06, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x2b, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, - 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, - 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x30, 0x01, 0x1a, 0x10, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x49, - 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x32, 0xe1, 0x01, 0x0a, 0x11, 0x41, 0x63, 0x74, 0x69, - 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x51, 0x0a, - 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, - 0x12, 0x6d, 0x0a, 0x10, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2b, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2c, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, + 0x22, 0x10, 0x0a, 0x0e, 0x48, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x51, 0x0a, 0x0f, 0x48, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x84, 0x01, 0x0a, 0x17, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x57, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x2b, 0x2e, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x30, 0x01, 0x1a, 0x10, 0xfa, 0xd2, 0xe4, 0x93, + 0x02, 0x0a, 0x12, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x32, 0xb5, 0x02, 0x0a, + 0x11, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x51, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25, 0x2e, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, - 0x0a, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x04, 0x12, 0x02, 0x56, 0x32, 0x42, 0xde, 0x01, 0x0a, 0x16, - 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x6f, - 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2f, 0x67, 0x6f, - 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x3b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x32, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x12, 0x53, 0x70, - 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0xca, 0x02, 0x12, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x32, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, - 0x68, 0x5c, 0x56, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, - 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x6d, 0x0a, 0x10, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2b, 0x2e, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x07, 0x48, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x12, + 0x22, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x0a, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x04, + 0x12, 0x02, 0x56, 0x32, 0x42, 0xde, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, + 0x0f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, + 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2f, 0x67, 0x6f, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, + 0x65, 0x73, 0x68, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, + 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x12, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x56, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x12, 0x53, 0x70, 0x61, 0x63, + 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, + 0x1e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x32, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x13, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x32, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -549,7 +645,7 @@ func file_spacemesh_v2alpha1_activation_proto_rawDescGZIP() []byte { return file_spacemesh_v2alpha1_activation_proto_rawDescData } -var file_spacemesh_v2alpha1_activation_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_spacemesh_v2alpha1_activation_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_spacemesh_v2alpha1_activation_proto_goTypes = []interface{}{ (*Activation)(nil), // 0: spacemesh.v2alpha1.Activation (*ActivationStreamRequest)(nil), // 1: spacemesh.v2alpha1.ActivationStreamRequest @@ -557,20 +653,25 @@ var file_spacemesh_v2alpha1_activation_proto_goTypes = []interface{}{ (*ActivationList)(nil), // 3: spacemesh.v2alpha1.ActivationList (*ActivationsCountRequest)(nil), // 4: spacemesh.v2alpha1.ActivationsCountRequest (*ActivationsCountResponse)(nil), // 5: spacemesh.v2alpha1.ActivationsCountResponse + (*HighestRequest)(nil), // 6: spacemesh.v2alpha1.HighestRequest + (*HighestResponse)(nil), // 7: spacemesh.v2alpha1.HighestResponse } var file_spacemesh_v2alpha1_activation_proto_depIdxs = []int32{ 0, // 0: spacemesh.v2alpha1.ActivationList.activations:type_name -> spacemesh.v2alpha1.Activation - 1, // 1: spacemesh.v2alpha1.ActivationStreamService.Stream:input_type -> spacemesh.v2alpha1.ActivationStreamRequest - 2, // 2: spacemesh.v2alpha1.ActivationService.List:input_type -> spacemesh.v2alpha1.ActivationRequest - 4, // 3: spacemesh.v2alpha1.ActivationService.ActivationsCount:input_type -> spacemesh.v2alpha1.ActivationsCountRequest - 0, // 4: spacemesh.v2alpha1.ActivationStreamService.Stream:output_type -> spacemesh.v2alpha1.Activation - 3, // 5: spacemesh.v2alpha1.ActivationService.List:output_type -> spacemesh.v2alpha1.ActivationList - 5, // 6: spacemesh.v2alpha1.ActivationService.ActivationsCount:output_type -> spacemesh.v2alpha1.ActivationsCountResponse - 4, // [4:7] is the sub-list for method output_type - 1, // [1:4] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 0, // 1: spacemesh.v2alpha1.HighestResponse.activation:type_name -> spacemesh.v2alpha1.Activation + 1, // 2: spacemesh.v2alpha1.ActivationStreamService.Stream:input_type -> spacemesh.v2alpha1.ActivationStreamRequest + 2, // 3: spacemesh.v2alpha1.ActivationService.List:input_type -> spacemesh.v2alpha1.ActivationRequest + 4, // 4: spacemesh.v2alpha1.ActivationService.ActivationsCount:input_type -> spacemesh.v2alpha1.ActivationsCountRequest + 6, // 5: spacemesh.v2alpha1.ActivationService.Highest:input_type -> spacemesh.v2alpha1.HighestRequest + 0, // 6: spacemesh.v2alpha1.ActivationStreamService.Stream:output_type -> spacemesh.v2alpha1.Activation + 3, // 7: spacemesh.v2alpha1.ActivationService.List:output_type -> spacemesh.v2alpha1.ActivationList + 5, // 8: spacemesh.v2alpha1.ActivationService.ActivationsCount:output_type -> spacemesh.v2alpha1.ActivationsCountResponse + 7, // 9: spacemesh.v2alpha1.ActivationService.Highest:output_type -> spacemesh.v2alpha1.HighestResponse + 6, // [6:10] is the sub-list for method output_type + 2, // [2:6] 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_spacemesh_v2alpha1_activation_proto_init() } @@ -651,6 +752,30 @@ func file_spacemesh_v2alpha1_activation_proto_init() { return nil } } + file_spacemesh_v2alpha1_activation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HighestRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v2alpha1_activation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HighestResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_spacemesh_v2alpha1_activation_proto_msgTypes[4].OneofWrappers = []interface{}{} type x struct{} @@ -659,7 +784,7 @@ func file_spacemesh_v2alpha1_activation_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_spacemesh_v2alpha1_activation_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 2, }, diff --git a/release/go/spacemesh/v2alpha1/activation.pb.gw.go b/release/go/spacemesh/v2alpha1/activation.pb.gw.go index 6e1903a0..8e504632 100644 --- a/release/go/spacemesh/v2alpha1/activation.pb.gw.go +++ b/release/go/spacemesh/v2alpha1/activation.pb.gw.go @@ -104,6 +104,32 @@ func local_request_ActivationService_ActivationsCount_0(ctx context.Context, mar } +func request_ActivationService_Highest_0(ctx context.Context, marshaler runtime.Marshaler, client ActivationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq HighestRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Highest(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ActivationService_Highest_0(ctx context.Context, marshaler runtime.Marshaler, server ActivationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq HighestRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Highest(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterActivationStreamServiceHandlerServer registers the http handlers for service ActivationStreamService to "mux". // UnaryRPC :call ActivationStreamServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -176,6 +202,31 @@ func RegisterActivationServiceHandlerServer(ctx context.Context, mux *runtime.Se }) + mux.Handle("POST", pattern_ActivationService_Highest_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/spacemesh.v2alpha1.ActivationService/Highest", runtime.WithHTTPPathPattern("/spacemesh.v2alpha1.ActivationService/Highest")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ActivationService_Highest_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ActivationService_Highest_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -332,6 +383,28 @@ func RegisterActivationServiceHandlerClient(ctx context.Context, mux *runtime.Se }) + mux.Handle("POST", pattern_ActivationService_Highest_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/spacemesh.v2alpha1.ActivationService/Highest", runtime.WithHTTPPathPattern("/spacemesh.v2alpha1.ActivationService/Highest")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ActivationService_Highest_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ActivationService_Highest_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -339,10 +412,14 @@ var ( pattern_ActivationService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"spacemesh.v2alpha1.ActivationService", "List"}, "")) pattern_ActivationService_ActivationsCount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"spacemesh.v2alpha1.ActivationService", "ActivationsCount"}, "")) + + pattern_ActivationService_Highest_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"spacemesh.v2alpha1.ActivationService", "Highest"}, "")) ) var ( forward_ActivationService_List_0 = runtime.ForwardResponseMessage forward_ActivationService_ActivationsCount_0 = runtime.ForwardResponseMessage + + forward_ActivationService_Highest_0 = runtime.ForwardResponseMessage ) diff --git a/release/go/spacemesh/v2alpha1/activation_grpc.pb.go b/release/go/spacemesh/v2alpha1/activation_grpc.pb.go index a75ac51c..9ec92428 100644 --- a/release/go/spacemesh/v2alpha1/activation_grpc.pb.go +++ b/release/go/spacemesh/v2alpha1/activation_grpc.pb.go @@ -136,6 +136,7 @@ var ActivationStreamService_ServiceDesc = grpc.ServiceDesc{ const ( ActivationService_List_FullMethodName = "/spacemesh.v2alpha1.ActivationService/List" ActivationService_ActivationsCount_FullMethodName = "/spacemesh.v2alpha1.ActivationService/ActivationsCount" + ActivationService_Highest_FullMethodName = "/spacemesh.v2alpha1.ActivationService/Highest" ) // ActivationServiceClient is the client API for ActivationService service. @@ -152,6 +153,11 @@ type ActivationServiceClient interface { // ActivationsCount is a method that takes an "{{.RequestType.Name}}" body and returns an "{{.ResponseType.Name}}". // This method is used to retrieve the count of activations for a specified epoch. ActivationsCount(ctx context.Context, in *ActivationsCountRequest, opts ...grpc.CallOption) (*ActivationsCountResponse, error) + // Highest + // + // Highest is a method that takes an "{{.RequestType.Name}}" body and returns an "{{.ResponseType.Name}}". + // This method is used to retrieve the activation with the highest tick count. + Highest(ctx context.Context, in *HighestRequest, opts ...grpc.CallOption) (*HighestResponse, error) } type activationServiceClient struct { @@ -180,6 +186,15 @@ func (c *activationServiceClient) ActivationsCount(ctx context.Context, in *Acti return out, nil } +func (c *activationServiceClient) Highest(ctx context.Context, in *HighestRequest, opts ...grpc.CallOption) (*HighestResponse, error) { + out := new(HighestResponse) + err := c.cc.Invoke(ctx, ActivationService_Highest_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ActivationServiceServer is the server API for ActivationService service. // All implementations should embed UnimplementedActivationServiceServer // for forward compatibility @@ -194,6 +209,11 @@ type ActivationServiceServer interface { // ActivationsCount is a method that takes an "{{.RequestType.Name}}" body and returns an "{{.ResponseType.Name}}". // This method is used to retrieve the count of activations for a specified epoch. ActivationsCount(context.Context, *ActivationsCountRequest) (*ActivationsCountResponse, error) + // Highest + // + // Highest is a method that takes an "{{.RequestType.Name}}" body and returns an "{{.ResponseType.Name}}". + // This method is used to retrieve the activation with the highest tick count. + Highest(context.Context, *HighestRequest) (*HighestResponse, error) } // UnimplementedActivationServiceServer should be embedded to have forward compatible implementations. @@ -206,6 +226,9 @@ func (UnimplementedActivationServiceServer) List(context.Context, *ActivationReq func (UnimplementedActivationServiceServer) ActivationsCount(context.Context, *ActivationsCountRequest) (*ActivationsCountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ActivationsCount not implemented") } +func (UnimplementedActivationServiceServer) Highest(context.Context, *HighestRequest) (*HighestResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Highest not implemented") +} // UnsafeActivationServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ActivationServiceServer will @@ -254,6 +277,24 @@ func _ActivationService_ActivationsCount_Handler(srv interface{}, ctx context.Co return interceptor(ctx, in, info, handler) } +func _ActivationService_Highest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HighestRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ActivationServiceServer).Highest(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ActivationService_Highest_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ActivationServiceServer).Highest(ctx, req.(*HighestRequest)) + } + return interceptor(ctx, in, info, handler) +} + // ActivationService_ServiceDesc is the grpc.ServiceDesc for ActivationService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -269,6 +310,10 @@ var ActivationService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ActivationsCount", Handler: _ActivationService_ActivationsCount_Handler, }, + { + MethodName: "Highest", + Handler: _ActivationService_Highest_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "spacemesh/v2alpha1/activation.proto", diff --git a/release/openapi/swagger/src/api.swagger.json b/release/openapi/swagger/src/api.swagger.json index edf97d5a..b93086c7 100644 --- a/release/openapi/swagger/src/api.swagger.json +++ b/release/openapi/swagger/src/api.swagger.json @@ -91,6 +91,40 @@ } } }, + "/spacemesh.v2alpha1.ActivationService/Highest": { + "post": { + "description": "Highest is a method that takes an \"HighestRequest\" body and returns an \"HighestResponse\".\nThis method is used to retrieve the activation with the highest tick count.", + "tags": [ + "ActivationService" + ], + "summary": "Highest", + "operationId": "ActivationService_Highest", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v2alpha1HighestRequest" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/spacemeshv2alpha1HighestResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + } + } + }, "/spacemesh.v2alpha1.ActivationService/List": { "post": { "description": "List is a method that takes an \"ActivationRequest\" body and returns an \"ActivationList\".\nThis method is used to retrieve a list of activations based on the provided request parameters.", @@ -607,6 +641,14 @@ } } }, + "spacemeshv2alpha1HighestResponse": { + "type": "object", + "properties": { + "activation": { + "$ref": "#/definitions/spacemeshv2alpha1Activation" + } + } + }, "spacemeshv2alpha1Layer": { "type": "object", "properties": { @@ -1127,6 +1169,9 @@ } } }, + "v2alpha1HighestRequest": { + "type": "object" + }, "v2alpha1LayerList": { "type": "object", "properties": { diff --git a/spacemesh/v2alpha1/activation.proto b/spacemesh/v2alpha1/activation.proto index 0f717e76..29abfd26 100644 --- a/spacemesh/v2alpha1/activation.proto +++ b/spacemesh/v2alpha1/activation.proto @@ -51,6 +51,13 @@ message ActivationsCountResponse { uint32 count = 1; // number of activations for the specified epoch } +message HighestRequest { +} + +message HighestResponse { + Activation activation = 1; +} + service ActivationService { option (google.api.api_visibility).restriction = "V2"; @@ -65,4 +72,10 @@ service ActivationService { // ActivationsCount is a method that takes an "{{.RequestType.Name}}" body and returns an "{{.ResponseType.Name}}". // This method is used to retrieve the count of activations for a specified epoch. rpc ActivationsCount(ActivationsCountRequest) returns (ActivationsCountResponse); + + // Highest + // + // Highest is a method that takes an "{{.RequestType.Name}}" body and returns an "{{.ResponseType.Name}}". + // This method is used to retrieve the activation with the highest tick count. + rpc Highest(HighestRequest) returns (HighestResponse); }