diff --git a/api/grpc/relay/relay.pb.go b/api/grpc/relay/relay.pb.go index a9d69a5fe..72dc48fbc 100644 --- a/api/grpc/relay/relay.pb.go +++ b/api/grpc/relay/relay.pb.go @@ -74,152 +74,6 @@ func (RelayError) EnumDescriptor() ([]byte, []int) { return file_relay_relay_proto_rawDescGZIP(), []int{0} } -// A request to upload one or more blobs. -type UploadBlobsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The blobs to upload. - Blobs []*BlobData `protobuf:"bytes,1,rep,name=blobs,proto3" json:"blobs,omitempty"` -} - -func (x *UploadBlobsRequest) Reset() { - *x = UploadBlobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_relay_relay_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UploadBlobsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UploadBlobsRequest) ProtoMessage() {} - -func (x *UploadBlobsRequest) ProtoReflect() protoreflect.Message { - mi := &file_relay_relay_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 UploadBlobsRequest.ProtoReflect.Descriptor instead. -func (*UploadBlobsRequest) Descriptor() ([]byte, []int) { - return file_relay_relay_proto_rawDescGZIP(), []int{0} -} - -func (x *UploadBlobsRequest) GetBlobs() []*BlobData { - if x != nil { - return x.Blobs - } - return nil -} - -// A blob, its header, and its encoded chunks. -type BlobData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The unencoded blob data. - Blob []byte `protobuf:"bytes,1,opt,name=blob,proto3" json:"blob,omitempty"` - // The encoded blob chunks. - Chunks []*common.ChunkData `protobuf:"bytes,2,rep,name=chunks,proto3" json:"chunks,omitempty"` -} - -func (x *BlobData) Reset() { - *x = BlobData{} - if protoimpl.UnsafeEnabled { - mi := &file_relay_relay_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BlobData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BlobData) ProtoMessage() {} - -func (x *BlobData) ProtoReflect() protoreflect.Message { - mi := &file_relay_relay_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 BlobData.ProtoReflect.Descriptor instead. -func (*BlobData) Descriptor() ([]byte, []int) { - return file_relay_relay_proto_rawDescGZIP(), []int{1} -} - -func (x *BlobData) GetBlob() []byte { - if x != nil { - return x.Blob - } - return nil -} - -func (x *BlobData) GetChunks() []*common.ChunkData { - if x != nil { - return x.Chunks - } - return nil -} - -// The reply to an UploadBlobs request. -type UploadBlobsReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UploadBlobsReply) Reset() { - *x = UploadBlobsReply{} - if protoimpl.UnsafeEnabled { - mi := &file_relay_relay_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UploadBlobsReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UploadBlobsReply) ProtoMessage() {} - -func (x *UploadBlobsReply) ProtoReflect() protoreflect.Message { - mi := &file_relay_relay_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 UploadBlobsReply.ProtoReflect.Descriptor instead. -func (*UploadBlobsReply) Descriptor() ([]byte, []int) { - return file_relay_relay_proto_rawDescGZIP(), []int{2} -} - // A request to fetch one or more blobs. type GetBlobsRequest struct { state protoimpl.MessageState @@ -233,14 +87,14 @@ type GetBlobsRequest struct { // is an unauthenticated request, this field should be empty. RequesterId uint64 `protobuf:"varint,2,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` // If this is an authenticated request, this field will hold a signature by the requester - // on the header hashes being requested. + // on the blob hashes being requested. RequesterSignature []byte `protobuf:"bytes,3,opt,name=requester_signature,json=requesterSignature,proto3" json:"requester_signature,omitempty"` } func (x *GetBlobsRequest) Reset() { *x = GetBlobsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_relay_relay_proto_msgTypes[3] + mi := &file_relay_relay_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -253,7 +107,7 @@ func (x *GetBlobsRequest) String() string { func (*GetBlobsRequest) ProtoMessage() {} func (x *GetBlobsRequest) ProtoReflect() protoreflect.Message { - mi := &file_relay_relay_proto_msgTypes[3] + mi := &file_relay_relay_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -266,7 +120,7 @@ func (x *GetBlobsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBlobsRequest.ProtoReflect.Descriptor instead. func (*GetBlobsRequest) Descriptor() ([]byte, []int) { - return file_relay_relay_proto_rawDescGZIP(), []int{3} + return file_relay_relay_proto_rawDescGZIP(), []int{0} } func (x *GetBlobsRequest) GetBlobHashes() [][]byte { @@ -304,7 +158,7 @@ type GetBlobsReply struct { func (x *GetBlobsReply) Reset() { *x = GetBlobsReply{} if protoimpl.UnsafeEnabled { - mi := &file_relay_relay_proto_msgTypes[4] + mi := &file_relay_relay_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -317,7 +171,7 @@ func (x *GetBlobsReply) String() string { func (*GetBlobsReply) ProtoMessage() {} func (x *GetBlobsReply) ProtoReflect() protoreflect.Message { - mi := &file_relay_relay_proto_msgTypes[4] + mi := &file_relay_relay_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -330,7 +184,7 @@ func (x *GetBlobsReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBlobsReply.ProtoReflect.Descriptor instead. func (*GetBlobsReply) Descriptor() ([]byte, []int) { - return file_relay_relay_proto_rawDescGZIP(), []int{4} + return file_relay_relay_proto_rawDescGZIP(), []int{1} } func (x *GetBlobsReply) GetBlobs() []*RequestedBlob { @@ -356,7 +210,7 @@ type RequestedBlob struct { func (x *RequestedBlob) Reset() { *x = RequestedBlob{} if protoimpl.UnsafeEnabled { - mi := &file_relay_relay_proto_msgTypes[5] + mi := &file_relay_relay_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -369,7 +223,7 @@ func (x *RequestedBlob) String() string { func (*RequestedBlob) ProtoMessage() {} func (x *RequestedBlob) ProtoReflect() protoreflect.Message { - mi := &file_relay_relay_proto_msgTypes[5] + mi := &file_relay_relay_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -382,7 +236,7 @@ func (x *RequestedBlob) ProtoReflect() protoreflect.Message { // Deprecated: Use RequestedBlob.ProtoReflect.Descriptor instead. func (*RequestedBlob) Descriptor() ([]byte, []int) { - return file_relay_relay_proto_rawDescGZIP(), []int{5} + return file_relay_relay_proto_rawDescGZIP(), []int{2} } func (m *RequestedBlob) GetData() isRequestedBlob_Data { @@ -432,12 +286,18 @@ type GetChunksRequest struct { // The chunk requests. Chunks are returned in the same order as they are requested. ChunkRequests []*ChunkRequest `protobuf:"bytes,1,rep,name=chunk_requests,json=chunkRequests,proto3" json:"chunk_requests,omitempty"` + // If this is an authenticated request, this should hold the ID of the requester. If this + // is an unauthenticated request, this field should be empty. + RequesterId uint64 `protobuf:"varint,2,opt,name=requester_id,json=requesterId,proto3" json:"requester_id,omitempty"` + // If this is an authenticated request, this field will hold a signature by the requester + // on the chunks being requested. + RequesterSignature []byte `protobuf:"bytes,3,opt,name=requester_signature,json=requesterSignature,proto3" json:"requester_signature,omitempty"` } func (x *GetChunksRequest) Reset() { *x = GetChunksRequest{} if protoimpl.UnsafeEnabled { - mi := &file_relay_relay_proto_msgTypes[6] + mi := &file_relay_relay_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -450,7 +310,7 @@ func (x *GetChunksRequest) String() string { func (*GetChunksRequest) ProtoMessage() {} func (x *GetChunksRequest) ProtoReflect() protoreflect.Message { - mi := &file_relay_relay_proto_msgTypes[6] + mi := &file_relay_relay_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -463,7 +323,7 @@ func (x *GetChunksRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetChunksRequest.ProtoReflect.Descriptor instead. func (*GetChunksRequest) Descriptor() ([]byte, []int) { - return file_relay_relay_proto_rawDescGZIP(), []int{6} + return file_relay_relay_proto_rawDescGZIP(), []int{3} } func (x *GetChunksRequest) GetChunkRequests() []*ChunkRequest { @@ -473,6 +333,20 @@ func (x *GetChunksRequest) GetChunkRequests() []*ChunkRequest { return nil } +func (x *GetChunksRequest) GetRequesterId() uint64 { + if x != nil { + return x.RequesterId + } + return 0 +} + +func (x *GetChunksRequest) GetRequesterSignature() []byte { + if x != nil { + return x.RequesterSignature + } + return nil +} + // A request for chunks within a specific blob. type ChunkRequest struct { state protoimpl.MessageState @@ -488,7 +362,7 @@ type ChunkRequest struct { func (x *ChunkRequest) Reset() { *x = ChunkRequest{} if protoimpl.UnsafeEnabled { - mi := &file_relay_relay_proto_msgTypes[7] + mi := &file_relay_relay_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -501,7 +375,7 @@ func (x *ChunkRequest) String() string { func (*ChunkRequest) ProtoMessage() {} func (x *ChunkRequest) ProtoReflect() protoreflect.Message { - mi := &file_relay_relay_proto_msgTypes[7] + mi := &file_relay_relay_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -514,7 +388,7 @@ func (x *ChunkRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ChunkRequest.ProtoReflect.Descriptor instead. func (*ChunkRequest) Descriptor() ([]byte, []int) { - return file_relay_relay_proto_rawDescGZIP(), []int{7} + return file_relay_relay_proto_rawDescGZIP(), []int{4} } func (x *ChunkRequest) GetHeaderHash() []byte { @@ -544,7 +418,7 @@ type GetChunksReply struct { func (x *GetChunksReply) Reset() { *x = GetChunksReply{} if protoimpl.UnsafeEnabled { - mi := &file_relay_relay_proto_msgTypes[8] + mi := &file_relay_relay_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -557,7 +431,7 @@ func (x *GetChunksReply) String() string { func (*GetChunksReply) ProtoMessage() {} func (x *GetChunksReply) ProtoReflect() protoreflect.Message { - mi := &file_relay_relay_proto_msgTypes[8] + mi := &file_relay_relay_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -570,7 +444,7 @@ func (x *GetChunksReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetChunksReply.ProtoReflect.Descriptor instead. func (*GetChunksReply) Descriptor() ([]byte, []int) { - return file_relay_relay_proto_rawDescGZIP(), []int{8} + return file_relay_relay_proto_rawDescGZIP(), []int{5} } func (x *GetChunksReply) GetData() []*BlobChunks { @@ -596,7 +470,7 @@ type BlobChunks struct { func (x *BlobChunks) Reset() { *x = BlobChunks{} if protoimpl.UnsafeEnabled { - mi := &file_relay_relay_proto_msgTypes[9] + mi := &file_relay_relay_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -609,7 +483,7 @@ func (x *BlobChunks) String() string { func (*BlobChunks) ProtoMessage() {} func (x *BlobChunks) ProtoReflect() protoreflect.Message { - mi := &file_relay_relay_proto_msgTypes[9] + mi := &file_relay_relay_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -622,7 +496,7 @@ func (x *BlobChunks) ProtoReflect() protoreflect.Message { // Deprecated: Use BlobChunks.ProtoReflect.Descriptor instead. func (*BlobChunks) Descriptor() ([]byte, []int) { - return file_relay_relay_proto_rawDescGZIP(), []int{9} + return file_relay_relay_proto_rawDescGZIP(), []int{6} } func (m *BlobChunks) GetBlob() isBlobChunks_Blob { @@ -675,7 +549,7 @@ type Chunks struct { func (x *Chunks) Reset() { *x = Chunks{} if protoimpl.UnsafeEnabled { - mi := &file_relay_relay_proto_msgTypes[10] + mi := &file_relay_relay_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -688,7 +562,7 @@ func (x *Chunks) String() string { func (*Chunks) ProtoMessage() {} func (x *Chunks) ProtoReflect() protoreflect.Message { - mi := &file_relay_relay_proto_msgTypes[10] + mi := &file_relay_relay_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -701,7 +575,7 @@ func (x *Chunks) ProtoReflect() protoreflect.Message { // Deprecated: Use Chunks.ProtoReflect.Descriptor instead. func (*Chunks) Descriptor() ([]byte, []int) { - return file_relay_relay_proto_rawDescGZIP(), []int{10} + return file_relay_relay_proto_rawDescGZIP(), []int{7} } func (x *Chunks) GetChunks() []*common.ChunkData { @@ -716,80 +590,71 @@ 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, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3a, - 0x0a, 0x12, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x22, 0x49, 0x0a, 0x08, 0x42, 0x6c, - 0x6f, 0x62, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6c, 0x6f, 0x62, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6c, 0x6f, 0x62, 0x12, 0x29, 0x0a, 0x06, 0x63, 0x68, - 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x06, 0x63, - 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x22, 0x12, 0x0a, 0x10, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x42, - 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x86, 0x01, 0x0a, 0x0f, 0x47, 0x65, - 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, - 0x0b, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0c, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x21, - 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x22, 0x3a, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, - 0x70, 0x6c, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x22, 0x60, - 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x62, 0x12, - 0x14, 0x0a, 0x04, 0x62, 0x6c, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, - 0x04, 0x62, 0x6c, 0x6f, 0x62, 0x12, 0x31, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x09, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x22, 0x4d, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x0e, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x52, 0x0d, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x22, - 0x54, 0x0a, 0x0c, 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, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0c, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x49, 0x6e, - 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0x36, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, - 0x6b, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x24, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x6c, 0x6f, - 0x62, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x6f, 0x0a, - 0x0a, 0x42, 0x6c, 0x6f, 0x62, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, 0x26, 0x0a, 0x06, 0x63, - 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x75, - 0x6e, 0x6b, 0x73, 0x12, 0x31, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, - 0x65, 0x6c, 0x61, 0x79, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x09, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x62, 0x6c, 0x6f, 0x62, 0x22, 0x33, - 0x0a, 0x06, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, 0x29, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, - 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x06, 0x63, 0x68, 0x75, - 0x6e, 0x6b, 0x73, 0x2a, 0x3c, 0x0a, 0x0a, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x42, 0x4c, 0x4f, - 0x42, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x55, 0x53, 0x59, 0x10, 0x01, 0x12, 0x12, 0x0a, - 0x0e, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, - 0x02, 0x32, 0x51, 0x0a, 0x0c, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, - 0x79, 0x12, 0x41, 0x0a, 0x0b, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x62, 0x73, - 0x12, 0x18, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6c, - 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x22, 0x00, 0x32, 0x7e, 0x0a, 0x05, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x38, 0x0a, - 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x12, 0x15, 0x2e, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x13, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x73, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x68, - 0x75, 0x6e, 0x6b, 0x73, 0x12, 0x16, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, - 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x22, 0x00, 0x42, 0x2d, 0x5a, 0x2b, 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, 0x72, 0x65, - 0x6c, 0x61, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, + 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x48, 0x61, 0x73, + 0x68, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x3a, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x42, 0x6c, + 0x6f, 0x62, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x62, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x05, 0x62, 0x6c, + 0x6f, 0x62, 0x73, 0x22, 0x60, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, + 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x14, 0x0a, 0x04, 0x62, 0x6c, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6c, 0x6f, 0x62, 0x12, 0x31, 0x0a, 0x0a, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, + 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x48, 0x00, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x06, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xa1, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, + 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x0e, 0x63, 0x68, + 0x75, 0x6e, 0x6b, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x54, 0x0a, 0x0c, 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, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, + 0x75, 0x6e, 0x6b, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x0c, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, + 0x36, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x12, 0x24, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x43, 0x68, 0x75, 0x6e, 0x6b, + 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x6f, 0x0a, 0x0a, 0x42, 0x6c, 0x6f, 0x62, 0x43, + 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, 0x26, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x43, 0x68, 0x75, + 0x6e, 0x6b, 0x73, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, 0x31, 0x0a, + 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x10, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, + 0x42, 0x06, 0x0a, 0x04, 0x62, 0x6c, 0x6f, 0x62, 0x22, 0x33, 0x0a, 0x06, 0x43, 0x68, 0x75, 0x6e, + 0x6b, 0x73, 0x12, 0x29, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x75, 0x6e, + 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x2a, 0x3c, 0x0a, + 0x0a, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x10, 0x0a, 0x0c, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x42, 0x4c, 0x4f, 0x42, 0x10, 0x00, 0x12, 0x08, 0x0a, + 0x04, 0x42, 0x55, 0x53, 0x59, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x54, 0x45, 0x52, + 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x32, 0x7e, 0x0a, 0x05, 0x52, + 0x65, 0x6c, 0x61, 0x79, 0x12, 0x38, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x73, + 0x12, 0x15, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, + 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3b, + 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, 0x16, 0x2e, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, + 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x2d, 0x5a, 0x2b, 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, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -805,43 +670,36 @@ func file_relay_relay_proto_rawDescGZIP() []byte { } var file_relay_relay_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_relay_relay_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_relay_relay_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_relay_relay_proto_goTypes = []interface{}{ - (RelayError)(0), // 0: node.RelayError - (*UploadBlobsRequest)(nil), // 1: node.UploadBlobsRequest - (*BlobData)(nil), // 2: node.BlobData - (*UploadBlobsReply)(nil), // 3: node.UploadBlobsReply - (*GetBlobsRequest)(nil), // 4: node.GetBlobsRequest - (*GetBlobsReply)(nil), // 5: node.GetBlobsReply - (*RequestedBlob)(nil), // 6: node.RequestedBlob - (*GetChunksRequest)(nil), // 7: node.GetChunksRequest - (*ChunkRequest)(nil), // 8: node.ChunkRequest - (*GetChunksReply)(nil), // 9: node.GetChunksReply - (*BlobChunks)(nil), // 10: node.BlobChunks - (*Chunks)(nil), // 11: node.Chunks - (*common.ChunkData)(nil), // 12: common.ChunkData + (RelayError)(0), // 0: node.RelayError + (*GetBlobsRequest)(nil), // 1: node.GetBlobsRequest + (*GetBlobsReply)(nil), // 2: node.GetBlobsReply + (*RequestedBlob)(nil), // 3: node.RequestedBlob + (*GetChunksRequest)(nil), // 4: node.GetChunksRequest + (*ChunkRequest)(nil), // 5: node.ChunkRequest + (*GetChunksReply)(nil), // 6: node.GetChunksReply + (*BlobChunks)(nil), // 7: node.BlobChunks + (*Chunks)(nil), // 8: node.Chunks + (*common.ChunkData)(nil), // 9: common.ChunkData } var file_relay_relay_proto_depIdxs = []int32{ - 2, // 0: node.UploadBlobsRequest.blobs:type_name -> node.BlobData - 12, // 1: node.BlobData.chunks:type_name -> common.ChunkData - 6, // 2: node.GetBlobsReply.blobs:type_name -> node.RequestedBlob - 0, // 3: node.RequestedBlob.error_code:type_name -> node.RelayError - 8, // 4: node.GetChunksRequest.chunk_requests:type_name -> node.ChunkRequest - 10, // 5: node.GetChunksReply.data:type_name -> node.BlobChunks - 11, // 6: node.BlobChunks.chunks:type_name -> node.Chunks - 0, // 7: node.BlobChunks.error_code:type_name -> node.RelayError - 12, // 8: node.Chunks.chunks:type_name -> common.ChunkData - 1, // 9: node.PrivateRelay.UploadBlobs:input_type -> node.UploadBlobsRequest - 4, // 10: node.Relay.GetBlobs:input_type -> node.GetBlobsRequest - 7, // 11: node.Relay.GetChunks:input_type -> node.GetChunksRequest - 3, // 12: node.PrivateRelay.UploadBlobs:output_type -> node.UploadBlobsReply - 5, // 13: node.Relay.GetBlobs:output_type -> node.GetBlobsReply - 9, // 14: node.Relay.GetChunks:output_type -> node.GetChunksReply - 12, // [12:15] is the sub-list for method output_type - 9, // [9:12] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 3, // 0: node.GetBlobsReply.blobs:type_name -> node.RequestedBlob + 0, // 1: node.RequestedBlob.error_code:type_name -> node.RelayError + 5, // 2: node.GetChunksRequest.chunk_requests:type_name -> node.ChunkRequest + 7, // 3: node.GetChunksReply.data:type_name -> node.BlobChunks + 8, // 4: node.BlobChunks.chunks:type_name -> node.Chunks + 0, // 5: node.BlobChunks.error_code:type_name -> node.RelayError + 9, // 6: node.Chunks.chunks:type_name -> common.ChunkData + 1, // 7: node.Relay.GetBlobs:input_type -> node.GetBlobsRequest + 4, // 8: node.Relay.GetChunks:input_type -> node.GetChunksRequest + 2, // 9: node.Relay.GetBlobs:output_type -> node.GetBlobsReply + 6, // 10: node.Relay.GetChunks:output_type -> node.GetChunksReply + 9, // [9:11] is the sub-list for method output_type + 7, // [7:9] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_relay_relay_proto_init() } @@ -851,42 +709,6 @@ func file_relay_relay_proto_init() { } if !protoimpl.UnsafeEnabled { file_relay_relay_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UploadBlobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relay_relay_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlobData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relay_relay_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UploadBlobsReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relay_relay_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetBlobsRequest); i { case 0: return &v.state @@ -898,7 +720,7 @@ func file_relay_relay_proto_init() { return nil } } - file_relay_relay_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_relay_relay_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetBlobsReply); i { case 0: return &v.state @@ -910,7 +732,7 @@ func file_relay_relay_proto_init() { return nil } } - file_relay_relay_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_relay_relay_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RequestedBlob); i { case 0: return &v.state @@ -922,7 +744,7 @@ func file_relay_relay_proto_init() { return nil } } - file_relay_relay_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_relay_relay_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetChunksRequest); i { case 0: return &v.state @@ -934,7 +756,7 @@ func file_relay_relay_proto_init() { return nil } } - file_relay_relay_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_relay_relay_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ChunkRequest); i { case 0: return &v.state @@ -946,7 +768,7 @@ func file_relay_relay_proto_init() { return nil } } - file_relay_relay_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_relay_relay_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetChunksReply); i { case 0: return &v.state @@ -958,7 +780,7 @@ func file_relay_relay_proto_init() { return nil } } - file_relay_relay_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_relay_relay_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlobChunks); i { case 0: return &v.state @@ -970,7 +792,7 @@ func file_relay_relay_proto_init() { return nil } } - file_relay_relay_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_relay_relay_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Chunks); i { case 0: return &v.state @@ -983,11 +805,11 @@ func file_relay_relay_proto_init() { } } } - file_relay_relay_proto_msgTypes[5].OneofWrappers = []interface{}{ + file_relay_relay_proto_msgTypes[2].OneofWrappers = []interface{}{ (*RequestedBlob_Blob)(nil), (*RequestedBlob_ErrorCode)(nil), } - file_relay_relay_proto_msgTypes[9].OneofWrappers = []interface{}{ + file_relay_relay_proto_msgTypes[6].OneofWrappers = []interface{}{ (*BlobChunks_Chunks)(nil), (*BlobChunks_ErrorCode)(nil), } @@ -997,9 +819,9 @@ func file_relay_relay_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_relay_relay_proto_rawDesc, NumEnums: 1, - NumMessages: 11, + NumMessages: 8, NumExtensions: 0, - NumServices: 2, + NumServices: 1, }, GoTypes: file_relay_relay_proto_goTypes, DependencyIndexes: file_relay_relay_proto_depIdxs, diff --git a/api/grpc/relay/relay_grpc.pb.go b/api/grpc/relay/relay_grpc.pb.go index 8c9b5dbc7..3d957db4a 100644 --- a/api/grpc/relay/relay_grpc.pb.go +++ b/api/grpc/relay/relay_grpc.pb.go @@ -18,98 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - PrivateRelay_UploadBlobs_FullMethodName = "/node.PrivateRelay/UploadBlobs" -) - -// PrivateRelayClient is the client API for PrivateRelay 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 PrivateRelayClient interface { - // UploadBlobs uploads blobs and encoded blob chunks to the relay. - UploadBlobs(ctx context.Context, in *UploadBlobsRequest, opts ...grpc.CallOption) (*UploadBlobsReply, error) -} - -type privateRelayClient struct { - cc grpc.ClientConnInterface -} - -func NewPrivateRelayClient(cc grpc.ClientConnInterface) PrivateRelayClient { - return &privateRelayClient{cc} -} - -func (c *privateRelayClient) UploadBlobs(ctx context.Context, in *UploadBlobsRequest, opts ...grpc.CallOption) (*UploadBlobsReply, error) { - out := new(UploadBlobsReply) - err := c.cc.Invoke(ctx, PrivateRelay_UploadBlobs_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// PrivateRelayServer is the server API for PrivateRelay service. -// All implementations must embed UnimplementedPrivateRelayServer -// for forward compatibility -type PrivateRelayServer interface { - // UploadBlobs uploads blobs and encoded blob chunks to the relay. - UploadBlobs(context.Context, *UploadBlobsRequest) (*UploadBlobsReply, error) - mustEmbedUnimplementedPrivateRelayServer() -} - -// UnimplementedPrivateRelayServer must be embedded to have forward compatible implementations. -type UnimplementedPrivateRelayServer struct { -} - -func (UnimplementedPrivateRelayServer) UploadBlobs(context.Context, *UploadBlobsRequest) (*UploadBlobsReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method UploadBlobs not implemented") -} -func (UnimplementedPrivateRelayServer) mustEmbedUnimplementedPrivateRelayServer() {} - -// UnsafePrivateRelayServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to PrivateRelayServer will -// result in compilation errors. -type UnsafePrivateRelayServer interface { - mustEmbedUnimplementedPrivateRelayServer() -} - -func RegisterPrivateRelayServer(s grpc.ServiceRegistrar, srv PrivateRelayServer) { - s.RegisterService(&PrivateRelay_ServiceDesc, srv) -} - -func _PrivateRelay_UploadBlobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UploadBlobsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PrivateRelayServer).UploadBlobs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: PrivateRelay_UploadBlobs_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PrivateRelayServer).UploadBlobs(ctx, req.(*UploadBlobsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// PrivateRelay_ServiceDesc is the grpc.ServiceDesc for PrivateRelay service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var PrivateRelay_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "node.PrivateRelay", - HandlerType: (*PrivateRelayServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "UploadBlobs", - Handler: _PrivateRelay_UploadBlobs_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "relay/relay.proto", -} - const ( Relay_GetBlobs_FullMethodName = "/node.Relay/GetBlobs" Relay_GetChunks_FullMethodName = "/node.Relay/GetChunks" diff --git a/api/proto/relay/relay.proto b/api/proto/relay/relay.proto index 9dd54f94f..acc7ad67d 100644 --- a/api/proto/relay/relay.proto +++ b/api/proto/relay/relay.proto @@ -7,13 +7,6 @@ option go_package = "github.com/Layr-Labs/eigenda/api/grpc/relay"; // Experimental: the following definitions are experimental and subject to change. // ///////////////////////////////////////////////////////////////////////////////////// -// PrivateRelay is a service that provides access to privileged relay functionality -// that isn't available to the general public. -service PrivateRelay { - // UploadBlobs uploads blobs and encoded blob chunks to the relay. - rpc UploadBlobs(UploadBlobsRequest) returns (UploadBlobsReply) {} -} - // Relay is a service that provides access to public relay functionality. service Relay { // GetBlobs retrieves blobs stored by the relay. @@ -23,25 +16,6 @@ service Relay { rpc GetChunks(GetChunksRequest) returns (GetChunksReply) {} } -// A request to upload one or more blobs. -message UploadBlobsRequest { - // The blobs to upload. - repeated BlobData blobs = 1; -} - -// A blob, its header, and its encoded chunks. -message BlobData { - // The unencoded blob data. - bytes blob = 1; - // The encoded blob chunks. - repeated common.ChunkData chunks = 2; -} - -// The reply to an UploadBlobs request. -message UploadBlobsReply { - -} - // A request to fetch one or more blobs. message GetBlobsRequest { // The hashes of the blobs to retrieve. The order of these requested headers will @@ -53,7 +27,7 @@ message GetBlobsRequest { uint64 requester_id = 2; // If this is an authenticated request, this field will hold a signature by the requester - // on the header hashes being requested. + // on the blob hashes being requested. bytes requester_signature = 3; } @@ -78,6 +52,14 @@ message RequestedBlob { message GetChunksRequest { // The chunk requests. Chunks are returned in the same order as they are requested. repeated ChunkRequest chunk_requests = 1; + + // If this is an authenticated request, this should hold the ID of the requester. If this + // is an unauthenticated request, this field should be empty. + uint64 requester_id = 2; + + // If this is an authenticated request, this field will hold a signature by the requester + // on the chunks being requested. + bytes requester_signature = 3; } // A request for chunks within a specific blob.