From 660f0f1e10c360821e35dae2657ca61092949f50 Mon Sep 17 00:00:00 2001 From: Jian Xiao <99709935+jianoaix@users.noreply.github.com> Date: Thu, 11 Jul 2024 12:39:26 -0700 Subject: [PATCH] =?UTF-8?q?[3/N]=20Chunk=20encoding=20optimization:=20Add?= =?UTF-8?q?=20support=20of=20new=20encoding=20format=E2=80=A6=20(#628)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/grpc/node/node.pb.go | 230 +++++++++++++++++++++++----------- api/grpc/node/node_grpc.pb.go | 2 +- api/proto/node/node.proto | 9 ++ 3 files changed, 165 insertions(+), 76 deletions(-) diff --git a/api/grpc/node/node.pb.go b/api/grpc/node/node.pb.go index 4ce01f3a08..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 v5.26.1 +// protoc v4.23.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..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 v5.26.1 +// - protoc v4.23.4 // source: node/node.proto package node diff --git a/api/proto/node/node.proto b/api/proto/node/node.proto index 1e99dfa2db..65128bb0ff 100644 --- a/api/proto/node/node.proto +++ b/api/proto/node/node.proto @@ -58,6 +58,13 @@ 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. + enum ChunkEncoding { + UNKNOWN = 0; + GNARK = 1; + GOB = 2; + } + ChunkEncoding encoding = 2; } @@ -109,6 +116,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 a byte array. + bytes bundle = 2; } message G2Commitment {