diff --git a/api/builder/protoc.sh b/api/builder/protoc.sh index e49592bf4..f5d23c9df 100755 --- a/api/builder/protoc.sh +++ b/api/builder/protoc.sh @@ -12,12 +12,14 @@ PROTO_DIR="${API_DIR}/proto" GRPC_DIR="${API_DIR}/grpc" mkdir -p "${GRPC_DIR}" +PROTO_FILES=( $(find "${PROTO_DIR}" -name '*.proto') ) + protoc -I "${PROTO_DIR}" \ --go_out="${GRPC_DIR}" \ --go_opt=paths=source_relative \ --go-grpc_out="${GRPC_DIR}" \ --go-grpc_opt=paths=source_relative \ - "${PROTO_DIR}"/**/*.proto + ${PROTO_FILES[@]} # Build protobufs in the disperser/api/proto directory. @@ -26,9 +28,11 @@ DISPERSER_PROTO_DIR="$DISPERSER_DIR/api/proto" DISPERSER_GRPC_DIR="$DISPERSER_DIR/api/grpc" mkdir -p "${DISPERSER_GRPC_DIR}" +DISPERSER_PROTO_FILES=( $(find "${DISPERSER_PROTO_DIR}" -name '*.proto') ) + protoc -I "${DISPERSER_PROTO_DIR}" -I "${PROTO_DIR}" \ --go_out="${DISPERSER_GRPC_DIR}" \ --go_opt=paths=source_relative \ --go-grpc_out="${DISPERSER_GRPC_DIR}" \ --go-grpc_opt=paths=source_relative \ - "${DISPERSER_PROTO_DIR}"/**/*.proto + ${DISPERSER_PROTO_FILES[@]} diff --git a/api/grpc/common/common.pb.go b/api/grpc/common/common.pb.go index 0bc1aa56f..b852bb100 100644 --- a/api/grpc/common/common.pb.go +++ b/api/grpc/common/common.pb.go @@ -77,6 +77,234 @@ func (x *G1Commitment) GetY() []byte { return nil } +type G2Commitment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The A0 element of the X coordinate of G2 point. + XA0 []byte `protobuf:"bytes,1,opt,name=x_a0,json=xA0,proto3" json:"x_a0,omitempty"` + // The A1 element of the X coordinate of G2 point. + XA1 []byte `protobuf:"bytes,2,opt,name=x_a1,json=xA1,proto3" json:"x_a1,omitempty"` + // The A0 element of the Y coordinate of G2 point. + YA0 []byte `protobuf:"bytes,3,opt,name=y_a0,json=yA0,proto3" json:"y_a0,omitempty"` + // The A1 element of the Y coordinate of G2 point. + YA1 []byte `protobuf:"bytes,4,opt,name=y_a1,json=yA1,proto3" json:"y_a1,omitempty"` +} + +func (x *G2Commitment) Reset() { + *x = G2Commitment{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *G2Commitment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*G2Commitment) ProtoMessage() {} + +func (x *G2Commitment) ProtoReflect() protoreflect.Message { + mi := &file_common_common_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use G2Commitment.ProtoReflect.Descriptor instead. +func (*G2Commitment) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{1} +} + +func (x *G2Commitment) GetXA0() []byte { + if x != nil { + return x.XA0 + } + return nil +} + +func (x *G2Commitment) GetXA1() []byte { + if x != nil { + return x.XA1 + } + return nil +} + +func (x *G2Commitment) GetYA0() []byte { + if x != nil { + return x.YA0 + } + return nil +} + +func (x *G2Commitment) GetYA1() []byte { + if x != nil { + return x.YA1 + } + return nil +} + +// BlobCommitment represents commitment of a specific blob, containing its +// KZG commitment, degree proof, the actual degree, and data length in number of symbols. +type BlobCommitment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Commitment *G1Commitment `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"` + LengthCommitment *G2Commitment `protobuf:"bytes,2,opt,name=length_commitment,json=lengthCommitment,proto3" json:"length_commitment,omitempty"` + LengthProof *G2Commitment `protobuf:"bytes,3,opt,name=length_proof,json=lengthProof,proto3" json:"length_proof,omitempty"` + DataLength uint32 `protobuf:"varint,4,opt,name=data_length,json=dataLength,proto3" json:"data_length,omitempty"` +} + +func (x *BlobCommitment) Reset() { + *x = BlobCommitment{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlobCommitment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlobCommitment) ProtoMessage() {} + +func (x *BlobCommitment) ProtoReflect() protoreflect.Message { + mi := &file_common_common_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlobCommitment.ProtoReflect.Descriptor instead. +func (*BlobCommitment) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{2} +} + +func (x *BlobCommitment) GetCommitment() *G1Commitment { + if x != nil { + return x.Commitment + } + return nil +} + +func (x *BlobCommitment) GetLengthCommitment() *G2Commitment { + if x != nil { + return x.LengthCommitment + } + return nil +} + +func (x *BlobCommitment) GetLengthProof() *G2Commitment { + if x != nil { + return x.LengthProof + } + return nil +} + +func (x *BlobCommitment) GetDataLength() uint32 { + if x != nil { + return x.DataLength + } + return 0 +} + +// BlobCertificate is what gets attested by the network +type BlobCertificate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + BlobKey []byte `protobuf:"bytes,2,opt,name=blob_key,json=blobKey,proto3" json:"blob_key,omitempty"` + BlobCommitment *BlobCommitment `protobuf:"bytes,3,opt,name=blob_commitment,json=blobCommitment,proto3" json:"blob_commitment,omitempty"` + QuorumNumbers []uint32 `protobuf:"varint,4,rep,packed,name=quorum_numbers,json=quorumNumbers,proto3" json:"quorum_numbers,omitempty"` + ReferenceBlockNumber uint32 `protobuf:"varint,5,opt,name=reference_block_number,json=referenceBlockNumber,proto3" json:"reference_block_number,omitempty"` +} + +func (x *BlobCertificate) Reset() { + *x = BlobCertificate{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlobCertificate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlobCertificate) ProtoMessage() {} + +func (x *BlobCertificate) ProtoReflect() protoreflect.Message { + mi := &file_common_common_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlobCertificate.ProtoReflect.Descriptor instead. +func (*BlobCertificate) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{3} +} + +func (x *BlobCertificate) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *BlobCertificate) GetBlobKey() []byte { + if x != nil { + return x.BlobKey + } + return nil +} + +func (x *BlobCertificate) GetBlobCommitment() *BlobCommitment { + if x != nil { + return x.BlobCommitment + } + return nil +} + +func (x *BlobCertificate) GetQuorumNumbers() []uint32 { + if x != nil { + return x.QuorumNumbers + } + return nil +} + +func (x *BlobCertificate) GetReferenceBlockNumber() uint32 { + if x != nil { + return x.ReferenceBlockNumber + } + return 0 +} + // A chunk of a blob. type ChunkData struct { state protoimpl.MessageState @@ -89,7 +317,7 @@ type ChunkData struct { func (x *ChunkData) Reset() { *x = ChunkData{} if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[1] + mi := &file_common_common_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -102,7 +330,7 @@ func (x *ChunkData) String() string { func (*ChunkData) ProtoMessage() {} func (x *ChunkData) ProtoReflect() protoreflect.Message { - mi := &file_common_common_proto_msgTypes[1] + mi := &file_common_common_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115,7 +343,7 @@ func (x *ChunkData) ProtoReflect() protoreflect.Message { // Deprecated: Use ChunkData.ProtoReflect.Descriptor instead. func (*ChunkData) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{1} + return file_common_common_proto_rawDescGZIP(), []int{4} } func (x *ChunkData) GetData() []byte { @@ -132,13 +360,47 @@ var file_common_common_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x2a, 0x0a, 0x0c, 0x47, 0x31, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x01, 0x79, 0x22, 0x1f, 0x0a, 0x09, 0x43, 0x68, 0x75, - 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x61, 0x79, 0x72, 0x2d, 0x4c, 0x61, - 0x62, 0x73, 0x2f, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x64, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, - 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x01, 0x79, 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, 0x04, 0x79, 0x5f, 0x61, 0x30, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x79, + 0x41, 0x30, 0x12, 0x11, 0x0a, 0x04, 0x79, 0x5f, 0x61, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x03, 0x79, 0x41, 0x31, 0x22, 0xe3, 0x01, 0x0a, 0x0e, 0x42, 0x6c, 0x6f, 0x62, 0x43, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x31, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, + 0x0a, 0x11, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x47, 0x32, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x10, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x37, 0x0a, 0x0c, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x6f, 0x6f, + 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x47, 0x32, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x61, + 0x74, 0x61, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0a, 0x64, 0x61, 0x74, 0x61, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe4, 0x01, 0x0a, 0x0f, + 0x42, 0x6c, 0x6f, 0x62, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, + 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x62, 0x6c, 0x6f, + 0x62, 0x4b, 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x43, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x62, 0x43, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0d, 0x71, + 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a, 0x16, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x14, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x22, 0x1f, 0x0a, 0x09, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x4c, 0x61, 0x79, 0x72, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x69, 0x67, 0x65, + 0x6e, 0x64, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -153,17 +415,24 @@ func file_common_common_proto_rawDescGZIP() []byte { return file_common_common_proto_rawDescData } -var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_common_common_proto_goTypes = []interface{}{ - (*G1Commitment)(nil), // 0: common.G1Commitment - (*ChunkData)(nil), // 1: common.ChunkData + (*G1Commitment)(nil), // 0: common.G1Commitment + (*G2Commitment)(nil), // 1: common.G2Commitment + (*BlobCommitment)(nil), // 2: common.BlobCommitment + (*BlobCertificate)(nil), // 3: common.BlobCertificate + (*ChunkData)(nil), // 4: common.ChunkData } var file_common_common_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 0, // 0: common.BlobCommitment.commitment:type_name -> common.G1Commitment + 1, // 1: common.BlobCommitment.length_commitment:type_name -> common.G2Commitment + 1, // 2: common.BlobCommitment.length_proof:type_name -> common.G2Commitment + 2, // 3: common.BlobCertificate.blob_commitment:type_name -> common.BlobCommitment + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_common_common_proto_init() } @@ -185,6 +454,42 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*G2Commitment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlobCommitment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlobCertificate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ChunkData); i { case 0: return &v.state @@ -203,7 +508,7 @@ func file_common_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_common_common_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/api/grpc/disperser/disperser.pb.go b/api/grpc/disperser/disperser.pb.go index 0737f0e46..39b7f0a62 100644 --- a/api/grpc/disperser/disperser.pb.go +++ b/api/grpc/disperser/disperser.pb.go @@ -1182,113 +1182,6 @@ func (x *BatchHeader) GetReferenceBlockNumber() uint32 { return 0 } -// Request a specific chunk -type GetChunkRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The hash of the blob's header. - BlobHeaderHash []byte `protobuf:"bytes,1,opt,name=blob_header_hash,json=blobHeaderHash,proto3" json:"blob_header_hash,omitempty"` - // The index of the chunk within the blob. - ChunkIndex uint32 `protobuf:"varint,2,opt,name=chunk_index,json=chunkIndex,proto3" json:"chunk_index,omitempty"` -} - -func (x *GetChunkRequest) Reset() { - *x = GetChunkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_disperser_disperser_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetChunkRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetChunkRequest) ProtoMessage() {} - -func (x *GetChunkRequest) ProtoReflect() protoreflect.Message { - mi := &file_disperser_disperser_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetChunkRequest.ProtoReflect.Descriptor instead. -func (*GetChunkRequest) Descriptor() ([]byte, []int) { - return file_disperser_disperser_proto_rawDescGZIP(), []int{16} -} - -func (x *GetChunkRequest) GetBlobHeaderHash() []byte { - if x != nil { - return x.BlobHeaderHash - } - return nil -} - -func (x *GetChunkRequest) GetChunkIndex() uint32 { - if x != nil { - return x.ChunkIndex - } - return 0 -} - -// Reply to GetChunkRequest -type GetChunkReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The chunk requested. - Chunk *common.ChunkData `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` -} - -func (x *GetChunkReply) Reset() { - *x = GetChunkReply{} - if protoimpl.UnsafeEnabled { - mi := &file_disperser_disperser_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetChunkReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetChunkReply) ProtoMessage() {} - -func (x *GetChunkReply) ProtoReflect() protoreflect.Message { - mi := &file_disperser_disperser_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetChunkReply.ProtoReflect.Descriptor instead. -func (*GetChunkReply) Descriptor() ([]byte, []int) { - return file_disperser_disperser_proto_rawDescGZIP(), []int{17} -} - -func (x *GetChunkReply) GetChunk() *common.ChunkData { - if x != nil { - return x.Chunk - } - return nil -} - var File_disperser_disperser_proto protoreflect.FileDescriptor var file_disperser_disperser_proto_rawDesc = []byte{ @@ -1438,54 +1331,41 @@ var file_disperser_disperser_proto_rawDesc = []byte{ 0x65, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x14, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x5c, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, - 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x62, - 0x6c, 0x6f, 0x62, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x63, 0x68, 0x75, 0x6e, - 0x6b, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x38, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, - 0x6e, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x27, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, - 0x2a, 0x80, 0x01, 0x0a, 0x0a, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, - 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, - 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, - 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x49, 0x4e, 0x41, 0x4c, - 0x49, 0x5a, 0x45, 0x44, 0x10, 0x04, 0x12, 0x1b, 0x0a, 0x17, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, - 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x54, 0x55, 0x52, 0x45, - 0x53, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x49, 0x53, 0x50, 0x45, 0x52, 0x53, 0x49, 0x4e, - 0x47, 0x10, 0x06, 0x32, 0x9d, 0x03, 0x0a, 0x09, 0x44, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, - 0x72, 0x12, 0x4e, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, - 0x62, 0x12, 0x1e, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x69, - 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x69, - 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, - 0x00, 0x12, 0x5f, 0x0a, 0x19, 0x44, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, - 0x62, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1f, - 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, - 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x75, 0x74, 0x68, - 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x28, 0x01, - 0x30, 0x01, 0x12, 0x4b, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x1c, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, - 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1a, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x42, 0x6c, - 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, - 0x4e, 0x0a, 0x0c, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x12, - 0x1e, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x74, 0x72, - 0x69, 0x65, 0x76, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1c, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x74, 0x72, - 0x69, 0x65, 0x76, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, - 0x42, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x1a, 0x2e, 0x64, 0x69, - 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, - 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x22, 0x00, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x4c, 0x61, 0x79, 0x72, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x69, 0x67, 0x65, - 0x6e, 0x64, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x64, 0x69, 0x73, - 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2a, 0x80, 0x01, 0x0a, 0x0a, 0x42, 0x6c, 0x6f, + 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x49, + 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, + 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, + 0x0d, 0x0a, 0x09, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x04, 0x12, 0x1b, + 0x0a, 0x17, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x53, + 0x49, 0x47, 0x4e, 0x41, 0x54, 0x55, 0x52, 0x45, 0x53, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x44, + 0x49, 0x53, 0x50, 0x45, 0x52, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x32, 0xd9, 0x02, 0x0a, 0x09, + 0x44, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x0c, 0x44, 0x69, 0x73, + 0x70, 0x65, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x1e, 0x2e, 0x64, 0x69, 0x73, 0x70, + 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x42, 0x6c, + 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x73, 0x70, + 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x42, 0x6c, + 0x6f, 0x62, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x19, 0x44, 0x69, 0x73, + 0x70, 0x65, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1f, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, + 0x65, 0x72, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, + 0x73, 0x65, 0x72, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x28, 0x01, 0x30, 0x01, 0x12, 0x4b, 0x0a, 0x0d, 0x47, 0x65, + 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x2e, 0x64, 0x69, + 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x64, 0x69, 0x73, 0x70, + 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0c, 0x52, 0x65, 0x74, 0x72, 0x69, + 0x65, 0x76, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x1e, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, + 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x42, 0x6c, 0x6f, 0x62, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, + 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x42, 0x6c, 0x6f, 0x62, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x61, 0x79, 0x72, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, + 0x65, 0x69, 0x67, 0x65, 0x6e, 0x64, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, + 0x2f, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -1501,7 +1381,7 @@ func file_disperser_disperser_proto_rawDescGZIP() []byte { } var file_disperser_disperser_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_disperser_disperser_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_disperser_disperser_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_disperser_disperser_proto_goTypes = []interface{}{ (BlobStatus)(0), // 0: disperser.BlobStatus (*AuthenticatedRequest)(nil), // 1: disperser.AuthenticatedRequest @@ -1520,10 +1400,7 @@ var file_disperser_disperser_proto_goTypes = []interface{}{ (*BlobVerificationProof)(nil), // 14: disperser.BlobVerificationProof (*BatchMetadata)(nil), // 15: disperser.BatchMetadata (*BatchHeader)(nil), // 16: disperser.BatchHeader - (*GetChunkRequest)(nil), // 17: disperser.GetChunkRequest - (*GetChunkReply)(nil), // 18: disperser.GetChunkReply - (*common.G1Commitment)(nil), // 19: common.G1Commitment - (*common.ChunkData)(nil), // 20: common.ChunkData + (*common.G1Commitment)(nil), // 17: common.G1Commitment } var file_disperser_disperser_proto_depIdxs = []int32{ 5, // 0: disperser.AuthenticatedRequest.disperse_request:type_name -> disperser.DisperseBlobRequest @@ -1535,26 +1412,23 @@ var file_disperser_disperser_proto_depIdxs = []int32{ 11, // 6: disperser.BlobStatusReply.info:type_name -> disperser.BlobInfo 12, // 7: disperser.BlobInfo.blob_header:type_name -> disperser.BlobHeader 14, // 8: disperser.BlobInfo.blob_verification_proof:type_name -> disperser.BlobVerificationProof - 19, // 9: disperser.BlobHeader.commitment:type_name -> common.G1Commitment + 17, // 9: disperser.BlobHeader.commitment:type_name -> common.G1Commitment 13, // 10: disperser.BlobHeader.blob_quorum_params:type_name -> disperser.BlobQuorumParam 15, // 11: disperser.BlobVerificationProof.batch_metadata:type_name -> disperser.BatchMetadata 16, // 12: disperser.BatchMetadata.batch_header:type_name -> disperser.BatchHeader - 20, // 13: disperser.GetChunkReply.chunk:type_name -> common.ChunkData - 5, // 14: disperser.Disperser.DisperseBlob:input_type -> disperser.DisperseBlobRequest - 1, // 15: disperser.Disperser.DisperseBlobAuthenticated:input_type -> disperser.AuthenticatedRequest - 7, // 16: disperser.Disperser.GetBlobStatus:input_type -> disperser.BlobStatusRequest - 9, // 17: disperser.Disperser.RetrieveBlob:input_type -> disperser.RetrieveBlobRequest - 17, // 18: disperser.Disperser.GetChunk:input_type -> disperser.GetChunkRequest - 6, // 19: disperser.Disperser.DisperseBlob:output_type -> disperser.DisperseBlobReply - 2, // 20: disperser.Disperser.DisperseBlobAuthenticated:output_type -> disperser.AuthenticatedReply - 8, // 21: disperser.Disperser.GetBlobStatus:output_type -> disperser.BlobStatusReply - 10, // 22: disperser.Disperser.RetrieveBlob:output_type -> disperser.RetrieveBlobReply - 18, // 23: disperser.Disperser.GetChunk:output_type -> disperser.GetChunkReply - 19, // [19:24] is the sub-list for method output_type - 14, // [14:19] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 5, // 13: disperser.Disperser.DisperseBlob:input_type -> disperser.DisperseBlobRequest + 1, // 14: disperser.Disperser.DisperseBlobAuthenticated:input_type -> disperser.AuthenticatedRequest + 7, // 15: disperser.Disperser.GetBlobStatus:input_type -> disperser.BlobStatusRequest + 9, // 16: disperser.Disperser.RetrieveBlob:input_type -> disperser.RetrieveBlobRequest + 6, // 17: disperser.Disperser.DisperseBlob:output_type -> disperser.DisperseBlobReply + 2, // 18: disperser.Disperser.DisperseBlobAuthenticated:output_type -> disperser.AuthenticatedReply + 8, // 19: disperser.Disperser.GetBlobStatus:output_type -> disperser.BlobStatusReply + 10, // 20: disperser.Disperser.RetrieveBlob:output_type -> disperser.RetrieveBlobReply + 17, // [17:21] is the sub-list for method output_type + 13, // [13:17] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_disperser_disperser_proto_init() } @@ -1755,30 +1629,6 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetChunkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_disperser_disperser_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetChunkReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } file_disperser_disperser_proto_msgTypes[0].OneofWrappers = []interface{}{ (*AuthenticatedRequest_DisperseRequest)(nil), @@ -1794,7 +1644,7 @@ func file_disperser_disperser_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_disperser_disperser_proto_rawDesc, NumEnums: 1, - NumMessages: 18, + NumMessages: 16, NumExtensions: 0, NumServices: 1, }, diff --git a/api/grpc/disperser/disperser_grpc.pb.go b/api/grpc/disperser/disperser_grpc.pb.go index d76bd1638..14f8e9f93 100644 --- a/api/grpc/disperser/disperser_grpc.pb.go +++ b/api/grpc/disperser/disperser_grpc.pb.go @@ -23,7 +23,6 @@ const ( Disperser_DisperseBlobAuthenticated_FullMethodName = "/disperser.Disperser/DisperseBlobAuthenticated" Disperser_GetBlobStatus_FullMethodName = "/disperser.Disperser/GetBlobStatus" Disperser_RetrieveBlob_FullMethodName = "/disperser.Disperser/RetrieveBlob" - Disperser_GetChunk_FullMethodName = "/disperser.Disperser/GetChunk" ) // DisperserClient is the client API for Disperser service. @@ -53,8 +52,6 @@ type DisperserClient interface { // The blob should have been initially dispersed via this Disperser service // for this API to work. RetrieveBlob(ctx context.Context, in *RetrieveBlobRequest, opts ...grpc.CallOption) (*RetrieveBlobReply, error) - // Retrieves the requested chunk from the Disperser's backend. - GetChunk(ctx context.Context, in *GetChunkRequest, opts ...grpc.CallOption) (*GetChunkReply, error) } type disperserClient struct { @@ -123,15 +120,6 @@ func (c *disperserClient) RetrieveBlob(ctx context.Context, in *RetrieveBlobRequ return out, nil } -func (c *disperserClient) GetChunk(ctx context.Context, in *GetChunkRequest, opts ...grpc.CallOption) (*GetChunkReply, error) { - out := new(GetChunkReply) - err := c.cc.Invoke(ctx, Disperser_GetChunk_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // DisperserServer is the server API for Disperser service. // All implementations must embed UnimplementedDisperserServer // for forward compatibility @@ -159,8 +147,6 @@ type DisperserServer interface { // The blob should have been initially dispersed via this Disperser service // for this API to work. RetrieveBlob(context.Context, *RetrieveBlobRequest) (*RetrieveBlobReply, error) - // Retrieves the requested chunk from the Disperser's backend. - GetChunk(context.Context, *GetChunkRequest) (*GetChunkReply, error) mustEmbedUnimplementedDisperserServer() } @@ -180,9 +166,6 @@ func (UnimplementedDisperserServer) GetBlobStatus(context.Context, *BlobStatusRe func (UnimplementedDisperserServer) RetrieveBlob(context.Context, *RetrieveBlobRequest) (*RetrieveBlobReply, error) { return nil, status.Errorf(codes.Unimplemented, "method RetrieveBlob not implemented") } -func (UnimplementedDisperserServer) GetChunk(context.Context, *GetChunkRequest) (*GetChunkReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") -} func (UnimplementedDisperserServer) mustEmbedUnimplementedDisperserServer() {} // UnsafeDisperserServer may be embedded to opt out of forward compatibility for this service. @@ -276,24 +259,6 @@ func _Disperser_RetrieveBlob_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } -func _Disperser_GetChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetChunkRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DisperserServer).GetChunk(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Disperser_GetChunk_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DisperserServer).GetChunk(ctx, req.(*GetChunkRequest)) - } - return interceptor(ctx, in, info, handler) -} - // Disperser_ServiceDesc is the grpc.ServiceDesc for Disperser service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -313,10 +278,6 @@ var Disperser_ServiceDesc = grpc.ServiceDesc{ MethodName: "RetrieveBlob", Handler: _Disperser_RetrieveBlob_Handler, }, - { - MethodName: "GetChunk", - Handler: _Disperser_GetChunk_Handler, - }, }, Streams: []grpc.StreamDesc{ { diff --git a/api/grpc/disperser/v2/disperser_v2.pb.go b/api/grpc/disperser/v2/disperser_v2.pb.go new file mode 100644 index 000000000..0aab38f4d --- /dev/null +++ b/api/grpc/disperser/v2/disperser_v2.pb.go @@ -0,0 +1,1060 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v4.23.4 +// source: disperser/v2/disperser_v2.proto + +package v2 + +import ( + common "github.com/Layr-Labs/eigenda/api/grpc/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// BlobStatus represents the status of a blob. +// The status of a blob is updated as the blob is processed by the disperser. +// The status of a blob can be queried by the client using the GetBlobStatus API. +// Intermediate states are states that the blob can be in while being processed, and it can be updated to a differet state: +// - QUEUED +// - ENCODED +// Terminal states are states that will not be updated to a different state: +// - CERTIFIED +// - FAILED +// - INSUFFICIENT_SIGNATURES +type BlobStatus int32 + +const ( + BlobStatus_UNKNOWN BlobStatus = 0 + // QUEUED means that the blob has been queued by the disperser for processing + BlobStatus_QUEUED BlobStatus = 1 + // ENCODED means that the blob has been encoded and is ready to be dispersed to DA Nodes + BlobStatus_ENCODED BlobStatus = 2 + // CERTIFIED means the blob has been dispersed and attested by the DA nodes + BlobStatus_CERTIFIED BlobStatus = 3 + // FAILED means that the blob has failed permanently (for reasons other than insufficient + // signatures, which is a separate state) + BlobStatus_FAILED BlobStatus = 4 + // INSUFFICIENT_SIGNATURES means that the confirmation threshold for the blob was not met + // for at least one quorum. + BlobStatus_INSUFFICIENT_SIGNATURES BlobStatus = 5 +) + +// Enum value maps for BlobStatus. +var ( + BlobStatus_name = map[int32]string{ + 0: "UNKNOWN", + 1: "QUEUED", + 2: "ENCODED", + 3: "CERTIFIED", + 4: "FAILED", + 5: "INSUFFICIENT_SIGNATURES", + } + BlobStatus_value = map[string]int32{ + "UNKNOWN": 0, + "QUEUED": 1, + "ENCODED": 2, + "CERTIFIED": 3, + "FAILED": 4, + "INSUFFICIENT_SIGNATURES": 5, + } +) + +func (x BlobStatus) Enum() *BlobStatus { + p := new(BlobStatus) + *p = x + return p +} + +func (x BlobStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BlobStatus) Descriptor() protoreflect.EnumDescriptor { + return file_disperser_v2_disperser_v2_proto_enumTypes[0].Descriptor() +} + +func (BlobStatus) Type() protoreflect.EnumType { + return &file_disperser_v2_disperser_v2_proto_enumTypes[0] +} + +func (x BlobStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BlobStatus.Descriptor instead. +func (BlobStatus) EnumDescriptor() ([]byte, []int) { + return file_disperser_v2_disperser_v2_proto_rawDescGZIP(), []int{0} +} + +type DisperseBlobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The data to be dispersed. + // The size of data must be <= 2MiB. Every 32 bytes of data chunk is interpreted as an integer in big endian format + // where the lower address has more significant bits. The integer must stay in the valid range to be interpreted + // as a field element on the bn254 curve. The valid range is + // 0 <= x < 21888242871839275222246405745257275088548364400416034343698204186575808495617 + // containing slightly less than 254 bits and more than 253 bits. If any one of the 32 bytes chunk is outside the range, + // the whole request is deemed as invalid, and rejected. + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + BlobHeader *BlobHeader `protobuf:"bytes,2,opt,name=blob_header,json=blobHeader,proto3" json:"blob_header,omitempty"` + // signature over keccak hash of the blob_header that can be verified by blob_header.account_id + AuthenticationData []byte `protobuf:"bytes,3,opt,name=authentication_data,json=authenticationData,proto3" json:"authentication_data,omitempty"` +} + +func (x *DisperseBlobRequest) Reset() { + *x = DisperseBlobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DisperseBlobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DisperseBlobRequest) ProtoMessage() {} + +func (x *DisperseBlobRequest) ProtoReflect() protoreflect.Message { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DisperseBlobRequest.ProtoReflect.Descriptor instead. +func (*DisperseBlobRequest) Descriptor() ([]byte, []int) { + return file_disperser_v2_disperser_v2_proto_rawDescGZIP(), []int{0} +} + +func (x *DisperseBlobRequest) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *DisperseBlobRequest) GetBlobHeader() *BlobHeader { + if x != nil { + return x.BlobHeader + } + return nil +} + +func (x *DisperseBlobRequest) GetAuthenticationData() []byte { + if x != nil { + return x.AuthenticationData + } + return nil +} + +type DisperseBlobReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The status of the blob associated with the blob key. + Result BlobStatus `protobuf:"varint,1,opt,name=result,proto3,enum=disperser.v2.BlobStatus" json:"result,omitempty"` + BlobKey []byte `protobuf:"bytes,2,opt,name=blob_key,json=blobKey,proto3" json:"blob_key,omitempty"` +} + +func (x *DisperseBlobReply) Reset() { + *x = DisperseBlobReply{} + if protoimpl.UnsafeEnabled { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DisperseBlobReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DisperseBlobReply) ProtoMessage() {} + +func (x *DisperseBlobReply) ProtoReflect() protoreflect.Message { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DisperseBlobReply.ProtoReflect.Descriptor instead. +func (*DisperseBlobReply) Descriptor() ([]byte, []int) { + return file_disperser_v2_disperser_v2_proto_rawDescGZIP(), []int{1} +} + +func (x *DisperseBlobReply) GetResult() BlobStatus { + if x != nil { + return x.Result + } + return BlobStatus_UNKNOWN +} + +func (x *DisperseBlobReply) GetBlobKey() []byte { + if x != nil { + return x.BlobKey + } + return nil +} + +// BlobStatusRequest is used to query the status of a blob. +type BlobStatusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlobKey []byte `protobuf:"bytes,1,opt,name=blob_key,json=blobKey,proto3" json:"blob_key,omitempty"` +} + +func (x *BlobStatusRequest) Reset() { + *x = BlobStatusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlobStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlobStatusRequest) ProtoMessage() {} + +func (x *BlobStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlobStatusRequest.ProtoReflect.Descriptor instead. +func (*BlobStatusRequest) Descriptor() ([]byte, []int) { + return file_disperser_v2_disperser_v2_proto_rawDescGZIP(), []int{2} +} + +func (x *BlobStatusRequest) GetBlobKey() []byte { + if x != nil { + return x.BlobKey + } + return nil +} + +type BlobStatusReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The status of the blob. + Status BlobStatus `protobuf:"varint,1,opt,name=status,proto3,enum=disperser.v2.BlobStatus" json:"status,omitempty"` + // The signed blob certificate + SignedCertificate *SignedCertificate `protobuf:"bytes,2,opt,name=signed_certificate,json=signedCertificate,proto3" json:"signed_certificate,omitempty"` +} + +func (x *BlobStatusReply) Reset() { + *x = BlobStatusReply{} + if protoimpl.UnsafeEnabled { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlobStatusReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlobStatusReply) ProtoMessage() {} + +func (x *BlobStatusReply) ProtoReflect() protoreflect.Message { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlobStatusReply.ProtoReflect.Descriptor instead. +func (*BlobStatusReply) Descriptor() ([]byte, []int) { + return file_disperser_v2_disperser_v2_proto_rawDescGZIP(), []int{3} +} + +func (x *BlobStatusReply) GetStatus() BlobStatus { + if x != nil { + return x.Status + } + return BlobStatus_UNKNOWN +} + +func (x *BlobStatusReply) GetSignedCertificate() *SignedCertificate { + if x != nil { + return x.SignedCertificate + } + return nil +} + +// Utility method used to generate the commitment of blob given its data. +// This can be used to construct BlobHeader.commitment +type BlobCommitmentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *BlobCommitmentRequest) Reset() { + *x = BlobCommitmentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlobCommitmentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlobCommitmentRequest) ProtoMessage() {} + +func (x *BlobCommitmentRequest) ProtoReflect() protoreflect.Message { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlobCommitmentRequest.ProtoReflect.Descriptor instead. +func (*BlobCommitmentRequest) Descriptor() ([]byte, []int) { + return file_disperser_v2_disperser_v2_proto_rawDescGZIP(), []int{4} +} + +func (x *BlobCommitmentRequest) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +type BlobCommitmentReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlobCommitment *common.BlobCommitment `protobuf:"bytes,1,opt,name=blob_commitment,json=blobCommitment,proto3" json:"blob_commitment,omitempty"` +} + +func (x *BlobCommitmentReply) Reset() { + *x = BlobCommitmentReply{} + if protoimpl.UnsafeEnabled { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlobCommitmentReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlobCommitmentReply) ProtoMessage() {} + +func (x *BlobCommitmentReply) ProtoReflect() protoreflect.Message { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlobCommitmentReply.ProtoReflect.Descriptor instead. +func (*BlobCommitmentReply) Descriptor() ([]byte, []int) { + return file_disperser_v2_disperser_v2_proto_rawDescGZIP(), []int{5} +} + +func (x *BlobCommitmentReply) GetBlobCommitment() *common.BlobCommitment { + if x != nil { + return x.BlobCommitment + } + return nil +} + +type BlobHeader struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + QuorumNumbers []uint32 `protobuf:"varint,1,rep,packed,name=quorum_numbers,json=quorumNumbers,proto3" json:"quorum_numbers,omitempty"` + // API version used to disperse the blob + Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + BinIndex uint32 `protobuf:"varint,3,opt,name=bin_index,json=binIndex,proto3" json:"bin_index,omitempty"` + CumulativePayment uint64 `protobuf:"varint,4,opt,name=cumulative_payment,json=cumulativePayment,proto3" json:"cumulative_payment,omitempty"` + // Ethereum Account Address in Hex string "0x..." + AccountId string `protobuf:"bytes,5,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + Commitment *common.G1Commitment `protobuf:"bytes,6,opt,name=commitment,proto3" json:"commitment,omitempty"` +} + +func (x *BlobHeader) Reset() { + *x = BlobHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlobHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlobHeader) ProtoMessage() {} + +func (x *BlobHeader) ProtoReflect() protoreflect.Message { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlobHeader.ProtoReflect.Descriptor instead. +func (*BlobHeader) Descriptor() ([]byte, []int) { + return file_disperser_v2_disperser_v2_proto_rawDescGZIP(), []int{6} +} + +func (x *BlobHeader) GetQuorumNumbers() []uint32 { + if x != nil { + return x.QuorumNumbers + } + return nil +} + +func (x *BlobHeader) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *BlobHeader) GetBinIndex() uint32 { + if x != nil { + return x.BinIndex + } + return 0 +} + +func (x *BlobHeader) GetCumulativePayment() uint64 { + if x != nil { + return x.CumulativePayment + } + return 0 +} + +func (x *BlobHeader) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *BlobHeader) GetCommitment() *common.G1Commitment { + if x != nil { + return x.Commitment + } + return nil +} + +type SignedCertificate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlobCertificate *common.BlobCertificate `protobuf:"bytes,1,opt,name=blob_certificate,json=blobCertificate,proto3" json:"blob_certificate,omitempty"` + NonSignerStakesAndSignature *Attestation `protobuf:"bytes,2,opt,name=non_signer_stakes_and_signature,json=nonSignerStakesAndSignature,proto3" json:"non_signer_stakes_and_signature,omitempty"` +} + +func (x *SignedCertificate) Reset() { + *x = SignedCertificate{} + if protoimpl.UnsafeEnabled { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignedCertificate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignedCertificate) ProtoMessage() {} + +func (x *SignedCertificate) ProtoReflect() protoreflect.Message { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignedCertificate.ProtoReflect.Descriptor instead. +func (*SignedCertificate) Descriptor() ([]byte, []int) { + return file_disperser_v2_disperser_v2_proto_rawDescGZIP(), []int{7} +} + +func (x *SignedCertificate) GetBlobCertificate() *common.BlobCertificate { + if x != nil { + return x.BlobCertificate + } + return nil +} + +func (x *SignedCertificate) GetNonSignerStakesAndSignature() *Attestation { + if x != nil { + return x.NonSignerStakesAndSignature + } + return nil +} + +type Attestation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NonSignerQuorumBitmapIndices []uint32 `protobuf:"varint,1,rep,packed,name=nonSignerQuorumBitmapIndices,proto3" json:"nonSignerQuorumBitmapIndices,omitempty"` + NonSignerPubkeys []*common.G1Commitment `protobuf:"bytes,2,rep,name=nonSignerPubkeys,proto3" json:"nonSignerPubkeys,omitempty"` + QuorumApks []*common.G1Commitment `protobuf:"bytes,3,rep,name=quorumApks,proto3" json:"quorumApks,omitempty"` + ApkG2 *common.G2Commitment `protobuf:"bytes,4,opt,name=apkG2,proto3" json:"apkG2,omitempty"` + Sigma *common.G1Commitment `protobuf:"bytes,5,opt,name=sigma,proto3" json:"sigma,omitempty"` + QuorumApkIndices []uint32 `protobuf:"varint,6,rep,packed,name=quorumApkIndices,proto3" json:"quorumApkIndices,omitempty"` + TotalStakeIndices []uint32 `protobuf:"varint,7,rep,packed,name=totalStakeIndices,proto3" json:"totalStakeIndices,omitempty"` + NonSignerStakeIndices []*NonSignerStakeIndicesForQuorum `protobuf:"bytes,8,rep,name=nonSignerStakeIndices,proto3" json:"nonSignerStakeIndices,omitempty"` +} + +func (x *Attestation) Reset() { + *x = Attestation{} + if protoimpl.UnsafeEnabled { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Attestation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Attestation) ProtoMessage() {} + +func (x *Attestation) ProtoReflect() protoreflect.Message { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Attestation.ProtoReflect.Descriptor instead. +func (*Attestation) Descriptor() ([]byte, []int) { + return file_disperser_v2_disperser_v2_proto_rawDescGZIP(), []int{8} +} + +func (x *Attestation) GetNonSignerQuorumBitmapIndices() []uint32 { + if x != nil { + return x.NonSignerQuorumBitmapIndices + } + return nil +} + +func (x *Attestation) GetNonSignerPubkeys() []*common.G1Commitment { + if x != nil { + return x.NonSignerPubkeys + } + return nil +} + +func (x *Attestation) GetQuorumApks() []*common.G1Commitment { + if x != nil { + return x.QuorumApks + } + return nil +} + +func (x *Attestation) GetApkG2() *common.G2Commitment { + if x != nil { + return x.ApkG2 + } + return nil +} + +func (x *Attestation) GetSigma() *common.G1Commitment { + if x != nil { + return x.Sigma + } + return nil +} + +func (x *Attestation) GetQuorumApkIndices() []uint32 { + if x != nil { + return x.QuorumApkIndices + } + return nil +} + +func (x *Attestation) GetTotalStakeIndices() []uint32 { + if x != nil { + return x.TotalStakeIndices + } + return nil +} + +func (x *Attestation) GetNonSignerStakeIndices() []*NonSignerStakeIndicesForQuorum { + if x != nil { + return x.NonSignerStakeIndices + } + return nil +} + +type NonSignerStakeIndicesForQuorum struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Indices []uint32 `protobuf:"varint,1,rep,packed,name=indices,proto3" json:"indices,omitempty"` +} + +func (x *NonSignerStakeIndicesForQuorum) Reset() { + *x = NonSignerStakeIndicesForQuorum{} + if protoimpl.UnsafeEnabled { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NonSignerStakeIndicesForQuorum) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NonSignerStakeIndicesForQuorum) ProtoMessage() {} + +func (x *NonSignerStakeIndicesForQuorum) ProtoReflect() protoreflect.Message { + mi := &file_disperser_v2_disperser_v2_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NonSignerStakeIndicesForQuorum.ProtoReflect.Descriptor instead. +func (*NonSignerStakeIndicesForQuorum) Descriptor() ([]byte, []int) { + return file_disperser_v2_disperser_v2_proto_rawDescGZIP(), []int{9} +} + +func (x *NonSignerStakeIndicesForQuorum) GetIndices() []uint32 { + if x != nil { + return x.Indices + } + return nil +} + +var File_disperser_v2_disperser_v2_proto protoreflect.FileDescriptor + +var file_disperser_v2_disperser_v2_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x64, + 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x5f, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x1a, + 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x01, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, + 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x39, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, + 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x13, 0x61, + 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x60, 0x0a, 0x11, + 0x44, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x12, 0x30, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x18, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x22, 0x2e, + 0x0a, 0x11, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x22, 0x93, + 0x01, 0x0a, 0x0f, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x4e, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x63, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x52, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x22, 0x2b, 0x0a, 0x15, 0x42, 0x6c, 0x6f, 0x62, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x22, 0x56, 0x0a, 0x13, 0x42, 0x6c, 0x6f, 0x62, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x3f, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x62, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x62, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xee, 0x01, 0x0a, 0x0a, 0x42, 0x6c, + 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x71, 0x75, 0x6f, 0x72, + 0x75, 0x6d, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, + 0x52, 0x0d, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x69, 0x6e, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x62, 0x69, + 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x11, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x61, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x47, 0x31, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xb8, 0x01, 0x0a, 0x11, 0x53, + 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x12, 0x42, 0x0a, 0x10, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x52, 0x0f, 0x62, 0x6c, 0x6f, 0x62, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x12, 0x5f, 0x0a, 0x1f, 0x6e, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1b, 0x6e, 0x6f, 0x6e, 0x53, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x73, 0x41, 0x6e, 0x64, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xdf, 0x03, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x1c, 0x6e, 0x6f, 0x6e, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x42, 0x69, 0x74, 0x6d, 0x61, 0x70, 0x49, 0x6e, + 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x1c, 0x6e, 0x6f, 0x6e, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x42, 0x69, 0x74, 0x6d, + 0x61, 0x70, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x10, 0x6e, 0x6f, 0x6e, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x31, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x10, 0x6e, 0x6f, 0x6e, 0x53, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x34, 0x0a, 0x0a, 0x71, + 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x41, 0x70, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x31, 0x43, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x41, 0x70, 0x6b, + 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x61, 0x70, 0x6b, 0x47, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x32, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x61, 0x70, 0x6b, 0x47, 0x32, 0x12, 0x2a, 0x0a, + 0x05, 0x73, 0x69, 0x67, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x31, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x05, 0x73, 0x69, 0x67, 0x6d, 0x61, 0x12, 0x2a, 0x0a, 0x10, 0x71, 0x75, 0x6f, + 0x72, 0x75, 0x6d, 0x41, 0x70, 0x6b, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x0d, 0x52, 0x10, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x41, 0x70, 0x6b, 0x49, 0x6e, + 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, + 0x61, 0x6b, 0x65, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0d, + 0x52, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x49, 0x6e, 0x64, 0x69, + 0x63, 0x65, 0x73, 0x12, 0x62, 0x0a, 0x15, 0x6e, 0x6f, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x6b, 0x65, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x4e, 0x6f, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x6b, 0x65, + 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x46, 0x6f, 0x72, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, + 0x52, 0x15, 0x6e, 0x6f, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x6b, 0x65, + 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0x3a, 0x0a, 0x1e, 0x4e, 0x6f, 0x6e, 0x53, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, + 0x46, 0x6f, 0x72, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x64, + 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x69, + 0x63, 0x65, 0x73, 0x2a, 0x6a, 0x0a, 0x0a, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, + 0x0a, 0x06, 0x51, 0x55, 0x45, 0x55, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, + 0x43, 0x4f, 0x44, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x45, 0x52, 0x54, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, + 0x10, 0x04, 0x12, 0x1b, 0x0a, 0x17, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, + 0x4e, 0x54, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x54, 0x55, 0x52, 0x45, 0x53, 0x10, 0x05, 0x32, + 0x93, 0x02, 0x0a, 0x09, 0x44, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x12, 0x54, 0x0a, + 0x0c, 0x44, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x21, 0x2e, + 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, + 0x70, 0x65, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x44, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, + 0x62, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x2e, 0x64, 0x69, + 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x42, 0x6c, 0x6f, 0x62, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x61, 0x79, 0x72, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x69, + 0x67, 0x65, 0x6e, 0x64, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x64, + 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_disperser_v2_disperser_v2_proto_rawDescOnce sync.Once + file_disperser_v2_disperser_v2_proto_rawDescData = file_disperser_v2_disperser_v2_proto_rawDesc +) + +func file_disperser_v2_disperser_v2_proto_rawDescGZIP() []byte { + file_disperser_v2_disperser_v2_proto_rawDescOnce.Do(func() { + file_disperser_v2_disperser_v2_proto_rawDescData = protoimpl.X.CompressGZIP(file_disperser_v2_disperser_v2_proto_rawDescData) + }) + return file_disperser_v2_disperser_v2_proto_rawDescData +} + +var file_disperser_v2_disperser_v2_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_disperser_v2_disperser_v2_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_disperser_v2_disperser_v2_proto_goTypes = []interface{}{ + (BlobStatus)(0), // 0: disperser.v2.BlobStatus + (*DisperseBlobRequest)(nil), // 1: disperser.v2.DisperseBlobRequest + (*DisperseBlobReply)(nil), // 2: disperser.v2.DisperseBlobReply + (*BlobStatusRequest)(nil), // 3: disperser.v2.BlobStatusRequest + (*BlobStatusReply)(nil), // 4: disperser.v2.BlobStatusReply + (*BlobCommitmentRequest)(nil), // 5: disperser.v2.BlobCommitmentRequest + (*BlobCommitmentReply)(nil), // 6: disperser.v2.BlobCommitmentReply + (*BlobHeader)(nil), // 7: disperser.v2.BlobHeader + (*SignedCertificate)(nil), // 8: disperser.v2.SignedCertificate + (*Attestation)(nil), // 9: disperser.v2.Attestation + (*NonSignerStakeIndicesForQuorum)(nil), // 10: disperser.v2.NonSignerStakeIndicesForQuorum + (*common.BlobCommitment)(nil), // 11: common.BlobCommitment + (*common.G1Commitment)(nil), // 12: common.G1Commitment + (*common.BlobCertificate)(nil), // 13: common.BlobCertificate + (*common.G2Commitment)(nil), // 14: common.G2Commitment +} +var file_disperser_v2_disperser_v2_proto_depIdxs = []int32{ + 7, // 0: disperser.v2.DisperseBlobRequest.blob_header:type_name -> disperser.v2.BlobHeader + 0, // 1: disperser.v2.DisperseBlobReply.result:type_name -> disperser.v2.BlobStatus + 0, // 2: disperser.v2.BlobStatusReply.status:type_name -> disperser.v2.BlobStatus + 8, // 3: disperser.v2.BlobStatusReply.signed_certificate:type_name -> disperser.v2.SignedCertificate + 11, // 4: disperser.v2.BlobCommitmentReply.blob_commitment:type_name -> common.BlobCommitment + 12, // 5: disperser.v2.BlobHeader.commitment:type_name -> common.G1Commitment + 13, // 6: disperser.v2.SignedCertificate.blob_certificate:type_name -> common.BlobCertificate + 9, // 7: disperser.v2.SignedCertificate.non_signer_stakes_and_signature:type_name -> disperser.v2.Attestation + 12, // 8: disperser.v2.Attestation.nonSignerPubkeys:type_name -> common.G1Commitment + 12, // 9: disperser.v2.Attestation.quorumApks:type_name -> common.G1Commitment + 14, // 10: disperser.v2.Attestation.apkG2:type_name -> common.G2Commitment + 12, // 11: disperser.v2.Attestation.sigma:type_name -> common.G1Commitment + 10, // 12: disperser.v2.Attestation.nonSignerStakeIndices:type_name -> disperser.v2.NonSignerStakeIndicesForQuorum + 1, // 13: disperser.v2.Disperser.DisperseBlob:input_type -> disperser.v2.DisperseBlobRequest + 3, // 14: disperser.v2.Disperser.GetBlobStatus:input_type -> disperser.v2.BlobStatusRequest + 5, // 15: disperser.v2.Disperser.GetBlobCommitment:input_type -> disperser.v2.BlobCommitmentRequest + 2, // 16: disperser.v2.Disperser.DisperseBlob:output_type -> disperser.v2.DisperseBlobReply + 4, // 17: disperser.v2.Disperser.GetBlobStatus:output_type -> disperser.v2.BlobStatusReply + 6, // 18: disperser.v2.Disperser.GetBlobCommitment:output_type -> disperser.v2.BlobCommitmentReply + 16, // [16:19] is the sub-list for method output_type + 13, // [13:16] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_disperser_v2_disperser_v2_proto_init() } +func file_disperser_v2_disperser_v2_proto_init() { + if File_disperser_v2_disperser_v2_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_disperser_v2_disperser_v2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DisperseBlobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_disperser_v2_disperser_v2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DisperseBlobReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_disperser_v2_disperser_v2_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlobStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_disperser_v2_disperser_v2_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlobStatusReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_disperser_v2_disperser_v2_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlobCommitmentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_disperser_v2_disperser_v2_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlobCommitmentReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_disperser_v2_disperser_v2_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlobHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_disperser_v2_disperser_v2_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignedCertificate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_disperser_v2_disperser_v2_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Attestation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_disperser_v2_disperser_v2_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NonSignerStakeIndicesForQuorum); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_disperser_v2_disperser_v2_proto_rawDesc, + NumEnums: 1, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_disperser_v2_disperser_v2_proto_goTypes, + DependencyIndexes: file_disperser_v2_disperser_v2_proto_depIdxs, + EnumInfos: file_disperser_v2_disperser_v2_proto_enumTypes, + MessageInfos: file_disperser_v2_disperser_v2_proto_msgTypes, + }.Build() + File_disperser_v2_disperser_v2_proto = out.File + file_disperser_v2_disperser_v2_proto_rawDesc = nil + file_disperser_v2_disperser_v2_proto_goTypes = nil + file_disperser_v2_disperser_v2_proto_depIdxs = nil +} diff --git a/api/grpc/disperser/v2/disperser_v2_grpc.pb.go b/api/grpc/disperser/v2/disperser_v2_grpc.pb.go new file mode 100644 index 000000000..d84637329 --- /dev/null +++ b/api/grpc/disperser/v2/disperser_v2_grpc.pb.go @@ -0,0 +1,195 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.23.4 +// source: disperser/v2/disperser_v2.proto + +package v2 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Disperser_DisperseBlob_FullMethodName = "/disperser.v2.Disperser/DisperseBlob" + Disperser_GetBlobStatus_FullMethodName = "/disperser.v2.Disperser/GetBlobStatus" + Disperser_GetBlobCommitment_FullMethodName = "/disperser.v2.Disperser/GetBlobCommitment" +) + +// 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. +type DisperserClient interface { + // DisperseBlob accepts blob to disperse from clients. + // This executes the dispersal asynchronously, i.e. it returns once the request + // is accepted. The client could use GetBlobStatus() API to poll the the + // processing status of the blob. + DisperseBlob(ctx context.Context, in *DisperseBlobRequest, opts ...grpc.CallOption) (*DisperseBlobReply, error) + // GetBlobStatus is meant to be polled for the blob status. + GetBlobStatus(ctx context.Context, in *BlobStatusRequest, opts ...grpc.CallOption) (*BlobStatusReply, error) + // GetBlobCommitment is a utility method that calculates commitment for a blob payload. + GetBlobCommitment(ctx context.Context, in *BlobCommitmentRequest, opts ...grpc.CallOption) (*BlobCommitmentReply, error) +} + +type disperserClient struct { + cc grpc.ClientConnInterface +} + +func NewDisperserClient(cc grpc.ClientConnInterface) DisperserClient { + return &disperserClient{cc} +} + +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...) + if err != nil { + return nil, err + } + return out, nil +} + +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...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *disperserClient) GetBlobCommitment(ctx context.Context, in *BlobCommitmentRequest, opts ...grpc.CallOption) (*BlobCommitmentReply, error) { + out := new(BlobCommitmentReply) + err := c.cc.Invoke(ctx, Disperser_GetBlobCommitment_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DisperserServer is the server API for Disperser service. +// All implementations must embed UnimplementedDisperserServer +// for forward compatibility +type DisperserServer interface { + // DisperseBlob accepts blob to disperse from clients. + // This executes the dispersal asynchronously, i.e. it returns once the request + // is accepted. The client could use GetBlobStatus() API to poll the the + // processing status of the blob. + DisperseBlob(context.Context, *DisperseBlobRequest) (*DisperseBlobReply, error) + // GetBlobStatus is meant to be polled for the blob status. + GetBlobStatus(context.Context, *BlobStatusRequest) (*BlobStatusReply, error) + // GetBlobCommitment is a utility method that calculates commitment for a blob payload. + GetBlobCommitment(context.Context, *BlobCommitmentRequest) (*BlobCommitmentReply, error) + mustEmbedUnimplementedDisperserServer() +} + +// UnimplementedDisperserServer must be embedded to have forward compatible implementations. +type UnimplementedDisperserServer struct { +} + +func (UnimplementedDisperserServer) DisperseBlob(context.Context, *DisperseBlobRequest) (*DisperseBlobReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method DisperseBlob not implemented") +} +func (UnimplementedDisperserServer) GetBlobStatus(context.Context, *BlobStatusRequest) (*BlobStatusReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlobStatus not implemented") +} +func (UnimplementedDisperserServer) GetBlobCommitment(context.Context, *BlobCommitmentRequest) (*BlobCommitmentReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlobCommitment not implemented") +} +func (UnimplementedDisperserServer) mustEmbedUnimplementedDisperserServer() {} + +// UnsafeDisperserServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DisperserServer will +// result in compilation errors. +type UnsafeDisperserServer interface { + mustEmbedUnimplementedDisperserServer() +} + +func RegisterDisperserServer(s grpc.ServiceRegistrar, srv DisperserServer) { + s.RegisterService(&Disperser_ServiceDesc, srv) +} + +func _Disperser_DisperseBlob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DisperseBlobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DisperserServer).DisperseBlob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Disperser_DisperseBlob_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DisperserServer).DisperseBlob(ctx, req.(*DisperseBlobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Disperser_GetBlobStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BlobStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DisperserServer).GetBlobStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Disperser_GetBlobStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DisperserServer).GetBlobStatus(ctx, req.(*BlobStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Disperser_GetBlobCommitment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BlobCommitmentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DisperserServer).GetBlobCommitment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Disperser_GetBlobCommitment_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DisperserServer).GetBlobCommitment(ctx, req.(*BlobCommitmentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Disperser_ServiceDesc is the grpc.ServiceDesc for Disperser service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Disperser_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "disperser.v2.Disperser", + HandlerType: (*DisperserServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "DisperseBlob", + Handler: _Disperser_DisperseBlob_Handler, + }, + { + MethodName: "GetBlobStatus", + Handler: _Disperser_GetBlobStatus_Handler, + }, + { + MethodName: "GetBlobCommitment", + Handler: _Disperser_GetBlobCommitment_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "disperser/v2/disperser_v2.proto", +} diff --git a/api/grpc/lightnode/lightnode.pb.go b/api/grpc/lightnode/lightnode.pb.go index f820a8916..ff5bf0974 100644 --- a/api/grpc/lightnode/lightnode.pb.go +++ b/api/grpc/lightnode/lightnode.pb.go @@ -7,7 +7,6 @@ package lightnode import ( - _ "github.com/Layr-Labs/eigenda/api/grpc/common" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -125,29 +124,28 @@ var File_lightnode_lightnode_proto protoreflect.FileDescriptor var file_lightnode_lightnode_proto_rawDesc = []byte{ 0x0a, 0x19, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6c, 0x69, 0x67, - 0x68, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x53, 0x0a, 0x1e, 0x53, + 0x68, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0x53, 0x0a, 0x1e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x14, 0x61, 0x75, 0x74, 0x68, + 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x3f, 0x0a, 0x1c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, - 0x14, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x61, 0x75, 0x74, - 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x22, 0x3f, 0x0a, 0x1c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x41, - 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, - 0x68, 0x32, 0x7d, 0x0a, 0x09, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x70, - 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x62, 0x41, 0x76, 0x61, 0x69, - 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x29, 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x68, 0x75, 0x6e, 0x6b, - 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x32, 0x7d, 0x0a, 0x09, + 0x4c, 0x69, 0x67, 0x68, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x70, 0x0a, 0x16, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x62, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x12, 0x29, 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x41, 0x76, 0x61, 0x69, 0x6c, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x30, 0x01, - 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, - 0x61, 0x79, 0x72, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x64, 0x61, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, - 0x6f, 0x64, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, + 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x30, 0x01, 0x42, 0x31, 0x5a, 0x2f, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x61, 0x79, 0x72, 0x2d, 0x4c, + 0x61, 0x62, 0x73, 0x2f, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x64, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x67, 0x72, 0x70, 0x63, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/grpc/node/node.pb.go b/api/grpc/node/node.pb.go index d76528437..b81c23ed2 100644 --- a/api/grpc/node/node.pb.go +++ b/api/grpc/node/node.pb.go @@ -1262,105 +1262,6 @@ func (x *NodeInfoReply) GetMemBytes() uint64 { return 0 } -// Request that all new blob headers be sent. -type StreamBlobHeadersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *StreamBlobHeadersRequest) Reset() { - *x = StreamBlobHeadersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_node_node_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamBlobHeadersRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamBlobHeadersRequest) ProtoMessage() {} - -func (x *StreamBlobHeadersRequest) ProtoReflect() protoreflect.Message { - mi := &file_node_node_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamBlobHeadersRequest.ProtoReflect.Descriptor instead. -func (*StreamBlobHeadersRequest) Descriptor() ([]byte, []int) { - return file_node_node_proto_rawDescGZIP(), []int{19} -} - -// Reply to StreamHeadersRequest -type StreamHeadersReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The header of the blob - BlobHeader *BlobHeader `protobuf:"bytes,1,opt,name=blob_header,json=blobHeader,proto3" json:"blob_header,omitempty"` - // Merkle proof that returned blob header belongs to the batch and is - // the batch's MerkleProof.index-th blob. - // This can be checked against the batch root on chain. - Proof *MerkleProof `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` -} - -func (x *StreamHeadersReply) Reset() { - *x = StreamHeadersReply{} - if protoimpl.UnsafeEnabled { - mi := &file_node_node_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamHeadersReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamHeadersReply) ProtoMessage() {} - -func (x *StreamHeadersReply) ProtoReflect() protoreflect.Message { - mi := &file_node_node_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamHeadersReply.ProtoReflect.Descriptor instead. -func (*StreamHeadersReply) Descriptor() ([]byte, []int) { - return file_node_node_proto_rawDescGZIP(), []int{20} -} - -func (x *StreamHeadersReply) GetBlobHeader() *BlobHeader { - if x != nil { - return x.BlobHeader - } - return nil -} - -func (x *StreamHeadersReply) GetProof() *MerkleProof { - if x != nil { - return x.Proof - } - return nil -} - var File_node_node_proto protoreflect.FileDescriptor var file_node_node_proto_rawDesc = []byte{ @@ -1502,59 +1403,45 @@ var file_node_node_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x6f, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x70, 0x75, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x43, 0x70, 0x75, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x65, 0x6d, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x1a, - 0x0a, 0x18, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x70, 0x0a, 0x12, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 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, 0x2a, 0x36, 0x0a, 0x13, - 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 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, 0x32, 0x8b, 0x02, 0x0a, 0x09, 0x44, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, - 0x61, 0x6c, 0x12, 0x41, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x75, 0x6e, 0x6b, - 0x73, 0x12, 0x18, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x43, 0x68, - 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, - 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0a, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x42, 0x6c, - 0x6f, 0x62, 0x73, 0x12, 0x17, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, - 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, - 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x18, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x41, 0x74, 0x74, 0x65, - 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, - 0x68, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x15, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x22, 0x00, 0x32, 0xaf, 0x02, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x61, 0x6c, - 0x12, 0x4a, 0x0a, 0x0e, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x43, 0x68, 0x75, 0x6e, - 0x6b, 0x73, 0x12, 0x1b, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, - 0x76, 0x65, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x19, 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, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0d, - 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x2e, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, - 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x15, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, - 0x53, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, - 0x28, 0x01, 0x30, 0x01, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x4c, 0x61, 0x79, 0x72, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x69, 0x67, - 0x65, 0x6e, 0x64, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x6e, 0x6f, - 0x64, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x42, 0x79, 0x74, 0x65, 0x73, 0x2a, 0x36, + 0x0a, 0x13, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 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, 0x32, 0x8b, 0x02, 0x0a, 0x09, 0x44, 0x69, 0x73, 0x70, 0x65, + 0x72, 0x73, 0x61, 0x6c, 0x12, 0x41, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x75, + 0x6e, 0x6b, 0x73, 0x12, 0x18, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, + 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0a, 0x53, 0x74, 0x6f, 0x72, 0x65, + 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x12, 0x17, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x6f, + 0x72, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, + 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x73, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x18, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x41, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x08, 0x4e, 0x6f, + 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x15, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x4e, 0x6f, + 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x22, 0x00, 0x32, 0xda, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, + 0x61, 0x6c, 0x12, 0x4a, 0x0a, 0x0e, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x43, 0x68, + 0x75, 0x6e, 0x6b, 0x73, 0x12, 0x1b, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, + 0x69, 0x65, 0x76, 0x65, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x19, 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, 0x22, 0x00, 0x12, 0x47, + 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, + 0x1a, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x15, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, + 0x00, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x4c, 0x61, 0x79, 0x72, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x64, + 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1570,71 +1457,65 @@ func file_node_node_proto_rawDescGZIP() []byte { } var file_node_node_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_node_node_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_node_node_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_node_node_proto_goTypes = []interface{}{ - (ChunkEncodingFormat)(0), // 0: node.ChunkEncodingFormat - (*StoreChunksRequest)(nil), // 1: node.StoreChunksRequest - (*StoreChunksReply)(nil), // 2: node.StoreChunksReply - (*StoreBlobsRequest)(nil), // 3: node.StoreBlobsRequest - (*StoreBlobsReply)(nil), // 4: node.StoreBlobsReply - (*AttestBatchRequest)(nil), // 5: node.AttestBatchRequest - (*AttestBatchReply)(nil), // 6: node.AttestBatchReply - (*RetrieveChunksRequest)(nil), // 7: node.RetrieveChunksRequest - (*RetrieveChunksReply)(nil), // 8: node.RetrieveChunksReply - (*GetBlobHeaderRequest)(nil), // 9: node.GetBlobHeaderRequest - (*GetBlobHeaderReply)(nil), // 10: node.GetBlobHeaderReply - (*MerkleProof)(nil), // 11: node.MerkleProof - (*Blob)(nil), // 12: node.Blob - (*Bundle)(nil), // 13: node.Bundle - (*G2Commitment)(nil), // 14: node.G2Commitment - (*BlobHeader)(nil), // 15: node.BlobHeader - (*BlobQuorumInfo)(nil), // 16: node.BlobQuorumInfo - (*BatchHeader)(nil), // 17: node.BatchHeader - (*NodeInfoRequest)(nil), // 18: node.NodeInfoRequest - (*NodeInfoReply)(nil), // 19: node.NodeInfoReply - (*StreamBlobHeadersRequest)(nil), // 20: node.StreamBlobHeadersRequest - (*StreamHeadersReply)(nil), // 21: node.StreamHeadersReply - (*wrapperspb.BytesValue)(nil), // 22: google.protobuf.BytesValue - (*common.G1Commitment)(nil), // 23: common.G1Commitment + (ChunkEncodingFormat)(0), // 0: node.ChunkEncodingFormat + (*StoreChunksRequest)(nil), // 1: node.StoreChunksRequest + (*StoreChunksReply)(nil), // 2: node.StoreChunksReply + (*StoreBlobsRequest)(nil), // 3: node.StoreBlobsRequest + (*StoreBlobsReply)(nil), // 4: node.StoreBlobsReply + (*AttestBatchRequest)(nil), // 5: node.AttestBatchRequest + (*AttestBatchReply)(nil), // 6: node.AttestBatchReply + (*RetrieveChunksRequest)(nil), // 7: node.RetrieveChunksRequest + (*RetrieveChunksReply)(nil), // 8: node.RetrieveChunksReply + (*GetBlobHeaderRequest)(nil), // 9: node.GetBlobHeaderRequest + (*GetBlobHeaderReply)(nil), // 10: node.GetBlobHeaderReply + (*MerkleProof)(nil), // 11: node.MerkleProof + (*Blob)(nil), // 12: node.Blob + (*Bundle)(nil), // 13: node.Bundle + (*G2Commitment)(nil), // 14: node.G2Commitment + (*BlobHeader)(nil), // 15: node.BlobHeader + (*BlobQuorumInfo)(nil), // 16: node.BlobQuorumInfo + (*BatchHeader)(nil), // 17: node.BatchHeader + (*NodeInfoRequest)(nil), // 18: node.NodeInfoRequest + (*NodeInfoReply)(nil), // 19: node.NodeInfoReply + (*wrapperspb.BytesValue)(nil), // 20: google.protobuf.BytesValue + (*common.G1Commitment)(nil), // 21: common.G1Commitment } var file_node_node_proto_depIdxs = []int32{ 17, // 0: node.StoreChunksRequest.batch_header:type_name -> node.BatchHeader 12, // 1: node.StoreChunksRequest.blobs:type_name -> node.Blob 12, // 2: node.StoreBlobsRequest.blobs:type_name -> node.Blob - 22, // 3: node.StoreBlobsReply.signatures:type_name -> google.protobuf.BytesValue + 20, // 3: node.StoreBlobsReply.signatures:type_name -> google.protobuf.BytesValue 17, // 4: node.AttestBatchRequest.batch_header:type_name -> node.BatchHeader 0, // 5: node.RetrieveChunksReply.chunk_encoding_format:type_name -> node.ChunkEncodingFormat 15, // 6: node.GetBlobHeaderReply.blob_header:type_name -> node.BlobHeader 11, // 7: node.GetBlobHeaderReply.proof:type_name -> node.MerkleProof 15, // 8: node.Blob.header:type_name -> node.BlobHeader 13, // 9: node.Blob.bundles:type_name -> node.Bundle - 23, // 10: node.BlobHeader.commitment:type_name -> common.G1Commitment + 21, // 10: node.BlobHeader.commitment:type_name -> common.G1Commitment 14, // 11: node.BlobHeader.length_commitment:type_name -> node.G2Commitment 14, // 12: node.BlobHeader.length_proof:type_name -> node.G2Commitment 16, // 13: node.BlobHeader.quorum_headers:type_name -> node.BlobQuorumInfo - 15, // 14: node.StreamHeadersReply.blob_header:type_name -> node.BlobHeader - 11, // 15: node.StreamHeadersReply.proof:type_name -> node.MerkleProof - 1, // 16: node.Dispersal.StoreChunks:input_type -> node.StoreChunksRequest - 3, // 17: node.Dispersal.StoreBlobs:input_type -> node.StoreBlobsRequest - 5, // 18: node.Dispersal.AttestBatch:input_type -> node.AttestBatchRequest - 18, // 19: node.Dispersal.NodeInfo:input_type -> node.NodeInfoRequest - 7, // 20: node.Retrieval.RetrieveChunks:input_type -> node.RetrieveChunksRequest - 9, // 21: node.Retrieval.GetBlobHeader:input_type -> node.GetBlobHeaderRequest - 18, // 22: node.Retrieval.NodeInfo:input_type -> node.NodeInfoRequest - 20, // 23: node.Retrieval.StreamBlobHeaders:input_type -> node.StreamBlobHeadersRequest - 2, // 24: node.Dispersal.StoreChunks:output_type -> node.StoreChunksReply - 4, // 25: node.Dispersal.StoreBlobs:output_type -> node.StoreBlobsReply - 6, // 26: node.Dispersal.AttestBatch:output_type -> node.AttestBatchReply - 19, // 27: node.Dispersal.NodeInfo:output_type -> node.NodeInfoReply - 8, // 28: node.Retrieval.RetrieveChunks:output_type -> node.RetrieveChunksReply - 10, // 29: node.Retrieval.GetBlobHeader:output_type -> node.GetBlobHeaderReply - 19, // 30: node.Retrieval.NodeInfo:output_type -> node.NodeInfoReply - 21, // 31: node.Retrieval.StreamBlobHeaders:output_type -> node.StreamHeadersReply - 24, // [24:32] is the sub-list for method output_type - 16, // [16:24] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name + 1, // 14: node.Dispersal.StoreChunks:input_type -> node.StoreChunksRequest + 3, // 15: node.Dispersal.StoreBlobs:input_type -> node.StoreBlobsRequest + 5, // 16: node.Dispersal.AttestBatch:input_type -> node.AttestBatchRequest + 18, // 17: node.Dispersal.NodeInfo:input_type -> node.NodeInfoRequest + 7, // 18: node.Retrieval.RetrieveChunks:input_type -> node.RetrieveChunksRequest + 9, // 19: node.Retrieval.GetBlobHeader:input_type -> node.GetBlobHeaderRequest + 18, // 20: node.Retrieval.NodeInfo:input_type -> node.NodeInfoRequest + 2, // 21: node.Dispersal.StoreChunks:output_type -> node.StoreChunksReply + 4, // 22: node.Dispersal.StoreBlobs:output_type -> node.StoreBlobsReply + 6, // 23: node.Dispersal.AttestBatch:output_type -> node.AttestBatchReply + 19, // 24: node.Dispersal.NodeInfo:output_type -> node.NodeInfoReply + 8, // 25: node.Retrieval.RetrieveChunks:output_type -> node.RetrieveChunksReply + 10, // 26: node.Retrieval.GetBlobHeader:output_type -> node.GetBlobHeaderReply + 19, // 27: node.Retrieval.NodeInfo:output_type -> node.NodeInfoReply + 21, // [21:28] is the sub-list for method output_type + 14, // [14:21] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_node_node_proto_init() } @@ -1871,30 +1752,6 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamBlobHeadersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_node_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamHeadersReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1902,7 +1759,7 @@ func file_node_node_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_node_node_proto_rawDesc, NumEnums: 1, - NumMessages: 21, + NumMessages: 19, NumExtensions: 0, NumServices: 2, }, diff --git a/api/grpc/node/node_grpc.pb.go b/api/grpc/node/node_grpc.pb.go index a30bbbdef..28a516cec 100644 --- a/api/grpc/node/node_grpc.pb.go +++ b/api/grpc/node/node_grpc.pb.go @@ -244,10 +244,9 @@ var Dispersal_ServiceDesc = grpc.ServiceDesc{ } const ( - Retrieval_RetrieveChunks_FullMethodName = "/node.Retrieval/RetrieveChunks" - Retrieval_GetBlobHeader_FullMethodName = "/node.Retrieval/GetBlobHeader" - Retrieval_NodeInfo_FullMethodName = "/node.Retrieval/NodeInfo" - Retrieval_StreamBlobHeaders_FullMethodName = "/node.Retrieval/StreamBlobHeaders" + 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. @@ -260,8 +259,6 @@ type RetrievalClient interface { GetBlobHeader(ctx context.Context, in *GetBlobHeaderRequest, opts ...grpc.CallOption) (*GetBlobHeaderReply, error) // Retrieve node info metadata NodeInfo(ctx context.Context, in *NodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoReply, error) - // StreamHeaders requests a stream all new headers. - StreamBlobHeaders(ctx context.Context, opts ...grpc.CallOption) (Retrieval_StreamBlobHeadersClient, error) } type retrievalClient struct { @@ -299,37 +296,6 @@ func (c *retrievalClient) NodeInfo(ctx context.Context, in *NodeInfoRequest, opt return out, nil } -func (c *retrievalClient) StreamBlobHeaders(ctx context.Context, opts ...grpc.CallOption) (Retrieval_StreamBlobHeadersClient, error) { - stream, err := c.cc.NewStream(ctx, &Retrieval_ServiceDesc.Streams[0], Retrieval_StreamBlobHeaders_FullMethodName, opts...) - if err != nil { - return nil, err - } - x := &retrievalStreamBlobHeadersClient{stream} - return x, nil -} - -type Retrieval_StreamBlobHeadersClient interface { - Send(*StreamBlobHeadersRequest) error - Recv() (*StreamHeadersReply, error) - grpc.ClientStream -} - -type retrievalStreamBlobHeadersClient struct { - grpc.ClientStream -} - -func (x *retrievalStreamBlobHeadersClient) Send(m *StreamBlobHeadersRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *retrievalStreamBlobHeadersClient) Recv() (*StreamHeadersReply, error) { - m := new(StreamHeadersReply) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - // RetrievalServer is the server API for Retrieval service. // All implementations must embed UnimplementedRetrievalServer // for forward compatibility @@ -340,8 +306,6 @@ type RetrievalServer interface { GetBlobHeader(context.Context, *GetBlobHeaderRequest) (*GetBlobHeaderReply, error) // Retrieve node info metadata NodeInfo(context.Context, *NodeInfoRequest) (*NodeInfoReply, error) - // StreamHeaders requests a stream all new headers. - StreamBlobHeaders(Retrieval_StreamBlobHeadersServer) error mustEmbedUnimplementedRetrievalServer() } @@ -358,9 +322,6 @@ func (UnimplementedRetrievalServer) GetBlobHeader(context.Context, *GetBlobHeade func (UnimplementedRetrievalServer) NodeInfo(context.Context, *NodeInfoRequest) (*NodeInfoReply, error) { return nil, status.Errorf(codes.Unimplemented, "method NodeInfo not implemented") } -func (UnimplementedRetrievalServer) StreamBlobHeaders(Retrieval_StreamBlobHeadersServer) error { - return status.Errorf(codes.Unimplemented, "method StreamBlobHeaders not implemented") -} func (UnimplementedRetrievalServer) mustEmbedUnimplementedRetrievalServer() {} // UnsafeRetrievalServer may be embedded to opt out of forward compatibility for this service. @@ -428,32 +389,6 @@ func _Retrieval_NodeInfo_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -func _Retrieval_StreamBlobHeaders_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(RetrievalServer).StreamBlobHeaders(&retrievalStreamBlobHeadersServer{stream}) -} - -type Retrieval_StreamBlobHeadersServer interface { - Send(*StreamHeadersReply) error - Recv() (*StreamBlobHeadersRequest, error) - grpc.ServerStream -} - -type retrievalStreamBlobHeadersServer struct { - grpc.ServerStream -} - -func (x *retrievalStreamBlobHeadersServer) Send(m *StreamHeadersReply) error { - return x.ServerStream.SendMsg(m) -} - -func (x *retrievalStreamBlobHeadersServer) Recv() (*StreamBlobHeadersRequest, error) { - m := new(StreamBlobHeadersRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - // Retrieval_ServiceDesc is the grpc.ServiceDesc for Retrieval service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -474,13 +409,6 @@ var Retrieval_ServiceDesc = grpc.ServiceDesc{ Handler: _Retrieval_NodeInfo_Handler, }, }, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamBlobHeaders", - Handler: _Retrieval_StreamBlobHeaders_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, + Streams: []grpc.StreamDesc{}, Metadata: "node/node.proto", } diff --git a/api/grpc/node/v2/node_v2.pb.go b/api/grpc/node/v2/node_v2.pb.go new file mode 100644 index 000000000..e91f7672b --- /dev/null +++ b/api/grpc/node/v2/node_v2.pb.go @@ -0,0 +1,682 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v4.23.4 +// source: node/v2/node_v2.proto + +package v2 + +import ( + common "github.com/Layr-Labs/eigenda/api/grpc/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type StoreChunksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // list of blob certificates to process + BlobCertificates []*common.BlobCertificate `protobuf:"bytes,1,rep,name=blob_certificates,json=blobCertificates,proto3" json:"blob_certificates,omitempty"` +} + +func (x *StoreChunksRequest) Reset() { + *x = StoreChunksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_node_v2_node_v2_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StoreChunksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StoreChunksRequest) ProtoMessage() {} + +func (x *StoreChunksRequest) ProtoReflect() protoreflect.Message { + mi := &file_node_v2_node_v2_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StoreChunksRequest.ProtoReflect.Descriptor instead. +func (*StoreChunksRequest) Descriptor() ([]byte, []int) { + return file_node_v2_node_v2_proto_rawDescGZIP(), []int{0} +} + +func (x *StoreChunksRequest) GetBlobCertificates() []*common.BlobCertificate { + if x != nil { + return x.BlobCertificates + } + return nil +} + +type StoreChunksReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signatures []*wrapperspb.BytesValue `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` +} + +func (x *StoreChunksReply) Reset() { + *x = StoreChunksReply{} + if protoimpl.UnsafeEnabled { + mi := &file_node_v2_node_v2_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StoreChunksReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StoreChunksReply) ProtoMessage() {} + +func (x *StoreChunksReply) ProtoReflect() protoreflect.Message { + mi := &file_node_v2_node_v2_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StoreChunksReply.ProtoReflect.Descriptor instead. +func (*StoreChunksReply) Descriptor() ([]byte, []int) { + return file_node_v2_node_v2_proto_rawDescGZIP(), []int{1} +} + +func (x *StoreChunksReply) GetSignatures() []*wrapperspb.BytesValue { + if x != nil { + return x.Signatures + } + return nil +} + +type GetChunksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlobKey []byte `protobuf:"bytes,1,opt,name=blob_key,json=blobKey,proto3" json:"blob_key,omitempty"` + // Which quorum of the blob to retrieve for (note: a blob can have multiple + // quorums and the chunks for different quorums at a Node can be different). + // The ID must be in range [0, 254]. + QuorumId uint32 `protobuf:"varint,2,opt,name=quorum_id,json=quorumId,proto3" json:"quorum_id,omitempty"` +} + +func (x *GetChunksRequest) Reset() { + *x = GetChunksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_node_v2_node_v2_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetChunksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetChunksRequest) ProtoMessage() {} + +func (x *GetChunksRequest) ProtoReflect() protoreflect.Message { + mi := &file_node_v2_node_v2_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetChunksRequest.ProtoReflect.Descriptor instead. +func (*GetChunksRequest) Descriptor() ([]byte, []int) { + return file_node_v2_node_v2_proto_rawDescGZIP(), []int{2} +} + +func (x *GetChunksRequest) GetBlobKey() []byte { + if x != nil { + return x.BlobKey + } + return nil +} + +func (x *GetChunksRequest) GetQuorumId() uint32 { + if x != nil { + return x.QuorumId + } + return 0 +} + +type GetChunksReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + 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"` +} + +func (x *GetChunksReply) Reset() { + *x = GetChunksReply{} + if protoimpl.UnsafeEnabled { + mi := &file_node_v2_node_v2_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetChunksReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetChunksReply) ProtoMessage() {} + +func (x *GetChunksReply) ProtoReflect() protoreflect.Message { + mi := &file_node_v2_node_v2_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetChunksReply.ProtoReflect.Descriptor instead. +func (*GetChunksReply) Descriptor() ([]byte, []int) { + return file_node_v2_node_v2_proto_rawDescGZIP(), []int{3} +} + +func (x *GetChunksReply) GetChunks() [][]byte { + if x != nil { + return x.Chunks + } + return nil +} + +type GetBlobCertificateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlobKey []byte `protobuf:"bytes,1,opt,name=blob_key,json=blobKey,proto3" json:"blob_key,omitempty"` +} + +func (x *GetBlobCertificateRequest) Reset() { + *x = GetBlobCertificateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_node_v2_node_v2_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBlobCertificateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlobCertificateRequest) ProtoMessage() {} + +func (x *GetBlobCertificateRequest) ProtoReflect() protoreflect.Message { + mi := &file_node_v2_node_v2_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBlobCertificateRequest.ProtoReflect.Descriptor instead. +func (*GetBlobCertificateRequest) Descriptor() ([]byte, []int) { + return file_node_v2_node_v2_proto_rawDescGZIP(), []int{4} +} + +func (x *GetBlobCertificateRequest) GetBlobKey() []byte { + if x != nil { + return x.BlobKey + } + return nil +} + +type GetBlobCertificateReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlobCertificate *common.BlobCertificate `protobuf:"bytes,1,opt,name=blob_certificate,json=blobCertificate,proto3" json:"blob_certificate,omitempty"` +} + +func (x *GetBlobCertificateReply) Reset() { + *x = GetBlobCertificateReply{} + if protoimpl.UnsafeEnabled { + mi := &file_node_v2_node_v2_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBlobCertificateReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlobCertificateReply) ProtoMessage() {} + +func (x *GetBlobCertificateReply) ProtoReflect() protoreflect.Message { + mi := &file_node_v2_node_v2_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBlobCertificateReply.ProtoReflect.Descriptor instead. +func (*GetBlobCertificateReply) Descriptor() ([]byte, []int) { + return file_node_v2_node_v2_proto_rawDescGZIP(), []int{5} +} + +func (x *GetBlobCertificateReply) GetBlobCertificate() *common.BlobCertificate { + if x != nil { + return x.BlobCertificate + } + return nil +} + +// Node info request +type NodeInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *NodeInfoRequest) Reset() { + *x = NodeInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_node_v2_node_v2_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeInfoRequest) ProtoMessage() {} + +func (x *NodeInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_node_v2_node_v2_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeInfoRequest.ProtoReflect.Descriptor instead. +func (*NodeInfoRequest) Descriptor() ([]byte, []int) { + return file_node_v2_node_v2_proto_rawDescGZIP(), []int{6} +} + +// Node info reply +type NodeInfoReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Semver string `protobuf:"bytes,1,opt,name=semver,proto3" json:"semver,omitempty"` + Arch string `protobuf:"bytes,2,opt,name=arch,proto3" json:"arch,omitempty"` + Os string `protobuf:"bytes,3,opt,name=os,proto3" json:"os,omitempty"` + NumCpu uint32 `protobuf:"varint,4,opt,name=num_cpu,json=numCpu,proto3" json:"num_cpu,omitempty"` + MemBytes uint64 `protobuf:"varint,5,opt,name=mem_bytes,json=memBytes,proto3" json:"mem_bytes,omitempty"` +} + +func (x *NodeInfoReply) Reset() { + *x = NodeInfoReply{} + if protoimpl.UnsafeEnabled { + mi := &file_node_v2_node_v2_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeInfoReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeInfoReply) ProtoMessage() {} + +func (x *NodeInfoReply) ProtoReflect() protoreflect.Message { + mi := &file_node_v2_node_v2_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeInfoReply.ProtoReflect.Descriptor instead. +func (*NodeInfoReply) Descriptor() ([]byte, []int) { + return file_node_v2_node_v2_proto_rawDescGZIP(), []int{7} +} + +func (x *NodeInfoReply) GetSemver() string { + if x != nil { + return x.Semver + } + return "" +} + +func (x *NodeInfoReply) GetArch() string { + if x != nil { + return x.Arch + } + return "" +} + +func (x *NodeInfoReply) GetOs() string { + if x != nil { + return x.Os + } + return "" +} + +func (x *NodeInfoReply) GetNumCpu() uint32 { + if x != nil { + return x.NumCpu + } + return 0 +} + +func (x *NodeInfoReply) GetMemBytes() uint64 { + if x != nil { + return x.MemBytes + } + return 0 +} + +var File_node_v2_node_v2_proto protoreflect.FileDescriptor + +var file_node_v2_node_v2_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x76, + 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x32, + 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x43, 0x68, + 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x11, 0x62, + 0x6c, 0x6f, 0x62, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x42, 0x6c, 0x6f, 0x62, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, + 0x10, 0x62, 0x6c, 0x6f, 0x62, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x73, 0x22, 0x4f, 0x0a, 0x10, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x3b, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x22, 0x4a, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x65, + 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x49, 0x64, 0x22, 0x28, + 0x0a, 0x0e, 0x47, 0x65, 0x74, 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, 0x36, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x42, + 0x6c, 0x6f, 0x62, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, + 0x22, 0x5d, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x42, 0x0a, 0x10, 0x62, + 0x6c, 0x6f, 0x62, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, + 0x6c, 0x6f, 0x62, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x0f, + 0x62, 0x6c, 0x6f, 0x62, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, + 0x11, 0x0a, 0x0f, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x0d, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6d, 0x76, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6d, 0x76, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, + 0x61, 0x72, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x63, 0x68, + 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x6f, 0x73, + 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x70, 0x75, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x43, 0x70, 0x75, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x65, 0x6d, + 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x65, + 0x6d, 0x42, 0x79, 0x74, 0x65, 0x73, 0x32, 0x94, 0x01, 0x0a, 0x09, 0x44, 0x69, 0x73, 0x70, 0x65, + 0x72, 0x73, 0x61, 0x6c, 0x12, 0x47, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x75, + 0x6e, 0x6b, 0x73, 0x12, 0x1b, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, + 0x6f, 0x72, 0x65, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x19, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, + 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3e, 0x0a, + 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x6f, + 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0xec, 0x01, + 0x0a, 0x09, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x61, 0x6c, 0x12, 0x41, 0x0a, 0x09, 0x47, + 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, 0x19, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x5c, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, + 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x08, + 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x6f, 0x64, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x2f, 0x5a, 0x2d, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x61, 0x79, 0x72, 0x2d, + 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x64, 0x61, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_node_v2_node_v2_proto_rawDescOnce sync.Once + file_node_v2_node_v2_proto_rawDescData = file_node_v2_node_v2_proto_rawDesc +) + +func file_node_v2_node_v2_proto_rawDescGZIP() []byte { + file_node_v2_node_v2_proto_rawDescOnce.Do(func() { + file_node_v2_node_v2_proto_rawDescData = protoimpl.X.CompressGZIP(file_node_v2_node_v2_proto_rawDescData) + }) + return file_node_v2_node_v2_proto_rawDescData +} + +var file_node_v2_node_v2_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_node_v2_node_v2_proto_goTypes = []interface{}{ + (*StoreChunksRequest)(nil), // 0: node.v2.StoreChunksRequest + (*StoreChunksReply)(nil), // 1: node.v2.StoreChunksReply + (*GetChunksRequest)(nil), // 2: node.v2.GetChunksRequest + (*GetChunksReply)(nil), // 3: node.v2.GetChunksReply + (*GetBlobCertificateRequest)(nil), // 4: node.v2.GetBlobCertificateRequest + (*GetBlobCertificateReply)(nil), // 5: node.v2.GetBlobCertificateReply + (*NodeInfoRequest)(nil), // 6: node.v2.NodeInfoRequest + (*NodeInfoReply)(nil), // 7: node.v2.NodeInfoReply + (*common.BlobCertificate)(nil), // 8: common.BlobCertificate + (*wrapperspb.BytesValue)(nil), // 9: google.protobuf.BytesValue +} +var file_node_v2_node_v2_proto_depIdxs = []int32{ + 8, // 0: node.v2.StoreChunksRequest.blob_certificates:type_name -> common.BlobCertificate + 9, // 1: node.v2.StoreChunksReply.signatures:type_name -> google.protobuf.BytesValue + 8, // 2: node.v2.GetBlobCertificateReply.blob_certificate:type_name -> common.BlobCertificate + 0, // 3: node.v2.Dispersal.StoreChunks:input_type -> node.v2.StoreChunksRequest + 6, // 4: node.v2.Dispersal.NodeInfo:input_type -> node.v2.NodeInfoRequest + 2, // 5: node.v2.Retrieval.GetChunks:input_type -> node.v2.GetChunksRequest + 4, // 6: node.v2.Retrieval.GetBlobCertificate:input_type -> node.v2.GetBlobCertificateRequest + 6, // 7: node.v2.Retrieval.NodeInfo:input_type -> node.v2.NodeInfoRequest + 1, // 8: node.v2.Dispersal.StoreChunks:output_type -> node.v2.StoreChunksReply + 7, // 9: node.v2.Dispersal.NodeInfo:output_type -> node.v2.NodeInfoReply + 3, // 10: node.v2.Retrieval.GetChunks:output_type -> node.v2.GetChunksReply + 5, // 11: node.v2.Retrieval.GetBlobCertificate:output_type -> node.v2.GetBlobCertificateReply + 7, // 12: node.v2.Retrieval.NodeInfo:output_type -> node.v2.NodeInfoReply + 8, // [8:13] is the sub-list for method output_type + 3, // [3:8] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_node_v2_node_v2_proto_init() } +func file_node_v2_node_v2_proto_init() { + if File_node_v2_node_v2_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_node_v2_node_v2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StoreChunksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_node_v2_node_v2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StoreChunksReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_node_v2_node_v2_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetChunksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_node_v2_node_v2_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetChunksReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_node_v2_node_v2_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBlobCertificateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_node_v2_node_v2_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBlobCertificateReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_node_v2_node_v2_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_node_v2_node_v2_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeInfoReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_node_v2_node_v2_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_node_v2_node_v2_proto_goTypes, + DependencyIndexes: file_node_v2_node_v2_proto_depIdxs, + MessageInfos: file_node_v2_node_v2_proto_msgTypes, + }.Build() + File_node_v2_node_v2_proto = out.File + file_node_v2_node_v2_proto_rawDesc = nil + file_node_v2_node_v2_proto_goTypes = nil + file_node_v2_node_v2_proto_depIdxs = nil +} diff --git a/api/grpc/node/v2/node_v2_grpc.pb.go b/api/grpc/node/v2/node_v2_grpc.pb.go new file mode 100644 index 000000000..d356d3a0d --- /dev/null +++ b/api/grpc/node/v2/node_v2_grpc.pb.go @@ -0,0 +1,316 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.23.4 +// source: node/v2/node_v2.proto + +package v2 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Dispersal_StoreChunks_FullMethodName = "/node.v2.Dispersal/StoreChunks" + Dispersal_NodeInfo_FullMethodName = "/node.v2.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. +type DispersalClient interface { + StoreChunks(ctx context.Context, in *StoreChunksRequest, opts ...grpc.CallOption) (*StoreChunksReply, error) + NodeInfo(ctx context.Context, in *NodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoReply, error) +} + +type dispersalClient struct { + cc grpc.ClientConnInterface +} + +func NewDispersalClient(cc grpc.ClientConnInterface) DispersalClient { + return &dispersalClient{cc} +} + +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...) + if err != nil { + return nil, err + } + return out, nil +} + +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...) + if err != nil { + return nil, err + } + return out, nil +} + +// DispersalServer is the server API for Dispersal service. +// All implementations must embed UnimplementedDispersalServer +// for forward compatibility +type DispersalServer interface { + StoreChunks(context.Context, *StoreChunksRequest) (*StoreChunksReply, error) + NodeInfo(context.Context, *NodeInfoRequest) (*NodeInfoReply, error) + mustEmbedUnimplementedDispersalServer() +} + +// UnimplementedDispersalServer must be embedded to have forward compatible implementations. +type UnimplementedDispersalServer struct { +} + +func (UnimplementedDispersalServer) StoreChunks(context.Context, *StoreChunksRequest) (*StoreChunksReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method StoreChunks not implemented") +} +func (UnimplementedDispersalServer) NodeInfo(context.Context, *NodeInfoRequest) (*NodeInfoReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method NodeInfo not implemented") +} +func (UnimplementedDispersalServer) mustEmbedUnimplementedDispersalServer() {} + +// UnsafeDispersalServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DispersalServer will +// result in compilation errors. +type UnsafeDispersalServer interface { + mustEmbedUnimplementedDispersalServer() +} + +func RegisterDispersalServer(s grpc.ServiceRegistrar, srv DispersalServer) { + s.RegisterService(&Dispersal_ServiceDesc, srv) +} + +func _Dispersal_StoreChunks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StoreChunksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DispersalServer).StoreChunks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Dispersal_StoreChunks_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DispersalServer).StoreChunks(ctx, req.(*StoreChunksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dispersal_NodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NodeInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DispersalServer).NodeInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Dispersal_NodeInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DispersalServer).NodeInfo(ctx, req.(*NodeInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Dispersal_ServiceDesc is the grpc.ServiceDesc for Dispersal service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Dispersal_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "node.v2.Dispersal", + HandlerType: (*DispersalServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "StoreChunks", + Handler: _Dispersal_StoreChunks_Handler, + }, + { + MethodName: "NodeInfo", + Handler: _Dispersal_NodeInfo_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "node/v2/node_v2.proto", +} + +const ( + Retrieval_GetChunks_FullMethodName = "/node.v2.Retrieval/GetChunks" + Retrieval_GetBlobCertificate_FullMethodName = "/node.v2.Retrieval/GetBlobCertificate" + Retrieval_NodeInfo_FullMethodName = "/node.v2.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. +type RetrievalClient interface { + // GetChunks retrieves the chunks for a blob custodied at the Node. + GetChunks(ctx context.Context, in *GetChunksRequest, opts ...grpc.CallOption) (*GetChunksReply, error) + // GetBlobHeader is similar to GetChunks, this just returns the header of the blob. + GetBlobCertificate(ctx context.Context, in *GetBlobCertificateRequest, opts ...grpc.CallOption) (*GetBlobCertificateReply, error) + // Retrieve node info metadata + NodeInfo(ctx context.Context, in *NodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoReply, error) +} + +type retrievalClient struct { + cc grpc.ClientConnInterface +} + +func NewRetrievalClient(cc grpc.ClientConnInterface) RetrievalClient { + return &retrievalClient{cc} +} + +func (c *retrievalClient) GetChunks(ctx context.Context, in *GetChunksRequest, opts ...grpc.CallOption) (*GetChunksReply, error) { + out := new(GetChunksReply) + err := c.cc.Invoke(ctx, Retrieval_GetChunks_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *retrievalClient) GetBlobCertificate(ctx context.Context, in *GetBlobCertificateRequest, opts ...grpc.CallOption) (*GetBlobCertificateReply, error) { + out := new(GetBlobCertificateReply) + err := c.cc.Invoke(ctx, Retrieval_GetBlobCertificate_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +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...) + if err != nil { + return nil, err + } + return out, nil +} + +// RetrievalServer is the server API for Retrieval service. +// All implementations must embed UnimplementedRetrievalServer +// for forward compatibility +type RetrievalServer interface { + // GetChunks retrieves the chunks for a blob custodied at the Node. + GetChunks(context.Context, *GetChunksRequest) (*GetChunksReply, error) + // GetBlobHeader is similar to GetChunks, this just returns the header of the blob. + GetBlobCertificate(context.Context, *GetBlobCertificateRequest) (*GetBlobCertificateReply, error) + // Retrieve node info metadata + NodeInfo(context.Context, *NodeInfoRequest) (*NodeInfoReply, error) + mustEmbedUnimplementedRetrievalServer() +} + +// UnimplementedRetrievalServer must be embedded to have forward compatible implementations. +type UnimplementedRetrievalServer struct { +} + +func (UnimplementedRetrievalServer) GetChunks(context.Context, *GetChunksRequest) (*GetChunksReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetChunks not implemented") +} +func (UnimplementedRetrievalServer) GetBlobCertificate(context.Context, *GetBlobCertificateRequest) (*GetBlobCertificateReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlobCertificate not implemented") +} +func (UnimplementedRetrievalServer) NodeInfo(context.Context, *NodeInfoRequest) (*NodeInfoReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method NodeInfo not implemented") +} +func (UnimplementedRetrievalServer) mustEmbedUnimplementedRetrievalServer() {} + +// UnsafeRetrievalServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RetrievalServer will +// result in compilation errors. +type UnsafeRetrievalServer interface { + mustEmbedUnimplementedRetrievalServer() +} + +func RegisterRetrievalServer(s grpc.ServiceRegistrar, srv RetrievalServer) { + s.RegisterService(&Retrieval_ServiceDesc, srv) +} + +func _Retrieval_GetChunks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetChunksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RetrievalServer).GetChunks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Retrieval_GetChunks_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RetrievalServer).GetChunks(ctx, req.(*GetChunksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Retrieval_GetBlobCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBlobCertificateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RetrievalServer).GetBlobCertificate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Retrieval_GetBlobCertificate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RetrievalServer).GetBlobCertificate(ctx, req.(*GetBlobCertificateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Retrieval_NodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NodeInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RetrievalServer).NodeInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Retrieval_NodeInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RetrievalServer).NodeInfo(ctx, req.(*NodeInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Retrieval_ServiceDesc is the grpc.ServiceDesc for Retrieval service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Retrieval_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "node.v2.Retrieval", + HandlerType: (*RetrievalServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetChunks", + Handler: _Retrieval_GetChunks_Handler, + }, + { + MethodName: "GetBlobCertificate", + Handler: _Retrieval_GetBlobCertificate_Handler, + }, + { + MethodName: "NodeInfo", + Handler: _Retrieval_NodeInfo_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "node/v2/node_v2.proto", +} diff --git a/api/grpc/relay/relay.pb.go b/api/grpc/relay/relay.pb.go index 1d6b078c9..0430ca79a 100644 --- a/api/grpc/relay/relay.pb.go +++ b/api/grpc/relay/relay.pb.go @@ -10,7 +10,6 @@ import ( common "github.com/Layr-Labs/eigenda/api/grpc/common" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/known/wrapperspb" reflect "reflect" sync "sync" ) @@ -133,9 +132,7 @@ var File_relay_relay_proto protoreflect.FileDescriptor var file_relay_relay_proto_rawDesc = []byte{ 0x0a, 0x11, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, - 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x53, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, diff --git a/api/proto/common/common.proto b/api/proto/common/common.proto index c2dd9d551..34bc5e77f 100644 --- a/api/proto/common/common.proto +++ b/api/proto/common/common.proto @@ -9,6 +9,35 @@ message G1Commitment { bytes y = 2; } +message G2Commitment { + // The A0 element of the X coordinate of G2 point. + bytes x_a0 = 1; + // The A1 element of the X coordinate of G2 point. + bytes x_a1 = 2; + // The A0 element of the Y coordinate of G2 point. + bytes y_a0 = 3; + // The A1 element of the Y coordinate of G2 point. + bytes y_a1 = 4; +} + +// BlobCommitment represents commitment of a specific blob, containing its +// KZG commitment, degree proof, the actual degree, and data length in number of symbols. +message BlobCommitment { + G1Commitment commitment = 1; + G2Commitment length_commitment = 2; + G2Commitment length_proof = 3; + uint32 data_length = 4; +} + +// BlobCertificate is what gets attested by the network +message BlobCertificate { + uint32 version = 1; + bytes blob_key = 2; + BlobCommitment blob_commitment = 3; + repeated uint32 quorum_numbers = 4; + uint32 reference_block_number = 5; +} + ///////////////////////////////////////////////////////////////////////////////////// // Experimental: the following definitions are experimental and subject to change. // ///////////////////////////////////////////////////////////////////////////////////// diff --git a/api/proto/disperser/disperser.proto b/api/proto/disperser/disperser.proto index 536ef182c..96f60856c 100644 --- a/api/proto/disperser/disperser.proto +++ b/api/proto/disperser/disperser.proto @@ -32,13 +32,6 @@ service Disperser { // The blob should have been initially dispersed via this Disperser service // for this API to work. rpc RetrieveBlob(RetrieveBlobRequest) returns (RetrieveBlobReply) {} - - ////////////////////////////////////////////////////////////////////////////// - // Experimental: the following RPCs are experimental and subject to change. // - ////////////////////////////////////////////////////////////////////////////// - - // Retrieves the requested chunk from the Disperser's backend. - rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} } // Requests and Responses @@ -257,21 +250,3 @@ message BatchHeader { // (e.g. operator stakes) at this block number. uint32 reference_block_number = 4; } - -///////////////////////////////////////////////////////////////////////////////////// -// Experimental: the following definitions are experimental and subject to change. // -///////////////////////////////////////////////////////////////////////////////////// - -// Request a specific chunk -message GetChunkRequest { - // The hash of the blob's header. - bytes blob_header_hash = 1; - // The index of the chunk within the blob. - uint32 chunk_index = 2; -} - -// Reply to GetChunkRequest -message GetChunkReply { - // The chunk requested. - common.ChunkData chunk = 1; -} \ No newline at end of file diff --git a/api/proto/disperser/v2/disperser_v2.proto b/api/proto/disperser/v2/disperser_v2.proto new file mode 100644 index 000000000..d69d6b7a2 --- /dev/null +++ b/api/proto/disperser/v2/disperser_v2.proto @@ -0,0 +1,129 @@ +syntax = "proto3"; +package disperser.v2; +import "common/common.proto"; +option go_package = "github.com/Layr-Labs/eigenda/api/grpc/disperser/v2"; + +// WARNING: the following RPCs are experimental and subject to change. + +// Disperser defines the public APIs for dispersing blobs. +service Disperser { + // DisperseBlob accepts blob to disperse from clients. + // This executes the dispersal asynchronously, i.e. it returns once the request + // is accepted. The client could use GetBlobStatus() API to poll the the + // processing status of the blob. + rpc DisperseBlob(DisperseBlobRequest) returns (DisperseBlobReply) {} + + // GetBlobStatus is meant to be polled for the blob status. + rpc GetBlobStatus(BlobStatusRequest) returns (BlobStatusReply) {} + + // GetBlobCommitment is a utility method that calculates commitment for a blob payload. + rpc GetBlobCommitment(BlobCommitmentRequest) returns (BlobCommitmentReply) {} +} + +// Requests and Replys + +message DisperseBlobRequest { + // The data to be dispersed. + // The size of data must be <= 2MiB. Every 32 bytes of data chunk is interpreted as an integer in big endian format + // where the lower address has more significant bits. The integer must stay in the valid range to be interpreted + // as a field element on the bn254 curve. The valid range is + // 0 <= x < 21888242871839275222246405745257275088548364400416034343698204186575808495617 + // containing slightly less than 254 bits and more than 253 bits. If any one of the 32 bytes chunk is outside the range, + // the whole request is deemed as invalid, and rejected. + bytes data = 1; + BlobHeader blob_header = 2; + // signature over keccak hash of the blob_header that can be verified by blob_header.account_id + bytes authentication_data = 3; +} + +message DisperseBlobReply { + // The status of the blob associated with the blob key. + BlobStatus result = 1; + bytes blob_key = 2; +} + +// BlobStatusRequest is used to query the status of a blob. +message BlobStatusRequest { + bytes blob_key = 1; +} + +message BlobStatusReply { + // The status of the blob. + BlobStatus status = 1; + // The signed blob certificate + SignedCertificate signed_certificate = 2; +} + +// Utility method used to generate the commitment of blob given its data. +// This can be used to construct BlobHeader.commitment +message BlobCommitmentRequest { + bytes data = 1; +} + +message BlobCommitmentReply { + common.BlobCommitment blob_commitment = 1; +} + +// Data Types + +// BlobStatus represents the status of a blob. +// The status of a blob is updated as the blob is processed by the disperser. +// The status of a blob can be queried by the client using the GetBlobStatus API. +// Intermediate states are states that the blob can be in while being processed, and it can be updated to a differet state: +// - QUEUED +// - ENCODED +// Terminal states are states that will not be updated to a different state: +// - CERTIFIED +// - FAILED +// - INSUFFICIENT_SIGNATURES +enum BlobStatus { + UNKNOWN = 0; + + // QUEUED means that the blob has been queued by the disperser for processing + QUEUED = 1; + + // ENCODED means that the blob has been encoded and is ready to be dispersed to DA Nodes + ENCODED = 2; + + // CERTIFIED means the blob has been dispersed and attested by the DA nodes + CERTIFIED = 3; + + // FAILED means that the blob has failed permanently (for reasons other than insufficient + // signatures, which is a separate state) + FAILED = 4; + + // INSUFFICIENT_SIGNATURES means that the confirmation threshold for the blob was not met + // for at least one quorum. + INSUFFICIENT_SIGNATURES = 5; +} + +message BlobHeader { + repeated uint32 quorum_numbers = 1; + // API version used to disperse the blob + uint32 version = 2; + uint32 bin_index = 3; + uint64 cumulative_payment = 4; + // Ethereum Account Address in Hex string "0x..." + string account_id = 5; + common.G1Commitment commitment = 6; +} + +message SignedCertificate { + common.BlobCertificate blob_certificate = 1; + Attestation non_signer_stakes_and_signature = 2; +} + +message Attestation { + repeated uint32 nonSignerQuorumBitmapIndices = 1; + repeated common.G1Commitment nonSignerPubkeys = 2; + repeated common.G1Commitment quorumApks = 3; + common.G2Commitment apkG2 = 4; + common.G1Commitment sigma = 5; + repeated uint32 quorumApkIndices = 6; + repeated uint32 totalStakeIndices = 7; + repeated NonSignerStakeIndicesForQuorum nonSignerStakeIndices = 8; +} + +message NonSignerStakeIndicesForQuorum { + repeated uint32 indices = 1; +} diff --git a/api/proto/lightnode/lightnode.proto b/api/proto/lightnode/lightnode.proto index 90b052721..f4a5470ae 100644 --- a/api/proto/lightnode/lightnode.proto +++ b/api/proto/lightnode/lightnode.proto @@ -1,6 +1,5 @@ syntax = "proto3"; package lightnode; -import "common/common.proto"; option go_package = "github.com/Layr-Labs/eigenda/api/grpc/lightnode"; ///////////////////////////////////////////////////////////////////////////////////// diff --git a/api/proto/node/node.proto b/api/proto/node/node.proto index b9fb54144..f32fea64a 100644 --- a/api/proto/node/node.proto +++ b/api/proto/node/node.proto @@ -33,13 +33,6 @@ service Retrieval { rpc GetBlobHeader(GetBlobHeaderRequest) returns (GetBlobHeaderReply) {} // Retrieve node info metadata rpc NodeInfo(NodeInfoRequest) returns (NodeInfoReply) {} - - ////////////////////////////////////////////////////////////////////////////// - // Experimental: the following RPCs are experimental and subject to change. // - ////////////////////////////////////////////////////////////////////////////// - - // StreamHeaders requests a stream all new headers. - rpc StreamBlobHeaders(stream StreamBlobHeadersRequest) returns (stream StreamHeadersReply) {} } // Requests and replies @@ -223,21 +216,3 @@ message NodeInfoReply { uint32 num_cpu = 4; uint64 mem_bytes = 5; } - -///////////////////////////////////////////////////////////////////////////////////// -// Experimental: the following definitions are experimental and subject to change. // -///////////////////////////////////////////////////////////////////////////////////// - -// Request that all new blob headers be sent. -message StreamBlobHeadersRequest { -} - -// Reply to StreamHeadersRequest -message StreamHeadersReply { - // The header of the blob - BlobHeader blob_header = 1; - // Merkle proof that returned blob header belongs to the batch and is - // the batch's MerkleProof.index-th blob. - // This can be checked against the batch root on chain. - MerkleProof proof = 2; -} diff --git a/api/proto/node/v2/node_v2.proto b/api/proto/node/v2/node_v2.proto new file mode 100644 index 000000000..d7d59edeb --- /dev/null +++ b/api/proto/node/v2/node_v2.proto @@ -0,0 +1,68 @@ +syntax = "proto3"; +package node.v2; +import "google/protobuf/wrappers.proto"; +import "common/common.proto"; +option go_package = "github.com/Layr-Labs/eigenda/api/grpc/node/v2"; + +// The EigenDA Node implements two services, Dispersal and Retrieval, as defined below, +// for better security and separation of concerns. + +// WARNING: the following RPCs are experimental and subject to change. +service Dispersal { + rpc StoreChunks(StoreChunksRequest) returns (StoreChunksReply) {} + rpc NodeInfo(NodeInfoRequest) returns (NodeInfoReply) {} +} + +service Retrieval { + // GetChunks retrieves the chunks for a blob custodied at the Node. + rpc GetChunks(GetChunksRequest) returns (GetChunksReply) {} + // GetBlobHeader is similar to GetChunks, this just returns the header of the blob. + rpc GetBlobCertificate(GetBlobCertificateRequest) returns (GetBlobCertificateReply) {} + // Retrieve node info metadata + rpc NodeInfo(NodeInfoRequest) returns (NodeInfoReply) {} +} + +// Requests and replies + +message StoreChunksRequest { + // list of blob certificates to process + repeated common.BlobCertificate blob_certificates = 1; +} + +message StoreChunksReply { + repeated google.protobuf.BytesValue signatures = 1; +} + +message GetChunksRequest { + bytes blob_key = 1; + // Which quorum of the blob to retrieve for (note: a blob can have multiple + // quorums and the chunks for different quorums at a Node can be different). + // The ID must be in range [0, 254]. + uint32 quorum_id = 2; +} + +message GetChunksReply { + // All chunks the Node is storing for the requested blob per RetrieveChunksRequest. + repeated bytes chunks = 1; +} + +message GetBlobCertificateRequest { + bytes blob_key = 1; +} + +message GetBlobCertificateReply { + common.BlobCertificate blob_certificate = 1; +} + +// Node info request +message NodeInfoRequest { +} + +// Node info reply +message NodeInfoReply { + string semver = 1; + string arch = 2; + string os = 3; + uint32 num_cpu = 4; + uint64 mem_bytes = 5; +} diff --git a/api/proto/relay/relay.proto b/api/proto/relay/relay.proto index d92f60576..797592683 100644 --- a/api/proto/relay/relay.proto +++ b/api/proto/relay/relay.proto @@ -1,6 +1,5 @@ syntax = "proto3"; package node; -import "google/protobuf/wrappers.proto"; import "common/common.proto"; option go_package = "github.com/Layr-Labs/eigenda/api/grpc/relay"; diff --git a/disperser/apiserver/server.go b/disperser/apiserver/server.go index 440586605..18cd71ac1 100644 --- a/disperser/apiserver/server.go +++ b/disperser/apiserver/server.go @@ -11,8 +11,6 @@ import ( "sync" "time" - "google.golang.org/grpc/status" - "github.com/Layr-Labs/eigenda/api" commonpb "github.com/Layr-Labs/eigenda/api/grpc/common" pb "github.com/Layr-Labs/eigenda/api/grpc/disperser" @@ -784,10 +782,6 @@ func (s *DispersalServer) RetrieveBlob(ctx context.Context, req *pb.RetrieveBlob }, nil } -func (s *DispersalServer) GetChunk(context.Context, *pb.GetChunkRequest) (*pb.GetChunkReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") -} - func (s *DispersalServer) GetRateConfig() *RateConfig { return &s.rateConfig } diff --git a/node/grpc/server.go b/node/grpc/server.go index b65d221d1..71df57b91 100644 --- a/node/grpc/server.go +++ b/node/grpc/server.go @@ -5,8 +5,6 @@ import ( "encoding/hex" "errors" "fmt" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" "reflect" "runtime" "sync" @@ -156,10 +154,6 @@ func (s *Server) NodeInfo(ctx context.Context, in *pb.NodeInfoRequest) (*pb.Node return &pb.NodeInfoReply{Semver: node.SemVer, Os: runtime.GOOS, Arch: runtime.GOARCH, NumCpu: uint32(runtime.GOMAXPROCS(0)), MemBytes: memBytes}, nil } -func (s *Server) StreamBlobHeaders(pb.Retrieval_StreamBlobHeadersServer) error { - return status.Errorf(codes.Unimplemented, "method StreamBlobHeaders not implemented") -} - func (s *Server) handleStoreChunksRequest(ctx context.Context, in *pb.StoreChunksRequest) (*pb.StoreChunksReply, error) { start := time.Now()