From 141bfcc2412a88eda58b9bfa7c1572b116c72831 Mon Sep 17 00:00:00 2001 From: Jian Xiao Date: Mon, 8 Jul 2024 18:35:26 +0000 Subject: [PATCH 1/7] [3/N] Chunk encoding optimization: Add support of new encoding format in API --- api/grpc/churner/churner.pb.go | 2 +- api/grpc/churner/churner_grpc.pb.go | 12 +- api/grpc/common/common.pb.go | 2 +- api/grpc/disperser/disperser.pb.go | 2 +- api/grpc/disperser/disperser_grpc.pb.go | 25 +-- api/grpc/node/node.pb.go | 219 ++++++++++++++++-------- api/grpc/node/node_grpc.pb.go | 29 ++-- api/grpc/retriever/retriever.pb.go | 2 +- api/grpc/retriever/retriever_grpc.pb.go | 12 +- api/proto/node/node.proto | 10 ++ 10 files changed, 191 insertions(+), 124 deletions(-) diff --git a/api/grpc/churner/churner.pb.go b/api/grpc/churner/churner.pb.go index 3cf597b918..3546c2d443 100644 --- a/api/grpc/churner/churner.pb.go +++ b/api/grpc/churner/churner.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.23.4 +// protoc v3.12.4 // source: churner/churner.proto package churner diff --git a/api/grpc/churner/churner_grpc.pb.go b/api/grpc/churner/churner_grpc.pb.go index 9958c263ca..75fdbed77f 100644 --- a/api/grpc/churner/churner_grpc.pb.go +++ b/api/grpc/churner/churner_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v4.23.4 +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.12.4 // source: churner/churner.proto package churner @@ -18,10 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - Churner_Churn_FullMethodName = "/churner.Churner/Churn" -) - // ChurnerClient is the client API for Churner 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. @@ -39,7 +35,7 @@ func NewChurnerClient(cc grpc.ClientConnInterface) ChurnerClient { func (c *churnerClient) Churn(ctx context.Context, in *ChurnRequest, opts ...grpc.CallOption) (*ChurnReply, error) { out := new(ChurnReply) - err := c.cc.Invoke(ctx, Churner_Churn_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/churner.Churner/Churn", in, out, opts...) if err != nil { return nil, err } @@ -84,7 +80,7 @@ func _Churner_Churn_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Churner_Churn_FullMethodName, + FullMethod: "/churner.Churner/Churn", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ChurnerServer).Churn(ctx, req.(*ChurnRequest)) diff --git a/api/grpc/common/common.pb.go b/api/grpc/common/common.pb.go index ce3f5be228..c1829695bf 100644 --- a/api/grpc/common/common.pb.go +++ b/api/grpc/common/common.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.23.4 +// protoc v3.12.4 // source: common/common.proto package common diff --git a/api/grpc/disperser/disperser.pb.go b/api/grpc/disperser/disperser.pb.go index 39b7f0a62c..02a33e8286 100644 --- a/api/grpc/disperser/disperser.pb.go +++ b/api/grpc/disperser/disperser.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.23.4 +// protoc v3.12.4 // source: disperser/disperser.proto package disperser diff --git a/api/grpc/disperser/disperser_grpc.pb.go b/api/grpc/disperser/disperser_grpc.pb.go index 14f8e9f93a..b0ddb284aa 100644 --- a/api/grpc/disperser/disperser_grpc.pb.go +++ b/api/grpc/disperser/disperser_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v4.23.4 +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.12.4 // source: disperser/disperser.proto package disperser @@ -18,13 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - Disperser_DisperseBlob_FullMethodName = "/disperser.Disperser/DisperseBlob" - Disperser_DisperseBlobAuthenticated_FullMethodName = "/disperser.Disperser/DisperseBlobAuthenticated" - Disperser_GetBlobStatus_FullMethodName = "/disperser.Disperser/GetBlobStatus" - Disperser_RetrieveBlob_FullMethodName = "/disperser.Disperser/RetrieveBlob" -) - // DisperserClient is the client API for Disperser 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. @@ -64,7 +57,7 @@ func NewDisperserClient(cc grpc.ClientConnInterface) DisperserClient { func (c *disperserClient) DisperseBlob(ctx context.Context, in *DisperseBlobRequest, opts ...grpc.CallOption) (*DisperseBlobReply, error) { out := new(DisperseBlobReply) - err := c.cc.Invoke(ctx, Disperser_DisperseBlob_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/disperser.Disperser/DisperseBlob", in, out, opts...) if err != nil { return nil, err } @@ -72,7 +65,7 @@ func (c *disperserClient) DisperseBlob(ctx context.Context, in *DisperseBlobRequ } func (c *disperserClient) DisperseBlobAuthenticated(ctx context.Context, opts ...grpc.CallOption) (Disperser_DisperseBlobAuthenticatedClient, error) { - stream, err := c.cc.NewStream(ctx, &Disperser_ServiceDesc.Streams[0], Disperser_DisperseBlobAuthenticated_FullMethodName, opts...) + stream, err := c.cc.NewStream(ctx, &Disperser_ServiceDesc.Streams[0], "/disperser.Disperser/DisperseBlobAuthenticated", opts...) if err != nil { return nil, err } @@ -104,7 +97,7 @@ func (x *disperserDisperseBlobAuthenticatedClient) Recv() (*AuthenticatedReply, func (c *disperserClient) GetBlobStatus(ctx context.Context, in *BlobStatusRequest, opts ...grpc.CallOption) (*BlobStatusReply, error) { out := new(BlobStatusReply) - err := c.cc.Invoke(ctx, Disperser_GetBlobStatus_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/disperser.Disperser/GetBlobStatus", in, out, opts...) if err != nil { return nil, err } @@ -113,7 +106,7 @@ func (c *disperserClient) GetBlobStatus(ctx context.Context, in *BlobStatusReque func (c *disperserClient) RetrieveBlob(ctx context.Context, in *RetrieveBlobRequest, opts ...grpc.CallOption) (*RetrieveBlobReply, error) { out := new(RetrieveBlobReply) - err := c.cc.Invoke(ctx, Disperser_RetrieveBlob_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/disperser.Disperser/RetrieveBlob", in, out, opts...) if err != nil { return nil, err } @@ -189,7 +182,7 @@ func _Disperser_DisperseBlob_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Disperser_DisperseBlob_FullMethodName, + FullMethod: "/disperser.Disperser/DisperseBlob", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DisperserServer).DisperseBlob(ctx, req.(*DisperseBlobRequest)) @@ -233,7 +226,7 @@ func _Disperser_GetBlobStatus_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Disperser_GetBlobStatus_FullMethodName, + FullMethod: "/disperser.Disperser/GetBlobStatus", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DisperserServer).GetBlobStatus(ctx, req.(*BlobStatusRequest)) @@ -251,7 +244,7 @@ func _Disperser_RetrieveBlob_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Disperser_RetrieveBlob_FullMethodName, + FullMethod: "/disperser.Disperser/RetrieveBlob", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DisperserServer).RetrieveBlob(ctx, req.(*RetrieveBlobRequest)) diff --git a/api/grpc/node/node.pb.go b/api/grpc/node/node.pb.go index ebfd8c58eb..06a59e7ed8 100644 --- a/api/grpc/node/node.pb.go +++ b/api/grpc/node/node.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.23.4 +// protoc v3.12.4 // source: node/node.proto package node @@ -21,6 +21,57 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Describes how the chunks above are encoded. +// If not specified, it’s treated as GOB. +type RetrieveChunksReply_ChunkEncoding int32 + +const ( + RetrieveChunksReply_UNKNOWN RetrieveChunksReply_ChunkEncoding = 0 + RetrieveChunksReply_GOB RetrieveChunksReply_ChunkEncoding = 1 + RetrieveChunksReply_GNARK RetrieveChunksReply_ChunkEncoding = 2 +) + +// Enum value maps for RetrieveChunksReply_ChunkEncoding. +var ( + RetrieveChunksReply_ChunkEncoding_name = map[int32]string{ + 0: "UNKNOWN", + 1: "GOB", + 2: "GNARK", + } + RetrieveChunksReply_ChunkEncoding_value = map[string]int32{ + "UNKNOWN": 0, + "GOB": 1, + "GNARK": 2, + } +) + +func (x RetrieveChunksReply_ChunkEncoding) Enum() *RetrieveChunksReply_ChunkEncoding { + p := new(RetrieveChunksReply_ChunkEncoding) + *p = x + return p +} + +func (x RetrieveChunksReply_ChunkEncoding) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RetrieveChunksReply_ChunkEncoding) Descriptor() protoreflect.EnumDescriptor { + return file_node_node_proto_enumTypes[0].Descriptor() +} + +func (RetrieveChunksReply_ChunkEncoding) Type() protoreflect.EnumType { + return &file_node_node_proto_enumTypes[0] +} + +func (x RetrieveChunksReply_ChunkEncoding) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RetrieveChunksReply_ChunkEncoding.Descriptor instead. +func (RetrieveChunksReply_ChunkEncoding) EnumDescriptor() ([]byte, []int) { + return file_node_node_proto_rawDescGZIP(), []int{3, 0} +} + type StoreChunksRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -203,7 +254,8 @@ type RetrieveChunksReply struct { unknownFields protoimpl.UnknownFields // All chunks the Node is storing for the requested blob per RetrieveChunksRequest. - Chunks [][]byte `protobuf:"bytes,1,rep,name=chunks,proto3" json:"chunks,omitempty"` + Chunks [][]byte `protobuf:"bytes,1,rep,name=chunks,proto3" json:"chunks,omitempty"` + Encoding RetrieveChunksReply_ChunkEncoding `protobuf:"varint,2,opt,name=encoding,proto3,enum=node.RetrieveChunksReply_ChunkEncoding" json:"encoding,omitempty"` } func (x *RetrieveChunksReply) Reset() { @@ -245,6 +297,13 @@ func (x *RetrieveChunksReply) GetChunks() [][]byte { return nil } +func (x *RetrieveChunksReply) GetEncoding() RetrieveChunksReply_ChunkEncoding { + if x != nil { + return x.Encoding + } + return RetrieveChunksReply_UNKNOWN +} + // See RetrieveChunksRequest for documentation of each parameter of GetBlobHeaderRequest. type GetBlobHeaderRequest struct { state protoimpl.MessageState @@ -502,6 +561,8 @@ type Bundle struct { // Each chunk corresponds to a collection of points on the polynomial. // Each chunk has same number of points. Chunks [][]byte `protobuf:"bytes,1,rep,name=chunks,proto3" json:"chunks,omitempty"` + // All chunks of the bundle encoded in an byte array. + Bundle []byte `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"` } func (x *Bundle) Reset() { @@ -543,6 +604,13 @@ func (x *Bundle) GetChunks() [][]byte { return nil } +func (x *Bundle) GetBundle() []byte { + if x != nil { + return x.Bundle + } + return nil +} + type G2Commitment struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -876,37 +944,46 @@ var file_node_node_proto_rawDesc = []byte{ 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x08, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x49, 0x64, 0x22, 0x2d, 0x0a, - 0x13, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x22, 0x7e, 0x0a, 0x14, - 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, - 0x1b, 0x0a, 0x09, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x08, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x49, 0x64, 0x22, 0x70, 0x0a, 0x12, - 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x12, 0x31, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x42, - 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x4d, 0x65, 0x72, 0x6b, - 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x3b, - 0x0a, 0x0b, 0x4d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x16, 0x0a, - 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x68, - 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x58, 0x0a, 0x04, 0x42, - 0x6c, 0x6f, 0x62, 0x12, 0x28, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x26, 0x0a, - 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, - 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x07, 0x62, 0x75, - 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x22, 0x20, 0x0a, 0x06, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, - 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x22, 0x5a, 0x0a, 0x0c, 0x47, 0x32, 0x43, 0x6f, 0x6d, + 0x01, 0x28, 0x0d, 0x52, 0x08, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x49, 0x64, 0x22, 0xa4, 0x01, + 0x0a, 0x13, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, 0x43, 0x0a, + 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x27, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x43, + 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, + 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, + 0x6e, 0x67, 0x22, 0x30, 0x0a, 0x0d, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x45, 0x6e, 0x63, 0x6f, 0x64, + 0x69, 0x6e, 0x67, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, + 0x12, 0x07, 0x0a, 0x03, 0x47, 0x4f, 0x42, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x4e, 0x41, + 0x52, 0x4b, 0x10, 0x02, 0x22, 0x7e, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x62, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, + 0x6f, 0x62, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x71, 0x75, 0x6f, 0x72, 0x75, + 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x71, 0x75, 0x6f, 0x72, + 0x75, 0x6d, 0x49, 0x64, 0x22, 0x70, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x31, 0x0a, 0x0b, 0x62, 0x6c, + 0x6f, 0x62, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x27, 0x0a, + 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x4d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, + 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x3b, 0x0a, 0x0b, 0x4d, 0x65, 0x72, 0x6b, 0x6c, 0x65, + 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x14, 0x0a, + 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x22, 0x58, 0x0a, 0x04, 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x28, 0x0a, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x22, 0x38, 0x0a, + 0x06, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x5a, 0x0a, 0x0c, 0x47, 0x32, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x11, 0x0a, 0x04, 0x78, 0x5f, 0x61, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x78, 0x41, 0x30, 0x12, 0x11, 0x0a, 0x04, 0x78, 0x5f, 0x61, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x78, 0x41, 0x31, 0x12, 0x11, 0x0a, @@ -984,45 +1061,48 @@ func file_node_node_proto_rawDescGZIP() []byte { return file_node_node_proto_rawDescData } +var file_node_node_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_node_node_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_node_node_proto_goTypes = []interface{}{ - (*StoreChunksRequest)(nil), // 0: node.StoreChunksRequest - (*StoreChunksReply)(nil), // 1: node.StoreChunksReply - (*RetrieveChunksRequest)(nil), // 2: node.RetrieveChunksRequest - (*RetrieveChunksReply)(nil), // 3: node.RetrieveChunksReply - (*GetBlobHeaderRequest)(nil), // 4: node.GetBlobHeaderRequest - (*GetBlobHeaderReply)(nil), // 5: node.GetBlobHeaderReply - (*MerkleProof)(nil), // 6: node.MerkleProof - (*Blob)(nil), // 7: node.Blob - (*Bundle)(nil), // 8: node.Bundle - (*G2Commitment)(nil), // 9: node.G2Commitment - (*BlobHeader)(nil), // 10: node.BlobHeader - (*BlobQuorumInfo)(nil), // 11: node.BlobQuorumInfo - (*BatchHeader)(nil), // 12: node.BatchHeader - (*common.G1Commitment)(nil), // 13: common.G1Commitment + (RetrieveChunksReply_ChunkEncoding)(0), // 0: node.RetrieveChunksReply.ChunkEncoding + (*StoreChunksRequest)(nil), // 1: node.StoreChunksRequest + (*StoreChunksReply)(nil), // 2: node.StoreChunksReply + (*RetrieveChunksRequest)(nil), // 3: node.RetrieveChunksRequest + (*RetrieveChunksReply)(nil), // 4: node.RetrieveChunksReply + (*GetBlobHeaderRequest)(nil), // 5: node.GetBlobHeaderRequest + (*GetBlobHeaderReply)(nil), // 6: node.GetBlobHeaderReply + (*MerkleProof)(nil), // 7: node.MerkleProof + (*Blob)(nil), // 8: node.Blob + (*Bundle)(nil), // 9: node.Bundle + (*G2Commitment)(nil), // 10: node.G2Commitment + (*BlobHeader)(nil), // 11: node.BlobHeader + (*BlobQuorumInfo)(nil), // 12: node.BlobQuorumInfo + (*BatchHeader)(nil), // 13: node.BatchHeader + (*common.G1Commitment)(nil), // 14: common.G1Commitment } var file_node_node_proto_depIdxs = []int32{ - 12, // 0: node.StoreChunksRequest.batch_header:type_name -> node.BatchHeader - 7, // 1: node.StoreChunksRequest.blobs:type_name -> node.Blob - 10, // 2: node.GetBlobHeaderReply.blob_header:type_name -> node.BlobHeader - 6, // 3: node.GetBlobHeaderReply.proof:type_name -> node.MerkleProof - 10, // 4: node.Blob.header:type_name -> node.BlobHeader - 8, // 5: node.Blob.bundles:type_name -> node.Bundle - 13, // 6: node.BlobHeader.commitment:type_name -> common.G1Commitment - 9, // 7: node.BlobHeader.length_commitment:type_name -> node.G2Commitment - 9, // 8: node.BlobHeader.length_proof:type_name -> node.G2Commitment - 11, // 9: node.BlobHeader.quorum_headers:type_name -> node.BlobQuorumInfo - 0, // 10: node.Dispersal.StoreChunks:input_type -> node.StoreChunksRequest - 2, // 11: node.Retrieval.RetrieveChunks:input_type -> node.RetrieveChunksRequest - 4, // 12: node.Retrieval.GetBlobHeader:input_type -> node.GetBlobHeaderRequest - 1, // 13: node.Dispersal.StoreChunks:output_type -> node.StoreChunksReply - 3, // 14: node.Retrieval.RetrieveChunks:output_type -> node.RetrieveChunksReply - 5, // 15: node.Retrieval.GetBlobHeader:output_type -> node.GetBlobHeaderReply - 13, // [13:16] is the sub-list for method output_type - 10, // [10:13] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 13, // 0: node.StoreChunksRequest.batch_header:type_name -> node.BatchHeader + 8, // 1: node.StoreChunksRequest.blobs:type_name -> node.Blob + 0, // 2: node.RetrieveChunksReply.encoding:type_name -> node.RetrieveChunksReply.ChunkEncoding + 11, // 3: node.GetBlobHeaderReply.blob_header:type_name -> node.BlobHeader + 7, // 4: node.GetBlobHeaderReply.proof:type_name -> node.MerkleProof + 11, // 5: node.Blob.header:type_name -> node.BlobHeader + 9, // 6: node.Blob.bundles:type_name -> node.Bundle + 14, // 7: node.BlobHeader.commitment:type_name -> common.G1Commitment + 10, // 8: node.BlobHeader.length_commitment:type_name -> node.G2Commitment + 10, // 9: node.BlobHeader.length_proof:type_name -> node.G2Commitment + 12, // 10: node.BlobHeader.quorum_headers:type_name -> node.BlobQuorumInfo + 1, // 11: node.Dispersal.StoreChunks:input_type -> node.StoreChunksRequest + 3, // 12: node.Retrieval.RetrieveChunks:input_type -> node.RetrieveChunksRequest + 5, // 13: node.Retrieval.GetBlobHeader:input_type -> node.GetBlobHeaderRequest + 2, // 14: node.Dispersal.StoreChunks:output_type -> node.StoreChunksReply + 4, // 15: node.Retrieval.RetrieveChunks:output_type -> node.RetrieveChunksReply + 6, // 16: node.Retrieval.GetBlobHeader:output_type -> node.GetBlobHeaderReply + 14, // [14:17] is the sub-list for method output_type + 11, // [11:14] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_node_node_proto_init() } @@ -1193,13 +1273,14 @@ func file_node_node_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_node_node_proto_rawDesc, - NumEnums: 0, + NumEnums: 1, NumMessages: 13, NumExtensions: 0, NumServices: 2, }, GoTypes: file_node_node_proto_goTypes, DependencyIndexes: file_node_node_proto_depIdxs, + EnumInfos: file_node_node_proto_enumTypes, MessageInfos: file_node_node_proto_msgTypes, }.Build() File_node_node_proto = out.File diff --git a/api/grpc/node/node_grpc.pb.go b/api/grpc/node/node_grpc.pb.go index 0dcf6f0eb4..369c358a11 100644 --- a/api/grpc/node/node_grpc.pb.go +++ b/api/grpc/node/node_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v4.23.4 +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.12.4 // source: node/node.proto package node @@ -18,10 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - Dispersal_StoreChunks_FullMethodName = "/node.Dispersal/StoreChunks" -) - // DispersalClient is the client API for Dispersal 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. @@ -45,7 +41,7 @@ func NewDispersalClient(cc grpc.ClientConnInterface) DispersalClient { func (c *dispersalClient) StoreChunks(ctx context.Context, in *StoreChunksRequest, opts ...grpc.CallOption) (*StoreChunksReply, error) { out := new(StoreChunksReply) - err := c.cc.Invoke(ctx, Dispersal_StoreChunks_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/node.Dispersal/StoreChunks", in, out, opts...) if err != nil { return nil, err } @@ -96,7 +92,7 @@ func _Dispersal_StoreChunks_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Dispersal_StoreChunks_FullMethodName, + FullMethod: "/node.Dispersal/StoreChunks", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DispersalServer).StoreChunks(ctx, req.(*StoreChunksRequest)) @@ -120,18 +116,13 @@ var Dispersal_ServiceDesc = grpc.ServiceDesc{ Metadata: "node/node.proto", } -const ( - Retrieval_RetrieveChunks_FullMethodName = "/node.Retrieval/RetrieveChunks" - Retrieval_GetBlobHeader_FullMethodName = "/node.Retrieval/GetBlobHeader" -) - // RetrievalClient is the client API for Retrieval 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 RetrievalClient interface { // RetrieveChunks retrieves the chunks for a blob custodied at the Node. RetrieveChunks(ctx context.Context, in *RetrieveChunksRequest, opts ...grpc.CallOption) (*RetrieveChunksReply, error) - // Similar to RetrieveChunks, this just returns the header of the blob. + // GetBlobHeader is similar to RetrieveChunks, this just returns the header of the blob. GetBlobHeader(ctx context.Context, in *GetBlobHeaderRequest, opts ...grpc.CallOption) (*GetBlobHeaderReply, error) } @@ -145,7 +136,7 @@ func NewRetrievalClient(cc grpc.ClientConnInterface) RetrievalClient { func (c *retrievalClient) RetrieveChunks(ctx context.Context, in *RetrieveChunksRequest, opts ...grpc.CallOption) (*RetrieveChunksReply, error) { out := new(RetrieveChunksReply) - err := c.cc.Invoke(ctx, Retrieval_RetrieveChunks_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/node.Retrieval/RetrieveChunks", in, out, opts...) if err != nil { return nil, err } @@ -154,7 +145,7 @@ func (c *retrievalClient) RetrieveChunks(ctx context.Context, in *RetrieveChunks func (c *retrievalClient) GetBlobHeader(ctx context.Context, in *GetBlobHeaderRequest, opts ...grpc.CallOption) (*GetBlobHeaderReply, error) { out := new(GetBlobHeaderReply) - err := c.cc.Invoke(ctx, Retrieval_GetBlobHeader_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/node.Retrieval/GetBlobHeader", in, out, opts...) if err != nil { return nil, err } @@ -167,7 +158,7 @@ func (c *retrievalClient) GetBlobHeader(ctx context.Context, in *GetBlobHeaderRe type RetrievalServer interface { // RetrieveChunks retrieves the chunks for a blob custodied at the Node. RetrieveChunks(context.Context, *RetrieveChunksRequest) (*RetrieveChunksReply, error) - // Similar to RetrieveChunks, this just returns the header of the blob. + // GetBlobHeader is similar to RetrieveChunks, this just returns the header of the blob. GetBlobHeader(context.Context, *GetBlobHeaderRequest) (*GetBlobHeaderReply, error) mustEmbedUnimplementedRetrievalServer() } @@ -205,7 +196,7 @@ func _Retrieval_RetrieveChunks_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Retrieval_RetrieveChunks_FullMethodName, + FullMethod: "/node.Retrieval/RetrieveChunks", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RetrievalServer).RetrieveChunks(ctx, req.(*RetrieveChunksRequest)) @@ -223,7 +214,7 @@ func _Retrieval_GetBlobHeader_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Retrieval_GetBlobHeader_FullMethodName, + FullMethod: "/node.Retrieval/GetBlobHeader", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RetrievalServer).GetBlobHeader(ctx, req.(*GetBlobHeaderRequest)) diff --git a/api/grpc/retriever/retriever.pb.go b/api/grpc/retriever/retriever.pb.go index f8aeac8536..cef5a3c26d 100644 --- a/api/grpc/retriever/retriever.pb.go +++ b/api/grpc/retriever/retriever.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v4.23.4 +// protoc v3.12.4 // source: retriever/retriever.proto package retriever diff --git a/api/grpc/retriever/retriever_grpc.pb.go b/api/grpc/retriever/retriever_grpc.pb.go index ffd67f16f8..be1556599b 100644 --- a/api/grpc/retriever/retriever_grpc.pb.go +++ b/api/grpc/retriever/retriever_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v4.23.4 +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.12.4 // source: retriever/retriever.proto package retriever @@ -18,10 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - Retriever_RetrieveBlob_FullMethodName = "/retriever.Retriever/RetrieveBlob" -) - // RetrieverClient is the client API for Retriever 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. @@ -41,7 +37,7 @@ func NewRetrieverClient(cc grpc.ClientConnInterface) RetrieverClient { func (c *retrieverClient) RetrieveBlob(ctx context.Context, in *BlobRequest, opts ...grpc.CallOption) (*BlobReply, error) { out := new(BlobReply) - err := c.cc.Invoke(ctx, Retriever_RetrieveBlob_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/retriever.Retriever/RetrieveBlob", in, out, opts...) if err != nil { return nil, err } @@ -88,7 +84,7 @@ func _Retriever_RetrieveBlob_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Retriever_RetrieveBlob_FullMethodName, + FullMethod: "/retriever.Retriever/RetrieveBlob", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RetrieverServer).RetrieveBlob(ctx, req.(*BlobRequest)) diff --git a/api/proto/node/node.proto b/api/proto/node/node.proto index f31646742b..12967cc67e 100644 --- a/api/proto/node/node.proto +++ b/api/proto/node/node.proto @@ -54,6 +54,14 @@ message RetrieveChunksRequest { message RetrieveChunksReply { // All chunks the Node is storing for the requested blob per RetrieveChunksRequest. repeated bytes chunks = 1; + // Describes how the chunks above are encoded. + // If not specified, it’s treated as GOB. + enum ChunkEncoding { + UNKNOWN = 0; + GOB = 1; + GNARK = 2; + } + ChunkEncoding encoding = 2; } @@ -105,6 +113,8 @@ message Bundle { // Each chunk corresponds to a collection of points on the polynomial. // Each chunk has same number of points. repeated bytes chunks = 1; + // All chunks of the bundle encoded in an byte array. + bytes bundle = 2; } message G2Commitment { From 35e016ce1ea80664adb4513d513a3066849dae79 Mon Sep 17 00:00:00 2001 From: Jian Xiao Date: Thu, 11 Jul 2024 18:03:48 +0000 Subject: [PATCH 2/7] typo --- api/proto/node/node.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/proto/node/node.proto b/api/proto/node/node.proto index 12967cc67e..baf79d2035 100644 --- a/api/proto/node/node.proto +++ b/api/proto/node/node.proto @@ -113,7 +113,7 @@ message Bundle { // Each chunk corresponds to a collection of points on the polynomial. // Each chunk has same number of points. repeated bytes chunks = 1; - // All chunks of the bundle encoded in an byte array. + // All chunks of the bundle encoded in a byte array. bytes bundle = 2; } From 0b6797cb1af98d35105e04c548e382d29177d6c1 Mon Sep 17 00:00:00 2001 From: Jian Xiao Date: Thu, 11 Jul 2024 18:05:23 +0000 Subject: [PATCH 3/7] default --- api/proto/node/node.proto | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/proto/node/node.proto b/api/proto/node/node.proto index baf79d2035..32bc20af6e 100644 --- a/api/proto/node/node.proto +++ b/api/proto/node/node.proto @@ -55,11 +55,10 @@ message RetrieveChunksReply { // All chunks the Node is storing for the requested blob per RetrieveChunksRequest. repeated bytes chunks = 1; // Describes how the chunks above are encoded. - // If not specified, it’s treated as GOB. enum ChunkEncoding { UNKNOWN = 0; - GOB = 1; - GNARK = 2; + GNARK = 1; + GOB = 2; } ChunkEncoding encoding = 2; } From eef5db0219dd7c6d408aaa0629b00a9c0d794b22 Mon Sep 17 00:00:00 2001 From: Jian Xiao Date: Thu, 11 Jul 2024 18:14:58 +0000 Subject: [PATCH 4/7] node pb --- api/grpc/node/node.pb.go | 219 +++++++++++----------------------- api/grpc/node/node_grpc.pb.go | 29 +++-- 2 files changed, 88 insertions(+), 160 deletions(-) diff --git a/api/grpc/node/node.pb.go b/api/grpc/node/node.pb.go index 06a59e7ed8..ebfd8c58eb 100644 --- a/api/grpc/node/node.pb.go +++ b/api/grpc/node/node.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.12.4 +// protoc v4.23.4 // source: node/node.proto package node @@ -21,57 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Describes how the chunks above are encoded. -// If not specified, it’s treated as GOB. -type RetrieveChunksReply_ChunkEncoding int32 - -const ( - RetrieveChunksReply_UNKNOWN RetrieveChunksReply_ChunkEncoding = 0 - RetrieveChunksReply_GOB RetrieveChunksReply_ChunkEncoding = 1 - RetrieveChunksReply_GNARK RetrieveChunksReply_ChunkEncoding = 2 -) - -// Enum value maps for RetrieveChunksReply_ChunkEncoding. -var ( - RetrieveChunksReply_ChunkEncoding_name = map[int32]string{ - 0: "UNKNOWN", - 1: "GOB", - 2: "GNARK", - } - RetrieveChunksReply_ChunkEncoding_value = map[string]int32{ - "UNKNOWN": 0, - "GOB": 1, - "GNARK": 2, - } -) - -func (x RetrieveChunksReply_ChunkEncoding) Enum() *RetrieveChunksReply_ChunkEncoding { - p := new(RetrieveChunksReply_ChunkEncoding) - *p = x - return p -} - -func (x RetrieveChunksReply_ChunkEncoding) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RetrieveChunksReply_ChunkEncoding) Descriptor() protoreflect.EnumDescriptor { - return file_node_node_proto_enumTypes[0].Descriptor() -} - -func (RetrieveChunksReply_ChunkEncoding) Type() protoreflect.EnumType { - return &file_node_node_proto_enumTypes[0] -} - -func (x RetrieveChunksReply_ChunkEncoding) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RetrieveChunksReply_ChunkEncoding.Descriptor instead. -func (RetrieveChunksReply_ChunkEncoding) EnumDescriptor() ([]byte, []int) { - return file_node_node_proto_rawDescGZIP(), []int{3, 0} -} - type StoreChunksRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -254,8 +203,7 @@ type RetrieveChunksReply struct { unknownFields protoimpl.UnknownFields // All chunks the Node is storing for the requested blob per RetrieveChunksRequest. - Chunks [][]byte `protobuf:"bytes,1,rep,name=chunks,proto3" json:"chunks,omitempty"` - Encoding RetrieveChunksReply_ChunkEncoding `protobuf:"varint,2,opt,name=encoding,proto3,enum=node.RetrieveChunksReply_ChunkEncoding" json:"encoding,omitempty"` + Chunks [][]byte `protobuf:"bytes,1,rep,name=chunks,proto3" json:"chunks,omitempty"` } func (x *RetrieveChunksReply) Reset() { @@ -297,13 +245,6 @@ func (x *RetrieveChunksReply) GetChunks() [][]byte { return nil } -func (x *RetrieveChunksReply) GetEncoding() RetrieveChunksReply_ChunkEncoding { - if x != nil { - return x.Encoding - } - return RetrieveChunksReply_UNKNOWN -} - // See RetrieveChunksRequest for documentation of each parameter of GetBlobHeaderRequest. type GetBlobHeaderRequest struct { state protoimpl.MessageState @@ -561,8 +502,6 @@ type Bundle struct { // Each chunk corresponds to a collection of points on the polynomial. // Each chunk has same number of points. Chunks [][]byte `protobuf:"bytes,1,rep,name=chunks,proto3" json:"chunks,omitempty"` - // All chunks of the bundle encoded in an byte array. - Bundle []byte `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"` } func (x *Bundle) Reset() { @@ -604,13 +543,6 @@ func (x *Bundle) GetChunks() [][]byte { return nil } -func (x *Bundle) GetBundle() []byte { - if x != nil { - return x.Bundle - } - return nil -} - type G2Commitment struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -944,46 +876,37 @@ var file_node_node_proto_rawDesc = []byte{ 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x08, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x49, 0x64, 0x22, 0xa4, 0x01, - 0x0a, 0x13, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, 0x43, 0x0a, - 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x27, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x43, - 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, - 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, - 0x6e, 0x67, 0x22, 0x30, 0x0a, 0x0d, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x45, 0x6e, 0x63, 0x6f, 0x64, - 0x69, 0x6e, 0x67, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, - 0x12, 0x07, 0x0a, 0x03, 0x47, 0x4f, 0x42, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x4e, 0x41, - 0x52, 0x4b, 0x10, 0x02, 0x22, 0x7e, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, - 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x62, - 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, - 0x6f, 0x62, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x71, 0x75, 0x6f, 0x72, 0x75, - 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x71, 0x75, 0x6f, 0x72, - 0x75, 0x6d, 0x49, 0x64, 0x22, 0x70, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x31, 0x0a, 0x0b, 0x62, 0x6c, - 0x6f, 0x62, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x27, 0x0a, - 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x4d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, - 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x3b, 0x0a, 0x0b, 0x4d, 0x65, 0x72, 0x6b, 0x6c, 0x65, - 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x22, 0x58, 0x0a, 0x04, 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x28, 0x0a, 0x06, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x75, - 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x22, 0x38, 0x0a, - 0x06, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, - 0x16, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x5a, 0x0a, 0x0c, 0x47, 0x32, 0x43, 0x6f, 0x6d, + 0x01, 0x28, 0x0d, 0x52, 0x08, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x49, 0x64, 0x22, 0x2d, 0x0a, + 0x13, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x22, 0x7e, 0x0a, 0x14, + 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x0f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x1b, 0x0a, 0x09, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x08, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x49, 0x64, 0x22, 0x70, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x31, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x42, + 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x4d, 0x65, 0x72, 0x6b, + 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x3b, + 0x0a, 0x0b, 0x4d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x16, 0x0a, + 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x68, + 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x58, 0x0a, 0x04, 0x42, + 0x6c, 0x6f, 0x62, 0x12, 0x28, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x26, 0x0a, + 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x07, 0x62, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x22, 0x20, 0x0a, 0x06, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, + 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x22, 0x5a, 0x0a, 0x0c, 0x47, 0x32, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x11, 0x0a, 0x04, 0x78, 0x5f, 0x61, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x78, 0x41, 0x30, 0x12, 0x11, 0x0a, 0x04, 0x78, 0x5f, 0x61, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x78, 0x41, 0x31, 0x12, 0x11, 0x0a, @@ -1061,48 +984,45 @@ func file_node_node_proto_rawDescGZIP() []byte { return file_node_node_proto_rawDescData } -var file_node_node_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_node_node_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_node_node_proto_goTypes = []interface{}{ - (RetrieveChunksReply_ChunkEncoding)(0), // 0: node.RetrieveChunksReply.ChunkEncoding - (*StoreChunksRequest)(nil), // 1: node.StoreChunksRequest - (*StoreChunksReply)(nil), // 2: node.StoreChunksReply - (*RetrieveChunksRequest)(nil), // 3: node.RetrieveChunksRequest - (*RetrieveChunksReply)(nil), // 4: node.RetrieveChunksReply - (*GetBlobHeaderRequest)(nil), // 5: node.GetBlobHeaderRequest - (*GetBlobHeaderReply)(nil), // 6: node.GetBlobHeaderReply - (*MerkleProof)(nil), // 7: node.MerkleProof - (*Blob)(nil), // 8: node.Blob - (*Bundle)(nil), // 9: node.Bundle - (*G2Commitment)(nil), // 10: node.G2Commitment - (*BlobHeader)(nil), // 11: node.BlobHeader - (*BlobQuorumInfo)(nil), // 12: node.BlobQuorumInfo - (*BatchHeader)(nil), // 13: node.BatchHeader - (*common.G1Commitment)(nil), // 14: common.G1Commitment + (*StoreChunksRequest)(nil), // 0: node.StoreChunksRequest + (*StoreChunksReply)(nil), // 1: node.StoreChunksReply + (*RetrieveChunksRequest)(nil), // 2: node.RetrieveChunksRequest + (*RetrieveChunksReply)(nil), // 3: node.RetrieveChunksReply + (*GetBlobHeaderRequest)(nil), // 4: node.GetBlobHeaderRequest + (*GetBlobHeaderReply)(nil), // 5: node.GetBlobHeaderReply + (*MerkleProof)(nil), // 6: node.MerkleProof + (*Blob)(nil), // 7: node.Blob + (*Bundle)(nil), // 8: node.Bundle + (*G2Commitment)(nil), // 9: node.G2Commitment + (*BlobHeader)(nil), // 10: node.BlobHeader + (*BlobQuorumInfo)(nil), // 11: node.BlobQuorumInfo + (*BatchHeader)(nil), // 12: node.BatchHeader + (*common.G1Commitment)(nil), // 13: common.G1Commitment } var file_node_node_proto_depIdxs = []int32{ - 13, // 0: node.StoreChunksRequest.batch_header:type_name -> node.BatchHeader - 8, // 1: node.StoreChunksRequest.blobs:type_name -> node.Blob - 0, // 2: node.RetrieveChunksReply.encoding:type_name -> node.RetrieveChunksReply.ChunkEncoding - 11, // 3: node.GetBlobHeaderReply.blob_header:type_name -> node.BlobHeader - 7, // 4: node.GetBlobHeaderReply.proof:type_name -> node.MerkleProof - 11, // 5: node.Blob.header:type_name -> node.BlobHeader - 9, // 6: node.Blob.bundles:type_name -> node.Bundle - 14, // 7: node.BlobHeader.commitment:type_name -> common.G1Commitment - 10, // 8: node.BlobHeader.length_commitment:type_name -> node.G2Commitment - 10, // 9: node.BlobHeader.length_proof:type_name -> node.G2Commitment - 12, // 10: node.BlobHeader.quorum_headers:type_name -> node.BlobQuorumInfo - 1, // 11: node.Dispersal.StoreChunks:input_type -> node.StoreChunksRequest - 3, // 12: node.Retrieval.RetrieveChunks:input_type -> node.RetrieveChunksRequest - 5, // 13: node.Retrieval.GetBlobHeader:input_type -> node.GetBlobHeaderRequest - 2, // 14: node.Dispersal.StoreChunks:output_type -> node.StoreChunksReply - 4, // 15: node.Retrieval.RetrieveChunks:output_type -> node.RetrieveChunksReply - 6, // 16: node.Retrieval.GetBlobHeader:output_type -> node.GetBlobHeaderReply - 14, // [14:17] is the sub-list for method output_type - 11, // [11:14] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 12, // 0: node.StoreChunksRequest.batch_header:type_name -> node.BatchHeader + 7, // 1: node.StoreChunksRequest.blobs:type_name -> node.Blob + 10, // 2: node.GetBlobHeaderReply.blob_header:type_name -> node.BlobHeader + 6, // 3: node.GetBlobHeaderReply.proof:type_name -> node.MerkleProof + 10, // 4: node.Blob.header:type_name -> node.BlobHeader + 8, // 5: node.Blob.bundles:type_name -> node.Bundle + 13, // 6: node.BlobHeader.commitment:type_name -> common.G1Commitment + 9, // 7: node.BlobHeader.length_commitment:type_name -> node.G2Commitment + 9, // 8: node.BlobHeader.length_proof:type_name -> node.G2Commitment + 11, // 9: node.BlobHeader.quorum_headers:type_name -> node.BlobQuorumInfo + 0, // 10: node.Dispersal.StoreChunks:input_type -> node.StoreChunksRequest + 2, // 11: node.Retrieval.RetrieveChunks:input_type -> node.RetrieveChunksRequest + 4, // 12: node.Retrieval.GetBlobHeader:input_type -> node.GetBlobHeaderRequest + 1, // 13: node.Dispersal.StoreChunks:output_type -> node.StoreChunksReply + 3, // 14: node.Retrieval.RetrieveChunks:output_type -> node.RetrieveChunksReply + 5, // 15: node.Retrieval.GetBlobHeader:output_type -> node.GetBlobHeaderReply + 13, // [13:16] is the sub-list for method output_type + 10, // [10:13] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_node_node_proto_init() } @@ -1273,14 +1193,13 @@ func file_node_node_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_node_node_proto_rawDesc, - NumEnums: 1, + NumEnums: 0, NumMessages: 13, NumExtensions: 0, NumServices: 2, }, GoTypes: file_node_node_proto_goTypes, DependencyIndexes: file_node_node_proto_depIdxs, - EnumInfos: file_node_node_proto_enumTypes, MessageInfos: file_node_node_proto_msgTypes, }.Build() File_node_node_proto = out.File diff --git a/api/grpc/node/node_grpc.pb.go b/api/grpc/node/node_grpc.pb.go index 369c358a11..0dcf6f0eb4 100644 --- a/api/grpc/node/node_grpc.pb.go +++ b/api/grpc/node/node_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.12.4 +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.23.4 // source: node/node.proto package node @@ -18,6 +18,10 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Dispersal_StoreChunks_FullMethodName = "/node.Dispersal/StoreChunks" +) + // DispersalClient is the client API for Dispersal 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. @@ -41,7 +45,7 @@ func NewDispersalClient(cc grpc.ClientConnInterface) DispersalClient { func (c *dispersalClient) StoreChunks(ctx context.Context, in *StoreChunksRequest, opts ...grpc.CallOption) (*StoreChunksReply, error) { out := new(StoreChunksReply) - err := c.cc.Invoke(ctx, "/node.Dispersal/StoreChunks", in, out, opts...) + err := c.cc.Invoke(ctx, Dispersal_StoreChunks_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -92,7 +96,7 @@ func _Dispersal_StoreChunks_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/node.Dispersal/StoreChunks", + FullMethod: Dispersal_StoreChunks_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DispersalServer).StoreChunks(ctx, req.(*StoreChunksRequest)) @@ -116,13 +120,18 @@ var Dispersal_ServiceDesc = grpc.ServiceDesc{ Metadata: "node/node.proto", } +const ( + Retrieval_RetrieveChunks_FullMethodName = "/node.Retrieval/RetrieveChunks" + Retrieval_GetBlobHeader_FullMethodName = "/node.Retrieval/GetBlobHeader" +) + // RetrievalClient is the client API for Retrieval 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 RetrievalClient interface { // RetrieveChunks retrieves the chunks for a blob custodied at the Node. RetrieveChunks(ctx context.Context, in *RetrieveChunksRequest, opts ...grpc.CallOption) (*RetrieveChunksReply, error) - // GetBlobHeader is similar to RetrieveChunks, this just returns the header of the blob. + // Similar to RetrieveChunks, this just returns the header of the blob. GetBlobHeader(ctx context.Context, in *GetBlobHeaderRequest, opts ...grpc.CallOption) (*GetBlobHeaderReply, error) } @@ -136,7 +145,7 @@ func NewRetrievalClient(cc grpc.ClientConnInterface) RetrievalClient { func (c *retrievalClient) RetrieveChunks(ctx context.Context, in *RetrieveChunksRequest, opts ...grpc.CallOption) (*RetrieveChunksReply, error) { out := new(RetrieveChunksReply) - err := c.cc.Invoke(ctx, "/node.Retrieval/RetrieveChunks", in, out, opts...) + err := c.cc.Invoke(ctx, Retrieval_RetrieveChunks_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -145,7 +154,7 @@ func (c *retrievalClient) RetrieveChunks(ctx context.Context, in *RetrieveChunks func (c *retrievalClient) GetBlobHeader(ctx context.Context, in *GetBlobHeaderRequest, opts ...grpc.CallOption) (*GetBlobHeaderReply, error) { out := new(GetBlobHeaderReply) - err := c.cc.Invoke(ctx, "/node.Retrieval/GetBlobHeader", in, out, opts...) + err := c.cc.Invoke(ctx, Retrieval_GetBlobHeader_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -158,7 +167,7 @@ func (c *retrievalClient) GetBlobHeader(ctx context.Context, in *GetBlobHeaderRe type RetrievalServer interface { // RetrieveChunks retrieves the chunks for a blob custodied at the Node. RetrieveChunks(context.Context, *RetrieveChunksRequest) (*RetrieveChunksReply, error) - // GetBlobHeader is similar to RetrieveChunks, this just returns the header of the blob. + // Similar to RetrieveChunks, this just returns the header of the blob. GetBlobHeader(context.Context, *GetBlobHeaderRequest) (*GetBlobHeaderReply, error) mustEmbedUnimplementedRetrievalServer() } @@ -196,7 +205,7 @@ func _Retrieval_RetrieveChunks_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/node.Retrieval/RetrieveChunks", + FullMethod: Retrieval_RetrieveChunks_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RetrievalServer).RetrieveChunks(ctx, req.(*RetrieveChunksRequest)) @@ -214,7 +223,7 @@ func _Retrieval_GetBlobHeader_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/node.Retrieval/GetBlobHeader", + FullMethod: Retrieval_GetBlobHeader_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RetrievalServer).GetBlobHeader(ctx, req.(*GetBlobHeaderRequest)) From 2864aa8e9378822e03399647b7ab3dc590bc21ae Mon Sep 17 00:00:00 2001 From: Jian Xiao Date: Thu, 11 Jul 2024 18:16:06 +0000 Subject: [PATCH 5/7] node pb --- api/grpc/node/node.pb.go | 230 +++++++++++++++++++++++----------- api/grpc/node/node_grpc.pb.go | 35 ++---- 2 files changed, 167 insertions(+), 98 deletions(-) diff --git a/api/grpc/node/node.pb.go b/api/grpc/node/node.pb.go index 4ce01f3a08..93375de2e7 100644 --- a/api/grpc/node/node.pb.go +++ b/api/grpc/node/node.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v5.26.1 +// protoc v3.12.4 // source: node/node.proto package node @@ -21,6 +21,56 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Describes how the chunks above are encoded. +type RetrieveChunksReply_ChunkEncoding int32 + +const ( + RetrieveChunksReply_UNKNOWN RetrieveChunksReply_ChunkEncoding = 0 + RetrieveChunksReply_GNARK RetrieveChunksReply_ChunkEncoding = 1 + RetrieveChunksReply_GOB RetrieveChunksReply_ChunkEncoding = 2 +) + +// Enum value maps for RetrieveChunksReply_ChunkEncoding. +var ( + RetrieveChunksReply_ChunkEncoding_name = map[int32]string{ + 0: "UNKNOWN", + 1: "GNARK", + 2: "GOB", + } + RetrieveChunksReply_ChunkEncoding_value = map[string]int32{ + "UNKNOWN": 0, + "GNARK": 1, + "GOB": 2, + } +) + +func (x RetrieveChunksReply_ChunkEncoding) Enum() *RetrieveChunksReply_ChunkEncoding { + p := new(RetrieveChunksReply_ChunkEncoding) + *p = x + return p +} + +func (x RetrieveChunksReply_ChunkEncoding) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RetrieveChunksReply_ChunkEncoding) Descriptor() protoreflect.EnumDescriptor { + return file_node_node_proto_enumTypes[0].Descriptor() +} + +func (RetrieveChunksReply_ChunkEncoding) Type() protoreflect.EnumType { + return &file_node_node_proto_enumTypes[0] +} + +func (x RetrieveChunksReply_ChunkEncoding) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RetrieveChunksReply_ChunkEncoding.Descriptor instead. +func (RetrieveChunksReply_ChunkEncoding) EnumDescriptor() ([]byte, []int) { + return file_node_node_proto_rawDescGZIP(), []int{3, 0} +} + type StoreChunksRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -203,7 +253,8 @@ type RetrieveChunksReply struct { unknownFields protoimpl.UnknownFields // All chunks the Node is storing for the requested blob per RetrieveChunksRequest. - Chunks [][]byte `protobuf:"bytes,1,rep,name=chunks,proto3" json:"chunks,omitempty"` + Chunks [][]byte `protobuf:"bytes,1,rep,name=chunks,proto3" json:"chunks,omitempty"` + Encoding RetrieveChunksReply_ChunkEncoding `protobuf:"varint,2,opt,name=encoding,proto3,enum=node.RetrieveChunksReply_ChunkEncoding" json:"encoding,omitempty"` } func (x *RetrieveChunksReply) Reset() { @@ -245,6 +296,13 @@ func (x *RetrieveChunksReply) GetChunks() [][]byte { return nil } +func (x *RetrieveChunksReply) GetEncoding() RetrieveChunksReply_ChunkEncoding { + if x != nil { + return x.Encoding + } + return RetrieveChunksReply_UNKNOWN +} + // See RetrieveChunksRequest for documentation of each parameter of GetBlobHeaderRequest. type GetBlobHeaderRequest struct { state protoimpl.MessageState @@ -502,6 +560,8 @@ type Bundle struct { // Each chunk corresponds to a collection of points on the polynomial. // Each chunk has same number of points. Chunks [][]byte `protobuf:"bytes,1,rep,name=chunks,proto3" json:"chunks,omitempty"` + // All chunks of the bundle encoded in a byte array. + Bundle []byte `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"` } func (x *Bundle) Reset() { @@ -543,6 +603,13 @@ func (x *Bundle) GetChunks() [][]byte { return nil } +func (x *Bundle) GetBundle() []byte { + if x != nil { + return x.Bundle + } + return nil +} + type G2Commitment struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -995,37 +1062,46 @@ var file_node_node_proto_rawDesc = []byte{ 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x08, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x49, 0x64, 0x22, 0x2d, 0x0a, - 0x13, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x22, 0x7e, 0x0a, 0x14, - 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, - 0x1b, 0x0a, 0x09, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x08, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x49, 0x64, 0x22, 0x70, 0x0a, 0x12, - 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x12, 0x31, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x42, - 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x4d, 0x65, 0x72, 0x6b, - 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x3b, - 0x0a, 0x0b, 0x4d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x16, 0x0a, - 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x68, - 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x58, 0x0a, 0x04, 0x42, - 0x6c, 0x6f, 0x62, 0x12, 0x28, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x26, 0x0a, - 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, - 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x07, 0x62, 0x75, - 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x22, 0x20, 0x0a, 0x06, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, - 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x22, 0x5a, 0x0a, 0x0c, 0x47, 0x32, 0x43, 0x6f, 0x6d, + 0x01, 0x28, 0x0d, 0x52, 0x08, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x49, 0x64, 0x22, 0xa4, 0x01, + 0x0a, 0x13, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, 0x43, 0x0a, + 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x27, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x43, + 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, + 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, + 0x6e, 0x67, 0x22, 0x30, 0x0a, 0x0d, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x45, 0x6e, 0x63, 0x6f, 0x64, + 0x69, 0x6e, 0x67, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x47, 0x4e, 0x41, 0x52, 0x4b, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x47, + 0x4f, 0x42, 0x10, 0x02, 0x22, 0x7e, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x62, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, + 0x6f, 0x62, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x71, 0x75, 0x6f, 0x72, 0x75, + 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x71, 0x75, 0x6f, 0x72, + 0x75, 0x6d, 0x49, 0x64, 0x22, 0x70, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x31, 0x0a, 0x0b, 0x62, 0x6c, + 0x6f, 0x62, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x27, 0x0a, + 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x4d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, + 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x3b, 0x0a, 0x0b, 0x4d, 0x65, 0x72, 0x6b, 0x6c, 0x65, + 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x14, 0x0a, + 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x22, 0x58, 0x0a, 0x04, 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x28, 0x0a, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x22, 0x38, 0x0a, + 0x06, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x5a, 0x0a, 0x0c, 0x47, 0x32, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x11, 0x0a, 0x04, 0x78, 0x5f, 0x61, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x78, 0x41, 0x30, 0x12, 0x11, 0x0a, 0x04, 0x78, 0x5f, 0x61, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x78, 0x41, 0x31, 0x12, 0x11, 0x0a, @@ -1120,51 +1196,54 @@ func file_node_node_proto_rawDescGZIP() []byte { return file_node_node_proto_rawDescData } +var file_node_node_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_node_node_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_node_node_proto_goTypes = []interface{}{ - (*StoreChunksRequest)(nil), // 0: node.StoreChunksRequest - (*StoreChunksReply)(nil), // 1: node.StoreChunksReply - (*RetrieveChunksRequest)(nil), // 2: node.RetrieveChunksRequest - (*RetrieveChunksReply)(nil), // 3: node.RetrieveChunksReply - (*GetBlobHeaderRequest)(nil), // 4: node.GetBlobHeaderRequest - (*GetBlobHeaderReply)(nil), // 5: node.GetBlobHeaderReply - (*MerkleProof)(nil), // 6: node.MerkleProof - (*Blob)(nil), // 7: node.Blob - (*Bundle)(nil), // 8: node.Bundle - (*G2Commitment)(nil), // 9: node.G2Commitment - (*BlobHeader)(nil), // 10: node.BlobHeader - (*BlobQuorumInfo)(nil), // 11: node.BlobQuorumInfo - (*BatchHeader)(nil), // 12: node.BatchHeader - (*NodeInfoRequest)(nil), // 13: node.NodeInfoRequest - (*NodeInfoReply)(nil), // 14: node.NodeInfoReply - (*common.G1Commitment)(nil), // 15: common.G1Commitment + (RetrieveChunksReply_ChunkEncoding)(0), // 0: node.RetrieveChunksReply.ChunkEncoding + (*StoreChunksRequest)(nil), // 1: node.StoreChunksRequest + (*StoreChunksReply)(nil), // 2: node.StoreChunksReply + (*RetrieveChunksRequest)(nil), // 3: node.RetrieveChunksRequest + (*RetrieveChunksReply)(nil), // 4: node.RetrieveChunksReply + (*GetBlobHeaderRequest)(nil), // 5: node.GetBlobHeaderRequest + (*GetBlobHeaderReply)(nil), // 6: node.GetBlobHeaderReply + (*MerkleProof)(nil), // 7: node.MerkleProof + (*Blob)(nil), // 8: node.Blob + (*Bundle)(nil), // 9: node.Bundle + (*G2Commitment)(nil), // 10: node.G2Commitment + (*BlobHeader)(nil), // 11: node.BlobHeader + (*BlobQuorumInfo)(nil), // 12: node.BlobQuorumInfo + (*BatchHeader)(nil), // 13: node.BatchHeader + (*NodeInfoRequest)(nil), // 14: node.NodeInfoRequest + (*NodeInfoReply)(nil), // 15: node.NodeInfoReply + (*common.G1Commitment)(nil), // 16: common.G1Commitment } var file_node_node_proto_depIdxs = []int32{ - 12, // 0: node.StoreChunksRequest.batch_header:type_name -> node.BatchHeader - 7, // 1: node.StoreChunksRequest.blobs:type_name -> node.Blob - 10, // 2: node.GetBlobHeaderReply.blob_header:type_name -> node.BlobHeader - 6, // 3: node.GetBlobHeaderReply.proof:type_name -> node.MerkleProof - 10, // 4: node.Blob.header:type_name -> node.BlobHeader - 8, // 5: node.Blob.bundles:type_name -> node.Bundle - 15, // 6: node.BlobHeader.commitment:type_name -> common.G1Commitment - 9, // 7: node.BlobHeader.length_commitment:type_name -> node.G2Commitment - 9, // 8: node.BlobHeader.length_proof:type_name -> node.G2Commitment - 11, // 9: node.BlobHeader.quorum_headers:type_name -> node.BlobQuorumInfo - 0, // 10: node.Dispersal.StoreChunks:input_type -> node.StoreChunksRequest - 13, // 11: node.Dispersal.NodeInfo:input_type -> node.NodeInfoRequest - 2, // 12: node.Retrieval.RetrieveChunks:input_type -> node.RetrieveChunksRequest - 4, // 13: node.Retrieval.GetBlobHeader:input_type -> node.GetBlobHeaderRequest - 13, // 14: node.Retrieval.NodeInfo:input_type -> node.NodeInfoRequest - 1, // 15: node.Dispersal.StoreChunks:output_type -> node.StoreChunksReply - 14, // 16: node.Dispersal.NodeInfo:output_type -> node.NodeInfoReply - 3, // 17: node.Retrieval.RetrieveChunks:output_type -> node.RetrieveChunksReply - 5, // 18: node.Retrieval.GetBlobHeader:output_type -> node.GetBlobHeaderReply - 14, // 19: node.Retrieval.NodeInfo:output_type -> node.NodeInfoReply - 15, // [15:20] is the sub-list for method output_type - 10, // [10:15] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 13, // 0: node.StoreChunksRequest.batch_header:type_name -> node.BatchHeader + 8, // 1: node.StoreChunksRequest.blobs:type_name -> node.Blob + 0, // 2: node.RetrieveChunksReply.encoding:type_name -> node.RetrieveChunksReply.ChunkEncoding + 11, // 3: node.GetBlobHeaderReply.blob_header:type_name -> node.BlobHeader + 7, // 4: node.GetBlobHeaderReply.proof:type_name -> node.MerkleProof + 11, // 5: node.Blob.header:type_name -> node.BlobHeader + 9, // 6: node.Blob.bundles:type_name -> node.Bundle + 16, // 7: node.BlobHeader.commitment:type_name -> common.G1Commitment + 10, // 8: node.BlobHeader.length_commitment:type_name -> node.G2Commitment + 10, // 9: node.BlobHeader.length_proof:type_name -> node.G2Commitment + 12, // 10: node.BlobHeader.quorum_headers:type_name -> node.BlobQuorumInfo + 1, // 11: node.Dispersal.StoreChunks:input_type -> node.StoreChunksRequest + 14, // 12: node.Dispersal.NodeInfo:input_type -> node.NodeInfoRequest + 3, // 13: node.Retrieval.RetrieveChunks:input_type -> node.RetrieveChunksRequest + 5, // 14: node.Retrieval.GetBlobHeader:input_type -> node.GetBlobHeaderRequest + 14, // 15: node.Retrieval.NodeInfo:input_type -> node.NodeInfoRequest + 2, // 16: node.Dispersal.StoreChunks:output_type -> node.StoreChunksReply + 15, // 17: node.Dispersal.NodeInfo:output_type -> node.NodeInfoReply + 4, // 18: node.Retrieval.RetrieveChunks:output_type -> node.RetrieveChunksReply + 6, // 19: node.Retrieval.GetBlobHeader:output_type -> node.GetBlobHeaderReply + 15, // 20: node.Retrieval.NodeInfo:output_type -> node.NodeInfoReply + 16, // [16:21] is the sub-list for method output_type + 11, // [11:16] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_node_node_proto_init() } @@ -1359,13 +1438,14 @@ func file_node_node_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_node_node_proto_rawDesc, - NumEnums: 0, + NumEnums: 1, NumMessages: 15, NumExtensions: 0, NumServices: 2, }, GoTypes: file_node_node_proto_goTypes, DependencyIndexes: file_node_node_proto_depIdxs, + EnumInfos: file_node_node_proto_enumTypes, MessageInfos: file_node_node_proto_msgTypes, }.Build() File_node_node_proto = out.File diff --git a/api/grpc/node/node_grpc.pb.go b/api/grpc/node/node_grpc.pb.go index 20ef64b70c..2a3771677b 100644 --- a/api/grpc/node/node_grpc.pb.go +++ b/api/grpc/node/node_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v5.26.1 +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.12.4 // source: node/node.proto package node @@ -18,11 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - Dispersal_StoreChunks_FullMethodName = "/node.Dispersal/StoreChunks" - Dispersal_NodeInfo_FullMethodName = "/node.Dispersal/NodeInfo" -) - // DispersalClient is the client API for Dispersal 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. @@ -48,7 +43,7 @@ func NewDispersalClient(cc grpc.ClientConnInterface) DispersalClient { func (c *dispersalClient) StoreChunks(ctx context.Context, in *StoreChunksRequest, opts ...grpc.CallOption) (*StoreChunksReply, error) { out := new(StoreChunksReply) - err := c.cc.Invoke(ctx, Dispersal_StoreChunks_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/node.Dispersal/StoreChunks", in, out, opts...) if err != nil { return nil, err } @@ -57,7 +52,7 @@ func (c *dispersalClient) StoreChunks(ctx context.Context, in *StoreChunksReques func (c *dispersalClient) NodeInfo(ctx context.Context, in *NodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoReply, error) { out := new(NodeInfoReply) - err := c.cc.Invoke(ctx, Dispersal_NodeInfo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/node.Dispersal/NodeInfo", in, out, opts...) if err != nil { return nil, err } @@ -113,7 +108,7 @@ func _Dispersal_StoreChunks_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Dispersal_StoreChunks_FullMethodName, + FullMethod: "/node.Dispersal/StoreChunks", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DispersalServer).StoreChunks(ctx, req.(*StoreChunksRequest)) @@ -131,7 +126,7 @@ func _Dispersal_NodeInfo_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Dispersal_NodeInfo_FullMethodName, + FullMethod: "/node.Dispersal/NodeInfo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DispersalServer).NodeInfo(ctx, req.(*NodeInfoRequest)) @@ -159,12 +154,6 @@ var Dispersal_ServiceDesc = grpc.ServiceDesc{ Metadata: "node/node.proto", } -const ( - Retrieval_RetrieveChunks_FullMethodName = "/node.Retrieval/RetrieveChunks" - Retrieval_GetBlobHeader_FullMethodName = "/node.Retrieval/GetBlobHeader" - Retrieval_NodeInfo_FullMethodName = "/node.Retrieval/NodeInfo" -) - // RetrievalClient is the client API for Retrieval 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. @@ -187,7 +176,7 @@ func NewRetrievalClient(cc grpc.ClientConnInterface) RetrievalClient { func (c *retrievalClient) RetrieveChunks(ctx context.Context, in *RetrieveChunksRequest, opts ...grpc.CallOption) (*RetrieveChunksReply, error) { out := new(RetrieveChunksReply) - err := c.cc.Invoke(ctx, Retrieval_RetrieveChunks_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/node.Retrieval/RetrieveChunks", in, out, opts...) if err != nil { return nil, err } @@ -196,7 +185,7 @@ func (c *retrievalClient) RetrieveChunks(ctx context.Context, in *RetrieveChunks func (c *retrievalClient) GetBlobHeader(ctx context.Context, in *GetBlobHeaderRequest, opts ...grpc.CallOption) (*GetBlobHeaderReply, error) { out := new(GetBlobHeaderReply) - err := c.cc.Invoke(ctx, Retrieval_GetBlobHeader_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/node.Retrieval/GetBlobHeader", in, out, opts...) if err != nil { return nil, err } @@ -205,7 +194,7 @@ func (c *retrievalClient) GetBlobHeader(ctx context.Context, in *GetBlobHeaderRe func (c *retrievalClient) NodeInfo(ctx context.Context, in *NodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoReply, error) { out := new(NodeInfoReply) - err := c.cc.Invoke(ctx, Retrieval_NodeInfo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/node.Retrieval/NodeInfo", in, out, opts...) if err != nil { return nil, err } @@ -261,7 +250,7 @@ func _Retrieval_RetrieveChunks_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Retrieval_RetrieveChunks_FullMethodName, + FullMethod: "/node.Retrieval/RetrieveChunks", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RetrievalServer).RetrieveChunks(ctx, req.(*RetrieveChunksRequest)) @@ -279,7 +268,7 @@ func _Retrieval_GetBlobHeader_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Retrieval_GetBlobHeader_FullMethodName, + FullMethod: "/node.Retrieval/GetBlobHeader", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RetrievalServer).GetBlobHeader(ctx, req.(*GetBlobHeaderRequest)) @@ -297,7 +286,7 @@ func _Retrieval_NodeInfo_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Retrieval_NodeInfo_FullMethodName, + FullMethod: "/node.Retrieval/NodeInfo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RetrievalServer).NodeInfo(ctx, req.(*NodeInfoRequest)) From 62a5de209fda336673b055580f7855e4024606a0 Mon Sep 17 00:00:00 2001 From: Jian Xiao Date: Thu, 11 Jul 2024 19:23:53 +0000 Subject: [PATCH 6/7] protoc-gen-go-grpc 1.3.0 --- api/grpc/churner/churner_grpc.pb.go | 10 +++++--- api/grpc/disperser/disperser_grpc.pb.go | 23 +++++++++++------ api/grpc/node/node_grpc.pb.go | 33 ++++++++++++++++--------- api/grpc/retriever/retriever_grpc.pb.go | 10 +++++--- 4 files changed, 51 insertions(+), 25 deletions(-) diff --git a/api/grpc/churner/churner_grpc.pb.go b/api/grpc/churner/churner_grpc.pb.go index 75fdbed77f..17aaa48ff9 100644 --- a/api/grpc/churner/churner_grpc.pb.go +++ b/api/grpc/churner/churner_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc v3.12.4 // source: churner/churner.proto @@ -18,6 +18,10 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Churner_Churn_FullMethodName = "/churner.Churner/Churn" +) + // ChurnerClient is the client API for Churner 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. @@ -35,7 +39,7 @@ func NewChurnerClient(cc grpc.ClientConnInterface) ChurnerClient { func (c *churnerClient) Churn(ctx context.Context, in *ChurnRequest, opts ...grpc.CallOption) (*ChurnReply, error) { out := new(ChurnReply) - err := c.cc.Invoke(ctx, "/churner.Churner/Churn", in, out, opts...) + err := c.cc.Invoke(ctx, Churner_Churn_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -80,7 +84,7 @@ func _Churner_Churn_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/churner.Churner/Churn", + FullMethod: Churner_Churn_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ChurnerServer).Churn(ctx, req.(*ChurnRequest)) diff --git a/api/grpc/disperser/disperser_grpc.pb.go b/api/grpc/disperser/disperser_grpc.pb.go index b0ddb284aa..440f0d15f7 100644 --- a/api/grpc/disperser/disperser_grpc.pb.go +++ b/api/grpc/disperser/disperser_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc v3.12.4 // source: disperser/disperser.proto @@ -18,6 +18,13 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Disperser_DisperseBlob_FullMethodName = "/disperser.Disperser/DisperseBlob" + Disperser_DisperseBlobAuthenticated_FullMethodName = "/disperser.Disperser/DisperseBlobAuthenticated" + Disperser_GetBlobStatus_FullMethodName = "/disperser.Disperser/GetBlobStatus" + Disperser_RetrieveBlob_FullMethodName = "/disperser.Disperser/RetrieveBlob" +) + // DisperserClient is the client API for Disperser 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. @@ -57,7 +64,7 @@ func NewDisperserClient(cc grpc.ClientConnInterface) DisperserClient { func (c *disperserClient) DisperseBlob(ctx context.Context, in *DisperseBlobRequest, opts ...grpc.CallOption) (*DisperseBlobReply, error) { out := new(DisperseBlobReply) - err := c.cc.Invoke(ctx, "/disperser.Disperser/DisperseBlob", in, out, opts...) + err := c.cc.Invoke(ctx, Disperser_DisperseBlob_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -65,7 +72,7 @@ func (c *disperserClient) DisperseBlob(ctx context.Context, in *DisperseBlobRequ } func (c *disperserClient) DisperseBlobAuthenticated(ctx context.Context, opts ...grpc.CallOption) (Disperser_DisperseBlobAuthenticatedClient, error) { - stream, err := c.cc.NewStream(ctx, &Disperser_ServiceDesc.Streams[0], "/disperser.Disperser/DisperseBlobAuthenticated", opts...) + stream, err := c.cc.NewStream(ctx, &Disperser_ServiceDesc.Streams[0], Disperser_DisperseBlobAuthenticated_FullMethodName, opts...) if err != nil { return nil, err } @@ -97,7 +104,7 @@ func (x *disperserDisperseBlobAuthenticatedClient) Recv() (*AuthenticatedReply, func (c *disperserClient) GetBlobStatus(ctx context.Context, in *BlobStatusRequest, opts ...grpc.CallOption) (*BlobStatusReply, error) { out := new(BlobStatusReply) - err := c.cc.Invoke(ctx, "/disperser.Disperser/GetBlobStatus", in, out, opts...) + err := c.cc.Invoke(ctx, Disperser_GetBlobStatus_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -106,7 +113,7 @@ func (c *disperserClient) GetBlobStatus(ctx context.Context, in *BlobStatusReque func (c *disperserClient) RetrieveBlob(ctx context.Context, in *RetrieveBlobRequest, opts ...grpc.CallOption) (*RetrieveBlobReply, error) { out := new(RetrieveBlobReply) - err := c.cc.Invoke(ctx, "/disperser.Disperser/RetrieveBlob", in, out, opts...) + err := c.cc.Invoke(ctx, Disperser_RetrieveBlob_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -182,7 +189,7 @@ func _Disperser_DisperseBlob_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/disperser.Disperser/DisperseBlob", + FullMethod: Disperser_DisperseBlob_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DisperserServer).DisperseBlob(ctx, req.(*DisperseBlobRequest)) @@ -226,7 +233,7 @@ func _Disperser_GetBlobStatus_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/disperser.Disperser/GetBlobStatus", + FullMethod: Disperser_GetBlobStatus_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DisperserServer).GetBlobStatus(ctx, req.(*BlobStatusRequest)) @@ -244,7 +251,7 @@ func _Disperser_RetrieveBlob_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/disperser.Disperser/RetrieveBlob", + FullMethod: Disperser_RetrieveBlob_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DisperserServer).RetrieveBlob(ctx, req.(*RetrieveBlobRequest)) diff --git a/api/grpc/node/node_grpc.pb.go b/api/grpc/node/node_grpc.pb.go index 2a3771677b..dc70a61a92 100644 --- a/api/grpc/node/node_grpc.pb.go +++ b/api/grpc/node/node_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc v3.12.4 // source: node/node.proto @@ -18,6 +18,11 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Dispersal_StoreChunks_FullMethodName = "/node.Dispersal/StoreChunks" + Dispersal_NodeInfo_FullMethodName = "/node.Dispersal/NodeInfo" +) + // DispersalClient is the client API for Dispersal 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. @@ -43,7 +48,7 @@ func NewDispersalClient(cc grpc.ClientConnInterface) DispersalClient { func (c *dispersalClient) StoreChunks(ctx context.Context, in *StoreChunksRequest, opts ...grpc.CallOption) (*StoreChunksReply, error) { out := new(StoreChunksReply) - err := c.cc.Invoke(ctx, "/node.Dispersal/StoreChunks", in, out, opts...) + err := c.cc.Invoke(ctx, Dispersal_StoreChunks_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -52,7 +57,7 @@ func (c *dispersalClient) StoreChunks(ctx context.Context, in *StoreChunksReques func (c *dispersalClient) NodeInfo(ctx context.Context, in *NodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoReply, error) { out := new(NodeInfoReply) - err := c.cc.Invoke(ctx, "/node.Dispersal/NodeInfo", in, out, opts...) + err := c.cc.Invoke(ctx, Dispersal_NodeInfo_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -108,7 +113,7 @@ func _Dispersal_StoreChunks_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/node.Dispersal/StoreChunks", + FullMethod: Dispersal_StoreChunks_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DispersalServer).StoreChunks(ctx, req.(*StoreChunksRequest)) @@ -126,7 +131,7 @@ func _Dispersal_NodeInfo_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/node.Dispersal/NodeInfo", + FullMethod: Dispersal_NodeInfo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DispersalServer).NodeInfo(ctx, req.(*NodeInfoRequest)) @@ -154,6 +159,12 @@ var Dispersal_ServiceDesc = grpc.ServiceDesc{ Metadata: "node/node.proto", } +const ( + Retrieval_RetrieveChunks_FullMethodName = "/node.Retrieval/RetrieveChunks" + Retrieval_GetBlobHeader_FullMethodName = "/node.Retrieval/GetBlobHeader" + Retrieval_NodeInfo_FullMethodName = "/node.Retrieval/NodeInfo" +) + // RetrievalClient is the client API for Retrieval 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. @@ -176,7 +187,7 @@ func NewRetrievalClient(cc grpc.ClientConnInterface) RetrievalClient { func (c *retrievalClient) RetrieveChunks(ctx context.Context, in *RetrieveChunksRequest, opts ...grpc.CallOption) (*RetrieveChunksReply, error) { out := new(RetrieveChunksReply) - err := c.cc.Invoke(ctx, "/node.Retrieval/RetrieveChunks", in, out, opts...) + err := c.cc.Invoke(ctx, Retrieval_RetrieveChunks_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -185,7 +196,7 @@ func (c *retrievalClient) RetrieveChunks(ctx context.Context, in *RetrieveChunks func (c *retrievalClient) GetBlobHeader(ctx context.Context, in *GetBlobHeaderRequest, opts ...grpc.CallOption) (*GetBlobHeaderReply, error) { out := new(GetBlobHeaderReply) - err := c.cc.Invoke(ctx, "/node.Retrieval/GetBlobHeader", in, out, opts...) + err := c.cc.Invoke(ctx, Retrieval_GetBlobHeader_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -194,7 +205,7 @@ func (c *retrievalClient) GetBlobHeader(ctx context.Context, in *GetBlobHeaderRe func (c *retrievalClient) NodeInfo(ctx context.Context, in *NodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoReply, error) { out := new(NodeInfoReply) - err := c.cc.Invoke(ctx, "/node.Retrieval/NodeInfo", in, out, opts...) + err := c.cc.Invoke(ctx, Retrieval_NodeInfo_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -250,7 +261,7 @@ func _Retrieval_RetrieveChunks_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/node.Retrieval/RetrieveChunks", + FullMethod: Retrieval_RetrieveChunks_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RetrievalServer).RetrieveChunks(ctx, req.(*RetrieveChunksRequest)) @@ -268,7 +279,7 @@ func _Retrieval_GetBlobHeader_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/node.Retrieval/GetBlobHeader", + FullMethod: Retrieval_GetBlobHeader_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RetrievalServer).GetBlobHeader(ctx, req.(*GetBlobHeaderRequest)) @@ -286,7 +297,7 @@ func _Retrieval_NodeInfo_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/node.Retrieval/NodeInfo", + FullMethod: Retrieval_NodeInfo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RetrievalServer).NodeInfo(ctx, req.(*NodeInfoRequest)) diff --git a/api/grpc/retriever/retriever_grpc.pb.go b/api/grpc/retriever/retriever_grpc.pb.go index be1556599b..15cc173cf5 100644 --- a/api/grpc/retriever/retriever_grpc.pb.go +++ b/api/grpc/retriever/retriever_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc v3.12.4 // source: retriever/retriever.proto @@ -18,6 +18,10 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Retriever_RetrieveBlob_FullMethodName = "/retriever.Retriever/RetrieveBlob" +) + // RetrieverClient is the client API for Retriever 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. @@ -37,7 +41,7 @@ func NewRetrieverClient(cc grpc.ClientConnInterface) RetrieverClient { func (c *retrieverClient) RetrieveBlob(ctx context.Context, in *BlobRequest, opts ...grpc.CallOption) (*BlobReply, error) { out := new(BlobReply) - err := c.cc.Invoke(ctx, "/retriever.Retriever/RetrieveBlob", in, out, opts...) + err := c.cc.Invoke(ctx, Retriever_RetrieveBlob_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -84,7 +88,7 @@ func _Retriever_RetrieveBlob_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/retriever.Retriever/RetrieveBlob", + FullMethod: Retriever_RetrieveBlob_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RetrieverServer).RetrieveBlob(ctx, req.(*BlobRequest)) From a35af35de07221d8325efbf005e4400be1b9f01c Mon Sep 17 00:00:00 2001 From: Jian Xiao Date: Thu, 11 Jul 2024 19:33:18 +0000 Subject: [PATCH 7/7] protoc 4.23.4 --- api/grpc/churner/churner.pb.go | 2 +- api/grpc/churner/churner_grpc.pb.go | 2 +- api/grpc/common/common.pb.go | 2 +- api/grpc/disperser/disperser.pb.go | 2 +- api/grpc/disperser/disperser_grpc.pb.go | 2 +- api/grpc/node/node.pb.go | 2 +- api/grpc/node/node_grpc.pb.go | 2 +- api/grpc/retriever/retriever.pb.go | 2 +- api/grpc/retriever/retriever_grpc.pb.go | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api/grpc/churner/churner.pb.go b/api/grpc/churner/churner.pb.go index 3546c2d443..3cf597b918 100644 --- a/api/grpc/churner/churner.pb.go +++ b/api/grpc/churner/churner.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.12.4 +// protoc v4.23.4 // source: churner/churner.proto package churner diff --git a/api/grpc/churner/churner_grpc.pb.go b/api/grpc/churner/churner_grpc.pb.go index 17aaa48ff9..9958c263ca 100644 --- a/api/grpc/churner/churner_grpc.pb.go +++ b/api/grpc/churner/churner_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v3.12.4 +// - protoc v4.23.4 // source: churner/churner.proto package churner diff --git a/api/grpc/common/common.pb.go b/api/grpc/common/common.pb.go index c1829695bf..ce3f5be228 100644 --- a/api/grpc/common/common.pb.go +++ b/api/grpc/common/common.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.12.4 +// protoc v4.23.4 // source: common/common.proto package common diff --git a/api/grpc/disperser/disperser.pb.go b/api/grpc/disperser/disperser.pb.go index 02a33e8286..39b7f0a62c 100644 --- a/api/grpc/disperser/disperser.pb.go +++ b/api/grpc/disperser/disperser.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.12.4 +// protoc v4.23.4 // source: disperser/disperser.proto package disperser diff --git a/api/grpc/disperser/disperser_grpc.pb.go b/api/grpc/disperser/disperser_grpc.pb.go index 440f0d15f7..14f8e9f93a 100644 --- a/api/grpc/disperser/disperser_grpc.pb.go +++ b/api/grpc/disperser/disperser_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v3.12.4 +// - protoc v4.23.4 // source: disperser/disperser.proto package disperser diff --git a/api/grpc/node/node.pb.go b/api/grpc/node/node.pb.go index 93375de2e7..06c625e61d 100644 --- a/api/grpc/node/node.pb.go +++ b/api/grpc/node/node.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.12.4 +// protoc v4.23.4 // source: node/node.proto package node diff --git a/api/grpc/node/node_grpc.pb.go b/api/grpc/node/node_grpc.pb.go index dc70a61a92..456dc6218e 100644 --- a/api/grpc/node/node_grpc.pb.go +++ b/api/grpc/node/node_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v3.12.4 +// - protoc v4.23.4 // source: node/node.proto package node diff --git a/api/grpc/retriever/retriever.pb.go b/api/grpc/retriever/retriever.pb.go index cef5a3c26d..f8aeac8536 100644 --- a/api/grpc/retriever/retriever.pb.go +++ b/api/grpc/retriever/retriever.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.12.4 +// protoc v4.23.4 // source: retriever/retriever.proto package retriever diff --git a/api/grpc/retriever/retriever_grpc.pb.go b/api/grpc/retriever/retriever_grpc.pb.go index 15cc173cf5..ffd67f16f8 100644 --- a/api/grpc/retriever/retriever_grpc.pb.go +++ b/api/grpc/retriever/retriever_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v3.12.4 +// - protoc v4.23.4 // source: retriever/retriever.proto package retriever