From f83c298b7622859644bb35815464c238e718bf03 Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Mon, 18 Sep 2023 13:55:39 +0000 Subject: [PATCH 01/11] Add PoST Service API --- release/go/spacemesh/v1/post.pb.go | 85 +++ release/go/spacemesh/v1/post.pb.gw.go | 162 ++++++ release/go/spacemesh/v1/post_grpc.pb.go | 141 +++++ release/go/spacemesh/v1/post_types.pb.go | 685 +++++++++++++++++++++++ spacemesh/v1/post.proto | 12 + spacemesh/v1/post_types.proto | 55 ++ 6 files changed, 1140 insertions(+) create mode 100644 release/go/spacemesh/v1/post.pb.go create mode 100644 release/go/spacemesh/v1/post.pb.gw.go create mode 100644 release/go/spacemesh/v1/post_grpc.pb.go create mode 100644 release/go/spacemesh/v1/post_types.pb.go create mode 100644 spacemesh/v1/post.proto create mode 100644 spacemesh/v1/post_types.proto diff --git a/release/go/spacemesh/v1/post.pb.go b/release/go/spacemesh/v1/post.pb.go new file mode 100644 index 00000000..d5914565 --- /dev/null +++ b/release/go/spacemesh/v1/post.pb.go @@ -0,0 +1,85 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: spacemesh/v1/post.proto + +package spacemeshv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +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) +) + +var File_spacemesh_v1_post_proto protoreflect.FileDescriptor + +var file_spacemesh_v1_post_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x70, + 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x1a, 0x1d, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, + 0x73, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x4b, 0x0a, 0x0b, 0x50, 0x6f, 0x53, 0x54, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x12, 0x15, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, + 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, + 0x01, 0x30, 0x01, 0x42, 0xae, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x50, 0x6f, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 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, 0x31, 0x3b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, + 0x65, 0x73, 0x68, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x70, + 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x53, 0x70, 0x61, + 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x53, 0x70, 0x61, 0x63, + 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_spacemesh_v1_post_proto_goTypes = []interface{}{ + (*Request)(nil), // 0: spacemesh.v1.Request + (*Response)(nil), // 1: spacemesh.v1.Response +} +var file_spacemesh_v1_post_proto_depIdxs = []int32{ + 0, // 0: spacemesh.v1.PoSTService.Connect:input_type -> spacemesh.v1.Request + 1, // 1: spacemesh.v1.PoSTService.Connect:output_type -> spacemesh.v1.Response + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_spacemesh_v1_post_proto_init() } +func file_spacemesh_v1_post_proto_init() { + if File_spacemesh_v1_post_proto != nil { + return + } + file_spacemesh_v1_post_types_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_spacemesh_v1_post_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_spacemesh_v1_post_proto_goTypes, + DependencyIndexes: file_spacemesh_v1_post_proto_depIdxs, + }.Build() + File_spacemesh_v1_post_proto = out.File + file_spacemesh_v1_post_proto_rawDesc = nil + file_spacemesh_v1_post_proto_goTypes = nil + file_spacemesh_v1_post_proto_depIdxs = nil +} diff --git a/release/go/spacemesh/v1/post.pb.gw.go b/release/go/spacemesh/v1/post.pb.gw.go new file mode 100644 index 00000000..44aabbee --- /dev/null +++ b/release/go/spacemesh/v1/post.pb.gw.go @@ -0,0 +1,162 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: spacemesh/v1/post.proto + +/* +Package spacemeshv1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package spacemeshv1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_PoSTService_Connect_0(ctx context.Context, marshaler runtime.Marshaler, client PoSTServiceClient, req *http.Request, pathParams map[string]string) (PoSTService_ConnectClient, runtime.ServerMetadata, error) { + var metadata runtime.ServerMetadata + stream, err := client.Connect(ctx) + if err != nil { + grpclog.Infof("Failed to start streaming: %v", err) + return nil, metadata, err + } + dec := marshaler.NewDecoder(req.Body) + handleSend := func() error { + var protoReq Request + err := dec.Decode(&protoReq) + if err == io.EOF { + return err + } + if err != nil { + grpclog.Infof("Failed to decode request: %v", err) + return err + } + if err := stream.Send(&protoReq); err != nil { + grpclog.Infof("Failed to send request: %v", err) + return err + } + return nil + } + go func() { + for { + if err := handleSend(); err != nil { + break + } + } + if err := stream.CloseSend(); err != nil { + grpclog.Infof("Failed to terminate client stream: %v", err) + } + }() + header, err := stream.Header() + if err != nil { + grpclog.Infof("Failed to get header from client: %v", err) + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil +} + +// RegisterPoSTServiceHandlerServer registers the http handlers for service PoSTService to "mux". +// UnaryRPC :call PoSTServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPoSTServiceHandlerFromEndpoint instead. +func RegisterPoSTServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PoSTServiceServer) error { + + mux.Handle("POST", pattern_PoSTService_Connect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + + return nil +} + +// RegisterPoSTServiceHandlerFromEndpoint is same as RegisterPoSTServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterPoSTServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.DialContext(ctx, endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterPoSTServiceHandler(ctx, mux, conn) +} + +// RegisterPoSTServiceHandler registers the http handlers for service PoSTService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterPoSTServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterPoSTServiceHandlerClient(ctx, mux, NewPoSTServiceClient(conn)) +} + +// RegisterPoSTServiceHandlerClient registers the http handlers for service PoSTService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PoSTServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PoSTServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "PoSTServiceClient" to call the correct interceptors. +func RegisterPoSTServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PoSTServiceClient) error { + + mux.Handle("POST", pattern_PoSTService_Connect_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.v1.PoSTService/Connect", runtime.WithHTTPPathPattern("/spacemesh.v1.PoSTService/Connect")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PoSTService_Connect_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_PoSTService_Connect_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_PoSTService_Connect_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"spacemesh.v1.PoSTService", "Connect"}, "")) +) + +var ( + forward_PoSTService_Connect_0 = runtime.ForwardResponseStream +) diff --git a/release/go/spacemesh/v1/post_grpc.pb.go b/release/go/spacemesh/v1/post_grpc.pb.go new file mode 100644 index 00000000..537c321e --- /dev/null +++ b/release/go/spacemesh/v1/post_grpc.pb.go @@ -0,0 +1,141 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: spacemesh/v1/post.proto + +package spacemeshv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + PoSTService_Connect_FullMethodName = "/spacemesh.v1.PoSTService/Connect" +) + +// PoSTServiceClient is the client API for PoSTService service. +// +// 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 PoSTServiceClient interface { + // Connect allows a dedicated PoST node to connect to the spacemesh node. + Connect(ctx context.Context, opts ...grpc.CallOption) (PoSTService_ConnectClient, error) +} + +type poSTServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPoSTServiceClient(cc grpc.ClientConnInterface) PoSTServiceClient { + return &poSTServiceClient{cc} +} + +func (c *poSTServiceClient) Connect(ctx context.Context, opts ...grpc.CallOption) (PoSTService_ConnectClient, error) { + stream, err := c.cc.NewStream(ctx, &PoSTService_ServiceDesc.Streams[0], PoSTService_Connect_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &poSTServiceConnectClient{stream} + return x, nil +} + +type PoSTService_ConnectClient interface { + Send(*Request) error + Recv() (*Response, error) + grpc.ClientStream +} + +type poSTServiceConnectClient struct { + grpc.ClientStream +} + +func (x *poSTServiceConnectClient) Send(m *Request) error { + return x.ClientStream.SendMsg(m) +} + +func (x *poSTServiceConnectClient) Recv() (*Response, error) { + m := new(Response) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// PoSTServiceServer is the server API for PoSTService service. +// All implementations should embed UnimplementedPoSTServiceServer +// for forward compatibility +type PoSTServiceServer interface { + // Connect allows a dedicated PoST node to connect to the spacemesh node. + Connect(PoSTService_ConnectServer) error +} + +// UnimplementedPoSTServiceServer should be embedded to have forward compatible implementations. +type UnimplementedPoSTServiceServer struct { +} + +func (UnimplementedPoSTServiceServer) Connect(PoSTService_ConnectServer) error { + return status.Errorf(codes.Unimplemented, "method Connect not implemented") +} + +// UnsafePoSTServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PoSTServiceServer will +// result in compilation errors. +type UnsafePoSTServiceServer interface { + mustEmbedUnimplementedPoSTServiceServer() +} + +func RegisterPoSTServiceServer(s grpc.ServiceRegistrar, srv PoSTServiceServer) { + s.RegisterService(&PoSTService_ServiceDesc, srv) +} + +func _PoSTService_Connect_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(PoSTServiceServer).Connect(&poSTServiceConnectServer{stream}) +} + +type PoSTService_ConnectServer interface { + Send(*Response) error + Recv() (*Request, error) + grpc.ServerStream +} + +type poSTServiceConnectServer struct { + grpc.ServerStream +} + +func (x *poSTServiceConnectServer) Send(m *Response) error { + return x.ServerStream.SendMsg(m) +} + +func (x *poSTServiceConnectServer) Recv() (*Request, error) { + m := new(Request) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// PoSTService_ServiceDesc is the grpc.ServiceDesc for PoSTService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PoSTService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "spacemesh.v1.PoSTService", + HandlerType: (*PoSTServiceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "Connect", + Handler: _PoSTService_Connect_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "spacemesh/v1/post.proto", +} diff --git a/release/go/spacemesh/v1/post_types.pb.go b/release/go/spacemesh/v1/post_types.pb.go new file mode 100644 index 00000000..3ffc31eb --- /dev/null +++ b/release/go/spacemesh/v1/post_types.pb.go @@ -0,0 +1,685 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: spacemesh/v1/post_types.proto + +package spacemeshv1 + +import ( + 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) +) + +type GenProofStatus int32 + +const ( + GenProofStatus_GEN_PROOF_STATUS_UNSPECIFIED GenProofStatus = 0 + GenProofStatus_GEN_PROOF_STATUS_OK GenProofStatus = 1 + GenProofStatus_GEN_PROOF_STATUS_ERROR GenProofStatus = 2 +) + +// Enum value maps for GenProofStatus. +var ( + GenProofStatus_name = map[int32]string{ + 0: "GEN_PROOF_STATUS_UNSPECIFIED", + 1: "GEN_PROOF_STATUS_OK", + 2: "GEN_PROOF_STATUS_ERROR", + } + GenProofStatus_value = map[string]int32{ + "GEN_PROOF_STATUS_UNSPECIFIED": 0, + "GEN_PROOF_STATUS_OK": 1, + "GEN_PROOF_STATUS_ERROR": 2, + } +) + +func (x GenProofStatus) Enum() *GenProofStatus { + p := new(GenProofStatus) + *p = x + return p +} + +func (x GenProofStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GenProofStatus) Descriptor() protoreflect.EnumDescriptor { + return file_spacemesh_v1_post_types_proto_enumTypes[0].Descriptor() +} + +func (GenProofStatus) Type() protoreflect.EnumType { + return &file_spacemesh_v1_post_types_proto_enumTypes[0] +} + +func (x GenProofStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GenProofStatus.Descriptor instead. +func (GenProofStatus) EnumDescriptor() ([]byte, []int) { + return file_spacemesh_v1_post_types_proto_rawDescGZIP(), []int{0} +} + +// Request are the messages sent to the post service. +type Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // + // *Request_GenProof + Type isRequest_Type `protobuf_oneof:"type"` +} + +func (x *Request) Reset() { + *x = Request{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v1_post_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Request) ProtoMessage() {} + +func (x *Request) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v1_post_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Request.ProtoReflect.Descriptor instead. +func (*Request) Descriptor() ([]byte, []int) { + return file_spacemesh_v1_post_types_proto_rawDescGZIP(), []int{0} +} + +func (m *Request) GetType() isRequest_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *Request) GetGenProof() *GenProofRequest { + if x, ok := x.GetType().(*Request_GenProof); ok { + return x.GenProof + } + return nil +} + +type isRequest_Type interface { + isRequest_Type() +} + +type Request_GenProof struct { + // StateRequest state = 1; + // MetadataRequest metadata = 2; + // InitRequest init = 3; + // ResizeRequest resize = 4; + GenProof *GenProofRequest `protobuf:"bytes,5,opt,name=gen_proof,json=genProof,proto3,oneof"` +} + +func (*Request_GenProof) isRequest_Type() {} + +// Response are the messages sent from the post service. +type Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // + // *Response_GenProof + Type isResponse_Type `protobuf_oneof:"type"` +} + +func (x *Response) Reset() { + *x = Response{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v1_post_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Response) ProtoMessage() {} + +func (x *Response) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v1_post_types_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Response.ProtoReflect.Descriptor instead. +func (*Response) Descriptor() ([]byte, []int) { + return file_spacemesh_v1_post_types_proto_rawDescGZIP(), []int{1} +} + +func (m *Response) GetType() isResponse_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *Response) GetGenProof() *GenProofResponse { + if x, ok := x.GetType().(*Response_GenProof); ok { + return x.GenProof + } + return nil +} + +type isResponse_Type interface { + isResponse_Type() +} + +type Response_GenProof struct { + // StateResponse state = 1; + // MetadataResponse metadata = 2; + // InitResponse init = 3; + // ResizeResponse resize = 4; + GenProof *GenProofResponse `protobuf:"bytes,5,opt,name=gen_proof,json=genProof,proto3,oneof"` +} + +func (*Response_GenProof) isResponse_Type() {} + +type GenProofRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Challenge []byte `protobuf:"bytes,1,opt,name=challenge,proto3" json:"challenge,omitempty"` +} + +func (x *GenProofRequest) Reset() { + *x = GenProofRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v1_post_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenProofRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenProofRequest) ProtoMessage() {} + +func (x *GenProofRequest) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v1_post_types_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenProofRequest.ProtoReflect.Descriptor instead. +func (*GenProofRequest) Descriptor() ([]byte, []int) { + return file_spacemesh_v1_post_types_proto_rawDescGZIP(), []int{2} +} + +func (x *GenProofRequest) GetChallenge() []byte { + if x != nil { + return x.Challenge + } + return nil +} + +type Proof struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Nonce uint32 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` + Indices []byte `protobuf:"bytes,2,opt,name=indices,proto3" json:"indices,omitempty"` + Pow uint64 `protobuf:"varint,3,opt,name=pow,proto3" json:"pow,omitempty"` +} + +func (x *Proof) Reset() { + *x = Proof{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v1_post_types_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Proof) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Proof) ProtoMessage() {} + +func (x *Proof) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v1_post_types_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Proof.ProtoReflect.Descriptor instead. +func (*Proof) Descriptor() ([]byte, []int) { + return file_spacemesh_v1_post_types_proto_rawDescGZIP(), []int{3} +} + +func (x *Proof) GetNonce() uint32 { + if x != nil { + return x.Nonce + } + return 0 +} + +func (x *Proof) GetIndices() []byte { + if x != nil { + return x.Indices + } + return nil +} + +func (x *Proof) GetPow() uint64 { + if x != nil { + return x.Pow + } + return 0 +} + +type ProofMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Challenge []byte `protobuf:"bytes,1,opt,name=challenge,proto3" json:"challenge,omitempty"` + NodeId *SmesherId `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + CommitmentAtxId *ActivationId `protobuf:"bytes,3,opt,name=commitment_atx_id,json=commitmentAtxId,proto3" json:"commitment_atx_id,omitempty"` + NumUnits uint32 `protobuf:"varint,4,opt,name=num_units,json=numUnits,proto3" json:"num_units,omitempty"` + LabelsPerUnit uint64 `protobuf:"varint,5,opt,name=labels_per_unit,json=labelsPerUnit,proto3" json:"labels_per_unit,omitempty"` +} + +func (x *ProofMetadata) Reset() { + *x = ProofMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v1_post_types_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProofMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProofMetadata) ProtoMessage() {} + +func (x *ProofMetadata) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v1_post_types_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProofMetadata.ProtoReflect.Descriptor instead. +func (*ProofMetadata) Descriptor() ([]byte, []int) { + return file_spacemesh_v1_post_types_proto_rawDescGZIP(), []int{4} +} + +func (x *ProofMetadata) GetChallenge() []byte { + if x != nil { + return x.Challenge + } + return nil +} + +func (x *ProofMetadata) GetNodeId() *SmesherId { + if x != nil { + return x.NodeId + } + return nil +} + +func (x *ProofMetadata) GetCommitmentAtxId() *ActivationId { + if x != nil { + return x.CommitmentAtxId + } + return nil +} + +func (x *ProofMetadata) GetNumUnits() uint32 { + if x != nil { + return x.NumUnits + } + return 0 +} + +func (x *ProofMetadata) GetLabelsPerUnit() uint64 { + if x != nil { + return x.LabelsPerUnit + } + return 0 +} + +type GenProofResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status GenProofStatus `protobuf:"varint,1,opt,name=status,proto3,enum=spacemesh.v1.GenProofStatus" json:"status,omitempty"` + Proof *Proof `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` + Metadata *ProofMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (x *GenProofResponse) Reset() { + *x = GenProofResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v1_post_types_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenProofResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenProofResponse) ProtoMessage() {} + +func (x *GenProofResponse) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v1_post_types_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenProofResponse.ProtoReflect.Descriptor instead. +func (*GenProofResponse) Descriptor() ([]byte, []int) { + return file_spacemesh_v1_post_types_proto_rawDescGZIP(), []int{5} +} + +func (x *GenProofResponse) GetStatus() GenProofStatus { + if x != nil { + return x.Status + } + return GenProofStatus_GEN_PROOF_STATUS_UNSPECIFIED +} + +func (x *GenProofResponse) GetProof() *Proof { + if x != nil { + return x.Proof + } + return nil +} + +func (x *GenProofResponse) GetMetadata() *ProofMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +var File_spacemesh_v1_post_types_proto protoreflect.FileDescriptor + +var file_spacemesh_v1_post_types_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x70, + 0x6f, 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x0c, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4f, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x08, 0x67, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, + 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x51, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x6f, + 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, + 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x08, 0x67, 0x65, 0x6e, 0x50, 0x72, + 0x6f, 0x6f, 0x66, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x2f, 0x0a, 0x0f, 0x47, + 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x22, 0x49, 0x0a, 0x05, + 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x69, + 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x69, 0x6e, + 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x03, 0x70, 0x6f, 0x77, 0x22, 0xec, 0x01, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x6f, + 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, + 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x68, + 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6d, 0x65, 0x73, 0x68, 0x65, 0x72, 0x49, + 0x64, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x11, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x78, 0x49, + 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x75, 0x6d, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6e, 0x75, 0x6d, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x12, 0x26, + 0x0a, 0x0f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x50, + 0x65, 0x72, 0x55, 0x6e, 0x69, 0x74, 0x22, 0xac, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x50, 0x72, + 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x50, 0x72, + 0x6f, 0x6f, 0x66, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x29, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x37, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, + 0x6f, 0x6f, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2a, 0x67, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, + 0x66, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x1c, 0x47, 0x45, 0x4e, 0x5f, 0x50, + 0x52, 0x4f, 0x4f, 0x46, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x47, 0x45, 0x4e, + 0x5f, 0x50, 0x52, 0x4f, 0x4f, 0x46, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4f, 0x4b, + 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x47, 0x45, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4f, 0x46, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x42, 0xb3, + 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x50, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 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, 0x31, 0x3b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, + 0x65, 0x73, 0x68, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x70, + 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x53, 0x70, 0x61, + 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x53, 0x70, 0x61, 0x63, + 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_spacemesh_v1_post_types_proto_rawDescOnce sync.Once + file_spacemesh_v1_post_types_proto_rawDescData = file_spacemesh_v1_post_types_proto_rawDesc +) + +func file_spacemesh_v1_post_types_proto_rawDescGZIP() []byte { + file_spacemesh_v1_post_types_proto_rawDescOnce.Do(func() { + file_spacemesh_v1_post_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_spacemesh_v1_post_types_proto_rawDescData) + }) + return file_spacemesh_v1_post_types_proto_rawDescData +} + +var file_spacemesh_v1_post_types_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_spacemesh_v1_post_types_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_spacemesh_v1_post_types_proto_goTypes = []interface{}{ + (GenProofStatus)(0), // 0: spacemesh.v1.GenProofStatus + (*Request)(nil), // 1: spacemesh.v1.Request + (*Response)(nil), // 2: spacemesh.v1.Response + (*GenProofRequest)(nil), // 3: spacemesh.v1.GenProofRequest + (*Proof)(nil), // 4: spacemesh.v1.Proof + (*ProofMetadata)(nil), // 5: spacemesh.v1.ProofMetadata + (*GenProofResponse)(nil), // 6: spacemesh.v1.GenProofResponse + (*SmesherId)(nil), // 7: spacemesh.v1.SmesherId + (*ActivationId)(nil), // 8: spacemesh.v1.ActivationId +} +var file_spacemesh_v1_post_types_proto_depIdxs = []int32{ + 3, // 0: spacemesh.v1.Request.gen_proof:type_name -> spacemesh.v1.GenProofRequest + 6, // 1: spacemesh.v1.Response.gen_proof:type_name -> spacemesh.v1.GenProofResponse + 7, // 2: spacemesh.v1.ProofMetadata.node_id:type_name -> spacemesh.v1.SmesherId + 8, // 3: spacemesh.v1.ProofMetadata.commitment_atx_id:type_name -> spacemesh.v1.ActivationId + 0, // 4: spacemesh.v1.GenProofResponse.status:type_name -> spacemesh.v1.GenProofStatus + 4, // 5: spacemesh.v1.GenProofResponse.proof:type_name -> spacemesh.v1.Proof + 5, // 6: spacemesh.v1.GenProofResponse.metadata:type_name -> spacemesh.v1.ProofMetadata + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_spacemesh_v1_post_types_proto_init() } +func file_spacemesh_v1_post_types_proto_init() { + if File_spacemesh_v1_post_types_proto != nil { + return + } + file_spacemesh_v1_types_proto_init() + if !protoimpl.UnsafeEnabled { + file_spacemesh_v1_post_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Request); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v1_post_types_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_spacemesh_v1_post_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenProofRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v1_post_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Proof); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v1_post_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProofMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v1_post_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenProofResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_spacemesh_v1_post_types_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Request_GenProof)(nil), + } + file_spacemesh_v1_post_types_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*Response_GenProof)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_spacemesh_v1_post_types_proto_rawDesc, + NumEnums: 1, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_spacemesh_v1_post_types_proto_goTypes, + DependencyIndexes: file_spacemesh_v1_post_types_proto_depIdxs, + EnumInfos: file_spacemesh_v1_post_types_proto_enumTypes, + MessageInfos: file_spacemesh_v1_post_types_proto_msgTypes, + }.Build() + File_spacemesh_v1_post_types_proto = out.File + file_spacemesh_v1_post_types_proto_rawDesc = nil + file_spacemesh_v1_post_types_proto_goTypes = nil + file_spacemesh_v1_post_types_proto_depIdxs = nil +} diff --git a/spacemesh/v1/post.proto b/spacemesh/v1/post.proto new file mode 100644 index 00000000..ec05d41f --- /dev/null +++ b/spacemesh/v1/post.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package spacemesh.v1; +option go_package = "github.com/spacemeshos/api/release/go/spacemesh/v1"; + +import "spacemesh/v1/post_types.proto"; + +// PoSTService is used by dedicated PoST nodes to interact with the spacemesh +// node. +service PoSTService { + // Connect allows a dedicated PoST node to connect to the spacemesh node. + rpc Connect(stream Request) returns (stream Response); +} diff --git a/spacemesh/v1/post_types.proto b/spacemesh/v1/post_types.proto new file mode 100644 index 00000000..36bcbf37 --- /dev/null +++ b/spacemesh/v1/post_types.proto @@ -0,0 +1,55 @@ +syntax = "proto3"; +package spacemesh.v1; +option go_package = "github.com/spacemeshos/api/release/go/spacemesh/v1"; + +import "spacemesh/v1/types.proto"; + +// Request are the messages sent to the post service. +message Request { + oneof type { + // StateRequest state = 1; + // MetadataRequest metadata = 2; + // InitRequest init = 3; + // ResizeRequest resize = 4; + GenProofRequest gen_proof = 5; + } +} + +// Response are the messages sent from the post service. +message Response { + oneof type { + // StateResponse state = 1; + // MetadataResponse metadata = 2; + // InitResponse init = 3; + // ResizeResponse resize = 4; + GenProofResponse gen_proof = 5; + } +} + +message GenProofRequest { bytes challenge = 1; } + +message Proof { + uint32 nonce = 1; + bytes indices = 2; + uint64 pow = 3; +} + +message ProofMetadata { + bytes challenge = 1; + SmesherId node_id = 2; + ActivationId commitment_atx_id = 3; + uint32 num_units = 4; + uint64 labels_per_unit = 5; +} + +enum GenProofStatus { + GEN_PROOF_STATUS_UNSPECIFIED = 0; + GEN_PROOF_STATUS_OK = 1; + GEN_PROOF_STATUS_ERROR = 2; +} + +message GenProofResponse { + GenProofStatus status = 1; + Proof proof = 2; + ProofMetadata metadata = 3; +} From cf69453e8f928be60fd1cd34295ce4f795ec51c0 Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Mon, 18 Sep 2023 14:04:36 +0000 Subject: [PATCH 02/11] Improve naming --- release/go/spacemesh/v1/post.pb.go | 43 ++--- release/go/spacemesh/v1/post.pb.gw.go | 2 +- release/go/spacemesh/v1/post_grpc.pb.go | 20 +-- release/go/spacemesh/v1/post_types.pb.go | 213 ++++++++++++----------- spacemesh/v1/post.proto | 2 +- spacemesh/v1/post_types.proto | 8 +- 6 files changed, 145 insertions(+), 143 deletions(-) diff --git a/release/go/spacemesh/v1/post.pb.go b/release/go/spacemesh/v1/post.pb.go index d5914565..24e7527f 100644 --- a/release/go/spacemesh/v1/post.pb.go +++ b/release/go/spacemesh/v1/post.pb.go @@ -26,32 +26,33 @@ var file_spacemesh_v1_post_proto_rawDesc = []byte{ 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x1a, 0x1d, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x4b, 0x0a, 0x0b, 0x50, 0x6f, 0x53, 0x54, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x12, 0x15, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, - 0x01, 0x30, 0x01, 0x42, 0xae, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x50, 0x6f, 0x73, 0x74, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 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, 0x31, 0x3b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, - 0x65, 0x73, 0x68, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x70, - 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x53, 0x70, 0x61, - 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x53, 0x70, 0x61, 0x63, - 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x56, 0x0a, 0x0b, 0x50, 0x6f, 0x53, 0x54, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x12, 0x1d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, + 0x19, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4e, + 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x01, 0x30, 0x01, 0x42, 0xae, + 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x42, 0x09, 0x50, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x3e, 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, 0x31, 0x3b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, + 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x0d, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_spacemesh_v1_post_proto_goTypes = []interface{}{ - (*Request)(nil), // 0: spacemesh.v1.Request - (*Response)(nil), // 1: spacemesh.v1.Response + (*ServiceResponse)(nil), // 0: spacemesh.v1.ServiceResponse + (*NodeRequest)(nil), // 1: spacemesh.v1.NodeRequest } var file_spacemesh_v1_post_proto_depIdxs = []int32{ - 0, // 0: spacemesh.v1.PoSTService.Connect:input_type -> spacemesh.v1.Request - 1, // 1: spacemesh.v1.PoSTService.Connect:output_type -> spacemesh.v1.Response + 0, // 0: spacemesh.v1.PoSTService.Connect:input_type -> spacemesh.v1.ServiceResponse + 1, // 1: spacemesh.v1.PoSTService.Connect:output_type -> spacemesh.v1.NodeRequest 1, // [1:2] is the sub-list for method output_type 0, // [0:1] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name diff --git a/release/go/spacemesh/v1/post.pb.gw.go b/release/go/spacemesh/v1/post.pb.gw.go index 44aabbee..fb352655 100644 --- a/release/go/spacemesh/v1/post.pb.gw.go +++ b/release/go/spacemesh/v1/post.pb.gw.go @@ -40,7 +40,7 @@ func request_PoSTService_Connect_0(ctx context.Context, marshaler runtime.Marsha } dec := marshaler.NewDecoder(req.Body) handleSend := func() error { - var protoReq Request + var protoReq ServiceResponse err := dec.Decode(&protoReq) if err == io.EOF { return err diff --git a/release/go/spacemesh/v1/post_grpc.pb.go b/release/go/spacemesh/v1/post_grpc.pb.go index 537c321e..8271d6bc 100644 --- a/release/go/spacemesh/v1/post_grpc.pb.go +++ b/release/go/spacemesh/v1/post_grpc.pb.go @@ -48,8 +48,8 @@ func (c *poSTServiceClient) Connect(ctx context.Context, opts ...grpc.CallOption } type PoSTService_ConnectClient interface { - Send(*Request) error - Recv() (*Response, error) + Send(*ServiceResponse) error + Recv() (*NodeRequest, error) grpc.ClientStream } @@ -57,12 +57,12 @@ type poSTServiceConnectClient struct { grpc.ClientStream } -func (x *poSTServiceConnectClient) Send(m *Request) error { +func (x *poSTServiceConnectClient) Send(m *ServiceResponse) error { return x.ClientStream.SendMsg(m) } -func (x *poSTServiceConnectClient) Recv() (*Response, error) { - m := new(Response) +func (x *poSTServiceConnectClient) Recv() (*NodeRequest, error) { + m := new(NodeRequest) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } @@ -101,8 +101,8 @@ func _PoSTService_Connect_Handler(srv interface{}, stream grpc.ServerStream) err } type PoSTService_ConnectServer interface { - Send(*Response) error - Recv() (*Request, error) + Send(*NodeRequest) error + Recv() (*ServiceResponse, error) grpc.ServerStream } @@ -110,12 +110,12 @@ type poSTServiceConnectServer struct { grpc.ServerStream } -func (x *poSTServiceConnectServer) Send(m *Response) error { +func (x *poSTServiceConnectServer) Send(m *NodeRequest) error { return x.ServerStream.SendMsg(m) } -func (x *poSTServiceConnectServer) Recv() (*Request, error) { - m := new(Request) +func (x *poSTServiceConnectServer) Recv() (*ServiceResponse, error) { + m := new(ServiceResponse) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } diff --git a/release/go/spacemesh/v1/post_types.pb.go b/release/go/spacemesh/v1/post_types.pb.go index 3ffc31eb..b87f4d34 100644 --- a/release/go/spacemesh/v1/post_types.pb.go +++ b/release/go/spacemesh/v1/post_types.pb.go @@ -69,20 +69,20 @@ func (GenProofStatus) EnumDescriptor() ([]byte, []int) { return file_spacemesh_v1_post_types_proto_rawDescGZIP(), []int{0} } -// Request are the messages sent to the post service. -type Request struct { +// NodeRequest is a request sent from the node to the post service. +type NodeRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to Type: // - // *Request_GenProof - Type isRequest_Type `protobuf_oneof:"type"` + // *NodeRequest_GenProof + Type isNodeRequest_Type `protobuf_oneof:"type"` } -func (x *Request) Reset() { - *x = Request{} +func (x *NodeRequest) Reset() { + *x = NodeRequest{} if protoimpl.UnsafeEnabled { mi := &file_spacemesh_v1_post_types_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -90,13 +90,13 @@ func (x *Request) Reset() { } } -func (x *Request) String() string { +func (x *NodeRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Request) ProtoMessage() {} +func (*NodeRequest) ProtoMessage() {} -func (x *Request) ProtoReflect() protoreflect.Message { +func (x *NodeRequest) ProtoReflect() protoreflect.Message { mi := &file_spacemesh_v1_post_types_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -108,30 +108,30 @@ func (x *Request) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Request.ProtoReflect.Descriptor instead. -func (*Request) Descriptor() ([]byte, []int) { +// Deprecated: Use NodeRequest.ProtoReflect.Descriptor instead. +func (*NodeRequest) Descriptor() ([]byte, []int) { return file_spacemesh_v1_post_types_proto_rawDescGZIP(), []int{0} } -func (m *Request) GetType() isRequest_Type { +func (m *NodeRequest) GetType() isNodeRequest_Type { if m != nil { return m.Type } return nil } -func (x *Request) GetGenProof() *GenProofRequest { - if x, ok := x.GetType().(*Request_GenProof); ok { +func (x *NodeRequest) GetGenProof() *GenProofRequest { + if x, ok := x.GetType().(*NodeRequest_GenProof); ok { return x.GenProof } return nil } -type isRequest_Type interface { - isRequest_Type() +type isNodeRequest_Type interface { + isNodeRequest_Type() } -type Request_GenProof struct { +type NodeRequest_GenProof struct { // StateRequest state = 1; // MetadataRequest metadata = 2; // InitRequest init = 3; @@ -139,22 +139,22 @@ type Request_GenProof struct { GenProof *GenProofRequest `protobuf:"bytes,5,opt,name=gen_proof,json=genProof,proto3,oneof"` } -func (*Request_GenProof) isRequest_Type() {} +func (*NodeRequest_GenProof) isNodeRequest_Type() {} -// Response are the messages sent from the post service. -type Response struct { +// ServiceResponse is a response sent from the post service to the node. +type ServiceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to Type: // - // *Response_GenProof - Type isResponse_Type `protobuf_oneof:"type"` + // *ServiceResponse_GenProof + Type isServiceResponse_Type `protobuf_oneof:"type"` } -func (x *Response) Reset() { - *x = Response{} +func (x *ServiceResponse) Reset() { + *x = ServiceResponse{} if protoimpl.UnsafeEnabled { mi := &file_spacemesh_v1_post_types_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -162,13 +162,13 @@ func (x *Response) Reset() { } } -func (x *Response) String() string { +func (x *ServiceResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Response) ProtoMessage() {} +func (*ServiceResponse) ProtoMessage() {} -func (x *Response) ProtoReflect() protoreflect.Message { +func (x *ServiceResponse) ProtoReflect() protoreflect.Message { mi := &file_spacemesh_v1_post_types_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -180,30 +180,30 @@ func (x *Response) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Response.ProtoReflect.Descriptor instead. -func (*Response) Descriptor() ([]byte, []int) { +// Deprecated: Use ServiceResponse.ProtoReflect.Descriptor instead. +func (*ServiceResponse) Descriptor() ([]byte, []int) { return file_spacemesh_v1_post_types_proto_rawDescGZIP(), []int{1} } -func (m *Response) GetType() isResponse_Type { +func (m *ServiceResponse) GetType() isServiceResponse_Type { if m != nil { return m.Type } return nil } -func (x *Response) GetGenProof() *GenProofResponse { - if x, ok := x.GetType().(*Response_GenProof); ok { +func (x *ServiceResponse) GetGenProof() *GenProofResponse { + if x, ok := x.GetType().(*ServiceResponse_GenProof); ok { return x.GenProof } return nil } -type isResponse_Type interface { - isResponse_Type() +type isServiceResponse_Type interface { + isServiceResponse_Type() } -type Response_GenProof struct { +type ServiceResponse_GenProof struct { // StateResponse state = 1; // MetadataResponse metadata = 2; // InitResponse init = 3; @@ -211,7 +211,7 @@ type Response_GenProof struct { GenProof *GenProofResponse `protobuf:"bytes,5,opt,name=gen_proof,json=genProof,proto3,oneof"` } -func (*Response_GenProof) isResponse_Type() {} +func (*ServiceResponse_GenProof) isServiceResponse_Type() {} type GenProofRequest struct { state protoimpl.MessageState @@ -472,69 +472,70 @@ var file_spacemesh_v1_post_types_proto_rawDesc = []byte{ 0x6f, 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4f, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x08, 0x67, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, - 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x51, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x6f, - 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x08, 0x67, 0x65, 0x6e, 0x50, 0x72, - 0x6f, 0x6f, 0x66, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x2f, 0x0a, 0x0f, 0x47, - 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, - 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x22, 0x49, 0x0a, 0x05, - 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x69, - 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x69, 0x6e, - 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x03, 0x70, 0x6f, 0x77, 0x22, 0xec, 0x01, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x6f, - 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x53, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x5f, 0x70, 0x72, + 0x6f, 0x6f, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, + 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x08, 0x67, 0x65, 0x6e, 0x50, + 0x72, 0x6f, 0x6f, 0x66, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x58, 0x0a, 0x0f, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x48, 0x00, 0x52, 0x08, 0x67, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x42, 0x06, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x2f, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, + 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x68, - 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6d, 0x65, 0x73, 0x68, 0x65, 0x72, 0x49, - 0x64, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x11, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x78, 0x49, - 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x75, 0x6d, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6e, 0x75, 0x6d, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x12, 0x26, - 0x0a, 0x0f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x50, - 0x65, 0x72, 0x55, 0x6e, 0x69, 0x74, 0x22, 0xac, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x50, 0x72, - 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x50, 0x72, - 0x6f, 0x6f, 0x66, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x29, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x37, 0x0a, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, - 0x6f, 0x6f, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2a, 0x67, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, - 0x66, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x1c, 0x47, 0x45, 0x4e, 0x5f, 0x50, - 0x52, 0x4f, 0x4f, 0x46, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x47, 0x45, 0x4e, - 0x5f, 0x50, 0x52, 0x4f, 0x4f, 0x46, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4f, 0x4b, - 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x47, 0x45, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4f, 0x46, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x42, 0xb3, - 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x50, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 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, 0x31, 0x3b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, - 0x65, 0x73, 0x68, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x70, - 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x53, 0x70, 0x61, - 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x53, 0x70, 0x61, 0x63, - 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x22, 0x49, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, + 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, + 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x70, + 0x6f, 0x77, 0x22, 0xec, 0x01, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, + 0x67, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x6d, 0x65, 0x73, 0x68, 0x65, 0x72, 0x49, 0x64, 0x52, 0x06, 0x6e, 0x6f, + 0x64, 0x65, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x5f, 0x61, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x52, 0x0f, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x78, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, + 0x6e, 0x75, 0x6d, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x08, 0x6e, 0x75, 0x6d, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x50, 0x65, 0x72, 0x55, 0x6e, 0x69, + 0x74, 0x22, 0xac, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x29, 0x0a, 0x05, + 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, + 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x37, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2a, 0x67, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x20, 0x0a, 0x1c, 0x47, 0x45, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4f, 0x46, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x47, 0x45, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4f, + 0x46, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x1a, 0x0a, + 0x16, 0x47, 0x45, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4f, 0x46, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x42, 0xb3, 0x01, 0x0a, 0x10, 0x63, 0x6f, + 0x6d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0e, + 0x50, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x3e, 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, 0x31, 0x3b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, + 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x0d, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -553,8 +554,8 @@ var file_spacemesh_v1_post_types_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_spacemesh_v1_post_types_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_spacemesh_v1_post_types_proto_goTypes = []interface{}{ (GenProofStatus)(0), // 0: spacemesh.v1.GenProofStatus - (*Request)(nil), // 1: spacemesh.v1.Request - (*Response)(nil), // 2: spacemesh.v1.Response + (*NodeRequest)(nil), // 1: spacemesh.v1.NodeRequest + (*ServiceResponse)(nil), // 2: spacemesh.v1.ServiceResponse (*GenProofRequest)(nil), // 3: spacemesh.v1.GenProofRequest (*Proof)(nil), // 4: spacemesh.v1.Proof (*ProofMetadata)(nil), // 5: spacemesh.v1.ProofMetadata @@ -563,8 +564,8 @@ var file_spacemesh_v1_post_types_proto_goTypes = []interface{}{ (*ActivationId)(nil), // 8: spacemesh.v1.ActivationId } var file_spacemesh_v1_post_types_proto_depIdxs = []int32{ - 3, // 0: spacemesh.v1.Request.gen_proof:type_name -> spacemesh.v1.GenProofRequest - 6, // 1: spacemesh.v1.Response.gen_proof:type_name -> spacemesh.v1.GenProofResponse + 3, // 0: spacemesh.v1.NodeRequest.gen_proof:type_name -> spacemesh.v1.GenProofRequest + 6, // 1: spacemesh.v1.ServiceResponse.gen_proof:type_name -> spacemesh.v1.GenProofResponse 7, // 2: spacemesh.v1.ProofMetadata.node_id:type_name -> spacemesh.v1.SmesherId 8, // 3: spacemesh.v1.ProofMetadata.commitment_atx_id:type_name -> spacemesh.v1.ActivationId 0, // 4: spacemesh.v1.GenProofResponse.status:type_name -> spacemesh.v1.GenProofStatus @@ -585,7 +586,7 @@ func file_spacemesh_v1_post_types_proto_init() { file_spacemesh_v1_types_proto_init() if !protoimpl.UnsafeEnabled { file_spacemesh_v1_post_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Request); i { + switch v := v.(*NodeRequest); i { case 0: return &v.state case 1: @@ -597,7 +598,7 @@ func file_spacemesh_v1_post_types_proto_init() { } } file_spacemesh_v1_post_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Response); i { + switch v := v.(*ServiceResponse); i { case 0: return &v.state case 1: @@ -658,10 +659,10 @@ func file_spacemesh_v1_post_types_proto_init() { } } file_spacemesh_v1_post_types_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Request_GenProof)(nil), + (*NodeRequest_GenProof)(nil), } file_spacemesh_v1_post_types_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*Response_GenProof)(nil), + (*ServiceResponse_GenProof)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/spacemesh/v1/post.proto b/spacemesh/v1/post.proto index ec05d41f..1ae59dfb 100644 --- a/spacemesh/v1/post.proto +++ b/spacemesh/v1/post.proto @@ -8,5 +8,5 @@ import "spacemesh/v1/post_types.proto"; // node. service PoSTService { // Connect allows a dedicated PoST node to connect to the spacemesh node. - rpc Connect(stream Request) returns (stream Response); + rpc Connect(stream ServiceResponse) returns (stream NodeRequest); } diff --git a/spacemesh/v1/post_types.proto b/spacemesh/v1/post_types.proto index 36bcbf37..4eee6623 100644 --- a/spacemesh/v1/post_types.proto +++ b/spacemesh/v1/post_types.proto @@ -4,8 +4,8 @@ option go_package = "github.com/spacemeshos/api/release/go/spacemesh/v1"; import "spacemesh/v1/types.proto"; -// Request are the messages sent to the post service. -message Request { +// NodeRequest is a request sent from the node to the post service. +message NodeRequest { oneof type { // StateRequest state = 1; // MetadataRequest metadata = 2; @@ -15,8 +15,8 @@ message Request { } } -// Response are the messages sent from the post service. -message Response { +// ServiceResponse is a response sent from the post service to the node. +message ServiceResponse { oneof type { // StateResponse state = 1; // MetadataResponse metadata = 2; From 9fe25654574c39f780ea0c398107cae3fc6534e2 Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Mon, 18 Sep 2023 14:46:56 +0000 Subject: [PATCH 03/11] Rename connect method --- release/go/spacemesh/v1/post.pb.go | 40 +++++++++++----------- release/go/spacemesh/v1/post.pb.gw.go | 18 +++++----- release/go/spacemesh/v1/post_grpc.pb.go | 44 ++++++++++++------------- spacemesh/v1/post.proto | 4 +-- 4 files changed, 53 insertions(+), 53 deletions(-) diff --git a/release/go/spacemesh/v1/post.pb.go b/release/go/spacemesh/v1/post.pb.go index 24e7527f..f94813c2 100644 --- a/release/go/spacemesh/v1/post.pb.go +++ b/release/go/spacemesh/v1/post.pb.go @@ -26,24 +26,24 @@ var file_spacemesh_v1_post_proto_rawDesc = []byte{ 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x1a, 0x1d, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x56, 0x0a, 0x0b, 0x50, 0x6f, 0x53, 0x54, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x12, 0x1d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, - 0x19, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4e, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x01, 0x30, 0x01, 0x42, 0xae, - 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x42, 0x09, 0x50, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x3e, 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, 0x31, 0x3b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, - 0x73, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, - 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x0d, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x57, 0x0a, 0x0b, 0x50, 0x6f, 0x53, 0x54, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x12, 0x1d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x1a, 0x19, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x01, 0x30, 0x01, 0x42, + 0xae, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x50, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x3e, 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, 0x31, 0x3b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, + 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, + 0x73, 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, + 0x68, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x0d, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_spacemesh_v1_post_proto_goTypes = []interface{}{ @@ -51,8 +51,8 @@ var file_spacemesh_v1_post_proto_goTypes = []interface{}{ (*NodeRequest)(nil), // 1: spacemesh.v1.NodeRequest } var file_spacemesh_v1_post_proto_depIdxs = []int32{ - 0, // 0: spacemesh.v1.PoSTService.Connect:input_type -> spacemesh.v1.ServiceResponse - 1, // 1: spacemesh.v1.PoSTService.Connect:output_type -> spacemesh.v1.NodeRequest + 0, // 0: spacemesh.v1.PoSTService.Register:input_type -> spacemesh.v1.ServiceResponse + 1, // 1: spacemesh.v1.PoSTService.Register:output_type -> spacemesh.v1.NodeRequest 1, // [1:2] is the sub-list for method output_type 0, // [0:1] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name diff --git a/release/go/spacemesh/v1/post.pb.gw.go b/release/go/spacemesh/v1/post.pb.gw.go index fb352655..58ec5e02 100644 --- a/release/go/spacemesh/v1/post.pb.gw.go +++ b/release/go/spacemesh/v1/post.pb.gw.go @@ -31,9 +31,9 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = metadata.Join -func request_PoSTService_Connect_0(ctx context.Context, marshaler runtime.Marshaler, client PoSTServiceClient, req *http.Request, pathParams map[string]string) (PoSTService_ConnectClient, runtime.ServerMetadata, error) { +func request_PoSTService_Register_0(ctx context.Context, marshaler runtime.Marshaler, client PoSTServiceClient, req *http.Request, pathParams map[string]string) (PoSTService_RegisterClient, runtime.ServerMetadata, error) { var metadata runtime.ServerMetadata - stream, err := client.Connect(ctx) + stream, err := client.Register(ctx) if err != nil { grpclog.Infof("Failed to start streaming: %v", err) return nil, metadata, err @@ -80,7 +80,7 @@ func request_PoSTService_Connect_0(ctx context.Context, marshaler runtime.Marsha // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPoSTServiceHandlerFromEndpoint instead. func RegisterPoSTServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PoSTServiceServer) error { - mux.Handle("POST", pattern_PoSTService_Connect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_PoSTService_Register_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -128,25 +128,25 @@ func RegisterPoSTServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // "PoSTServiceClient" to call the correct interceptors. func RegisterPoSTServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PoSTServiceClient) error { - mux.Handle("POST", pattern_PoSTService_Connect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_PoSTService_Register_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.v1.PoSTService/Connect", runtime.WithHTTPPathPattern("/spacemesh.v1.PoSTService/Connect")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/spacemesh.v1.PoSTService/Register", runtime.WithHTTPPathPattern("/spacemesh.v1.PoSTService/Register")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PoSTService_Connect_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PoSTService_Register_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PoSTService_Connect_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + forward_PoSTService_Register_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) @@ -154,9 +154,9 @@ func RegisterPoSTServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } var ( - pattern_PoSTService_Connect_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"spacemesh.v1.PoSTService", "Connect"}, "")) + pattern_PoSTService_Register_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"spacemesh.v1.PoSTService", "Register"}, "")) ) var ( - forward_PoSTService_Connect_0 = runtime.ForwardResponseStream + forward_PoSTService_Register_0 = runtime.ForwardResponseStream ) diff --git a/release/go/spacemesh/v1/post_grpc.pb.go b/release/go/spacemesh/v1/post_grpc.pb.go index 8271d6bc..b7e93401 100644 --- a/release/go/spacemesh/v1/post_grpc.pb.go +++ b/release/go/spacemesh/v1/post_grpc.pb.go @@ -19,15 +19,15 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - PoSTService_Connect_FullMethodName = "/spacemesh.v1.PoSTService/Connect" + PoSTService_Register_FullMethodName = "/spacemesh.v1.PoSTService/Register" ) // PoSTServiceClient is the client API for PoSTService service. // // 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 PoSTServiceClient interface { - // Connect allows a dedicated PoST node to connect to the spacemesh node. - Connect(ctx context.Context, opts ...grpc.CallOption) (PoSTService_ConnectClient, error) + // Register allows a dedicated PoST node to connect to the spacemesh node. + Register(ctx context.Context, opts ...grpc.CallOption) (PoSTService_RegisterClient, error) } type poSTServiceClient struct { @@ -38,30 +38,30 @@ func NewPoSTServiceClient(cc grpc.ClientConnInterface) PoSTServiceClient { return &poSTServiceClient{cc} } -func (c *poSTServiceClient) Connect(ctx context.Context, opts ...grpc.CallOption) (PoSTService_ConnectClient, error) { - stream, err := c.cc.NewStream(ctx, &PoSTService_ServiceDesc.Streams[0], PoSTService_Connect_FullMethodName, opts...) +func (c *poSTServiceClient) Register(ctx context.Context, opts ...grpc.CallOption) (PoSTService_RegisterClient, error) { + stream, err := c.cc.NewStream(ctx, &PoSTService_ServiceDesc.Streams[0], PoSTService_Register_FullMethodName, opts...) if err != nil { return nil, err } - x := &poSTServiceConnectClient{stream} + x := &poSTServiceRegisterClient{stream} return x, nil } -type PoSTService_ConnectClient interface { +type PoSTService_RegisterClient interface { Send(*ServiceResponse) error Recv() (*NodeRequest, error) grpc.ClientStream } -type poSTServiceConnectClient struct { +type poSTServiceRegisterClient struct { grpc.ClientStream } -func (x *poSTServiceConnectClient) Send(m *ServiceResponse) error { +func (x *poSTServiceRegisterClient) Send(m *ServiceResponse) error { return x.ClientStream.SendMsg(m) } -func (x *poSTServiceConnectClient) Recv() (*NodeRequest, error) { +func (x *poSTServiceRegisterClient) Recv() (*NodeRequest, error) { m := new(NodeRequest) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err @@ -73,16 +73,16 @@ func (x *poSTServiceConnectClient) Recv() (*NodeRequest, error) { // All implementations should embed UnimplementedPoSTServiceServer // for forward compatibility type PoSTServiceServer interface { - // Connect allows a dedicated PoST node to connect to the spacemesh node. - Connect(PoSTService_ConnectServer) error + // Register allows a dedicated PoST node to connect to the spacemesh node. + Register(PoSTService_RegisterServer) error } // UnimplementedPoSTServiceServer should be embedded to have forward compatible implementations. type UnimplementedPoSTServiceServer struct { } -func (UnimplementedPoSTServiceServer) Connect(PoSTService_ConnectServer) error { - return status.Errorf(codes.Unimplemented, "method Connect not implemented") +func (UnimplementedPoSTServiceServer) Register(PoSTService_RegisterServer) error { + return status.Errorf(codes.Unimplemented, "method Register not implemented") } // UnsafePoSTServiceServer may be embedded to opt out of forward compatibility for this service. @@ -96,25 +96,25 @@ func RegisterPoSTServiceServer(s grpc.ServiceRegistrar, srv PoSTServiceServer) { s.RegisterService(&PoSTService_ServiceDesc, srv) } -func _PoSTService_Connect_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(PoSTServiceServer).Connect(&poSTServiceConnectServer{stream}) +func _PoSTService_Register_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(PoSTServiceServer).Register(&poSTServiceRegisterServer{stream}) } -type PoSTService_ConnectServer interface { +type PoSTService_RegisterServer interface { Send(*NodeRequest) error Recv() (*ServiceResponse, error) grpc.ServerStream } -type poSTServiceConnectServer struct { +type poSTServiceRegisterServer struct { grpc.ServerStream } -func (x *poSTServiceConnectServer) Send(m *NodeRequest) error { +func (x *poSTServiceRegisterServer) Send(m *NodeRequest) error { return x.ServerStream.SendMsg(m) } -func (x *poSTServiceConnectServer) Recv() (*ServiceResponse, error) { +func (x *poSTServiceRegisterServer) Recv() (*ServiceResponse, error) { m := new(ServiceResponse) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err @@ -131,8 +131,8 @@ var PoSTService_ServiceDesc = grpc.ServiceDesc{ Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { - StreamName: "Connect", - Handler: _PoSTService_Connect_Handler, + StreamName: "Register", + Handler: _PoSTService_Register_Handler, ServerStreams: true, ClientStreams: true, }, diff --git a/spacemesh/v1/post.proto b/spacemesh/v1/post.proto index 1ae59dfb..522495ab 100644 --- a/spacemesh/v1/post.proto +++ b/spacemesh/v1/post.proto @@ -7,6 +7,6 @@ import "spacemesh/v1/post_types.proto"; // PoSTService is used by dedicated PoST nodes to interact with the spacemesh // node. service PoSTService { - // Connect allows a dedicated PoST node to connect to the spacemesh node. - rpc Connect(stream ServiceResponse) returns (stream NodeRequest); + // Register allows a dedicated PoST node to connect to the spacemesh node. + rpc Register(stream ServiceResponse) returns (stream NodeRequest); } From 4b8d012d7a0cbaaa02234c24b3a54dfffc8bf408 Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Tue, 19 Sep 2023 10:51:40 +0000 Subject: [PATCH 04/11] Review feedback --- release/go/spacemesh/v1/post.pb.go | 6 +- release/go/spacemesh/v1/post.pb.gw.go | 46 +++++++------- release/go/spacemesh/v1/post_grpc.pb.go | 76 ++++++++++++------------ release/go/spacemesh/v1/post_types.pb.go | 36 +++++------ spacemesh/v1/post.proto | 4 +- spacemesh/v1/post_types.proto | 4 +- 6 files changed, 86 insertions(+), 86 deletions(-) diff --git a/release/go/spacemesh/v1/post.pb.go b/release/go/spacemesh/v1/post.pb.go index f94813c2..319a6fb8 100644 --- a/release/go/spacemesh/v1/post.pb.go +++ b/release/go/spacemesh/v1/post.pb.go @@ -26,7 +26,7 @@ var file_spacemesh_v1_post_proto_rawDesc = []byte{ 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x1a, 0x1d, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x57, 0x0a, 0x0b, 0x50, 0x6f, 0x53, 0x54, 0x53, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x57, 0x0a, 0x0b, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, @@ -51,8 +51,8 @@ var file_spacemesh_v1_post_proto_goTypes = []interface{}{ (*NodeRequest)(nil), // 1: spacemesh.v1.NodeRequest } var file_spacemesh_v1_post_proto_depIdxs = []int32{ - 0, // 0: spacemesh.v1.PoSTService.Register:input_type -> spacemesh.v1.ServiceResponse - 1, // 1: spacemesh.v1.PoSTService.Register:output_type -> spacemesh.v1.NodeRequest + 0, // 0: spacemesh.v1.PostService.Register:input_type -> spacemesh.v1.ServiceResponse + 1, // 1: spacemesh.v1.PostService.Register:output_type -> spacemesh.v1.NodeRequest 1, // [1:2] is the sub-list for method output_type 0, // [0:1] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name diff --git a/release/go/spacemesh/v1/post.pb.gw.go b/release/go/spacemesh/v1/post.pb.gw.go index 58ec5e02..2ab3a69e 100644 --- a/release/go/spacemesh/v1/post.pb.gw.go +++ b/release/go/spacemesh/v1/post.pb.gw.go @@ -31,7 +31,7 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = metadata.Join -func request_PoSTService_Register_0(ctx context.Context, marshaler runtime.Marshaler, client PoSTServiceClient, req *http.Request, pathParams map[string]string) (PoSTService_RegisterClient, runtime.ServerMetadata, error) { +func request_PostService_Register_0(ctx context.Context, marshaler runtime.Marshaler, client PostServiceClient, req *http.Request, pathParams map[string]string) (PostService_RegisterClient, runtime.ServerMetadata, error) { var metadata runtime.ServerMetadata stream, err := client.Register(ctx) if err != nil { @@ -74,13 +74,13 @@ func request_PoSTService_Register_0(ctx context.Context, marshaler runtime.Marsh return stream, metadata, nil } -// RegisterPoSTServiceHandlerServer registers the http handlers for service PoSTService to "mux". -// UnaryRPC :call PoSTServiceServer directly. +// RegisterPostServiceHandlerServer registers the http handlers for service PostService to "mux". +// UnaryRPC :call PostServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPoSTServiceHandlerFromEndpoint instead. -func RegisterPoSTServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PoSTServiceServer) error { +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPostServiceHandlerFromEndpoint instead. +func RegisterPostServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PostServiceServer) error { - mux.Handle("POST", pattern_PoSTService_Register_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_PostService_Register_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -90,9 +90,9 @@ func RegisterPoSTServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux return nil } -// RegisterPoSTServiceHandlerFromEndpoint is same as RegisterPoSTServiceHandler but +// RegisterPostServiceHandlerFromEndpoint is same as RegisterPostServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterPoSTServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { +func RegisterPostServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err @@ -112,41 +112,41 @@ func RegisterPoSTServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.Se }() }() - return RegisterPoSTServiceHandler(ctx, mux, conn) + return RegisterPostServiceHandler(ctx, mux, conn) } -// RegisterPoSTServiceHandler registers the http handlers for service PoSTService to "mux". +// RegisterPostServiceHandler registers the http handlers for service PostService to "mux". // The handlers forward requests to the grpc endpoint over "conn". -func RegisterPoSTServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterPoSTServiceHandlerClient(ctx, mux, NewPoSTServiceClient(conn)) +func RegisterPostServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterPostServiceHandlerClient(ctx, mux, NewPostServiceClient(conn)) } -// RegisterPoSTServiceHandlerClient registers the http handlers for service PoSTService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PoSTServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PoSTServiceClient" +// RegisterPostServiceHandlerClient registers the http handlers for service PostService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PostServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PostServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "PoSTServiceClient" to call the correct interceptors. -func RegisterPoSTServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PoSTServiceClient) error { +// "PostServiceClient" to call the correct interceptors. +func RegisterPostServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PostServiceClient) error { - mux.Handle("POST", pattern_PoSTService_Register_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_PostService_Register_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.v1.PoSTService/Register", runtime.WithHTTPPathPattern("/spacemesh.v1.PoSTService/Register")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/spacemesh.v1.PostService/Register", runtime.WithHTTPPathPattern("/spacemesh.v1.PostService/Register")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PoSTService_Register_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PostService_Register_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PoSTService_Register_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + forward_PostService_Register_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) @@ -154,9 +154,9 @@ func RegisterPoSTServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } var ( - pattern_PoSTService_Register_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"spacemesh.v1.PoSTService", "Register"}, "")) + pattern_PostService_Register_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"spacemesh.v1.PostService", "Register"}, "")) ) var ( - forward_PoSTService_Register_0 = runtime.ForwardResponseStream + forward_PostService_Register_0 = runtime.ForwardResponseStream ) diff --git a/release/go/spacemesh/v1/post_grpc.pb.go b/release/go/spacemesh/v1/post_grpc.pb.go index b7e93401..effc5b17 100644 --- a/release/go/spacemesh/v1/post_grpc.pb.go +++ b/release/go/spacemesh/v1/post_grpc.pb.go @@ -19,49 +19,49 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - PoSTService_Register_FullMethodName = "/spacemesh.v1.PoSTService/Register" + PostService_Register_FullMethodName = "/spacemesh.v1.PostService/Register" ) -// PoSTServiceClient is the client API for PoSTService service. +// PostServiceClient is the client API for PostService service. // // 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 PoSTServiceClient interface { +type PostServiceClient interface { // Register allows a dedicated PoST node to connect to the spacemesh node. - Register(ctx context.Context, opts ...grpc.CallOption) (PoSTService_RegisterClient, error) + Register(ctx context.Context, opts ...grpc.CallOption) (PostService_RegisterClient, error) } -type poSTServiceClient struct { +type postServiceClient struct { cc grpc.ClientConnInterface } -func NewPoSTServiceClient(cc grpc.ClientConnInterface) PoSTServiceClient { - return &poSTServiceClient{cc} +func NewPostServiceClient(cc grpc.ClientConnInterface) PostServiceClient { + return &postServiceClient{cc} } -func (c *poSTServiceClient) Register(ctx context.Context, opts ...grpc.CallOption) (PoSTService_RegisterClient, error) { - stream, err := c.cc.NewStream(ctx, &PoSTService_ServiceDesc.Streams[0], PoSTService_Register_FullMethodName, opts...) +func (c *postServiceClient) Register(ctx context.Context, opts ...grpc.CallOption) (PostService_RegisterClient, error) { + stream, err := c.cc.NewStream(ctx, &PostService_ServiceDesc.Streams[0], PostService_Register_FullMethodName, opts...) if err != nil { return nil, err } - x := &poSTServiceRegisterClient{stream} + x := &postServiceRegisterClient{stream} return x, nil } -type PoSTService_RegisterClient interface { +type PostService_RegisterClient interface { Send(*ServiceResponse) error Recv() (*NodeRequest, error) grpc.ClientStream } -type poSTServiceRegisterClient struct { +type postServiceRegisterClient struct { grpc.ClientStream } -func (x *poSTServiceRegisterClient) Send(m *ServiceResponse) error { +func (x *postServiceRegisterClient) Send(m *ServiceResponse) error { return x.ClientStream.SendMsg(m) } -func (x *poSTServiceRegisterClient) Recv() (*NodeRequest, error) { +func (x *postServiceRegisterClient) Recv() (*NodeRequest, error) { m := new(NodeRequest) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err @@ -69,52 +69,52 @@ func (x *poSTServiceRegisterClient) Recv() (*NodeRequest, error) { return m, nil } -// PoSTServiceServer is the server API for PoSTService service. -// All implementations should embed UnimplementedPoSTServiceServer +// PostServiceServer is the server API for PostService service. +// All implementations should embed UnimplementedPostServiceServer // for forward compatibility -type PoSTServiceServer interface { +type PostServiceServer interface { // Register allows a dedicated PoST node to connect to the spacemesh node. - Register(PoSTService_RegisterServer) error + Register(PostService_RegisterServer) error } -// UnimplementedPoSTServiceServer should be embedded to have forward compatible implementations. -type UnimplementedPoSTServiceServer struct { +// UnimplementedPostServiceServer should be embedded to have forward compatible implementations. +type UnimplementedPostServiceServer struct { } -func (UnimplementedPoSTServiceServer) Register(PoSTService_RegisterServer) error { +func (UnimplementedPostServiceServer) Register(PostService_RegisterServer) error { return status.Errorf(codes.Unimplemented, "method Register not implemented") } -// UnsafePoSTServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to PoSTServiceServer will +// UnsafePostServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PostServiceServer will // result in compilation errors. -type UnsafePoSTServiceServer interface { - mustEmbedUnimplementedPoSTServiceServer() +type UnsafePostServiceServer interface { + mustEmbedUnimplementedPostServiceServer() } -func RegisterPoSTServiceServer(s grpc.ServiceRegistrar, srv PoSTServiceServer) { - s.RegisterService(&PoSTService_ServiceDesc, srv) +func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer) { + s.RegisterService(&PostService_ServiceDesc, srv) } -func _PoSTService_Register_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(PoSTServiceServer).Register(&poSTServiceRegisterServer{stream}) +func _PostService_Register_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(PostServiceServer).Register(&postServiceRegisterServer{stream}) } -type PoSTService_RegisterServer interface { +type PostService_RegisterServer interface { Send(*NodeRequest) error Recv() (*ServiceResponse, error) grpc.ServerStream } -type poSTServiceRegisterServer struct { +type postServiceRegisterServer struct { grpc.ServerStream } -func (x *poSTServiceRegisterServer) Send(m *NodeRequest) error { +func (x *postServiceRegisterServer) Send(m *NodeRequest) error { return x.ServerStream.SendMsg(m) } -func (x *poSTServiceRegisterServer) Recv() (*ServiceResponse, error) { +func (x *postServiceRegisterServer) Recv() (*ServiceResponse, error) { m := new(ServiceResponse) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err @@ -122,17 +122,17 @@ func (x *poSTServiceRegisterServer) Recv() (*ServiceResponse, error) { return m, nil } -// PoSTService_ServiceDesc is the grpc.ServiceDesc for PoSTService service. +// PostService_ServiceDesc is the grpc.ServiceDesc for PostService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) -var PoSTService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "spacemesh.v1.PoSTService", - HandlerType: (*PoSTServiceServer)(nil), +var PostService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "spacemesh.v1.PostService", + HandlerType: (*PostServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Register", - Handler: _PoSTService_Register_Handler, + Handler: _PostService_Register_Handler, ServerStreams: true, ClientStreams: true, }, diff --git a/release/go/spacemesh/v1/post_types.pb.go b/release/go/spacemesh/v1/post_types.pb.go index b87f4d34..17360fc8 100644 --- a/release/go/spacemesh/v1/post_types.pb.go +++ b/release/go/spacemesh/v1/post_types.pb.go @@ -75,10 +75,10 @@ type NodeRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Types that are assignable to Type: + // Types that are assignable to Kind: // // *NodeRequest_GenProof - Type isNodeRequest_Type `protobuf_oneof:"type"` + Kind isNodeRequest_Kind `protobuf_oneof:"kind"` } func (x *NodeRequest) Reset() { @@ -113,22 +113,22 @@ func (*NodeRequest) Descriptor() ([]byte, []int) { return file_spacemesh_v1_post_types_proto_rawDescGZIP(), []int{0} } -func (m *NodeRequest) GetType() isNodeRequest_Type { +func (m *NodeRequest) GetKind() isNodeRequest_Kind { if m != nil { - return m.Type + return m.Kind } return nil } func (x *NodeRequest) GetGenProof() *GenProofRequest { - if x, ok := x.GetType().(*NodeRequest_GenProof); ok { + if x, ok := x.GetKind().(*NodeRequest_GenProof); ok { return x.GenProof } return nil } -type isNodeRequest_Type interface { - isNodeRequest_Type() +type isNodeRequest_Kind interface { + isNodeRequest_Kind() } type NodeRequest_GenProof struct { @@ -139,7 +139,7 @@ type NodeRequest_GenProof struct { GenProof *GenProofRequest `protobuf:"bytes,5,opt,name=gen_proof,json=genProof,proto3,oneof"` } -func (*NodeRequest_GenProof) isNodeRequest_Type() {} +func (*NodeRequest_GenProof) isNodeRequest_Kind() {} // ServiceResponse is a response sent from the post service to the node. type ServiceResponse struct { @@ -147,10 +147,10 @@ type ServiceResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Types that are assignable to Type: + // Types that are assignable to Kind: // // *ServiceResponse_GenProof - Type isServiceResponse_Type `protobuf_oneof:"type"` + Kind isServiceResponse_Kind `protobuf_oneof:"kind"` } func (x *ServiceResponse) Reset() { @@ -185,22 +185,22 @@ func (*ServiceResponse) Descriptor() ([]byte, []int) { return file_spacemesh_v1_post_types_proto_rawDescGZIP(), []int{1} } -func (m *ServiceResponse) GetType() isServiceResponse_Type { +func (m *ServiceResponse) GetKind() isServiceResponse_Kind { if m != nil { - return m.Type + return m.Kind } return nil } func (x *ServiceResponse) GetGenProof() *GenProofResponse { - if x, ok := x.GetType().(*ServiceResponse_GenProof); ok { + if x, ok := x.GetKind().(*ServiceResponse_GenProof); ok { return x.GenProof } return nil } -type isServiceResponse_Type interface { - isServiceResponse_Type() +type isServiceResponse_Kind interface { + isServiceResponse_Kind() } type ServiceResponse_GenProof struct { @@ -211,7 +211,7 @@ type ServiceResponse_GenProof struct { GenProof *GenProofResponse `protobuf:"bytes,5,opt,name=gen_proof,json=genProof,proto3,oneof"` } -func (*ServiceResponse_GenProof) isServiceResponse_Type() {} +func (*ServiceResponse_GenProof) isServiceResponse_Kind() {} type GenProofRequest struct { state protoimpl.MessageState @@ -477,13 +477,13 @@ var file_spacemesh_v1_post_types_proto_rawDesc = []byte{ 0x6f, 0x6f, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x08, 0x67, 0x65, 0x6e, 0x50, - 0x72, 0x6f, 0x6f, 0x66, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x58, 0x0a, 0x0f, + 0x72, 0x6f, 0x6f, 0x66, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x58, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x08, 0x67, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x42, 0x06, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x2f, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, + 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x2f, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x22, 0x49, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, diff --git a/spacemesh/v1/post.proto b/spacemesh/v1/post.proto index 522495ab..af14ce11 100644 --- a/spacemesh/v1/post.proto +++ b/spacemesh/v1/post.proto @@ -4,9 +4,9 @@ option go_package = "github.com/spacemeshos/api/release/go/spacemesh/v1"; import "spacemesh/v1/post_types.proto"; -// PoSTService is used by dedicated PoST nodes to interact with the spacemesh +// PostService is used by dedicated PoST nodes to interact with the spacemesh // node. -service PoSTService { +service PostService { // Register allows a dedicated PoST node to connect to the spacemesh node. rpc Register(stream ServiceResponse) returns (stream NodeRequest); } diff --git a/spacemesh/v1/post_types.proto b/spacemesh/v1/post_types.proto index 4eee6623..7eca6116 100644 --- a/spacemesh/v1/post_types.proto +++ b/spacemesh/v1/post_types.proto @@ -6,7 +6,7 @@ import "spacemesh/v1/types.proto"; // NodeRequest is a request sent from the node to the post service. message NodeRequest { - oneof type { + oneof kind { // StateRequest state = 1; // MetadataRequest metadata = 2; // InitRequest init = 3; @@ -17,7 +17,7 @@ message NodeRequest { // ServiceResponse is a response sent from the post service to the node. message ServiceResponse { - oneof type { + oneof kind { // StateResponse state = 1; // MetadataResponse metadata = 2; // InitResponse init = 3; From e3c1db1ff460f5bbfc89244f89042ff309555438 Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Tue, 26 Sep 2023 17:05:12 +0000 Subject: [PATCH 05/11] Add events for post service start and stop --- release/go/spacemesh/v1/admin_types.pb.go | 523 ++++++++++++++-------- spacemesh/v1/admin_types.proto | 6 + 2 files changed, 342 insertions(+), 187 deletions(-) diff --git a/release/go/spacemesh/v1/admin_types.pb.go b/release/go/spacemesh/v1/admin_types.pb.go index beedac99..8af42936 100644 --- a/release/go/spacemesh/v1/admin_types.pb.go +++ b/release/go/spacemesh/v1/admin_types.pb.go @@ -204,6 +204,8 @@ type Event struct { // *Event_Proposal // *Event_InitFailed // *Event_Malfeasance + // *Event_PostServiceStarted + // *Event_PostServiceStopped Details isEvent_Details `protobuf_oneof:"details"` } @@ -351,6 +353,20 @@ func (x *Event) GetMalfeasance() *EventMalfeasance { return nil } +func (x *Event) GetPostServiceStarted() *EventPostServiceStarted { + if x, ok := x.GetDetails().(*Event_PostServiceStarted); ok { + return x.PostServiceStarted + } + return nil +} + +func (x *Event) GetPostServiceStopped() *EventPostServiceStopped { + if x, ok := x.GetDetails().(*Event_PostServiceStopped); ok { + return x.PostServiceStopped + } + return nil +} + type isEvent_Details interface { isEvent_Details() } @@ -403,6 +419,14 @@ type Event_Malfeasance struct { Malfeasance *EventMalfeasance `protobuf:"bytes,15,opt,name=malfeasance,proto3,oneof"` } +type Event_PostServiceStarted struct { + PostServiceStarted *EventPostServiceStarted `protobuf:"bytes,16,opt,name=post_service_started,json=postServiceStarted,proto3,oneof"` +} + +type Event_PostServiceStopped struct { + PostServiceStopped *EventPostServiceStopped `protobuf:"bytes,17,opt,name=post_service_stopped,json=postServiceStopped,proto3,oneof"` +} + func (*Event_Beacon) isEvent_Details() {} func (*Event_InitStart) isEvent_Details() {} @@ -427,6 +451,10 @@ func (*Event_InitFailed) isEvent_Details() {} func (*Event_Malfeasance) isEvent_Details() {} +func (*Event_PostServiceStarted) isEvent_Details() {} + +func (*Event_PostServiceStopped) isEvent_Details() {} + type EventBeacon struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -638,6 +666,82 @@ func (*EventInitComplete) Descriptor() ([]byte, []int) { return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{7} } +type EventPostServiceStarted struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EventPostServiceStarted) Reset() { + *x = EventPostServiceStarted{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventPostServiceStarted) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventPostServiceStarted) ProtoMessage() {} + +func (x *EventPostServiceStarted) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventPostServiceStarted.ProtoReflect.Descriptor instead. +func (*EventPostServiceStarted) Descriptor() ([]byte, []int) { + return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{8} +} + +type EventPostServiceStopped struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EventPostServiceStopped) Reset() { + *x = EventPostServiceStopped{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventPostServiceStopped) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventPostServiceStopped) ProtoMessage() {} + +func (x *EventPostServiceStopped) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[9] + 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 EventPostServiceStopped.ProtoReflect.Descriptor instead. +func (*EventPostServiceStopped) Descriptor() ([]byte, []int) { + return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{9} +} + type EventPostStart struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -649,7 +753,7 @@ type EventPostStart struct { func (x *EventPostStart) Reset() { *x = EventPostStart{} if protoimpl.UnsafeEnabled { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[8] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -662,7 +766,7 @@ func (x *EventPostStart) String() string { func (*EventPostStart) ProtoMessage() {} func (x *EventPostStart) ProtoReflect() protoreflect.Message { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[8] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -675,7 +779,7 @@ func (x *EventPostStart) ProtoReflect() protoreflect.Message { // Deprecated: Use EventPostStart.ProtoReflect.Descriptor instead. func (*EventPostStart) Descriptor() ([]byte, []int) { - return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{8} + return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{10} } func (x *EventPostStart) GetChallenge() []byte { @@ -696,7 +800,7 @@ type EventPostComplete struct { func (x *EventPostComplete) Reset() { *x = EventPostComplete{} if protoimpl.UnsafeEnabled { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[9] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -709,7 +813,7 @@ func (x *EventPostComplete) String() string { func (*EventPostComplete) ProtoMessage() {} func (x *EventPostComplete) ProtoReflect() protoreflect.Message { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[9] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -722,7 +826,7 @@ func (x *EventPostComplete) ProtoReflect() protoreflect.Message { // Deprecated: Use EventPostComplete.ProtoReflect.Descriptor instead. func (*EventPostComplete) Descriptor() ([]byte, []int) { - return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{9} + return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{11} } func (x *EventPostComplete) GetChallenge() []byte { @@ -745,7 +849,7 @@ type EventPoetWaitRound struct { func (x *EventPoetWaitRound) Reset() { *x = EventPoetWaitRound{} if protoimpl.UnsafeEnabled { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[10] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -758,7 +862,7 @@ func (x *EventPoetWaitRound) String() string { func (*EventPoetWaitRound) ProtoMessage() {} func (x *EventPoetWaitRound) ProtoReflect() protoreflect.Message { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[10] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -771,7 +875,7 @@ func (x *EventPoetWaitRound) ProtoReflect() protoreflect.Message { // Deprecated: Use EventPoetWaitRound.ProtoReflect.Descriptor instead. func (*EventPoetWaitRound) Descriptor() ([]byte, []int) { - return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{10} + return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{12} } func (x *EventPoetWaitRound) GetCurrent() uint32 { @@ -808,7 +912,7 @@ type EventPoetWaitProof struct { func (x *EventPoetWaitProof) Reset() { *x = EventPoetWaitProof{} if protoimpl.UnsafeEnabled { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[11] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -821,7 +925,7 @@ func (x *EventPoetWaitProof) String() string { func (*EventPoetWaitProof) ProtoMessage() {} func (x *EventPoetWaitProof) ProtoReflect() protoreflect.Message { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[11] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -834,7 +938,7 @@ func (x *EventPoetWaitProof) ProtoReflect() protoreflect.Message { // Deprecated: Use EventPoetWaitProof.ProtoReflect.Descriptor instead. func (*EventPoetWaitProof) Descriptor() ([]byte, []int) { - return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{11} + return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{13} } func (x *EventPoetWaitProof) GetPublish() uint32 { @@ -872,7 +976,7 @@ type EventAtxPubished struct { func (x *EventAtxPubished) Reset() { *x = EventAtxPubished{} if protoimpl.UnsafeEnabled { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[12] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -885,7 +989,7 @@ func (x *EventAtxPubished) String() string { func (*EventAtxPubished) ProtoMessage() {} func (x *EventAtxPubished) ProtoReflect() protoreflect.Message { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[12] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -898,7 +1002,7 @@ func (x *EventAtxPubished) ProtoReflect() protoreflect.Message { // Deprecated: Use EventAtxPubished.ProtoReflect.Descriptor instead. func (*EventAtxPubished) Descriptor() ([]byte, []int) { - return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{12} + return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{14} } func (x *EventAtxPubished) GetCurrent() uint32 { @@ -944,7 +1048,7 @@ type EventEligibilities struct { func (x *EventEligibilities) Reset() { *x = EventEligibilities{} if protoimpl.UnsafeEnabled { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[13] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -957,7 +1061,7 @@ func (x *EventEligibilities) String() string { func (*EventEligibilities) ProtoMessage() {} func (x *EventEligibilities) ProtoReflect() protoreflect.Message { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[13] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -970,7 +1074,7 @@ func (x *EventEligibilities) ProtoReflect() protoreflect.Message { // Deprecated: Use EventEligibilities.ProtoReflect.Descriptor instead. func (*EventEligibilities) Descriptor() ([]byte, []int) { - return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{13} + return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{15} } func (x *EventEligibilities) GetEpoch() uint32 { @@ -1020,7 +1124,7 @@ type ProposalEligibility struct { func (x *ProposalEligibility) Reset() { *x = ProposalEligibility{} if protoimpl.UnsafeEnabled { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[14] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1033,7 +1137,7 @@ func (x *ProposalEligibility) String() string { func (*ProposalEligibility) ProtoMessage() {} func (x *ProposalEligibility) ProtoReflect() protoreflect.Message { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[14] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1046,7 +1150,7 @@ func (x *ProposalEligibility) ProtoReflect() protoreflect.Message { // Deprecated: Use ProposalEligibility.ProtoReflect.Descriptor instead. func (*ProposalEligibility) Descriptor() ([]byte, []int) { - return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{14} + return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{16} } func (x *ProposalEligibility) GetLayer() uint32 { @@ -1076,7 +1180,7 @@ type EventProposal struct { func (x *EventProposal) Reset() { *x = EventProposal{} if protoimpl.UnsafeEnabled { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[15] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1089,7 +1193,7 @@ func (x *EventProposal) String() string { func (*EventProposal) ProtoMessage() {} func (x *EventProposal) ProtoReflect() protoreflect.Message { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[15] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1102,7 +1206,7 @@ func (x *EventProposal) ProtoReflect() protoreflect.Message { // Deprecated: Use EventProposal.ProtoReflect.Descriptor instead. func (*EventProposal) Descriptor() ([]byte, []int) { - return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{15} + return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{17} } func (x *EventProposal) GetLayer() uint32 { @@ -1130,7 +1234,7 @@ type EventMalfeasance struct { func (x *EventMalfeasance) Reset() { *x = EventMalfeasance{} if protoimpl.UnsafeEnabled { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[16] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1143,7 +1247,7 @@ func (x *EventMalfeasance) String() string { func (*EventMalfeasance) ProtoMessage() {} func (x *EventMalfeasance) ProtoReflect() protoreflect.Message { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[16] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1156,7 +1260,7 @@ func (x *EventMalfeasance) ProtoReflect() protoreflect.Message { // Deprecated: Use EventMalfeasance.ProtoReflect.Descriptor instead. func (*EventMalfeasance) Descriptor() ([]byte, []int) { - return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{16} + return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{18} } func (x *EventMalfeasance) GetProof() *MalfeasanceProof { @@ -1175,7 +1279,7 @@ type EventStreamRequest struct { func (x *EventStreamRequest) Reset() { *x = EventStreamRequest{} if protoimpl.UnsafeEnabled { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[17] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1188,7 +1292,7 @@ func (x *EventStreamRequest) String() string { func (*EventStreamRequest) ProtoMessage() {} func (x *EventStreamRequest) ProtoReflect() protoreflect.Message { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[17] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1201,7 +1305,7 @@ func (x *EventStreamRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use EventStreamRequest.ProtoReflect.Descriptor instead. func (*EventStreamRequest) Descriptor() ([]byte, []int) { - return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{17} + return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{19} } type ConnectionInfo struct { @@ -1217,7 +1321,7 @@ type ConnectionInfo struct { func (x *ConnectionInfo) Reset() { *x = ConnectionInfo{} if protoimpl.UnsafeEnabled { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[18] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1230,7 +1334,7 @@ func (x *ConnectionInfo) String() string { func (*ConnectionInfo) ProtoMessage() {} func (x *ConnectionInfo) ProtoReflect() protoreflect.Message { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[18] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1243,7 +1347,7 @@ func (x *ConnectionInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ConnectionInfo.ProtoReflect.Descriptor instead. func (*ConnectionInfo) Descriptor() ([]byte, []int) { - return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{18} + return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{20} } func (x *ConnectionInfo) GetAddress() string { @@ -1280,7 +1384,7 @@ type PeerInfo struct { func (x *PeerInfo) Reset() { *x = PeerInfo{} if protoimpl.UnsafeEnabled { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[19] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1293,7 +1397,7 @@ func (x *PeerInfo) String() string { func (*PeerInfo) ProtoMessage() {} func (x *PeerInfo) ProtoReflect() protoreflect.Message { - mi := &file_spacemesh_v1_admin_types_proto_msgTypes[19] + mi := &file_spacemesh_v1_admin_types_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1306,7 +1410,7 @@ func (x *PeerInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use PeerInfo.ProtoReflect.Descriptor instead. func (*PeerInfo) Descriptor() ([]byte, []int) { - return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{19} + return file_spacemesh_v1_admin_types_proto_rawDescGZIP(), []int{21} } func (x *PeerInfo) GetId() string { @@ -1355,7 +1459,7 @@ var file_spacemesh_v1_admin_types_proto_rawDesc = []byte{ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x22, - 0xa7, 0x07, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0xdd, 0x08, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, @@ -1412,107 +1516,122 @@ var file_spacemesh_v1_admin_types_proto_rawDesc = []byte{ 0x6c, 0x66, 0x65, 0x61, 0x73, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x6c, 0x66, 0x65, 0x61, 0x73, 0x61, 0x6e, 0x63, 0x65, 0x48, - 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x6c, 0x66, 0x65, 0x61, 0x73, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x09, - 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x3b, 0x0a, 0x0b, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x16, - 0x0a, 0x06, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, - 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x22, 0x4a, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, - 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6d, 0x65, 0x73, - 0x68, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x6d, 0x65, 0x73, 0x68, - 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, - 0x6e, 0x74, 0x22, 0x61, 0x0a, 0x0f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x46, - 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6d, 0x65, 0x73, 0x68, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x6d, 0x65, 0x73, 0x68, 0x65, 0x72, 0x12, - 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x13, 0x0a, 0x11, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x6e, - 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x22, 0x2e, 0x0a, 0x0e, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x22, 0x31, 0x0a, 0x11, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x22, 0x77, 0x0a, - 0x12, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x65, 0x74, 0x57, 0x61, 0x69, 0x74, 0x52, 0x6f, - 0x75, 0x6e, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, - 0x07, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x12, 0x2d, 0x0a, 0x04, 0x77, 0x61, 0x69, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x04, 0x77, 0x61, 0x69, 0x74, 0x22, 0x75, 0x0a, 0x12, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, - 0x6f, 0x65, 0x74, 0x57, 0x61, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x18, 0x0a, 0x07, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2d, - 0x0a, 0x04, 0x77, 0x61, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x77, 0x61, 0x69, 0x74, 0x22, 0x83, 0x01, - 0x0a, 0x10, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x78, 0x50, 0x75, 0x62, 0x69, 0x73, 0x68, - 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x04, 0x77, 0x61, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x77, - 0x61, 0x69, 0x74, 0x22, 0xc5, 0x01, 0x0a, 0x12, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x45, 0x6c, 0x69, - 0x67, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, - 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x12, 0x16, 0x0a, 0x06, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x06, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x74, 0x78, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x61, 0x74, 0x78, 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x53, 0x65, 0x74, 0x53, 0x69, - 0x7a, 0x65, 0x12, 0x47, 0x0a, 0x0d, 0x65, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x45, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x65, 0x6c, - 0x69, 0x67, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x41, 0x0a, 0x13, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x05, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x41, - 0x0a, 0x0d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, - 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x22, 0x48, 0x0a, 0x10, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x6c, 0x66, 0x65, 0x61, - 0x73, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x6c, 0x66, 0x65, 0x61, 0x73, 0x61, 0x6e, 0x63, 0x65, 0x50, - 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x14, 0x0a, 0x12, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x79, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x31, 0x0a, - 0x06, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, - 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x6e, 0x0a, 0x08, - 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3e, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x42, 0xb4, 0x01, 0x0a, - 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x42, 0x0f, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 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, 0x31, 0x3b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, - 0x73, 0x68, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x70, 0x61, - 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x53, 0x70, 0x61, 0x63, - 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x53, 0x70, 0x61, 0x63, 0x65, - 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x6c, 0x66, 0x65, 0x61, 0x73, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x59, + 0x0a, 0x14, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x12, 0x70, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x59, 0x0a, 0x14, 0x70, 0x6f, 0x73, + 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, + 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, + 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x74, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x48, 0x00, + 0x52, 0x12, 0x70, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x6f, + 0x70, 0x70, 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, + 0x3b, 0x0a, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x12, 0x14, + 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x22, 0x4a, 0x0a, 0x0e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x73, 0x6d, 0x65, 0x73, 0x68, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x07, 0x73, 0x6d, 0x65, 0x73, 0x68, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x61, 0x0a, 0x0f, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x49, 0x6e, 0x69, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x6d, 0x65, 0x73, 0x68, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x6d, + 0x65, 0x73, 0x68, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x13, 0x0a, 0x11, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, + 0x22, 0x19, 0x0a, 0x17, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, + 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x22, 0x2e, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, + 0x6f, 0x73, 0x74, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6c, + 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x68, 0x61, + 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x22, 0x31, 0x0a, 0x11, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, + 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, + 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, + 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x22, 0x77, 0x0a, 0x12, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x50, 0x6f, 0x65, 0x74, 0x57, 0x61, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x73, 0x68, 0x12, 0x2d, 0x0a, 0x04, 0x77, 0x61, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x77, 0x61, + 0x69, 0x74, 0x22, 0x75, 0x0a, 0x12, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x65, 0x74, 0x57, + 0x61, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x77, 0x61, + 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x77, 0x61, 0x69, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x10, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x41, 0x74, 0x78, 0x50, 0x75, 0x62, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x2d, 0x0a, 0x04, 0x77, 0x61, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x77, 0x61, 0x69, 0x74, 0x22, + 0xc5, 0x01, 0x0a, 0x12, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x45, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, + 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x62, 0x65, + 0x61, 0x63, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x74, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x03, 0x61, 0x74, 0x78, 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0d, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x53, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x47, + 0x0a, 0x0d, 0x65, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x6c, 0x69, + 0x67, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x65, 0x6c, 0x69, 0x67, 0x69, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x41, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x45, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x41, 0x0a, 0x0d, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, 0x48, 0x0a, + 0x10, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x6c, 0x66, 0x65, 0x61, 0x73, 0x61, 0x6e, 0x63, + 0x65, 0x12, 0x34, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x61, 0x6c, 0x66, 0x65, 0x61, 0x73, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, + 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x14, 0x0a, 0x12, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x79, 0x0a, + 0x0e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x31, 0x0a, 0x06, 0x75, 0x70, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x6e, 0x0a, 0x08, 0x50, 0x65, 0x65, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x3e, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x42, 0xb4, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, + 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x41, + 0x64, 0x6d, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x3e, 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, 0x31, 0x3b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, + 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x0d, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1527,7 +1646,7 @@ func file_spacemesh_v1_admin_types_proto_rawDescGZIP() []byte { return file_spacemesh_v1_admin_types_proto_rawDescData } -var file_spacemesh_v1_admin_types_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_spacemesh_v1_admin_types_proto_msgTypes = make([]protoimpl.MessageInfo, 22) var file_spacemesh_v1_admin_types_proto_goTypes = []interface{}{ (*CheckpointStreamRequest)(nil), // 0: spacemesh.v1.CheckpointStreamRequest (*CheckpointStreamResponse)(nil), // 1: spacemesh.v1.CheckpointStreamResponse @@ -1537,48 +1656,52 @@ var file_spacemesh_v1_admin_types_proto_goTypes = []interface{}{ (*EventInitStart)(nil), // 5: spacemesh.v1.EventInitStart (*EventInitFailed)(nil), // 6: spacemesh.v1.EventInitFailed (*EventInitComplete)(nil), // 7: spacemesh.v1.EventInitComplete - (*EventPostStart)(nil), // 8: spacemesh.v1.EventPostStart - (*EventPostComplete)(nil), // 9: spacemesh.v1.EventPostComplete - (*EventPoetWaitRound)(nil), // 10: spacemesh.v1.EventPoetWaitRound - (*EventPoetWaitProof)(nil), // 11: spacemesh.v1.EventPoetWaitProof - (*EventAtxPubished)(nil), // 12: spacemesh.v1.EventAtxPubished - (*EventEligibilities)(nil), // 13: spacemesh.v1.EventEligibilities - (*ProposalEligibility)(nil), // 14: spacemesh.v1.ProposalEligibility - (*EventProposal)(nil), // 15: spacemesh.v1.EventProposal - (*EventMalfeasance)(nil), // 16: spacemesh.v1.EventMalfeasance - (*EventStreamRequest)(nil), // 17: spacemesh.v1.EventStreamRequest - (*ConnectionInfo)(nil), // 18: spacemesh.v1.ConnectionInfo - (*PeerInfo)(nil), // 19: spacemesh.v1.PeerInfo - (*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 21: google.protobuf.Duration - (*MalfeasanceProof)(nil), // 22: spacemesh.v1.MalfeasanceProof + (*EventPostServiceStarted)(nil), // 8: spacemesh.v1.EventPostServiceStarted + (*EventPostServiceStopped)(nil), // 9: spacemesh.v1.EventPostServiceStopped + (*EventPostStart)(nil), // 10: spacemesh.v1.EventPostStart + (*EventPostComplete)(nil), // 11: spacemesh.v1.EventPostComplete + (*EventPoetWaitRound)(nil), // 12: spacemesh.v1.EventPoetWaitRound + (*EventPoetWaitProof)(nil), // 13: spacemesh.v1.EventPoetWaitProof + (*EventAtxPubished)(nil), // 14: spacemesh.v1.EventAtxPubished + (*EventEligibilities)(nil), // 15: spacemesh.v1.EventEligibilities + (*ProposalEligibility)(nil), // 16: spacemesh.v1.ProposalEligibility + (*EventProposal)(nil), // 17: spacemesh.v1.EventProposal + (*EventMalfeasance)(nil), // 18: spacemesh.v1.EventMalfeasance + (*EventStreamRequest)(nil), // 19: spacemesh.v1.EventStreamRequest + (*ConnectionInfo)(nil), // 20: spacemesh.v1.ConnectionInfo + (*PeerInfo)(nil), // 21: spacemesh.v1.PeerInfo + (*timestamppb.Timestamp)(nil), // 22: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 23: google.protobuf.Duration + (*MalfeasanceProof)(nil), // 24: spacemesh.v1.MalfeasanceProof } var file_spacemesh_v1_admin_types_proto_depIdxs = []int32{ - 20, // 0: spacemesh.v1.Event.timestamp:type_name -> google.protobuf.Timestamp + 22, // 0: spacemesh.v1.Event.timestamp:type_name -> google.protobuf.Timestamp 4, // 1: spacemesh.v1.Event.beacon:type_name -> spacemesh.v1.EventBeacon 5, // 2: spacemesh.v1.Event.init_start:type_name -> spacemesh.v1.EventInitStart 7, // 3: spacemesh.v1.Event.init_complete:type_name -> spacemesh.v1.EventInitComplete - 8, // 4: spacemesh.v1.Event.post_start:type_name -> spacemesh.v1.EventPostStart - 9, // 5: spacemesh.v1.Event.post_complete:type_name -> spacemesh.v1.EventPostComplete - 10, // 6: spacemesh.v1.Event.poet_wait_round:type_name -> spacemesh.v1.EventPoetWaitRound - 11, // 7: spacemesh.v1.Event.poet_wait_proof:type_name -> spacemesh.v1.EventPoetWaitProof - 12, // 8: spacemesh.v1.Event.atx_published:type_name -> spacemesh.v1.EventAtxPubished - 13, // 9: spacemesh.v1.Event.eligibilities:type_name -> spacemesh.v1.EventEligibilities - 15, // 10: spacemesh.v1.Event.proposal:type_name -> spacemesh.v1.EventProposal + 10, // 4: spacemesh.v1.Event.post_start:type_name -> spacemesh.v1.EventPostStart + 11, // 5: spacemesh.v1.Event.post_complete:type_name -> spacemesh.v1.EventPostComplete + 12, // 6: spacemesh.v1.Event.poet_wait_round:type_name -> spacemesh.v1.EventPoetWaitRound + 13, // 7: spacemesh.v1.Event.poet_wait_proof:type_name -> spacemesh.v1.EventPoetWaitProof + 14, // 8: spacemesh.v1.Event.atx_published:type_name -> spacemesh.v1.EventAtxPubished + 15, // 9: spacemesh.v1.Event.eligibilities:type_name -> spacemesh.v1.EventEligibilities + 17, // 10: spacemesh.v1.Event.proposal:type_name -> spacemesh.v1.EventProposal 6, // 11: spacemesh.v1.Event.init_failed:type_name -> spacemesh.v1.EventInitFailed - 16, // 12: spacemesh.v1.Event.malfeasance:type_name -> spacemesh.v1.EventMalfeasance - 21, // 13: spacemesh.v1.EventPoetWaitRound.wait:type_name -> google.protobuf.Duration - 21, // 14: spacemesh.v1.EventPoetWaitProof.wait:type_name -> google.protobuf.Duration - 21, // 15: spacemesh.v1.EventAtxPubished.wait:type_name -> google.protobuf.Duration - 14, // 16: spacemesh.v1.EventEligibilities.eligibilities:type_name -> spacemesh.v1.ProposalEligibility - 22, // 17: spacemesh.v1.EventMalfeasance.proof:type_name -> spacemesh.v1.MalfeasanceProof - 21, // 18: spacemesh.v1.ConnectionInfo.uptime:type_name -> google.protobuf.Duration - 18, // 19: spacemesh.v1.PeerInfo.connections:type_name -> spacemesh.v1.ConnectionInfo - 20, // [20:20] is the sub-list for method output_type - 20, // [20:20] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 18, // 12: spacemesh.v1.Event.malfeasance:type_name -> spacemesh.v1.EventMalfeasance + 8, // 13: spacemesh.v1.Event.post_service_started:type_name -> spacemesh.v1.EventPostServiceStarted + 9, // 14: spacemesh.v1.Event.post_service_stopped:type_name -> spacemesh.v1.EventPostServiceStopped + 23, // 15: spacemesh.v1.EventPoetWaitRound.wait:type_name -> google.protobuf.Duration + 23, // 16: spacemesh.v1.EventPoetWaitProof.wait:type_name -> google.protobuf.Duration + 23, // 17: spacemesh.v1.EventAtxPubished.wait:type_name -> google.protobuf.Duration + 16, // 18: spacemesh.v1.EventEligibilities.eligibilities:type_name -> spacemesh.v1.ProposalEligibility + 24, // 19: spacemesh.v1.EventMalfeasance.proof:type_name -> spacemesh.v1.MalfeasanceProof + 23, // 20: spacemesh.v1.ConnectionInfo.uptime:type_name -> google.protobuf.Duration + 20, // 21: spacemesh.v1.PeerInfo.connections:type_name -> spacemesh.v1.ConnectionInfo + 22, // [22:22] is the sub-list for method output_type + 22, // [22:22] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name } func init() { file_spacemesh_v1_admin_types_proto_init() } @@ -1685,7 +1808,7 @@ func file_spacemesh_v1_admin_types_proto_init() { } } file_spacemesh_v1_admin_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventPostStart); i { + switch v := v.(*EventPostServiceStarted); i { case 0: return &v.state case 1: @@ -1697,7 +1820,7 @@ func file_spacemesh_v1_admin_types_proto_init() { } } file_spacemesh_v1_admin_types_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventPostComplete); i { + switch v := v.(*EventPostServiceStopped); i { case 0: return &v.state case 1: @@ -1709,7 +1832,7 @@ func file_spacemesh_v1_admin_types_proto_init() { } } file_spacemesh_v1_admin_types_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventPoetWaitRound); i { + switch v := v.(*EventPostStart); i { case 0: return &v.state case 1: @@ -1721,7 +1844,7 @@ func file_spacemesh_v1_admin_types_proto_init() { } } file_spacemesh_v1_admin_types_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventPoetWaitProof); i { + switch v := v.(*EventPostComplete); i { case 0: return &v.state case 1: @@ -1733,7 +1856,7 @@ func file_spacemesh_v1_admin_types_proto_init() { } } file_spacemesh_v1_admin_types_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventAtxPubished); i { + switch v := v.(*EventPoetWaitRound); i { case 0: return &v.state case 1: @@ -1745,7 +1868,7 @@ func file_spacemesh_v1_admin_types_proto_init() { } } file_spacemesh_v1_admin_types_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventEligibilities); i { + switch v := v.(*EventPoetWaitProof); i { case 0: return &v.state case 1: @@ -1757,7 +1880,7 @@ func file_spacemesh_v1_admin_types_proto_init() { } } file_spacemesh_v1_admin_types_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProposalEligibility); i { + switch v := v.(*EventAtxPubished); i { case 0: return &v.state case 1: @@ -1769,7 +1892,7 @@ func file_spacemesh_v1_admin_types_proto_init() { } } file_spacemesh_v1_admin_types_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventProposal); i { + switch v := v.(*EventEligibilities); i { case 0: return &v.state case 1: @@ -1781,7 +1904,7 @@ func file_spacemesh_v1_admin_types_proto_init() { } } file_spacemesh_v1_admin_types_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventMalfeasance); i { + switch v := v.(*ProposalEligibility); i { case 0: return &v.state case 1: @@ -1793,7 +1916,7 @@ func file_spacemesh_v1_admin_types_proto_init() { } } file_spacemesh_v1_admin_types_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventStreamRequest); i { + switch v := v.(*EventProposal); i { case 0: return &v.state case 1: @@ -1805,7 +1928,7 @@ func file_spacemesh_v1_admin_types_proto_init() { } } file_spacemesh_v1_admin_types_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConnectionInfo); i { + switch v := v.(*EventMalfeasance); i { case 0: return &v.state case 1: @@ -1817,6 +1940,30 @@ func file_spacemesh_v1_admin_types_proto_init() { } } file_spacemesh_v1_admin_types_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventStreamRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v1_admin_types_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConnectionInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v1_admin_types_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PeerInfo); i { case 0: return &v.state @@ -1842,6 +1989,8 @@ func file_spacemesh_v1_admin_types_proto_init() { (*Event_Proposal)(nil), (*Event_InitFailed)(nil), (*Event_Malfeasance)(nil), + (*Event_PostServiceStarted)(nil), + (*Event_PostServiceStopped)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -1849,7 +1998,7 @@ func file_spacemesh_v1_admin_types_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_spacemesh_v1_admin_types_proto_rawDesc, NumEnums: 0, - NumMessages: 20, + NumMessages: 22, NumExtensions: 0, NumServices: 0, }, diff --git a/spacemesh/v1/admin_types.proto b/spacemesh/v1/admin_types.proto index 2c69214b..9c2368ec 100644 --- a/spacemesh/v1/admin_types.proto +++ b/spacemesh/v1/admin_types.proto @@ -40,6 +40,8 @@ message Event { EventProposal proposal = 13; EventInitFailed init_failed = 14; EventMalfeasance malfeasance = 15; + EventPostServiceStarted post_service_started = 16; + EventPostServiceStopped post_service_stopped = 17; } } @@ -61,6 +63,10 @@ message EventInitFailed { message EventInitComplete {} +message EventPostServiceStarted {} + +message EventPostServiceStopped {} + message EventPostStart { bytes challenge = 1; } From 50f3a79535bf7cf37bf6d572011bf5c0718bfaaa Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Wed, 4 Oct 2023 09:40:05 +0000 Subject: [PATCH 06/11] Fix linting errors --- spacemesh/v1/post.proto | 4 ++-- spacemesh/v1/post_types.proto | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spacemesh/v1/post.proto b/spacemesh/v1/post.proto index af14ce11..fc53ddb4 100644 --- a/spacemesh/v1/post.proto +++ b/spacemesh/v1/post.proto @@ -1,9 +1,9 @@ syntax = "proto3"; -package spacemesh.v1; -option go_package = "github.com/spacemeshos/api/release/go/spacemesh/v1"; import "spacemesh/v1/post_types.proto"; +package spacemesh.v1; + // PostService is used by dedicated PoST nodes to interact with the spacemesh // node. service PostService { diff --git a/spacemesh/v1/post_types.proto b/spacemesh/v1/post_types.proto index 7eca6116..fa433384 100644 --- a/spacemesh/v1/post_types.proto +++ b/spacemesh/v1/post_types.proto @@ -1,9 +1,9 @@ syntax = "proto3"; -package spacemesh.v1; -option go_package = "github.com/spacemeshos/api/release/go/spacemesh/v1"; import "spacemesh/v1/types.proto"; +package spacemesh.v1; + // NodeRequest is a request sent from the node to the post service. message NodeRequest { oneof kind { From 24bc165a5907e8ed44a5b866486d45d2e0b6f6fd Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Mon, 9 Oct 2023 14:25:13 +0000 Subject: [PATCH 07/11] Add Metadata request and response --- release/go/spacemesh/v1/post_types.pb.go | 451 +++++++++++++++++------ spacemesh/v1/post_types.proto | 30 +- 2 files changed, 353 insertions(+), 128 deletions(-) diff --git a/release/go/spacemesh/v1/post_types.pb.go b/release/go/spacemesh/v1/post_types.pb.go index 17360fc8..f1cc1db2 100644 --- a/release/go/spacemesh/v1/post_types.pb.go +++ b/release/go/spacemesh/v1/post_types.pb.go @@ -77,6 +77,7 @@ type NodeRequest struct { // Types that are assignable to Kind: // + // *NodeRequest_Metadata // *NodeRequest_GenProof Kind isNodeRequest_Kind `protobuf_oneof:"kind"` } @@ -120,6 +121,13 @@ func (m *NodeRequest) GetKind() isNodeRequest_Kind { return nil } +func (x *NodeRequest) GetMetadata() *MetadataRequest { + if x, ok := x.GetKind().(*NodeRequest_Metadata); ok { + return x.Metadata + } + return nil +} + func (x *NodeRequest) GetGenProof() *GenProofRequest { if x, ok := x.GetKind().(*NodeRequest_GenProof); ok { return x.GenProof @@ -131,14 +139,16 @@ type isNodeRequest_Kind interface { isNodeRequest_Kind() } +type NodeRequest_Metadata struct { + Metadata *MetadataRequest `protobuf:"bytes,1,opt,name=metadata,proto3,oneof"` +} + type NodeRequest_GenProof struct { - // StateRequest state = 1; - // MetadataRequest metadata = 2; - // InitRequest init = 3; - // ResizeRequest resize = 4; - GenProof *GenProofRequest `protobuf:"bytes,5,opt,name=gen_proof,json=genProof,proto3,oneof"` + GenProof *GenProofRequest `protobuf:"bytes,2,opt,name=gen_proof,json=genProof,proto3,oneof"` } +func (*NodeRequest_Metadata) isNodeRequest_Kind() {} + func (*NodeRequest_GenProof) isNodeRequest_Kind() {} // ServiceResponse is a response sent from the post service to the node. @@ -149,6 +159,7 @@ type ServiceResponse struct { // Types that are assignable to Kind: // + // *ServiceResponse_Metadata // *ServiceResponse_GenProof Kind isServiceResponse_Kind `protobuf_oneof:"kind"` } @@ -192,6 +203,13 @@ func (m *ServiceResponse) GetKind() isServiceResponse_Kind { return nil } +func (x *ServiceResponse) GetMetadata() *MetadataResponse { + if x, ok := x.GetKind().(*ServiceResponse_Metadata); ok { + return x.Metadata + } + return nil +} + func (x *ServiceResponse) GetGenProof() *GenProofResponse { if x, ok := x.GetKind().(*ServiceResponse_GenProof); ok { return x.GenProof @@ -203,14 +221,16 @@ type isServiceResponse_Kind interface { isServiceResponse_Kind() } +type ServiceResponse_Metadata struct { + Metadata *MetadataResponse `protobuf:"bytes,1,opt,name=metadata,proto3,oneof"` +} + type ServiceResponse_GenProof struct { - // StateResponse state = 1; - // MetadataResponse metadata = 2; - // InitResponse init = 3; - // ResizeResponse resize = 4; - GenProof *GenProofResponse `protobuf:"bytes,5,opt,name=gen_proof,json=genProof,proto3,oneof"` + GenProof *GenProofResponse `protobuf:"bytes,2,opt,name=gen_proof,json=genProof,proto3,oneof"` } +func (*ServiceResponse_Metadata) isServiceResponse_Kind() {} + func (*ServiceResponse_GenProof) isServiceResponse_Kind() {} type GenProofRequest struct { @@ -323,20 +343,20 @@ func (x *Proof) GetPow() uint64 { return 0 } -type ProofMetadata struct { +type Metadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Challenge []byte `protobuf:"bytes,1,opt,name=challenge,proto3" json:"challenge,omitempty"` - NodeId *SmesherId `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - CommitmentAtxId *ActivationId `protobuf:"bytes,3,opt,name=commitment_atx_id,json=commitmentAtxId,proto3" json:"commitment_atx_id,omitempty"` - NumUnits uint32 `protobuf:"varint,4,opt,name=num_units,json=numUnits,proto3" json:"num_units,omitempty"` - LabelsPerUnit uint64 `protobuf:"varint,5,opt,name=labels_per_unit,json=labelsPerUnit,proto3" json:"labels_per_unit,omitempty"` + NodeId []byte `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + CommitmentAtxId []byte `protobuf:"bytes,2,opt,name=commitment_atx_id,json=commitmentAtxId,proto3" json:"commitment_atx_id,omitempty"` + Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` + NumUnits uint32 `protobuf:"varint,4,opt,name=num_units,json=numUnits,proto3" json:"num_units,omitempty"` + LabelsPerUnit uint64 `protobuf:"varint,5,opt,name=labels_per_unit,json=labelsPerUnit,proto3" json:"labels_per_unit,omitempty"` } -func (x *ProofMetadata) Reset() { - *x = ProofMetadata{} +func (x *Metadata) Reset() { + *x = Metadata{} if protoimpl.UnsafeEnabled { mi := &file_spacemesh_v1_post_types_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -344,13 +364,13 @@ func (x *ProofMetadata) Reset() { } } -func (x *ProofMetadata) String() string { +func (x *Metadata) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ProofMetadata) ProtoMessage() {} +func (*Metadata) ProtoMessage() {} -func (x *ProofMetadata) ProtoReflect() protoreflect.Message { +func (x *Metadata) ProtoReflect() protoreflect.Message { mi := &file_spacemesh_v1_post_types_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -362,46 +382,101 @@ func (x *ProofMetadata) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ProofMetadata.ProtoReflect.Descriptor instead. -func (*ProofMetadata) Descriptor() ([]byte, []int) { +// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. +func (*Metadata) Descriptor() ([]byte, []int) { return file_spacemesh_v1_post_types_proto_rawDescGZIP(), []int{4} } -func (x *ProofMetadata) GetChallenge() []byte { +func (x *Metadata) GetNodeId() []byte { if x != nil { - return x.Challenge + return x.NodeId } return nil } -func (x *ProofMetadata) GetNodeId() *SmesherId { +func (x *Metadata) GetCommitmentAtxId() []byte { if x != nil { - return x.NodeId + return x.CommitmentAtxId } return nil } -func (x *ProofMetadata) GetCommitmentAtxId() *ActivationId { +func (x *Metadata) GetNonce() uint64 { if x != nil { - return x.CommitmentAtxId + return x.Nonce } - return nil + return 0 } -func (x *ProofMetadata) GetNumUnits() uint32 { +func (x *Metadata) GetNumUnits() uint32 { if x != nil { return x.NumUnits } return 0 } -func (x *ProofMetadata) GetLabelsPerUnit() uint64 { +func (x *Metadata) GetLabelsPerUnit() uint64 { if x != nil { return x.LabelsPerUnit } return 0 } +type ProofMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Challenge []byte `protobuf:"bytes,1,opt,name=challenge,proto3" json:"challenge,omitempty"` + Meta *Metadata `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"` +} + +func (x *ProofMetadata) Reset() { + *x = ProofMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v1_post_types_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProofMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProofMetadata) ProtoMessage() {} + +func (x *ProofMetadata) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v1_post_types_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProofMetadata.ProtoReflect.Descriptor instead. +func (*ProofMetadata) Descriptor() ([]byte, []int) { + return file_spacemesh_v1_post_types_proto_rawDescGZIP(), []int{5} +} + +func (x *ProofMetadata) GetChallenge() []byte { + if x != nil { + return x.Challenge + } + return nil +} + +func (x *ProofMetadata) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + type GenProofResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -415,7 +490,7 @@ type GenProofResponse struct { func (x *GenProofResponse) Reset() { *x = GenProofResponse{} if protoimpl.UnsafeEnabled { - mi := &file_spacemesh_v1_post_types_proto_msgTypes[5] + mi := &file_spacemesh_v1_post_types_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -428,7 +503,7 @@ func (x *GenProofResponse) String() string { func (*GenProofResponse) ProtoMessage() {} func (x *GenProofResponse) ProtoReflect() protoreflect.Message { - mi := &file_spacemesh_v1_post_types_proto_msgTypes[5] + mi := &file_spacemesh_v1_post_types_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -441,7 +516,7 @@ func (x *GenProofResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GenProofResponse.ProtoReflect.Descriptor instead. func (*GenProofResponse) Descriptor() ([]byte, []int) { - return file_spacemesh_v1_post_types_proto_rawDescGZIP(), []int{5} + return file_spacemesh_v1_post_types_proto_rawDescGZIP(), []int{6} } func (x *GenProofResponse) GetStatus() GenProofStatus { @@ -465,6 +540,91 @@ func (x *GenProofResponse) GetMetadata() *ProofMetadata { return nil } +type MetadataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MetadataRequest) Reset() { + *x = MetadataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v1_post_types_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetadataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetadataRequest) ProtoMessage() {} + +func (x *MetadataRequest) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v1_post_types_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 MetadataRequest.ProtoReflect.Descriptor instead. +func (*MetadataRequest) Descriptor() ([]byte, []int) { + return file_spacemesh_v1_post_types_proto_rawDescGZIP(), []int{7} +} + +type MetadataResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` +} + +func (x *MetadataResponse) Reset() { + *x = MetadataResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v1_post_types_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetadataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetadataResponse) ProtoMessage() {} + +func (x *MetadataResponse) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v1_post_types_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetadataResponse.ProtoReflect.Descriptor instead. +func (*MetadataResponse) Descriptor() ([]byte, []int) { + return file_spacemesh_v1_post_types_proto_rawDescGZIP(), []int{8} +} + +func (x *MetadataResponse) GetMeta() *Metadata { + if x != nil { + return x.Meta + } + return nil +} + var File_spacemesh_v1_post_types_proto protoreflect.FileDescriptor var file_spacemesh_v1_post_types_proto_rawDesc = []byte{ @@ -472,70 +632,84 @@ var file_spacemesh_v1_post_types_proto_rawDesc = []byte{ 0x6f, 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x53, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x5f, 0x70, 0x72, - 0x6f, 0x6f, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, - 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x08, 0x67, 0x65, 0x6e, 0x50, - 0x72, 0x6f, 0x6f, 0x66, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x58, 0x0a, 0x0f, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x48, 0x00, 0x52, 0x08, 0x67, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x42, 0x06, - 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x2f, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, - 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, - 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x68, - 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x22, 0x49, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, - 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, - 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x70, - 0x6f, 0x77, 0x22, 0xec, 0x01, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, - 0x67, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x6d, 0x65, 0x73, 0x68, 0x65, 0x72, 0x49, 0x64, 0x52, 0x06, 0x6e, 0x6f, - 0x64, 0x65, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, - 0x6e, 0x74, 0x5f, 0x61, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x52, 0x0f, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x78, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, - 0x6e, 0x75, 0x6d, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x08, 0x6e, 0x75, 0x6d, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x50, 0x65, 0x72, 0x55, 0x6e, 0x69, - 0x74, 0x22, 0xac, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, - 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x29, 0x0a, 0x05, - 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, - 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x37, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x2a, 0x67, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x20, 0x0a, 0x1c, 0x47, 0x45, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4f, 0x46, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x47, 0x45, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4f, - 0x46, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x1a, 0x0a, - 0x16, 0x47, 0x45, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4f, 0x46, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x42, 0xb3, 0x01, 0x0a, 0x10, 0x63, 0x6f, - 0x6d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0e, - 0x50, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x3e, 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, 0x31, 0x3b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, - 0x73, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, - 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x0d, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x01, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x3c, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x6f, + 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, + 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x08, 0x67, 0x65, 0x6e, 0x50, 0x72, 0x6f, + 0x6f, 0x66, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x96, 0x01, 0x0a, 0x0f, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3d, 0x0a, 0x09, + 0x67, 0x65, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, + 0x00, 0x52, 0x08, 0x67, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x42, 0x06, 0x0a, 0x04, 0x6b, + 0x69, 0x6e, 0x64, 0x22, 0x2f, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, + 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, + 0x65, 0x6e, 0x67, 0x65, 0x22, 0x49, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x14, 0x0a, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0x10, 0x0a, + 0x03, 0x70, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x70, 0x6f, 0x77, 0x22, + 0xaa, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x17, 0x0a, 0x07, + 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, + 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x78, 0x49, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x75, 0x6d, 0x5f, 0x75, + 0x6e, 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6e, 0x75, 0x6d, 0x55, + 0x6e, 0x69, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x5f, 0x70, + 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x50, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x74, 0x22, 0x59, 0x0a, 0x0d, + 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, + 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x6d, + 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0xac, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x50, + 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x50, + 0x72, 0x6f, 0x6f, 0x66, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x29, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x37, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x72, 0x6f, 0x6f, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3e, 0x0a, 0x10, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, + 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x2a, 0x67, 0x0a, 0x0e, 0x47, 0x65, 0x6e, + 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x1c, 0x47, + 0x45, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4f, 0x46, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, + 0x13, 0x47, 0x45, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4f, 0x46, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x47, 0x45, 0x4e, 0x5f, 0x50, 0x52, + 0x4f, 0x4f, 0x46, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x10, 0x02, 0x42, 0xb3, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x50, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 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, 0x31, 0x3b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, + 0x02, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, + 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x53, 0x70, 0x61, 0x63, 0x65, + 0x6d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -551,31 +725,34 @@ func file_spacemesh_v1_post_types_proto_rawDescGZIP() []byte { } var file_spacemesh_v1_post_types_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_spacemesh_v1_post_types_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_spacemesh_v1_post_types_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_spacemesh_v1_post_types_proto_goTypes = []interface{}{ (GenProofStatus)(0), // 0: spacemesh.v1.GenProofStatus (*NodeRequest)(nil), // 1: spacemesh.v1.NodeRequest (*ServiceResponse)(nil), // 2: spacemesh.v1.ServiceResponse (*GenProofRequest)(nil), // 3: spacemesh.v1.GenProofRequest (*Proof)(nil), // 4: spacemesh.v1.Proof - (*ProofMetadata)(nil), // 5: spacemesh.v1.ProofMetadata - (*GenProofResponse)(nil), // 6: spacemesh.v1.GenProofResponse - (*SmesherId)(nil), // 7: spacemesh.v1.SmesherId - (*ActivationId)(nil), // 8: spacemesh.v1.ActivationId + (*Metadata)(nil), // 5: spacemesh.v1.Metadata + (*ProofMetadata)(nil), // 6: spacemesh.v1.ProofMetadata + (*GenProofResponse)(nil), // 7: spacemesh.v1.GenProofResponse + (*MetadataRequest)(nil), // 8: spacemesh.v1.MetadataRequest + (*MetadataResponse)(nil), // 9: spacemesh.v1.MetadataResponse } var file_spacemesh_v1_post_types_proto_depIdxs = []int32{ - 3, // 0: spacemesh.v1.NodeRequest.gen_proof:type_name -> spacemesh.v1.GenProofRequest - 6, // 1: spacemesh.v1.ServiceResponse.gen_proof:type_name -> spacemesh.v1.GenProofResponse - 7, // 2: spacemesh.v1.ProofMetadata.node_id:type_name -> spacemesh.v1.SmesherId - 8, // 3: spacemesh.v1.ProofMetadata.commitment_atx_id:type_name -> spacemesh.v1.ActivationId - 0, // 4: spacemesh.v1.GenProofResponse.status:type_name -> spacemesh.v1.GenProofStatus - 4, // 5: spacemesh.v1.GenProofResponse.proof:type_name -> spacemesh.v1.Proof - 5, // 6: spacemesh.v1.GenProofResponse.metadata:type_name -> spacemesh.v1.ProofMetadata - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 8, // 0: spacemesh.v1.NodeRequest.metadata:type_name -> spacemesh.v1.MetadataRequest + 3, // 1: spacemesh.v1.NodeRequest.gen_proof:type_name -> spacemesh.v1.GenProofRequest + 9, // 2: spacemesh.v1.ServiceResponse.metadata:type_name -> spacemesh.v1.MetadataResponse + 7, // 3: spacemesh.v1.ServiceResponse.gen_proof:type_name -> spacemesh.v1.GenProofResponse + 5, // 4: spacemesh.v1.ProofMetadata.meta:type_name -> spacemesh.v1.Metadata + 0, // 5: spacemesh.v1.GenProofResponse.status:type_name -> spacemesh.v1.GenProofStatus + 4, // 6: spacemesh.v1.GenProofResponse.proof:type_name -> spacemesh.v1.Proof + 6, // 7: spacemesh.v1.GenProofResponse.metadata:type_name -> spacemesh.v1.ProofMetadata + 5, // 8: spacemesh.v1.MetadataResponse.meta:type_name -> spacemesh.v1.Metadata + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_spacemesh_v1_post_types_proto_init() } @@ -634,7 +811,7 @@ func file_spacemesh_v1_post_types_proto_init() { } } file_spacemesh_v1_post_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProofMetadata); i { + switch v := v.(*Metadata); i { case 0: return &v.state case 1: @@ -646,6 +823,18 @@ func file_spacemesh_v1_post_types_proto_init() { } } file_spacemesh_v1_post_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProofMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v1_post_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenProofResponse); i { case 0: return &v.state @@ -657,11 +846,37 @@ func file_spacemesh_v1_post_types_proto_init() { return nil } } + file_spacemesh_v1_post_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MetadataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v1_post_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MetadataResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_spacemesh_v1_post_types_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*NodeRequest_Metadata)(nil), (*NodeRequest_GenProof)(nil), } file_spacemesh_v1_post_types_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*ServiceResponse_Metadata)(nil), (*ServiceResponse_GenProof)(nil), } type x struct{} @@ -670,7 +885,7 @@ func file_spacemesh_v1_post_types_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_spacemesh_v1_post_types_proto_rawDesc, NumEnums: 1, - NumMessages: 6, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, diff --git a/spacemesh/v1/post_types.proto b/spacemesh/v1/post_types.proto index fa433384..c5e00217 100644 --- a/spacemesh/v1/post_types.proto +++ b/spacemesh/v1/post_types.proto @@ -7,22 +7,20 @@ package spacemesh.v1; // NodeRequest is a request sent from the node to the post service. message NodeRequest { oneof kind { - // StateRequest state = 1; - // MetadataRequest metadata = 2; + MetadataRequest metadata = 1; + GenProofRequest gen_proof = 2; // InitRequest init = 3; // ResizeRequest resize = 4; - GenProofRequest gen_proof = 5; } } // ServiceResponse is a response sent from the post service to the node. message ServiceResponse { oneof kind { - // StateResponse state = 1; - // MetadataResponse metadata = 2; + MetadataResponse metadata = 1; + GenProofResponse gen_proof = 2; // InitResponse init = 3; // ResizeResponse resize = 4; - GenProofResponse gen_proof = 5; } } @@ -34,14 +32,20 @@ message Proof { uint64 pow = 3; } -message ProofMetadata { - bytes challenge = 1; - SmesherId node_id = 2; - ActivationId commitment_atx_id = 3; +message Metadata { + bytes node_id = 1; + bytes commitment_atx_id = 2; + uint64 nonce = 3; + uint32 num_units = 4; uint64 labels_per_unit = 5; } +message ProofMetadata { + bytes challenge = 1; + Metadata meta = 2; +} + enum GenProofStatus { GEN_PROOF_STATUS_UNSPECIFIED = 0; GEN_PROOF_STATUS_OK = 1; @@ -53,3 +57,9 @@ message GenProofResponse { Proof proof = 2; ProofMetadata metadata = 3; } + +message MetadataRequest {} + +message MetadataResponse { + Metadata meta = 1; +} From 0dc2114b26134d4583e675c2ac1a08831ff4288d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20R=C3=B3=C5=BCa=C5=84ski?= Date: Fri, 13 Oct 2023 11:09:42 +0200 Subject: [PATCH 08/11] Make Metadata::nonce optional --- release/go/spacemesh/v1/post_types.pb.go | 110 ++++++++++++----------- spacemesh/v1/post_types.proto | 4 +- 2 files changed, 58 insertions(+), 56 deletions(-) diff --git a/release/go/spacemesh/v1/post_types.pb.go b/release/go/spacemesh/v1/post_types.pb.go index f1cc1db2..22b4bdc6 100644 --- a/release/go/spacemesh/v1/post_types.pb.go +++ b/release/go/spacemesh/v1/post_types.pb.go @@ -348,11 +348,11 @@ type Metadata struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - NodeId []byte `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - CommitmentAtxId []byte `protobuf:"bytes,2,opt,name=commitment_atx_id,json=commitmentAtxId,proto3" json:"commitment_atx_id,omitempty"` - Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` - NumUnits uint32 `protobuf:"varint,4,opt,name=num_units,json=numUnits,proto3" json:"num_units,omitempty"` - LabelsPerUnit uint64 `protobuf:"varint,5,opt,name=labels_per_unit,json=labelsPerUnit,proto3" json:"labels_per_unit,omitempty"` + NodeId []byte `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + CommitmentAtxId []byte `protobuf:"bytes,2,opt,name=commitment_atx_id,json=commitmentAtxId,proto3" json:"commitment_atx_id,omitempty"` + Nonce *uint64 `protobuf:"varint,3,opt,name=nonce,proto3,oneof" json:"nonce,omitempty"` + NumUnits uint32 `protobuf:"varint,4,opt,name=num_units,json=numUnits,proto3" json:"num_units,omitempty"` + LabelsPerUnit uint64 `protobuf:"varint,5,opt,name=labels_per_unit,json=labelsPerUnit,proto3" json:"labels_per_unit,omitempty"` } func (x *Metadata) Reset() { @@ -402,8 +402,8 @@ func (x *Metadata) GetCommitmentAtxId() []byte { } func (x *Metadata) GetNonce() uint64 { - if x != nil { - return x.Nonce + if x != nil && x.Nonce != nil { + return *x.Nonce } return 0 } @@ -659,57 +659,58 @@ var file_spacemesh_v1_post_types_proto_rawDesc = []byte{ 0x6e, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x70, 0x6f, 0x77, 0x22, - 0xaa, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x17, 0x0a, 0x07, + 0xb9, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x78, 0x49, - 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x75, 0x6d, 0x5f, 0x75, - 0x6e, 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6e, 0x75, 0x6d, 0x55, - 0x6e, 0x69, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x5f, 0x70, - 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x50, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x74, 0x22, 0x59, 0x0a, 0x0d, - 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, - 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x6d, - 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0xac, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x50, - 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x50, - 0x72, 0x6f, 0x6f, 0x66, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x29, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x37, 0x0a, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x72, 0x6f, 0x6f, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3e, 0x0a, 0x10, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, - 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x2a, 0x67, 0x0a, 0x0e, 0x47, 0x65, 0x6e, - 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x1c, 0x47, - 0x45, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4f, 0x46, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, - 0x13, 0x47, 0x45, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4f, 0x46, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x47, 0x45, 0x4e, 0x5f, 0x50, 0x52, - 0x4f, 0x4f, 0x46, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x10, 0x02, 0x42, 0xb3, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x50, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 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, 0x31, 0x3b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, - 0x02, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, - 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x53, 0x70, 0x61, 0x63, 0x65, - 0x6d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x12, 0x19, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, + 0x48, 0x00, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x09, + 0x6e, 0x75, 0x6d, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x08, 0x6e, 0x75, 0x6d, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x50, 0x65, 0x72, 0x55, 0x6e, 0x69, + 0x74, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x59, 0x0a, 0x0d, 0x50, + 0x72, 0x6f, 0x6f, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, + 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x6d, 0x65, + 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0xac, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x50, 0x72, + 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x50, 0x72, + 0x6f, 0x6f, 0x66, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x29, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x37, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, + 0x6f, 0x6f, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3e, 0x0a, 0x10, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x04, + 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x2a, 0x67, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x50, + 0x72, 0x6f, 0x6f, 0x66, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x1c, 0x47, 0x45, + 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4f, 0x46, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, + 0x47, 0x45, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x4f, 0x46, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x47, 0x45, 0x4e, 0x5f, 0x50, 0x52, 0x4f, + 0x4f, 0x46, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, + 0x02, 0x42, 0xb3, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, + 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x50, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 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, 0x31, 0x3b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, + 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, + 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x53, + 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, + 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -879,6 +880,7 @@ func file_spacemesh_v1_post_types_proto_init() { (*ServiceResponse_Metadata)(nil), (*ServiceResponse_GenProof)(nil), } + file_spacemesh_v1_post_types_proto_msgTypes[4].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/spacemesh/v1/post_types.proto b/spacemesh/v1/post_types.proto index c5e00217..ab8ca0f7 100644 --- a/spacemesh/v1/post_types.proto +++ b/spacemesh/v1/post_types.proto @@ -35,8 +35,8 @@ message Proof { message Metadata { bytes node_id = 1; bytes commitment_atx_id = 2; - uint64 nonce = 3; - + optional uint64 nonce = 3; + uint32 num_units = 4; uint64 labels_per_unit = 5; } From 61198052fa63217ebf3c83f78772ba5784b7a287 Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Wed, 18 Oct 2023 09:28:49 +0000 Subject: [PATCH 09/11] Added clarifying comment --- spacemesh/v1/post.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacemesh/v1/post.proto b/spacemesh/v1/post.proto index fc53ddb4..3ee7fbe5 100644 --- a/spacemesh/v1/post.proto +++ b/spacemesh/v1/post.proto @@ -7,6 +7,6 @@ package spacemesh.v1; // PostService is used by dedicated PoST nodes to interact with the spacemesh // node. service PostService { - // Register allows a dedicated PoST node to connect to the spacemesh node. + // Register is a bi-directional stream allows a dedicated PoST node to connect to the spacemesh node. rpc Register(stream ServiceResponse) returns (stream NodeRequest); } From bffadcbf9ea0f9a9b6d0154a0e3106dc7fa943d4 Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Wed, 18 Oct 2023 09:37:57 +0000 Subject: [PATCH 10/11] Update dependencies to address dependabot warnings --- release/go/go.mod | 12 ++++++------ release/go/go.sum | 26 +++++++++++++------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/release/go/go.mod b/release/go/go.mod index 64f30aca..e01f6614 100644 --- a/release/go/go.mod +++ b/release/go/go.mod @@ -4,16 +4,16 @@ go 1.20 require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 - google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13 - google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 - google.golang.org/grpc v1.58.2 + google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b + google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b + google.golang.org/grpc v1.59.0 google.golang.org/protobuf v1.31.0 ) require ( github.com/golang/protobuf v1.5.3 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/sys v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto v0.0.0-20230920204549-e6e6cdab5c13 // indirect + google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect ) diff --git a/release/go/go.sum b/release/go/go.sum index ed3a001b..0d5beaac 100644 --- a/release/go/go.sum +++ b/release/go/go.sum @@ -1,4 +1,4 @@ -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= +github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -6,21 +6,21 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 h1:RtRsiaGvWxcwd8y3BiRZxsylPT8hLWZ5SPcfI+3IDNk= github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0/go.mod h1:TzP6duP4Py2pHLVPPQp42aoYI92+PCrVotyR5e8Vqlk= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20230920204549-e6e6cdab5c13 h1:vlzZttNJGVqTsRFU9AmdnrcO1Znh8Ew9kCD//yjigk0= -google.golang.org/genproto v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:CCviP9RmpZ1mxVr8MUjCnSiY09IbAXZxhLE6EhHIdPU= -google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13 h1:U7+wNaVuSTaUqNvK2+osJ9ejEZxbjHHk8F2b6Hpx0AE= -google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:RdyHbowztCGQySiCvQPgWQWgWhGnouTdCflKoDBt32U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 h1:N3bU/SQDCDyD6R528GJ/PwW9KjYcJA3dgyH+MovAkIM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= -google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= -google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= +google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k= +google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= From 405755987984efe309c8c2e5cb9069528632ac7d Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Wed, 18 Oct 2023 11:04:22 +0000 Subject: [PATCH 11/11] Regenerate code after changing comment --- release/go/spacemesh/v1/post_grpc.pb.go | 6 ++++-- spacemesh/v1/post.proto | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/release/go/spacemesh/v1/post_grpc.pb.go b/release/go/spacemesh/v1/post_grpc.pb.go index effc5b17..7ddf05ac 100644 --- a/release/go/spacemesh/v1/post_grpc.pb.go +++ b/release/go/spacemesh/v1/post_grpc.pb.go @@ -26,7 +26,8 @@ const ( // // 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 PostServiceClient interface { - // Register allows a dedicated PoST node to connect to the spacemesh node. + // Register is a bi-directional stream that allows a dedicated PoST node to connect to the spacemesh node. + // The node will send NodeRequets to PoST and the service will respond with ServiceResponses. Register(ctx context.Context, opts ...grpc.CallOption) (PostService_RegisterClient, error) } @@ -73,7 +74,8 @@ func (x *postServiceRegisterClient) Recv() (*NodeRequest, error) { // All implementations should embed UnimplementedPostServiceServer // for forward compatibility type PostServiceServer interface { - // Register allows a dedicated PoST node to connect to the spacemesh node. + // Register is a bi-directional stream that allows a dedicated PoST node to connect to the spacemesh node. + // The node will send NodeRequets to PoST and the service will respond with ServiceResponses. Register(PostService_RegisterServer) error } diff --git a/spacemesh/v1/post.proto b/spacemesh/v1/post.proto index 3ee7fbe5..bee9cedc 100644 --- a/spacemesh/v1/post.proto +++ b/spacemesh/v1/post.proto @@ -7,6 +7,7 @@ package spacemesh.v1; // PostService is used by dedicated PoST nodes to interact with the spacemesh // node. service PostService { - // Register is a bi-directional stream allows a dedicated PoST node to connect to the spacemesh node. + // Register is a bi-directional stream that allows a dedicated PoST node to connect to the spacemesh node. + // The node will send NodeRequets to PoST and the service will respond with ServiceResponses. rpc Register(stream ServiceResponse) returns (stream NodeRequest); }