From 91feb282494dae4dd945eb269c79863266af4f63 Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Mon, 19 Aug 2024 13:58:41 -0500 Subject: [PATCH 01/31] Rough draft for DAS protobuffs. Signed-off-by: Cody Littley --- api/proto/disperser/disperser.proto | 61 ++++++++++- api/proto/lightnode/lightnode.proto | 65 ++++++++++++ api/proto/node/node.proto | 151 +++++++++++++++++++++++----- api/proto/retriever/retriever.proto | 41 +++++++- 4 files changed, 287 insertions(+), 31 deletions(-) create mode 100644 api/proto/lightnode/lightnode.proto diff --git a/api/proto/disperser/disperser.proto b/api/proto/disperser/disperser.proto index d83aaf3124..c45c1ca218 100644 --- a/api/proto/disperser/disperser.proto +++ b/api/proto/disperser/disperser.proto @@ -31,7 +31,19 @@ service Disperser { // api/proto/retriever/retriever.proto). // The blob should have been initially dispersed via this Disperser service // for this API to work. - rpc RetrieveBlob(RetrieveBlobRequest) returns (RetrieveBlobReply) {} + rpc GetBlob(GetBlobRequest) returns (GetBlobReply) {} + + // Retrieves the requested chunk from the Disperser's backend. + rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} + + ///////////////////////////////// + // Deprecated RPCs, do not use // + ///////////////////////////////// + + // Deprecated: use GetBlob instead. + rpc RetrieveBlob(RetrieveBlobRequest) returns (RetrieveBlobReply) { + option deprecated = true; + } } // Requests and Responses @@ -115,17 +127,39 @@ message BlobStatusReply { BlobInfo info = 2; } -// RetrieveBlobRequest contains parameters to retrieve the blob. -message RetrieveBlobRequest { +// GetBlobRequest contains parameters to retrieve the blob. +message GetBlobRequest { bytes batch_header_hash = 1; uint32 blob_index = 2; } -// RetrieveBlobReply contains the retrieved blob data -message RetrieveBlobReply { +// GetBlobReply contains the retrieved blob data +message GetBlobReply { bytes data = 1; } +// TODO this is identical to the node.proto definition. Should we share this definition? +// A request to retrieve a specific chunk. +message GetChunkRequest { + // The hash of the blob's ReducedBatchHeader defined on-chain. + bytes batch_header_hash = 1; + // Which blob in the batch to retrieve for (note: a batch is logically an ordered + // list of blobs). + uint32 blob_index = 2; + // 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 = 3; + // Which chunk in the blob to retrieve. + uint32 chunk_index = 4; +} + +// A reply to GetChunkRequest. +message GetChunkReply { + // The chunk requested. + bytes chunk = 1; +} + // Data Types // BlobStatus represents the status of a blob. @@ -250,3 +284,20 @@ message BatchHeader { // (e.g. operator stakes) at this block number. uint32 reference_block_number = 4; } + +///////////////////////////////////// +// Deprecated messages, do not use // +///////////////////////////////////// + +// Deprecated: use GetBlobRequest instead. +message RetrieveBlobRequest { + option deprecated = true; + bytes batch_header_hash = 1; + uint32 blob_index = 2; +} + +// Deprecated: use GetBlobReply instead. +message RetrieveBlobReply { + option deprecated = true; + bytes data = 1; +} \ No newline at end of file diff --git a/api/proto/lightnode/lightnode.proto b/api/proto/lightnode/lightnode.proto new file mode 100644 index 0000000000..e8a74d867c --- /dev/null +++ b/api/proto/lightnode/lightnode.proto @@ -0,0 +1,65 @@ +syntax = "proto3"; +package lightnode; +option go_package = "github.com/Layr-Labs/eigenda/api/grpc/lightnode"; + +service LightNode { + // GetChunk retrieves a specific chunk held by the light node. + rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} + + // StreamAvailabilityStatus streams the availability status of all chunks assigned to the light node. + // For use by a DA node for monitoring the availability of chunks through its constellation of agent light nodes. + rpc StreamAvailabilityStatus(StreamAvailabilityStatusRequest) returns (stream SampledChunk) {} +} + +// TODO these message types are duplicated from node.proto, perhaps they should share a common definition + +// A request to retrieve a specific chunk. +message GetChunkRequest { + // The hash of the blob's ReducedBatchHeader defined on-chain. + bytes batch_header_hash = 1; + // Which blob in the batch to retrieve for (note: a batch is logically an ordered + // list of blobs). + uint32 blob_index = 2; + // 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 = 3; + // Which chunk in the blob to retrieve. + uint32 chunk_index = 4; +} + +// This describes how the chunks returned in GetChunkReply is encoded. +enum ChunkEncodingFormat { + UNKNOWN = 0; + GNARK = 1; + GOB = 2; +} + +// A reply to RetrieveChunkRequest. +message GetChunkReply { + // The chunk requested per RetrieveChunkRequest. + bytes chunk = 1; + // The encoding format of the chunk. + ChunkEncodingFormat chunk_encoding_format = 2; +} + +// A request from a DA node to an agent light node to stream the availability status of all chunks +// assigned to the light node. +message StreamAvailabilityStatusRequest { + // TODO describe protocol for authentication + bytes authentication_token = 1; +} + +// For every chunk verified by an agent light node, the agent light node sends a message to its parent DA node +// to indicate that the chunk is available. +message SampledChunk { + // The hash of the blob's ReducedBatchHeader defined on-chain. + bytes batch_header_hash = 1; + // The index of a blob within its batch (note: a batch is logically an ordered + // list of blobs). + uint32 blob_index = 2; + // The quorum ID of the blob. + uint32 quorum_id = 3; + // Which chunk in the blob this light node is responsible for sampling. + uint32 chunk_index = 4; +} \ No newline at end of file diff --git a/api/proto/node/node.proto b/api/proto/node/node.proto index f32fea64a8..249611664a 100644 --- a/api/proto/node/node.proto +++ b/api/proto/node/node.proto @@ -27,12 +27,32 @@ service Dispersal { } service Retrieval { - // RetrieveChunks retrieves the chunks for a blob custodied at the Node. - rpc RetrieveChunks(RetrieveChunksRequest) returns (RetrieveChunksReply) {} + // GetChunks retrieves all of the chunks for a blob held by the node. + rpc GetChunks(GetChunksRequest) returns (GetChunksReply) {} + // GetChunk retrieves a specific chunk for a blob custodied at the Node. + rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} + // StreamChunks requests a stream of chunks with a specific index. + rpc StreamChunks(stream StreamChunksRequest) returns (stream GetChunkReply) {} // GetBlobHeader is similar to RetrieveChunks, this just returns the header of the blob. rpc GetBlobHeader(GetBlobHeaderRequest) returns (GetBlobHeaderReply) {} - // Retrieve node info metadata - rpc NodeInfo(NodeInfoRequest) returns (NodeInfoReply) {} + // StreamBlobHeaders streams the blob headers to the client. + rpc StreamBlobHeaders(StreamBlobHeadersRequest) returns (stream GetBlobHeaderReply) {} + // Retrieve node info metadata. + rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoReply) {} + + ///////////////////////////////// + // Deprecated RPCs, do not use // + ///////////////////////////////// + + // Deprecated: Use GetChunks instead. + rpc RetrieveChunks(RetrieveChunksRequest) returns (RetrieveChunksReply) { + option deprecated = true; + } + + // Deprecated: Use GetNodeInfo instead. + rpc NodeInfo(NodeInfoRequest) returns (NodeInfoReply) { + option deprecated = true; + } } // Requests and replies @@ -74,8 +94,17 @@ message AttestBatchReply { bytes signature = 1; } -message RetrieveChunksRequest { - // The hash of the ReducedBatchHeader defined onchain, see: +// This describes how the chunks returned in GetChunksReply are encoded. +// Used to facilitate the decoding of chunks. +enum ChunkEncodingFormat { + UNKNOWN = 0; + GNARK = 1; + GOB = 2; +} + +// Request all of the chunks for a blob held by the node. +message GetChunksRequest { + // The hash of the ReducedBatchHeader defined on-chain, see: // https://github.com/Layr-Labs/eigenda/blob/master/contracts/src/interfaces/IEigenDAServiceManager.sol#L43 // This identifies which batch to retrieve for. bytes batch_header_hash = 1; @@ -88,21 +117,45 @@ message RetrieveChunksRequest { uint32 quorum_id = 3; } -// This describes how the chunks returned in RetrieveChunksReply are encoded. -// Used to facilitate the decoding of chunks. -enum ChunkEncodingFormat { - UNKNOWN = 0; - GNARK = 1; - GOB = 2; -} - -message RetrieveChunksReply { +// Reply to GetChunksRequest. +message GetChunksReply { // All chunks the Node is storing for the requested blob per RetrieveChunksRequest. repeated bytes chunks = 1; // How the above chunks are encoded. ChunkEncodingFormat chunk_encoding_format = 2; } +// A request to retrieve a specific chunk. +message GetChunkRequest { + // The hash of the blob's ReducedBatchHeader defined on-chain. + bytes batch_header_hash = 1; + // Which blob in the batch to retrieve for (note: a batch is logically an ordered + // list of blobs). + uint32 blob_index = 2; + // 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 = 3; + // Which chunk in the blob to retrieve. + uint32 chunk_index = 4; +} + +// A reply to RetrieveChunkRequest. +message GetChunkReply { + // The chunk requested per RetrieveChunkRequest. + bytes chunk = 1; + // The encoding format of the chunk. + ChunkEncodingFormat chunk_encoding_format = 2; +} + +// Request that all new chunks with a particular index be sent to the client. +message StreamChunksRequest { + // The quorum ID of the chunks to stream. + uint32 quorum_id = 1; + // The chunk index to start streaming from. + uint32 chunk_index = 2; +} + // See RetrieveChunksRequest for documentation of each parameter of GetBlobHeaderRequest. message GetBlobHeaderRequest { bytes batch_header_hash = 1; @@ -119,6 +172,12 @@ message GetBlobHeaderReply { MerkleProof proof = 2; } +// Request that all new blob headers be sent to the client. +message StreamBlobHeadersRequest { + // The quorum ID of the headers to stream. + uint32 quorum_id = 1; +} + message MerkleProof { // The proof itself. repeated bytes hashes = 1; @@ -204,15 +263,61 @@ message BatchHeader { uint32 reference_block_number = 3; } -// Node info request +// Node info request. +message GetNodeInfoRequest { +} + +// Node info reply. +message GetNodeInfoReply { + string semver = 1; + string arch = 2; + string os = 3; + uint32 num_cpu = 4; + uint64 mem_bytes = 5; +} + +///////////////////////////////////// +// Deprecated messages, do not use // +///////////////////////////////////// + +// Deprecated: Use RetrieveChunkRequest instead. +message RetrieveChunksRequest { + // Use GetChunksRequest instead. + option deprecated = true; + // The hash of the ReducedBatchHeader defined on-chain, see: + // https://github.com/Layr-Labs/eigenda/blob/master/contracts/src/interfaces/IEigenDAServiceManager.sol#L43 + // This identifies which batch to retrieve for. + bytes batch_header_hash = 1; + // Which blob in the batch to retrieve for (note: a batch is logically an ordered + // list of blobs). + uint32 blob_index = 2; + // 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 = 3; +} + +// Deprecated: Use RetrieveChunkReply instead. +message RetrieveChunksReply { + // Use GetChunksReply instead. + option deprecated = true; + // All chunks the Node is storing for the requested blob per RetrieveChunksRequest. + repeated bytes chunks = 1; + // How the above chunks are encoded. + ChunkEncodingFormat chunk_encoding_format = 2; +} + +// Deprecated: Use GetNodeInfoRequest instead. message NodeInfoRequest { + option deprecated = true; } -// Node info reply +// Deprecated: Use NodeInfoReply instead. message NodeInfoReply { - string semver = 1; - string arch = 2; - string os = 3; - uint32 num_cpu = 4; - uint64 mem_bytes = 5; -} + option deprecated = true; + string semver = 1; + string arch = 2; + string os = 3; + uint32 num_cpu = 4; + uint64 mem_bytes = 5; +} \ No newline at end of file diff --git a/api/proto/retriever/retriever.proto b/api/proto/retriever/retriever.proto index 754a9348fb..2ba8aad42b 100644 --- a/api/proto/retriever/retriever.proto +++ b/api/proto/retriever/retriever.proto @@ -17,12 +17,46 @@ package retriever; // (the 2nd approach here) removes the need to trust the Disperser, with the downside of // worse cost and performance. service Retriever { - // This fans out request to EigenDA Nodes to retrieve the chunks and returns the - // reconstructed original blob in response. - rpc RetrieveBlob(BlobRequest) returns (BlobReply) {} + + // Obtain the chunks necessary to reconstruct a blob and return it. + rpc GetBlob(GetBlobRequest) returns (GetBlobReply) {} + + ///////////////////////////////// + // Deprecated RPCs, do not use // + ///////////////////////////////// + + // Deprecated: use GetBlob instead. + rpc RetrieveBlob(BlobRequest) returns (BlobReply) { + option deprecated = true; + } +} + +message GetBlobRequest { + // The hash of the ReducedBatchHeader defined onchain, see: + // https://github.com/Layr-Labs/eigenda/blob/master/contracts/src/interfaces/IEigenDAServiceManager.sol#L43 + // This identifies the batch that this blob belongs to. + bytes batch_header_hash = 1; + // Which blob in the batch this is requesting for (note: a batch is logically an + // ordered list of blobs). + uint32 blob_index = 2; + // The Ethereum block number at which the batch for this blob was constructed. + uint32 reference_block_number = 3; + // Which quorum of the blob this is requesting for (note a blob can participate in + // multiple quorums). + uint32 quorum_id = 4; } +message GetBlobReply { + // The blob retrieved and reconstructed from the EigenDA Nodes per BlobRequest. + bytes data = 1; +} + +///////////////////////////////////// +// Deprecated messages, do not use // +///////////////////////////////////// + message BlobRequest { + option deprecated = true; // The hash of the ReducedBatchHeader defined onchain, see: // https://github.com/Layr-Labs/eigenda/blob/master/contracts/src/interfaces/IEigenDAServiceManager.sol#L43 // This identifies the batch that this blob belongs to. @@ -38,6 +72,7 @@ message BlobRequest { } message BlobReply { + option deprecated = true; // The blob retrieved and reconstructed from the EigenDA Nodes per BlobRequest. bytes data = 1; } From fe9abf168b0aecc014dd63bd8504e1c81da444a4 Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Mon, 19 Aug 2024 14:03:11 -0500 Subject: [PATCH 02/31] Fix whitespace. Signed-off-by: Cody Littley --- api/proto/lightnode/lightnode.proto | 68 +++++++++---------- api/proto/node/node.proto | 102 ++++++++++++++-------------- 2 files changed, 85 insertions(+), 85 deletions(-) diff --git a/api/proto/lightnode/lightnode.proto b/api/proto/lightnode/lightnode.proto index e8a74d867c..cd828e9573 100644 --- a/api/proto/lightnode/lightnode.proto +++ b/api/proto/lightnode/lightnode.proto @@ -3,63 +3,63 @@ package lightnode; option go_package = "github.com/Layr-Labs/eigenda/api/grpc/lightnode"; service LightNode { - // GetChunk retrieves a specific chunk held by the light node. - rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} + // GetChunk retrieves a specific chunk held by the light node. + rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} - // StreamAvailabilityStatus streams the availability status of all chunks assigned to the light node. - // For use by a DA node for monitoring the availability of chunks through its constellation of agent light nodes. - rpc StreamAvailabilityStatus(StreamAvailabilityStatusRequest) returns (stream SampledChunk) {} + // StreamAvailabilityStatus streams the availability status of all chunks assigned to the light node. + // For use by a DA node for monitoring the availability of chunks through its constellation of agent light nodes. + rpc StreamAvailabilityStatus(StreamAvailabilityStatusRequest) returns (stream SampledChunk) {} } // TODO these message types are duplicated from node.proto, perhaps they should share a common definition // A request to retrieve a specific chunk. message GetChunkRequest { - // The hash of the blob's ReducedBatchHeader defined on-chain. - bytes batch_header_hash = 1; - // Which blob in the batch to retrieve for (note: a batch is logically an ordered - // list of blobs). - uint32 blob_index = 2; - // 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 = 3; - // Which chunk in the blob to retrieve. - uint32 chunk_index = 4; + // The hash of the blob's ReducedBatchHeader defined on-chain. + bytes batch_header_hash = 1; + // Which blob in the batch to retrieve for (note: a batch is logically an ordered + // list of blobs). + uint32 blob_index = 2; + // 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 = 3; + // Which chunk in the blob to retrieve. + uint32 chunk_index = 4; } // This describes how the chunks returned in GetChunkReply is encoded. enum ChunkEncodingFormat { - UNKNOWN = 0; - GNARK = 1; - GOB = 2; + UNKNOWN = 0; + GNARK = 1; + GOB = 2; } // A reply to RetrieveChunkRequest. message GetChunkReply { - // The chunk requested per RetrieveChunkRequest. - bytes chunk = 1; - // The encoding format of the chunk. - ChunkEncodingFormat chunk_encoding_format = 2; + // The chunk requested per RetrieveChunkRequest. + bytes chunk = 1; + // The encoding format of the chunk. + ChunkEncodingFormat chunk_encoding_format = 2; } // A request from a DA node to an agent light node to stream the availability status of all chunks // assigned to the light node. message StreamAvailabilityStatusRequest { - // TODO describe protocol for authentication - bytes authentication_token = 1; + // TODO describe protocol for authentication + bytes authentication_token = 1; } // For every chunk verified by an agent light node, the agent light node sends a message to its parent DA node // to indicate that the chunk is available. message SampledChunk { - // The hash of the blob's ReducedBatchHeader defined on-chain. - bytes batch_header_hash = 1; - // The index of a blob within its batch (note: a batch is logically an ordered - // list of blobs). - uint32 blob_index = 2; - // The quorum ID of the blob. - uint32 quorum_id = 3; - // Which chunk in the blob this light node is responsible for sampling. - uint32 chunk_index = 4; + // The hash of the blob's ReducedBatchHeader defined on-chain. + bytes batch_header_hash = 1; + // The index of a blob within its batch (note: a batch is logically an ordered + // list of blobs). + uint32 blob_index = 2; + // The quorum ID of the blob. + uint32 quorum_id = 3; + // Which chunk in the blob this light node is responsible for sampling. + uint32 chunk_index = 4; } \ No newline at end of file diff --git a/api/proto/node/node.proto b/api/proto/node/node.proto index 249611664a..a7e9988062 100644 --- a/api/proto/node/node.proto +++ b/api/proto/node/node.proto @@ -27,8 +27,8 @@ service Dispersal { } service Retrieval { - // GetChunks retrieves all of the chunks for a blob held by the node. - rpc GetChunks(GetChunksRequest) returns (GetChunksReply) {} + // GetChunks retrieves all of the chunks for a blob held by the node. + rpc GetChunks(GetChunksRequest) returns (GetChunksReply) {} // GetChunk retrieves a specific chunk for a blob custodied at the Node. rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} // StreamChunks requests a stream of chunks with a specific index. @@ -37,22 +37,22 @@ service Retrieval { rpc GetBlobHeader(GetBlobHeaderRequest) returns (GetBlobHeaderReply) {} // StreamBlobHeaders streams the blob headers to the client. rpc StreamBlobHeaders(StreamBlobHeadersRequest) returns (stream GetBlobHeaderReply) {} - // Retrieve node info metadata. - rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoReply) {} - - ///////////////////////////////// - // Deprecated RPCs, do not use // - ///////////////////////////////// - - // Deprecated: Use GetChunks instead. - rpc RetrieveChunks(RetrieveChunksRequest) returns (RetrieveChunksReply) { - option deprecated = true; - } - - // Deprecated: Use GetNodeInfo instead. - rpc NodeInfo(NodeInfoRequest) returns (NodeInfoReply) { - option deprecated = true; - } + // Retrieve node info metadata. + rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoReply) {} + + ///////////////////////////////// + // Deprecated RPCs, do not use // + ///////////////////////////////// + + // Deprecated: Use GetChunks instead. + rpc RetrieveChunks(RetrieveChunksRequest) returns (RetrieveChunksReply) { + option deprecated = true; + } + + // Deprecated: Use GetNodeInfo instead. + rpc NodeInfo(NodeInfoRequest) returns (NodeInfoReply) { + option deprecated = true; + } } // Requests and replies @@ -174,8 +174,8 @@ message GetBlobHeaderReply { // Request that all new blob headers be sent to the client. message StreamBlobHeadersRequest { - // The quorum ID of the headers to stream. - uint32 quorum_id = 1; + // The quorum ID of the headers to stream. + uint32 quorum_id = 1; } message MerkleProof { @@ -269,11 +269,11 @@ message GetNodeInfoRequest { // Node info reply. message GetNodeInfoReply { - string semver = 1; - string arch = 2; - string os = 3; - uint32 num_cpu = 4; - uint64 mem_bytes = 5; + string semver = 1; + string arch = 2; + string os = 3; + uint32 num_cpu = 4; + uint64 mem_bytes = 5; } ///////////////////////////////////// @@ -282,42 +282,42 @@ message GetNodeInfoReply { // Deprecated: Use RetrieveChunkRequest instead. message RetrieveChunksRequest { - // Use GetChunksRequest instead. - option deprecated = true; - // The hash of the ReducedBatchHeader defined on-chain, see: - // https://github.com/Layr-Labs/eigenda/blob/master/contracts/src/interfaces/IEigenDAServiceManager.sol#L43 - // This identifies which batch to retrieve for. - bytes batch_header_hash = 1; - // Which blob in the batch to retrieve for (note: a batch is logically an ordered - // list of blobs). - uint32 blob_index = 2; - // 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 = 3; + // Use GetChunksRequest instead. + option deprecated = true; + // The hash of the ReducedBatchHeader defined on-chain, see: + // https://github.com/Layr-Labs/eigenda/blob/master/contracts/src/interfaces/IEigenDAServiceManager.sol#L43 + // This identifies which batch to retrieve for. + bytes batch_header_hash = 1; + // Which blob in the batch to retrieve for (note: a batch is logically an ordered + // list of blobs). + uint32 blob_index = 2; + // 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 = 3; } // Deprecated: Use RetrieveChunkReply instead. message RetrieveChunksReply { - // Use GetChunksReply instead. - option deprecated = true; - // All chunks the Node is storing for the requested blob per RetrieveChunksRequest. - repeated bytes chunks = 1; - // How the above chunks are encoded. - ChunkEncodingFormat chunk_encoding_format = 2; + // Use GetChunksReply instead. + option deprecated = true; + // All chunks the Node is storing for the requested blob per RetrieveChunksRequest. + repeated bytes chunks = 1; + // How the above chunks are encoded. + ChunkEncodingFormat chunk_encoding_format = 2; } // Deprecated: Use GetNodeInfoRequest instead. message NodeInfoRequest { - option deprecated = true; + option deprecated = true; } // Deprecated: Use NodeInfoReply instead. message NodeInfoReply { - option deprecated = true; - string semver = 1; - string arch = 2; - string os = 3; - uint32 num_cpu = 4; - uint64 mem_bytes = 5; + option deprecated = true; + string semver = 1; + string arch = 2; + string os = 3; + uint32 num_cpu = 4; + uint64 mem_bytes = 5; } \ No newline at end of file From 4f5aaf4cbd3a2bdab4128569b5c5a7a30bdd17c0 Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Thu, 22 Aug 2024 08:18:26 -0500 Subject: [PATCH 03/31] Removed unecessary RPC. Signed-off-by: Cody Littley --- api/proto/node/node.proto | 8 -------- 1 file changed, 8 deletions(-) diff --git a/api/proto/node/node.proto b/api/proto/node/node.proto index a7e9988062..f8538bd095 100644 --- a/api/proto/node/node.proto +++ b/api/proto/node/node.proto @@ -35,8 +35,6 @@ service Retrieval { rpc StreamChunks(stream StreamChunksRequest) returns (stream GetChunkReply) {} // GetBlobHeader is similar to RetrieveChunks, this just returns the header of the blob. rpc GetBlobHeader(GetBlobHeaderRequest) returns (GetBlobHeaderReply) {} - // StreamBlobHeaders streams the blob headers to the client. - rpc StreamBlobHeaders(StreamBlobHeadersRequest) returns (stream GetBlobHeaderReply) {} // Retrieve node info metadata. rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoReply) {} @@ -172,12 +170,6 @@ message GetBlobHeaderReply { MerkleProof proof = 2; } -// Request that all new blob headers be sent to the client. -message StreamBlobHeadersRequest { - // The quorum ID of the headers to stream. - uint32 quorum_id = 1; -} - message MerkleProof { // The proof itself. repeated bytes hashes = 1; From 3fd77c7a49a05902e20d8bd4c830a753c2b40c0d Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Tue, 27 Aug 2024 09:54:19 -0500 Subject: [PATCH 04/31] Make suggested changes. Signed-off-by: Cody Littley --- api/proto/common/common.proto | 47 ++++++++- api/proto/disperser/disperser.proto | 67 +++--------- api/proto/lightnode/lightnode.proto | 55 ++-------- api/proto/node/node.proto | 152 +++++++++------------------- 4 files changed, 113 insertions(+), 208 deletions(-) diff --git a/api/proto/common/common.proto b/api/proto/common/common.proto index 343222f88c..4d2765433c 100644 --- a/api/proto/common/common.proto +++ b/api/proto/common/common.proto @@ -3,8 +3,47 @@ package common; option go_package = "github.com/Layr-Labs/eigenda/api/grpc/common"; message G1Commitment { - // The X coordinate of the KZG commitment. This is the raw byte representation of the field element. - bytes x = 1; - // The Y coordinate of the KZG commitment. This is the raw byte representation of the field element. - bytes y = 2; + // The X coordinate of the KZG commitment. This is the raw byte representation of the field element. + bytes x = 1; + // The Y coordinate of the KZG commitment. This is the raw byte representation of the field element. + bytes y = 2; } + +///////////////////////////////////////////////////////////////////////////////////////////////// +// Messages for WIP RPCs. These are subject to change, do not consider these to be stable API. // +///////////////////////////////////////////////////////////////////////////////////////////////// + +// A unique identifier for a blob. +message BlobKey { + oneof key { + AuthHeaderBlobKey auth_header_blob_key = 1; + BatchHeaderBlobKey batch_header_blob_key = 2; + } +} + +// Uniquely identifies a blob based on its auth header hash. +message AuthHeaderBlobKey { + bytes auth_header_hash = 1; +} + +// Uniquely identifies a blob based on its batch header hash and blob index. +message BatchHeaderBlobKey { + bytes batch_header_hash = 1; + uint32 blob_index = 2; +} + +// A unique identifier for a chunk. +message ChunkKey { + BlobKey blob_key = 1; + uint32 chunk_index = 2; +} + +// A blob. +message BlobData { + bytes data = 1; +} + +// A chunk of a blob. +message ChunkData { + bytes data = 1; +} \ No newline at end of file diff --git a/api/proto/disperser/disperser.proto b/api/proto/disperser/disperser.proto index c45c1ca218..468121e049 100644 --- a/api/proto/disperser/disperser.proto +++ b/api/proto/disperser/disperser.proto @@ -31,19 +31,19 @@ service Disperser { // api/proto/retriever/retriever.proto). // The blob should have been initially dispersed via this Disperser service // for this API to work. - rpc GetBlob(GetBlobRequest) returns (GetBlobReply) {} + rpc RetrieveBlob(RetrieveBlobRequest) returns (RetrieveBlobReply) {} - // Retrieves the requested chunk from the Disperser's backend. - rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} + //////////////////////////////////////////////////////////////////////////////////////////////// + // These RPCs are a work in progress and are not yet fully functional. API may not be stable. // + //////////////////////////////////////////////////////////////////////////////////////////////// - ///////////////////////////////// - // Deprecated RPCs, do not use // - ///////////////////////////////// + // Retrieves the requested blob from the disperser's backend. + // This RPC is is a work in progress with undefined behavior, use with caution. + rpc GetBlob(common.BlobKey) returns (common.BlobData) {} - // Deprecated: use GetBlob instead. - rpc RetrieveBlob(RetrieveBlobRequest) returns (RetrieveBlobReply) { - option deprecated = true; - } + // Retrieves the requested chunk from the Disperser's backend. + // This RPC is is a work in progress with undefined behavior, use with caution. + rpc GetChunk(common.ChunkKey) returns (common.ChunkData) {} } // Requests and Responses @@ -127,39 +127,17 @@ message BlobStatusReply { BlobInfo info = 2; } -// GetBlobRequest contains parameters to retrieve the blob. -message GetBlobRequest { +// RetrieveBlobRequest contains parameters to retrieve the blob. +message RetrieveBlobRequest { bytes batch_header_hash = 1; uint32 blob_index = 2; } -// GetBlobReply contains the retrieved blob data -message GetBlobReply { +// RetrieveBlobReply contains the retrieved blob data +message RetrieveBlobReply { bytes data = 1; } -// TODO this is identical to the node.proto definition. Should we share this definition? -// A request to retrieve a specific chunk. -message GetChunkRequest { - // The hash of the blob's ReducedBatchHeader defined on-chain. - bytes batch_header_hash = 1; - // Which blob in the batch to retrieve for (note: a batch is logically an ordered - // list of blobs). - uint32 blob_index = 2; - // 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 = 3; - // Which chunk in the blob to retrieve. - uint32 chunk_index = 4; -} - -// A reply to GetChunkRequest. -message GetChunkReply { - // The chunk requested. - bytes chunk = 1; -} - // Data Types // BlobStatus represents the status of a blob. @@ -283,21 +261,4 @@ message BatchHeader { // The Disperser will encode and disperse the blobs based on the onchain info // (e.g. operator stakes) at this block number. uint32 reference_block_number = 4; -} - -///////////////////////////////////// -// Deprecated messages, do not use // -///////////////////////////////////// - -// Deprecated: use GetBlobRequest instead. -message RetrieveBlobRequest { - option deprecated = true; - bytes batch_header_hash = 1; - uint32 blob_index = 2; -} - -// Deprecated: use GetBlobReply instead. -message RetrieveBlobReply { - option deprecated = true; - bytes data = 1; } \ No newline at end of file diff --git a/api/proto/lightnode/lightnode.proto b/api/proto/lightnode/lightnode.proto index cd828e9573..0bfdcf7043 100644 --- a/api/proto/lightnode/lightnode.proto +++ b/api/proto/lightnode/lightnode.proto @@ -1,46 +1,19 @@ syntax = "proto3"; package lightnode; +import "common/common.proto"; option go_package = "github.com/Layr-Labs/eigenda/api/grpc/lightnode"; +/////////////////////////////////////////////////////////////////////////////////// +// Warning: light node APIs are currently in flux. This is not yet a stable API. // +/////////////////////////////////////////////////////////////////////////////////// + service LightNode { // GetChunk retrieves a specific chunk held by the light node. - rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} + rpc GetChunk(common.ChunkKey) returns (common.ChunkData) {} // StreamAvailabilityStatus streams the availability status of all chunks assigned to the light node. // For use by a DA node for monitoring the availability of chunks through its constellation of agent light nodes. - rpc StreamAvailabilityStatus(StreamAvailabilityStatusRequest) returns (stream SampledChunk) {} -} - -// TODO these message types are duplicated from node.proto, perhaps they should share a common definition - -// A request to retrieve a specific chunk. -message GetChunkRequest { - // The hash of the blob's ReducedBatchHeader defined on-chain. - bytes batch_header_hash = 1; - // Which blob in the batch to retrieve for (note: a batch is logically an ordered - // list of blobs). - uint32 blob_index = 2; - // 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 = 3; - // Which chunk in the blob to retrieve. - uint32 chunk_index = 4; -} - -// This describes how the chunks returned in GetChunkReply is encoded. -enum ChunkEncodingFormat { - UNKNOWN = 0; - GNARK = 1; - GOB = 2; -} - -// A reply to RetrieveChunkRequest. -message GetChunkReply { - // The chunk requested per RetrieveChunkRequest. - bytes chunk = 1; - // The encoding format of the chunk. - ChunkEncodingFormat chunk_encoding_format = 2; + rpc StreamAvailabilityStatus(StreamAvailabilityStatusRequest) returns (stream common.ChunkKey) {} } // A request from a DA node to an agent light node to stream the availability status of all chunks @@ -48,18 +21,4 @@ message GetChunkReply { message StreamAvailabilityStatusRequest { // TODO describe protocol for authentication bytes authentication_token = 1; -} - -// For every chunk verified by an agent light node, the agent light node sends a message to its parent DA node -// to indicate that the chunk is available. -message SampledChunk { - // The hash of the blob's ReducedBatchHeader defined on-chain. - bytes batch_header_hash = 1; - // The index of a blob within its batch (note: a batch is logically an ordered - // list of blobs). - uint32 blob_index = 2; - // The quorum ID of the blob. - uint32 quorum_id = 3; - // Which chunk in the blob this light node is responsible for sampling. - uint32 chunk_index = 4; } \ No newline at end of file diff --git a/api/proto/node/node.proto b/api/proto/node/node.proto index f8538bd095..a004f00e9e 100644 --- a/api/proto/node/node.proto +++ b/api/proto/node/node.proto @@ -27,30 +27,25 @@ service Dispersal { } service Retrieval { + // RetrieveChunks retrieves the chunks for a blob custodied at the Node. + rpc RetrieveChunks(RetrieveChunksRequest) returns (RetrieveChunksReply) {} + // Retrieve node info metadata + rpc NodeInfo(NodeInfoRequest) returns (NodeInfoReply) {} + + //////////////////////////////////////////////////////////////////////////////////////////////// + // These RPCs are a work in progress and are not yet fully functional. API may not be stable. // + //////////////////////////////////////////////////////////////////////////////////////////////// + // GetChunks retrieves all of the chunks for a blob held by the node. - rpc GetChunks(GetChunksRequest) returns (GetChunksReply) {} + rpc GetChunks(common.BlobKey) returns (GetChunksReply) {} // GetChunk retrieves a specific chunk for a blob custodied at the Node. - rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} + rpc GetChunk(common.ChunkKey) returns (common.ChunkData) {} // StreamChunks requests a stream of chunks with a specific index. - rpc StreamChunks(stream StreamChunksRequest) returns (stream GetChunkReply) {} + rpc StreamChunks(stream StreamChunksRequest) returns (stream common.ChunkData) {} // GetBlobHeader is similar to RetrieveChunks, this just returns the header of the blob. - rpc GetBlobHeader(GetBlobHeaderRequest) returns (GetBlobHeaderReply) {} + rpc GetBlobHeader(common.BlobKey) returns (GetBlobHeaderReply) {} // Retrieve node info metadata. rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoReply) {} - - ///////////////////////////////// - // Deprecated RPCs, do not use // - ///////////////////////////////// - - // Deprecated: Use GetChunks instead. - rpc RetrieveChunks(RetrieveChunksRequest) returns (RetrieveChunksReply) { - option deprecated = true; - } - - // Deprecated: Use GetNodeInfo instead. - rpc NodeInfo(NodeInfoRequest) returns (NodeInfoReply) { - option deprecated = true; - } } // Requests and replies @@ -100,8 +95,7 @@ enum ChunkEncodingFormat { GOB = 2; } -// Request all of the chunks for a blob held by the node. -message GetChunksRequest { +message RetrieveChunksRequest { // The hash of the ReducedBatchHeader defined on-chain, see: // https://github.com/Layr-Labs/eigenda/blob/master/contracts/src/interfaces/IEigenDAServiceManager.sol#L43 // This identifies which batch to retrieve for. @@ -115,59 +109,21 @@ message GetChunksRequest { uint32 quorum_id = 3; } -// Reply to GetChunksRequest. -message GetChunksReply { +message RetrieveChunksReply { // All chunks the Node is storing for the requested blob per RetrieveChunksRequest. repeated bytes chunks = 1; // How the above chunks are encoded. ChunkEncodingFormat chunk_encoding_format = 2; } -// A request to retrieve a specific chunk. -message GetChunkRequest { - // The hash of the blob's ReducedBatchHeader defined on-chain. - bytes batch_header_hash = 1; - // Which blob in the batch to retrieve for (note: a batch is logically an ordered - // list of blobs). - uint32 blob_index = 2; - // 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 = 3; - // Which chunk in the blob to retrieve. - uint32 chunk_index = 4; -} - -// A reply to RetrieveChunkRequest. -message GetChunkReply { - // The chunk requested per RetrieveChunkRequest. - bytes chunk = 1; - // The encoding format of the chunk. - ChunkEncodingFormat chunk_encoding_format = 2; -} +message NodeInfoRequest {} -// Request that all new chunks with a particular index be sent to the client. -message StreamChunksRequest { - // The quorum ID of the chunks to stream. - uint32 quorum_id = 1; - // The chunk index to start streaming from. - uint32 chunk_index = 2; -} - -// See RetrieveChunksRequest for documentation of each parameter of GetBlobHeaderRequest. -message GetBlobHeaderRequest { - bytes batch_header_hash = 1; - uint32 blob_index = 2; - uint32 quorum_id = 3; -} - -message GetBlobHeaderReply { - // The header of the blob requested per GetBlobHeaderRequest. - 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; +message NodeInfoReply { + string semver = 1; + string arch = 2; + string os = 3; + uint32 num_cpu = 4; + uint64 mem_bytes = 5; } message MerkleProof { @@ -268,48 +224,38 @@ message GetNodeInfoReply { uint64 mem_bytes = 5; } -///////////////////////////////////// -// Deprecated messages, do not use // -///////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////////////// +// Messages for WIP RPCs. These are subject to change, do not consider these to be stable API. // +///////////////////////////////////////////////////////////////////////////////////////////////// -// Deprecated: Use RetrieveChunkRequest instead. -message RetrieveChunksRequest { - // Use GetChunksRequest instead. - option deprecated = true; - // The hash of the ReducedBatchHeader defined on-chain, see: - // https://github.com/Layr-Labs/eigenda/blob/master/contracts/src/interfaces/IEigenDAServiceManager.sol#L43 - // This identifies which batch to retrieve for. - bytes batch_header_hash = 1; - // Which blob in the batch to retrieve for (note: a batch is logically an ordered - // list of blobs). - uint32 blob_index = 2; - // 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 = 3; +// Reply to GetChunksRequest. +message GetChunksReply { + // The indices of the chunks sent. Each index corresponds to the chunk at the same position in the chunks field. + repeated uint32 chunk_indices = 1; + // The chunks this node has. + repeated common.ChunkData chunks = 2; } -// Deprecated: Use RetrieveChunkReply instead. -message RetrieveChunksReply { - // Use GetChunksReply instead. - option deprecated = true; - // All chunks the Node is storing for the requested blob per RetrieveChunksRequest. - repeated bytes chunks = 1; - // How the above chunks are encoded. - ChunkEncodingFormat chunk_encoding_format = 2; +// Request that all new chunks with a particular index be sent to the client. +message StreamChunksRequest { + // The quorum ID of the chunks to stream. + uint32 quorum_id = 1; + // The chunk index to start streaming from. + uint32 chunk_index = 2; } -// Deprecated: Use GetNodeInfoRequest instead. -message NodeInfoRequest { - option deprecated = true; +// See RetrieveChunksRequest for documentation of each parameter of GetBlobHeaderRequest. +message GetBlobHeaderRequest { + bytes batch_header_hash = 1; + uint32 blob_index = 2; + uint32 quorum_id = 3; } -// Deprecated: Use NodeInfoReply instead. -message NodeInfoReply { - option deprecated = true; - string semver = 1; - string arch = 2; - string os = 3; - uint32 num_cpu = 4; - uint64 mem_bytes = 5; +message GetBlobHeaderReply { + // The header of the blob requested per GetBlobHeaderRequest. + 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; } \ No newline at end of file From 4a1a1ace8e0751dcbb9070098e18009cccf9827a Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Tue, 27 Aug 2024 09:58:09 -0500 Subject: [PATCH 05/31] Revert some changes. Signed-off-by: Cody Littley --- api/proto/node/node.proto | 56 ++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/api/proto/node/node.proto b/api/proto/node/node.proto index a004f00e9e..ad0a784e45 100644 --- a/api/proto/node/node.proto +++ b/api/proto/node/node.proto @@ -29,6 +29,8 @@ service Dispersal { service Retrieval { // RetrieveChunks retrieves the chunks for a blob custodied at the Node. rpc RetrieveChunks(RetrieveChunksRequest) returns (RetrieveChunksReply) {} + // GetBlobHeader is similar to RetrieveChunks, this just returns the header of the blob. + rpc GetBlobHeader(GetBlobHeaderRequest) returns (GetBlobHeaderReply) {} // Retrieve node info metadata rpc NodeInfo(NodeInfoRequest) returns (NodeInfoReply) {} @@ -42,8 +44,8 @@ service Retrieval { rpc GetChunk(common.ChunkKey) returns (common.ChunkData) {} // StreamChunks requests a stream of chunks with a specific index. rpc StreamChunks(stream StreamChunksRequest) returns (stream common.ChunkData) {} - // GetBlobHeader is similar to RetrieveChunks, this just returns the header of the blob. - rpc GetBlobHeader(common.BlobKey) returns (GetBlobHeaderReply) {} + // GetHeader is similar to RetrieveChunks, this just returns the header of the blob. + rpc GetHeader(common.BlobKey) returns (GetBlobHeaderReply) {} // Retrieve node info metadata. rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoReply) {} } @@ -87,16 +89,8 @@ message AttestBatchReply { bytes signature = 1; } -// This describes how the chunks returned in GetChunksReply are encoded. -// Used to facilitate the decoding of chunks. -enum ChunkEncodingFormat { - UNKNOWN = 0; - GNARK = 1; - GOB = 2; -} - message RetrieveChunksRequest { - // The hash of the ReducedBatchHeader defined on-chain, see: + // The hash of the ReducedBatchHeader defined onchain, see: // https://github.com/Layr-Labs/eigenda/blob/master/contracts/src/interfaces/IEigenDAServiceManager.sol#L43 // This identifies which batch to retrieve for. bytes batch_header_hash = 1; @@ -109,6 +103,14 @@ message RetrieveChunksRequest { uint32 quorum_id = 3; } +// This describes how the chunks returned in GetChunksReply are encoded. +// Used to facilitate the decoding of chunks. +enum ChunkEncodingFormat { + UNKNOWN = 0; + GNARK = 1; + GOB = 2; +} + message RetrieveChunksReply { // All chunks the Node is storing for the requested blob per RetrieveChunksRequest. repeated bytes chunks = 1; @@ -116,6 +118,22 @@ message RetrieveChunksReply { ChunkEncodingFormat chunk_encoding_format = 2; } +// See RetrieveChunksRequest for documentation of each parameter of GetBlobHeaderRequest. +message GetBlobHeaderRequest { + bytes batch_header_hash = 1; + uint32 blob_index = 2; + uint32 quorum_id = 3; +} + +message GetBlobHeaderReply { + // The header of the blob requested per GetBlobHeaderRequest. + 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; +} + message NodeInfoRequest {} message NodeInfoReply { @@ -242,20 +260,4 @@ message StreamChunksRequest { uint32 quorum_id = 1; // The chunk index to start streaming from. uint32 chunk_index = 2; -} - -// See RetrieveChunksRequest for documentation of each parameter of GetBlobHeaderRequest. -message GetBlobHeaderRequest { - bytes batch_header_hash = 1; - uint32 blob_index = 2; - uint32 quorum_id = 3; -} - -message GetBlobHeaderReply { - // The header of the blob requested per GetBlobHeaderRequest. - 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; } \ No newline at end of file From 135bae79bec451e7ef4896fa62ff41f6b49ef370 Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Tue, 27 Aug 2024 10:00:19 -0500 Subject: [PATCH 06/31] Minor changes. Signed-off-by: Cody Littley --- api/proto/node/node.proto | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/api/proto/node/node.proto b/api/proto/node/node.proto index ad0a784e45..136f9417e5 100644 --- a/api/proto/node/node.proto +++ b/api/proto/node/node.proto @@ -103,7 +103,7 @@ message RetrieveChunksRequest { uint32 quorum_id = 3; } -// This describes how the chunks returned in GetChunksReply are encoded. +// This describes how the chunks returned in RetrieveChunksReply are encoded. // Used to facilitate the decoding of chunks. enum ChunkEncodingFormat { UNKNOWN = 0; @@ -229,18 +229,7 @@ message BatchHeader { uint32 reference_block_number = 3; } -// Node info request. -message GetNodeInfoRequest { -} -// Node info reply. -message GetNodeInfoReply { - string semver = 1; - string arch = 2; - string os = 3; - uint32 num_cpu = 4; - uint64 mem_bytes = 5; -} ///////////////////////////////////////////////////////////////////////////////////////////////// // Messages for WIP RPCs. These are subject to change, do not consider these to be stable API. // @@ -260,4 +249,17 @@ message StreamChunksRequest { uint32 quorum_id = 1; // The chunk index to start streaming from. uint32 chunk_index = 2; +} + +// Node info request. +message GetNodeInfoRequest { +} + +// Node info reply. +message GetNodeInfoReply { + string semver = 1; + string arch = 2; + string os = 3; + uint32 num_cpu = 4; + uint64 mem_bytes = 5; } \ No newline at end of file From b8795c0456e7c9ef7da022170a6cb65c04d37897 Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Tue, 27 Aug 2024 10:01:46 -0500 Subject: [PATCH 07/31] Move things to original location. Signed-off-by: Cody Littley --- api/proto/node/node.proto | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/api/proto/node/node.proto b/api/proto/node/node.proto index 136f9417e5..d7a1d551c6 100644 --- a/api/proto/node/node.proto +++ b/api/proto/node/node.proto @@ -134,16 +134,6 @@ message GetBlobHeaderReply { MerkleProof proof = 2; } -message NodeInfoRequest {} - -message NodeInfoReply { - string semver = 1; - string arch = 2; - string os = 3; - uint32 num_cpu = 4; - uint64 mem_bytes = 5; -} - message MerkleProof { // The proof itself. repeated bytes hashes = 1; @@ -229,7 +219,15 @@ message BatchHeader { uint32 reference_block_number = 3; } +message NodeInfoRequest {} +message NodeInfoReply { + string semver = 1; + string arch = 2; + string os = 3; + uint32 num_cpu = 4; + uint64 mem_bytes = 5; +} ///////////////////////////////////////////////////////////////////////////////////////////////// // Messages for WIP RPCs. These are subject to change, do not consider these to be stable API. // From 31610fb5b13fcfea89c40fa5add601490f37afa0 Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Tue, 27 Aug 2024 10:03:46 -0500 Subject: [PATCH 08/31] Revert whitespace changes. Signed-off-by: Cody Littley --- api/proto/node/node.proto | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/api/proto/node/node.proto b/api/proto/node/node.proto index d7a1d551c6..80452026c0 100644 --- a/api/proto/node/node.proto +++ b/api/proto/node/node.proto @@ -29,8 +29,8 @@ service Dispersal { service Retrieval { // RetrieveChunks retrieves the chunks for a blob custodied at the Node. rpc RetrieveChunks(RetrieveChunksRequest) returns (RetrieveChunksReply) {} - // GetBlobHeader is similar to RetrieveChunks, this just returns the header of the blob. - rpc GetBlobHeader(GetBlobHeaderRequest) returns (GetBlobHeaderReply) {} + // GetBlobHeader is similar to RetrieveChunks, this just returns the header of the blob. + rpc GetBlobHeader(GetBlobHeaderRequest) returns (GetBlobHeaderReply) {} // Retrieve node info metadata rpc NodeInfo(NodeInfoRequest) returns (NodeInfoReply) {} @@ -120,18 +120,18 @@ message RetrieveChunksReply { // See RetrieveChunksRequest for documentation of each parameter of GetBlobHeaderRequest. message GetBlobHeaderRequest { - bytes batch_header_hash = 1; - uint32 blob_index = 2; - uint32 quorum_id = 3; + bytes batch_header_hash = 1; + uint32 blob_index = 2; + uint32 quorum_id = 3; } message GetBlobHeaderReply { - // The header of the blob requested per GetBlobHeaderRequest. - 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; + // The header of the blob requested per GetBlobHeaderRequest. + 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; } message MerkleProof { @@ -219,8 +219,11 @@ message BatchHeader { uint32 reference_block_number = 3; } -message NodeInfoRequest {} +// Node info request +message NodeInfoRequest { +} +// Node info reply message NodeInfoReply { string semver = 1; string arch = 2; From dce9903644502fed97c04071826db056c73df880 Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Tue, 27 Aug 2024 10:06:12 -0500 Subject: [PATCH 09/31] Fix retriever protos. Signed-off-by: Cody Littley --- api/proto/retriever/retriever.proto | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/api/proto/retriever/retriever.proto b/api/proto/retriever/retriever.proto index 2ba8aad42b..1f2b48535f 100644 --- a/api/proto/retriever/retriever.proto +++ b/api/proto/retriever/retriever.proto @@ -1,6 +1,7 @@ syntax = "proto3"; option go_package = "github.com/Layr-Labs/eigenda/api/grpc/retriever"; +import "common/common.proto"; package retriever; // The Retriever is a service for retrieving chunks corresponding to a blob from @@ -17,18 +18,16 @@ package retriever; // (the 2nd approach here) removes the need to trust the Disperser, with the downside of // worse cost and performance. service Retriever { + // This fans out request to EigenDA Nodes to retrieve the chunks and returns the + // reconstructed original blob in response. + rpc RetrieveBlob(BlobRequest) returns (BlobReply) {} - // Obtain the chunks necessary to reconstruct a blob and return it. - rpc GetBlob(GetBlobRequest) returns (GetBlobReply) {} - - ///////////////////////////////// - // Deprecated RPCs, do not use // - ///////////////////////////////// + //////////////////////////////////////////////////////////////////////////////////////////////// + // These RPCs are a work in progress and are not yet fully functional. API may not be stable. // + //////////////////////////////////////////////////////////////////////////////////////////////// - // Deprecated: use GetBlob instead. - rpc RetrieveBlob(BlobRequest) returns (BlobReply) { - option deprecated = true; - } + // Obtain the chunks necessary to reconstruct a blob and return it. + rpc GetBlob(common.BlobKey) returns (common.BlobData) {} } message GetBlobRequest { @@ -51,12 +50,7 @@ message GetBlobReply { bytes data = 1; } -///////////////////////////////////// -// Deprecated messages, do not use // -///////////////////////////////////// - message BlobRequest { - option deprecated = true; // The hash of the ReducedBatchHeader defined onchain, see: // https://github.com/Layr-Labs/eigenda/blob/master/contracts/src/interfaces/IEigenDAServiceManager.sol#L43 // This identifies the batch that this blob belongs to. @@ -72,7 +66,6 @@ message BlobRequest { } message BlobReply { - option deprecated = true; // The blob retrieved and reconstructed from the EigenDA Nodes per BlobRequest. bytes data = 1; } From 808311cdb70846aa5cdae0265400d5c0ec9f3a94 Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Tue, 27 Aug 2024 10:07:13 -0500 Subject: [PATCH 10/31] Remove unused messages. Signed-off-by: Cody Littley --- api/proto/retriever/retriever.proto | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/api/proto/retriever/retriever.proto b/api/proto/retriever/retriever.proto index 1f2b48535f..d05a35cafd 100644 --- a/api/proto/retriever/retriever.proto +++ b/api/proto/retriever/retriever.proto @@ -30,26 +30,6 @@ service Retriever { rpc GetBlob(common.BlobKey) returns (common.BlobData) {} } -message GetBlobRequest { - // The hash of the ReducedBatchHeader defined onchain, see: - // https://github.com/Layr-Labs/eigenda/blob/master/contracts/src/interfaces/IEigenDAServiceManager.sol#L43 - // This identifies the batch that this blob belongs to. - bytes batch_header_hash = 1; - // Which blob in the batch this is requesting for (note: a batch is logically an - // ordered list of blobs). - uint32 blob_index = 2; - // The Ethereum block number at which the batch for this blob was constructed. - uint32 reference_block_number = 3; - // Which quorum of the blob this is requesting for (note a blob can participate in - // multiple quorums). - uint32 quorum_id = 4; -} - -message GetBlobReply { - // The blob retrieved and reconstructed from the EigenDA Nodes per BlobRequest. - bytes data = 1; -} - message BlobRequest { // The hash of the ReducedBatchHeader defined onchain, see: // https://github.com/Layr-Labs/eigenda/blob/master/contracts/src/interfaces/IEigenDAServiceManager.sol#L43 From 204949a3e85367681ffe066459743562b3b93021 Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Wed, 28 Aug 2024 13:27:21 -0500 Subject: [PATCH 11/31] Made small changes. Signed-off-by: Cody Littley --- api/proto/node/node.proto | 11 +++++++++-- api/proto/retriever/retriever.proto | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/api/proto/node/node.proto b/api/proto/node/node.proto index 80452026c0..92b49d2dec 100644 --- a/api/proto/node/node.proto +++ b/api/proto/node/node.proto @@ -38,15 +38,18 @@ service Retrieval { // These RPCs are a work in progress and are not yet fully functional. API may not be stable. // //////////////////////////////////////////////////////////////////////////////////////////////// - // GetChunks retrieves all of the chunks for a blob held by the node. + // GetChunks retrieves all of the chunks for a blob held by the node. Eventually this will replace RetrieveChunks. rpc GetChunks(common.BlobKey) returns (GetChunksReply) {} // GetChunk retrieves a specific chunk for a blob custodied at the Node. rpc GetChunk(common.ChunkKey) returns (common.ChunkData) {} // StreamChunks requests a stream of chunks with a specific index. rpc StreamChunks(stream StreamChunksRequest) returns (stream common.ChunkData) {} // GetHeader is similar to RetrieveChunks, this just returns the header of the blob. + // Eventually this will replace GetBlobHeader. rpc GetHeader(common.BlobKey) returns (GetBlobHeaderReply) {} - // Retrieve node info metadata. + // StreamHeaders requests a stream all new headers. + rpc StreamHeaders(stream StreamHeadersRequest) returns (stream GetBlobHeaderReply) {} + // Retrieve node info metadata. Eventually this will replace NodeInfo. rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoReply) {} } @@ -252,6 +255,10 @@ message StreamChunksRequest { uint32 chunk_index = 2; } +// Request that all new headers be sent. +message StreamHeadersRequest { +} + // Node info request. message GetNodeInfoRequest { } diff --git a/api/proto/retriever/retriever.proto b/api/proto/retriever/retriever.proto index d05a35cafd..7ba70fb00d 100644 --- a/api/proto/retriever/retriever.proto +++ b/api/proto/retriever/retriever.proto @@ -27,6 +27,7 @@ service Retriever { //////////////////////////////////////////////////////////////////////////////////////////////// // Obtain the chunks necessary to reconstruct a blob and return it. + // Eventually this will replace RetrieveBlob. rpc GetBlob(common.BlobKey) returns (common.BlobData) {} } From 0dad952164b402d667129060890bce8103282c07 Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Thu, 29 Aug 2024 07:57:20 -0500 Subject: [PATCH 12/31] Made suggested changes. Signed-off-by: Cody Littley --- api/proto/common/common.proto | 19 ++++++++++--------- api/proto/node/node.proto | 21 +++++++++------------ 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/api/proto/common/common.proto b/api/proto/common/common.proto index 4d2765433c..fc520592fb 100644 --- a/api/proto/common/common.proto +++ b/api/proto/common/common.proto @@ -16,26 +16,27 @@ message G1Commitment { // A unique identifier for a blob. message BlobKey { oneof key { - AuthHeaderBlobKey auth_header_blob_key = 1; - BatchHeaderBlobKey batch_header_blob_key = 2; + HeaderBlobKey header_blob_key = 1; + CertificateBlobKey certificate_blob_key = 2; } } -// Uniquely identifies a blob based on its auth header hash. -message AuthHeaderBlobKey { - bytes auth_header_hash = 1; +// Uniquely identifies a blob based on its blob header hash. +message HeaderBlobKey { + bytes header_hash = 1; } -// Uniquely identifies a blob based on its batch header hash and blob index. -message BatchHeaderBlobKey { - bytes batch_header_hash = 1; +// Uniquely identifies a blob based on its certificate hash and blob index. +message CertificateBlobKey { + bytes certificate_hash = 1; uint32 blob_index = 2; } // A unique identifier for a chunk. message ChunkKey { BlobKey blob_key = 1; - uint32 chunk_index = 2; + uint32 quorum_id = 2; + uint32 chunk_index = 3; } // A blob. diff --git a/api/proto/node/node.proto b/api/proto/node/node.proto index 92b49d2dec..c52c2fed12 100644 --- a/api/proto/node/node.proto +++ b/api/proto/node/node.proto @@ -38,12 +38,11 @@ service Retrieval { // These RPCs are a work in progress and are not yet fully functional. API may not be stable. // //////////////////////////////////////////////////////////////////////////////////////////////// - // GetChunks retrieves all of the chunks for a blob held by the node. Eventually this will replace RetrieveChunks. - rpc GetChunks(common.BlobKey) returns (GetChunksReply) {} + // GetChunks retrieves all of the chunks from a specified quorum for a blob held by the node. + // Eventually this will replace RetrieveChunks. + rpc GetChunks(GetChunksRequest) returns (GetChunksReply) {} // GetChunk retrieves a specific chunk for a blob custodied at the Node. rpc GetChunk(common.ChunkKey) returns (common.ChunkData) {} - // StreamChunks requests a stream of chunks with a specific index. - rpc StreamChunks(stream StreamChunksRequest) returns (stream common.ChunkData) {} // GetHeader is similar to RetrieveChunks, this just returns the header of the blob. // Eventually this will replace GetBlobHeader. rpc GetHeader(common.BlobKey) returns (GetBlobHeaderReply) {} @@ -239,6 +238,12 @@ message NodeInfoReply { // Messages for WIP RPCs. These are subject to change, do not consider these to be stable API. // ///////////////////////////////////////////////////////////////////////////////////////////////// +// Request that all chunks from a particular quorum for a blob be sent. +message GetChunksRequest { + common.BlobKey blob_key = 1; + uint32 quorum_id = 2; +} + // Reply to GetChunksRequest. message GetChunksReply { // The indices of the chunks sent. Each index corresponds to the chunk at the same position in the chunks field. @@ -247,14 +252,6 @@ message GetChunksReply { repeated common.ChunkData chunks = 2; } -// Request that all new chunks with a particular index be sent to the client. -message StreamChunksRequest { - // The quorum ID of the chunks to stream. - uint32 quorum_id = 1; - // The chunk index to start streaming from. - uint32 chunk_index = 2; -} - // Request that all new headers be sent. message StreamHeadersRequest { } From 45bb35975215230685339c1bca7e5d55b8acddf1 Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Thu, 29 Aug 2024 10:43:06 -0500 Subject: [PATCH 13/31] Update protobufs. Signed-off-by: Cody Littley --- api/grpc/churner/churner.pb.go | 14 +- api/grpc/churner/churner_grpc.pb.go | 52 +- api/grpc/common/common.pb.go | 495 ++++++++++++++- api/grpc/disperser/disperser.pb.go | 80 ++- api/grpc/disperser/disperser_grpc.pb.go | 182 ++++-- api/grpc/lightnode/lightnode.pb.go | 169 ++++++ api/grpc/lightnode/lightnode_grpc.pb.go | 170 ++++++ api/grpc/node/node.pb.go | 567 +++++++++++++++--- api/grpc/node/node_grpc.pb.go | 269 ++++++++- api/grpc/retriever/retriever.pb.go | 74 ++- api/grpc/retriever/retriever_grpc.pb.go | 101 +++- disperser/api/grpc/encoder/encoder.pb.go | 14 +- disperser/api/grpc/encoder/encoder_grpc.pb.go | 30 +- go.mod | 8 +- go.sum | 21 +- 15 files changed, 1945 insertions(+), 301 deletions(-) create mode 100644 api/grpc/lightnode/lightnode.pb.go create mode 100644 api/grpc/lightnode/lightnode_grpc.pb.go diff --git a/api/grpc/churner/churner.pb.go b/api/grpc/churner/churner.pb.go index 3cf597b918..67947ff06d 100644 --- a/api/grpc/churner/churner.pb.go +++ b/api/grpc/churner/churner.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v4.23.4 +// protoc-gen-go v1.34.2 +// protoc v5.27.3 // source: churner/churner.proto package churner @@ -399,7 +399,7 @@ func file_churner_churner_proto_rawDescGZIP() []byte { } var file_churner_churner_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_churner_churner_proto_goTypes = []interface{}{ +var file_churner_churner_proto_goTypes = []any{ (*ChurnRequest)(nil), // 0: churner.ChurnRequest (*ChurnReply)(nil), // 1: churner.ChurnReply (*SignatureWithSaltAndExpiry)(nil), // 2: churner.SignatureWithSaltAndExpiry @@ -423,7 +423,7 @@ func file_churner_churner_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_churner_churner_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_churner_churner_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ChurnRequest); i { case 0: return &v.state @@ -435,7 +435,7 @@ func file_churner_churner_proto_init() { return nil } } - file_churner_churner_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_churner_churner_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ChurnReply); i { case 0: return &v.state @@ -447,7 +447,7 @@ func file_churner_churner_proto_init() { return nil } } - file_churner_churner_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_churner_churner_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*SignatureWithSaltAndExpiry); i { case 0: return &v.state @@ -459,7 +459,7 @@ func file_churner_churner_proto_init() { return nil } } - file_churner_churner_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_churner_churner_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*OperatorToChurn); i { case 0: return &v.state diff --git a/api/grpc/churner/churner_grpc.pb.go b/api/grpc/churner/churner_grpc.pb.go index 9958c263ca..c371618bea 100644 --- a/api/grpc/churner/churner_grpc.pb.go +++ b/api/grpc/churner/churner_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v4.23.4 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.27.3 // source: churner/churner.proto package churner @@ -15,8 +15,8 @@ import ( // 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 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Churner_Churn_FullMethodName = "/churner.Churner/Churn" @@ -25,6 +25,17 @@ const ( // ChurnerClient is the client API for Churner service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// The Churner is a service that handles churn requests from new operators trying to +// join the EigenDA network. +// When the EigenDA network reaches the maximum number of operators, any new operator +// trying to join will have to make a churn request to this Churner, which acts as the +// sole decision maker to decide whether this new operator could join, and if so, which +// existing operator will be churned out (so the max number of operators won't be +// exceeded). +// The max number of operators, as well as the rules to make churn decisions, are +// defined onchain, see details in OperatorSetParam at: +// https://github.com/Layr-Labs/eigenlayer-middleware/blob/master/src/interfaces/IBLSRegistryCoordinatorWithIndices.sol#L24. type ChurnerClient interface { Churn(ctx context.Context, in *ChurnRequest, opts ...grpc.CallOption) (*ChurnReply, error) } @@ -38,8 +49,9 @@ func NewChurnerClient(cc grpc.ClientConnInterface) ChurnerClient { } func (c *churnerClient) Churn(ctx context.Context, in *ChurnRequest, opts ...grpc.CallOption) (*ChurnReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ChurnReply) - err := c.cc.Invoke(ctx, Churner_Churn_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Churner_Churn_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -48,20 +60,35 @@ func (c *churnerClient) Churn(ctx context.Context, in *ChurnRequest, opts ...grp // ChurnerServer is the server API for Churner service. // All implementations must embed UnimplementedChurnerServer -// for forward compatibility +// for forward compatibility. +// +// The Churner is a service that handles churn requests from new operators trying to +// join the EigenDA network. +// When the EigenDA network reaches the maximum number of operators, any new operator +// trying to join will have to make a churn request to this Churner, which acts as the +// sole decision maker to decide whether this new operator could join, and if so, which +// existing operator will be churned out (so the max number of operators won't be +// exceeded). +// The max number of operators, as well as the rules to make churn decisions, are +// defined onchain, see details in OperatorSetParam at: +// https://github.com/Layr-Labs/eigenlayer-middleware/blob/master/src/interfaces/IBLSRegistryCoordinatorWithIndices.sol#L24. type ChurnerServer interface { Churn(context.Context, *ChurnRequest) (*ChurnReply, error) mustEmbedUnimplementedChurnerServer() } -// UnimplementedChurnerServer must be embedded to have forward compatible implementations. -type UnimplementedChurnerServer struct { -} +// UnimplementedChurnerServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedChurnerServer struct{} func (UnimplementedChurnerServer) Churn(context.Context, *ChurnRequest) (*ChurnReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Churn not implemented") } func (UnimplementedChurnerServer) mustEmbedUnimplementedChurnerServer() {} +func (UnimplementedChurnerServer) testEmbeddedByValue() {} // UnsafeChurnerServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ChurnerServer will @@ -71,6 +98,13 @@ type UnsafeChurnerServer interface { } func RegisterChurnerServer(s grpc.ServiceRegistrar, srv ChurnerServer) { + // If the following call pancis, it indicates UnimplementedChurnerServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Churner_ServiceDesc, srv) } diff --git a/api/grpc/common/common.pb.go b/api/grpc/common/common.pb.go index ce3f5be228..edf2081f06 100644 --- a/api/grpc/common/common.pb.go +++ b/api/grpc/common/common.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v4.23.4 +// protoc-gen-go v1.34.2 +// protoc v5.27.3 // source: common/common.proto package common @@ -77,6 +77,352 @@ func (x *G1Commitment) GetY() []byte { return nil } +// A unique identifier for a blob. +type BlobKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Key: + // + // *BlobKey_HeaderBlobKey + // *BlobKey_CertificateBlobKey + Key isBlobKey_Key `protobuf_oneof:"key"` +} + +func (x *BlobKey) Reset() { + *x = BlobKey{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlobKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlobKey) ProtoMessage() {} + +func (x *BlobKey) 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 BlobKey.ProtoReflect.Descriptor instead. +func (*BlobKey) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{1} +} + +func (m *BlobKey) GetKey() isBlobKey_Key { + if m != nil { + return m.Key + } + return nil +} + +func (x *BlobKey) GetHeaderBlobKey() *HeaderBlobKey { + if x, ok := x.GetKey().(*BlobKey_HeaderBlobKey); ok { + return x.HeaderBlobKey + } + return nil +} + +func (x *BlobKey) GetCertificateBlobKey() *CertificateBlobKey { + if x, ok := x.GetKey().(*BlobKey_CertificateBlobKey); ok { + return x.CertificateBlobKey + } + return nil +} + +type isBlobKey_Key interface { + isBlobKey_Key() +} + +type BlobKey_HeaderBlobKey struct { + HeaderBlobKey *HeaderBlobKey `protobuf:"bytes,1,opt,name=header_blob_key,json=headerBlobKey,proto3,oneof"` +} + +type BlobKey_CertificateBlobKey struct { + CertificateBlobKey *CertificateBlobKey `protobuf:"bytes,2,opt,name=certificate_blob_key,json=certificateBlobKey,proto3,oneof"` +} + +func (*BlobKey_HeaderBlobKey) isBlobKey_Key() {} + +func (*BlobKey_CertificateBlobKey) isBlobKey_Key() {} + +// Uniquely identifies a blob based on its blob header hash. +type HeaderBlobKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HeaderHash []byte `protobuf:"bytes,1,opt,name=header_hash,json=headerHash,proto3" json:"header_hash,omitempty"` +} + +func (x *HeaderBlobKey) Reset() { + *x = HeaderBlobKey{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeaderBlobKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeaderBlobKey) ProtoMessage() {} + +func (x *HeaderBlobKey) 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 HeaderBlobKey.ProtoReflect.Descriptor instead. +func (*HeaderBlobKey) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{2} +} + +func (x *HeaderBlobKey) GetHeaderHash() []byte { + if x != nil { + return x.HeaderHash + } + return nil +} + +// Uniquely identifies a blob based on its certificate hash and blob index. +type CertificateBlobKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CertificateHash []byte `protobuf:"bytes,1,opt,name=certificate_hash,json=certificateHash,proto3" json:"certificate_hash,omitempty"` + BlobIndex uint32 `protobuf:"varint,2,opt,name=blob_index,json=blobIndex,proto3" json:"blob_index,omitempty"` +} + +func (x *CertificateBlobKey) Reset() { + *x = CertificateBlobKey{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CertificateBlobKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CertificateBlobKey) ProtoMessage() {} + +func (x *CertificateBlobKey) 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 CertificateBlobKey.ProtoReflect.Descriptor instead. +func (*CertificateBlobKey) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{3} +} + +func (x *CertificateBlobKey) GetCertificateHash() []byte { + if x != nil { + return x.CertificateHash + } + return nil +} + +func (x *CertificateBlobKey) GetBlobIndex() uint32 { + if x != nil { + return x.BlobIndex + } + return 0 +} + +// A unique identifier for a chunk. +type ChunkKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlobKey *BlobKey `protobuf:"bytes,1,opt,name=blob_key,json=blobKey,proto3" json:"blob_key,omitempty"` + QuorumId uint32 `protobuf:"varint,2,opt,name=quorum_id,json=quorumId,proto3" json:"quorum_id,omitempty"` + ChunkIndex uint32 `protobuf:"varint,3,opt,name=chunk_index,json=chunkIndex,proto3" json:"chunk_index,omitempty"` +} + +func (x *ChunkKey) Reset() { + *x = ChunkKey{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChunkKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChunkKey) ProtoMessage() {} + +func (x *ChunkKey) ProtoReflect() protoreflect.Message { + mi := &file_common_common_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 ChunkKey.ProtoReflect.Descriptor instead. +func (*ChunkKey) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{4} +} + +func (x *ChunkKey) GetBlobKey() *BlobKey { + if x != nil { + return x.BlobKey + } + return nil +} + +func (x *ChunkKey) GetQuorumId() uint32 { + if x != nil { + return x.QuorumId + } + return 0 +} + +func (x *ChunkKey) GetChunkIndex() uint32 { + if x != nil { + return x.ChunkIndex + } + return 0 +} + +// A blob. +type BlobData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *BlobData) Reset() { + *x = BlobData{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[5] + 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_common_common_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 BlobData.ProtoReflect.Descriptor instead. +func (*BlobData) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{5} +} + +func (x *BlobData) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +// A chunk of a blob. +type ChunkData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *ChunkData) Reset() { + *x = ChunkData{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChunkData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChunkData) ProtoMessage() {} + +func (x *ChunkData) ProtoReflect() protoreflect.Message { + mi := &file_common_common_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 ChunkData.ProtoReflect.Descriptor instead. +func (*ChunkData) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{6} +} + +func (x *ChunkData) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + var File_common_common_proto protoreflect.FileDescriptor var file_common_common_proto_rawDesc = []byte{ @@ -84,11 +430,41 @@ 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, 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, 0xa1, 0x01, 0x0a, 0x07, 0x42, 0x6c, + 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, + 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x6c, + 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x0d, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, + 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x4e, 0x0a, 0x14, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, + 0x48, 0x00, 0x52, 0x12, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, + 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x42, 0x05, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x30, 0x0a, + 0x0d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 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, 0x22, + 0x5e, 0x0a, 0x12, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x6c, + 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x0f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, + 0x74, 0x0a, 0x08, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x4b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x08, 0x62, + 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 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, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x63, 0x68, 0x75, 0x6e, 0x6b, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x1e, 0x0a, 0x08, 0x42, 0x6c, 0x6f, 0x62, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 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 ( @@ -103,16 +479,25 @@ func file_common_common_proto_rawDescGZIP() []byte { return file_common_common_proto_rawDescData } -var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_common_common_proto_goTypes = []interface{}{ - (*G1Commitment)(nil), // 0: common.G1Commitment +var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_common_common_proto_goTypes = []any{ + (*G1Commitment)(nil), // 0: common.G1Commitment + (*BlobKey)(nil), // 1: common.BlobKey + (*HeaderBlobKey)(nil), // 2: common.HeaderBlobKey + (*CertificateBlobKey)(nil), // 3: common.CertificateBlobKey + (*ChunkKey)(nil), // 4: common.ChunkKey + (*BlobData)(nil), // 5: common.BlobData + (*ChunkData)(nil), // 6: 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 + 2, // 0: common.BlobKey.header_blob_key:type_name -> common.HeaderBlobKey + 3, // 1: common.BlobKey.certificate_blob_key:type_name -> common.CertificateBlobKey + 1, // 2: common.ChunkKey.blob_key:type_name -> common.BlobKey + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] 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_common_common_proto_init() } @@ -121,7 +506,7 @@ func file_common_common_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_common_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_common_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*G1Commitment); i { case 0: return &v.state @@ -133,6 +518,82 @@ func file_common_common_proto_init() { return nil } } + file_common_common_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*BlobKey); 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 any, i int) any { + switch v := v.(*HeaderBlobKey); 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 any, i int) any { + switch v := v.(*CertificateBlobKey); 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 any, i int) any { + switch v := v.(*ChunkKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_common_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*BlobData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_common_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ChunkData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_common_common_proto_msgTypes[1].OneofWrappers = []any{ + (*BlobKey_HeaderBlobKey)(nil), + (*BlobKey_CertificateBlobKey)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -140,7 +601,7 @@ func file_common_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_common_common_proto_rawDesc, NumEnums: 0, - NumMessages: 1, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/api/grpc/disperser/disperser.pb.go b/api/grpc/disperser/disperser.pb.go index 39b7f0a62c..945825c0bf 100644 --- a/api/grpc/disperser/disperser.pb.go +++ b/api/grpc/disperser/disperser.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v4.23.4 +// protoc-gen-go v1.34.2 +// protoc v5.27.3 // source: disperser/disperser.proto package disperser @@ -1339,7 +1339,7 @@ var file_disperser_disperser_proto_rawDesc = []byte{ 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, + 0x49, 0x53, 0x50, 0x45, 0x52, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x32, 0xbc, 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, @@ -1361,11 +1361,17 @@ var file_disperser_disperser_proto_rawDesc = []byte{ 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, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x2e, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x42, 0x6c, + 0x6f, 0x62, 0x12, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x62, + 0x4b, 0x65, 0x79, 0x1a, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, + 0x62, 0x44, 0x61, 0x74, 0x61, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x43, 0x68, + 0x75, 0x6e, 0x6b, 0x12, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x75, + 0x6e, 0x6b, 0x4b, 0x65, 0x79, 0x1a, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, + 0x68, 0x75, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 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 ( @@ -1382,7 +1388,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, 16) -var file_disperser_disperser_proto_goTypes = []interface{}{ +var file_disperser_disperser_proto_goTypes = []any{ (BlobStatus)(0), // 0: disperser.BlobStatus (*AuthenticatedRequest)(nil), // 1: disperser.AuthenticatedRequest (*AuthenticatedReply)(nil), // 2: disperser.AuthenticatedReply @@ -1401,6 +1407,10 @@ var file_disperser_disperser_proto_goTypes = []interface{}{ (*BatchMetadata)(nil), // 15: disperser.BatchMetadata (*BatchHeader)(nil), // 16: disperser.BatchHeader (*common.G1Commitment)(nil), // 17: common.G1Commitment + (*common.BlobKey)(nil), // 18: common.BlobKey + (*common.ChunkKey)(nil), // 19: common.ChunkKey + (*common.BlobData)(nil), // 20: common.BlobData + (*common.ChunkData)(nil), // 21: common.ChunkData } var file_disperser_disperser_proto_depIdxs = []int32{ 5, // 0: disperser.AuthenticatedRequest.disperse_request:type_name -> disperser.DisperseBlobRequest @@ -1420,12 +1430,16 @@ var file_disperser_disperser_proto_depIdxs = []int32{ 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 + 18, // 17: disperser.Disperser.GetBlob:input_type -> common.BlobKey + 19, // 18: disperser.Disperser.GetChunk:input_type -> common.ChunkKey + 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 + 20, // 23: disperser.Disperser.GetBlob:output_type -> common.BlobData + 21, // 24: disperser.Disperser.GetChunk:output_type -> common.ChunkData + 19, // [19:25] is the sub-list for method output_type + 13, // [13:19] 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 @@ -1437,7 +1451,7 @@ func file_disperser_disperser_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_disperser_disperser_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_disperser_disperser_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*AuthenticatedRequest); i { case 0: return &v.state @@ -1449,7 +1463,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_disperser_disperser_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*AuthenticatedReply); i { case 0: return &v.state @@ -1461,7 +1475,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_disperser_disperser_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*BlobAuthHeader); i { case 0: return &v.state @@ -1473,7 +1487,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_disperser_disperser_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*AuthenticationData); i { case 0: return &v.state @@ -1485,7 +1499,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_disperser_disperser_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*DisperseBlobRequest); i { case 0: return &v.state @@ -1497,7 +1511,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_disperser_disperser_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*DisperseBlobReply); i { case 0: return &v.state @@ -1509,7 +1523,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_disperser_disperser_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*BlobStatusRequest); i { case 0: return &v.state @@ -1521,7 +1535,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_disperser_disperser_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*BlobStatusReply); i { case 0: return &v.state @@ -1533,7 +1547,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_disperser_disperser_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*RetrieveBlobRequest); i { case 0: return &v.state @@ -1545,7 +1559,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_disperser_disperser_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*RetrieveBlobReply); i { case 0: return &v.state @@ -1557,7 +1571,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_disperser_disperser_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*BlobInfo); i { case 0: return &v.state @@ -1569,7 +1583,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_disperser_disperser_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*BlobHeader); i { case 0: return &v.state @@ -1581,7 +1595,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_disperser_disperser_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*BlobQuorumParam); i { case 0: return &v.state @@ -1593,7 +1607,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_disperser_disperser_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*BlobVerificationProof); i { case 0: return &v.state @@ -1605,7 +1619,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_disperser_disperser_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*BatchMetadata); i { case 0: return &v.state @@ -1617,7 +1631,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_disperser_disperser_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*BatchHeader); i { case 0: return &v.state @@ -1630,11 +1644,11 @@ func file_disperser_disperser_proto_init() { } } } - file_disperser_disperser_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_disperser_disperser_proto_msgTypes[0].OneofWrappers = []any{ (*AuthenticatedRequest_DisperseRequest)(nil), (*AuthenticatedRequest_AuthenticationData)(nil), } - file_disperser_disperser_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_disperser_disperser_proto_msgTypes[1].OneofWrappers = []any{ (*AuthenticatedReply_BlobAuthHeader)(nil), (*AuthenticatedReply_DisperseReply)(nil), } diff --git a/api/grpc/disperser/disperser_grpc.pb.go b/api/grpc/disperser/disperser_grpc.pb.go index 14f8e9f93a..004bf35139 100644 --- a/api/grpc/disperser/disperser_grpc.pb.go +++ b/api/grpc/disperser/disperser_grpc.pb.go @@ -1,13 +1,14 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v4.23.4 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.27.3 // source: disperser/disperser.proto package disperser import ( context "context" + common "github.com/Layr-Labs/eigenda/api/grpc/common" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -15,19 +16,23 @@ import ( // 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 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Disperser_DisperseBlob_FullMethodName = "/disperser.Disperser/DisperseBlob" Disperser_DisperseBlobAuthenticated_FullMethodName = "/disperser.Disperser/DisperseBlobAuthenticated" Disperser_GetBlobStatus_FullMethodName = "/disperser.Disperser/GetBlobStatus" Disperser_RetrieveBlob_FullMethodName = "/disperser.Disperser/RetrieveBlob" + Disperser_GetBlob_FullMethodName = "/disperser.Disperser/GetBlob" + Disperser_GetChunk_FullMethodName = "/disperser.Disperser/GetChunk" ) // 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. +// +// Disperser defines the public APIs for dispersing blobs. type DisperserClient interface { // This API accepts blob to disperse from clients. // This executes the dispersal async, i.e. it returns once the request @@ -42,7 +47,7 @@ type DisperserClient interface { // 3. The client verifies the BlobAuthHeader and sends back the signed BlobAuthHeader in an // AuthenticationData message. // 4. The Disperser verifies the signature and returns a DisperseBlobReply message. - DisperseBlobAuthenticated(ctx context.Context, opts ...grpc.CallOption) (Disperser_DisperseBlobAuthenticatedClient, error) + DisperseBlobAuthenticated(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[AuthenticatedRequest, AuthenticatedReply], error) // This API is meant to be polled for the blob status. GetBlobStatus(ctx context.Context, in *BlobStatusRequest, opts ...grpc.CallOption) (*BlobStatusReply, error) // This retrieves the requested blob from the Disperser's backend. @@ -52,6 +57,12 @@ 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 blob from the disperser's backend. + // This RPC is is a work in progress with undefined behavior, use with caution. + GetBlob(ctx context.Context, in *common.BlobKey, opts ...grpc.CallOption) (*common.BlobData, error) + // Retrieves the requested chunk from the Disperser's backend. + // This RPC is is a work in progress with undefined behavior, use with caution. + GetChunk(ctx context.Context, in *common.ChunkKey, opts ...grpc.CallOption) (*common.ChunkData, error) } type disperserClient struct { @@ -63,57 +74,62 @@ func NewDisperserClient(cc grpc.ClientConnInterface) DisperserClient { } func (c *disperserClient) DisperseBlob(ctx context.Context, in *DisperseBlobRequest, opts ...grpc.CallOption) (*DisperseBlobReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DisperseBlobReply) - err := c.cc.Invoke(ctx, Disperser_DisperseBlob_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Disperser_DisperseBlob_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *disperserClient) DisperseBlobAuthenticated(ctx context.Context, opts ...grpc.CallOption) (Disperser_DisperseBlobAuthenticatedClient, error) { - stream, err := c.cc.NewStream(ctx, &Disperser_ServiceDesc.Streams[0], Disperser_DisperseBlobAuthenticated_FullMethodName, opts...) +func (c *disperserClient) DisperseBlobAuthenticated(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[AuthenticatedRequest, AuthenticatedReply], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Disperser_ServiceDesc.Streams[0], Disperser_DisperseBlobAuthenticated_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &disperserDisperseBlobAuthenticatedClient{stream} + x := &grpc.GenericClientStream[AuthenticatedRequest, AuthenticatedReply]{ClientStream: stream} return x, nil } -type Disperser_DisperseBlobAuthenticatedClient interface { - Send(*AuthenticatedRequest) error - Recv() (*AuthenticatedReply, error) - grpc.ClientStream -} - -type disperserDisperseBlobAuthenticatedClient struct { - grpc.ClientStream -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Disperser_DisperseBlobAuthenticatedClient = grpc.BidiStreamingClient[AuthenticatedRequest, AuthenticatedReply] -func (x *disperserDisperseBlobAuthenticatedClient) Send(m *AuthenticatedRequest) error { - return x.ClientStream.SendMsg(m) +func (c *disperserClient) GetBlobStatus(ctx context.Context, in *BlobStatusRequest, opts ...grpc.CallOption) (*BlobStatusReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(BlobStatusReply) + err := c.cc.Invoke(ctx, Disperser_GetBlobStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil } -func (x *disperserDisperseBlobAuthenticatedClient) Recv() (*AuthenticatedReply, error) { - m := new(AuthenticatedReply) - if err := x.ClientStream.RecvMsg(m); err != nil { +func (c *disperserClient) RetrieveBlob(ctx context.Context, in *RetrieveBlobRequest, opts ...grpc.CallOption) (*RetrieveBlobReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RetrieveBlobReply) + err := c.cc.Invoke(ctx, Disperser_RetrieveBlob_FullMethodName, in, out, cOpts...) + if err != nil { return nil, err } - return m, nil + 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...) +func (c *disperserClient) GetBlob(ctx context.Context, in *common.BlobKey, opts ...grpc.CallOption) (*common.BlobData, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(common.BlobData) + err := c.cc.Invoke(ctx, Disperser_GetBlob_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *disperserClient) RetrieveBlob(ctx context.Context, in *RetrieveBlobRequest, opts ...grpc.CallOption) (*RetrieveBlobReply, error) { - out := new(RetrieveBlobReply) - err := c.cc.Invoke(ctx, Disperser_RetrieveBlob_FullMethodName, in, out, opts...) +func (c *disperserClient) GetChunk(ctx context.Context, in *common.ChunkKey, opts ...grpc.CallOption) (*common.ChunkData, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(common.ChunkData) + err := c.cc.Invoke(ctx, Disperser_GetChunk_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -122,7 +138,9 @@ func (c *disperserClient) RetrieveBlob(ctx context.Context, in *RetrieveBlobRequ // DisperserServer is the server API for Disperser service. // All implementations must embed UnimplementedDisperserServer -// for forward compatibility +// for forward compatibility. +// +// Disperser defines the public APIs for dispersing blobs. type DisperserServer interface { // This API accepts blob to disperse from clients. // This executes the dispersal async, i.e. it returns once the request @@ -137,7 +155,7 @@ type DisperserServer interface { // 3. The client verifies the BlobAuthHeader and sends back the signed BlobAuthHeader in an // AuthenticationData message. // 4. The Disperser verifies the signature and returns a DisperseBlobReply message. - DisperseBlobAuthenticated(Disperser_DisperseBlobAuthenticatedServer) error + DisperseBlobAuthenticated(grpc.BidiStreamingServer[AuthenticatedRequest, AuthenticatedReply]) error // This API is meant to be polled for the blob status. GetBlobStatus(context.Context, *BlobStatusRequest) (*BlobStatusReply, error) // This retrieves the requested blob from the Disperser's backend. @@ -147,17 +165,26 @@ 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 blob from the disperser's backend. + // This RPC is is a work in progress with undefined behavior, use with caution. + GetBlob(context.Context, *common.BlobKey) (*common.BlobData, error) + // Retrieves the requested chunk from the Disperser's backend. + // This RPC is is a work in progress with undefined behavior, use with caution. + GetChunk(context.Context, *common.ChunkKey) (*common.ChunkData, error) mustEmbedUnimplementedDisperserServer() } -// UnimplementedDisperserServer must be embedded to have forward compatible implementations. -type UnimplementedDisperserServer struct { -} +// UnimplementedDisperserServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedDisperserServer struct{} func (UnimplementedDisperserServer) DisperseBlob(context.Context, *DisperseBlobRequest) (*DisperseBlobReply, error) { return nil, status.Errorf(codes.Unimplemented, "method DisperseBlob not implemented") } -func (UnimplementedDisperserServer) DisperseBlobAuthenticated(Disperser_DisperseBlobAuthenticatedServer) error { +func (UnimplementedDisperserServer) DisperseBlobAuthenticated(grpc.BidiStreamingServer[AuthenticatedRequest, AuthenticatedReply]) error { return status.Errorf(codes.Unimplemented, "method DisperseBlobAuthenticated not implemented") } func (UnimplementedDisperserServer) GetBlobStatus(context.Context, *BlobStatusRequest) (*BlobStatusReply, error) { @@ -166,7 +193,14 @@ 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) GetBlob(context.Context, *common.BlobKey) (*common.BlobData, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlob not implemented") +} +func (UnimplementedDisperserServer) GetChunk(context.Context, *common.ChunkKey) (*common.ChunkData, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") +} func (UnimplementedDisperserServer) mustEmbedUnimplementedDisperserServer() {} +func (UnimplementedDisperserServer) testEmbeddedByValue() {} // 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 @@ -176,6 +210,13 @@ type UnsafeDisperserServer interface { } func RegisterDisperserServer(s grpc.ServiceRegistrar, srv DisperserServer) { + // If the following call pancis, it indicates UnimplementedDisperserServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Disperser_ServiceDesc, srv) } @@ -198,30 +239,11 @@ func _Disperser_DisperseBlob_Handler(srv interface{}, ctx context.Context, dec f } func _Disperser_DisperseBlobAuthenticated_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(DisperserServer).DisperseBlobAuthenticated(&disperserDisperseBlobAuthenticatedServer{stream}) + return srv.(DisperserServer).DisperseBlobAuthenticated(&grpc.GenericServerStream[AuthenticatedRequest, AuthenticatedReply]{ServerStream: stream}) } -type Disperser_DisperseBlobAuthenticatedServer interface { - Send(*AuthenticatedReply) error - Recv() (*AuthenticatedRequest, error) - grpc.ServerStream -} - -type disperserDisperseBlobAuthenticatedServer struct { - grpc.ServerStream -} - -func (x *disperserDisperseBlobAuthenticatedServer) Send(m *AuthenticatedReply) error { - return x.ServerStream.SendMsg(m) -} - -func (x *disperserDisperseBlobAuthenticatedServer) Recv() (*AuthenticatedRequest, error) { - m := new(AuthenticatedRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Disperser_DisperseBlobAuthenticatedServer = grpc.BidiStreamingServer[AuthenticatedRequest, AuthenticatedReply] func _Disperser_GetBlobStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(BlobStatusRequest) @@ -259,6 +281,42 @@ func _Disperser_RetrieveBlob_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Disperser_GetBlob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(common.BlobKey) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DisperserServer).GetBlob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Disperser_GetBlob_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DisperserServer).GetBlob(ctx, req.(*common.BlobKey)) + } + 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(common.ChunkKey) + 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.(*common.ChunkKey)) + } + 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) @@ -278,6 +336,14 @@ var Disperser_ServiceDesc = grpc.ServiceDesc{ MethodName: "RetrieveBlob", Handler: _Disperser_RetrieveBlob_Handler, }, + { + MethodName: "GetBlob", + Handler: _Disperser_GetBlob_Handler, + }, + { + MethodName: "GetChunk", + Handler: _Disperser_GetChunk_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/api/grpc/lightnode/lightnode.pb.go b/api/grpc/lightnode/lightnode.pb.go new file mode 100644 index 0000000000..227721347c --- /dev/null +++ b/api/grpc/lightnode/lightnode.pb.go @@ -0,0 +1,169 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v5.27.3 +// source: lightnode/lightnode.proto + +package lightnode + +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) +) + +// A request from a DA node to an agent light node to stream the availability status of all chunks +// assigned to the light node. +type StreamAvailabilityStatusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // TODO describe protocol for authentication + AuthenticationToken []byte `protobuf:"bytes,1,opt,name=authentication_token,json=authenticationToken,proto3" json:"authentication_token,omitempty"` +} + +func (x *StreamAvailabilityStatusRequest) Reset() { + *x = StreamAvailabilityStatusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_lightnode_lightnode_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamAvailabilityStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamAvailabilityStatusRequest) ProtoMessage() {} + +func (x *StreamAvailabilityStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_lightnode_lightnode_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 StreamAvailabilityStatusRequest.ProtoReflect.Descriptor instead. +func (*StreamAvailabilityStatusRequest) Descriptor() ([]byte, []int) { + return file_lightnode_lightnode_proto_rawDescGZIP(), []int{0} +} + +func (x *StreamAvailabilityStatusRequest) GetAuthenticationToken() []byte { + if x != nil { + return x.AuthenticationToken + } + return nil +} + +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, 0x54, 0x0a, 0x1f, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x32, 0x9c, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x31, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x10, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x4b, 0x65, 0x79, 0x1a, 0x11, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, + 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x18, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, + 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x4b, 0x65, 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 ( + file_lightnode_lightnode_proto_rawDescOnce sync.Once + file_lightnode_lightnode_proto_rawDescData = file_lightnode_lightnode_proto_rawDesc +) + +func file_lightnode_lightnode_proto_rawDescGZIP() []byte { + file_lightnode_lightnode_proto_rawDescOnce.Do(func() { + file_lightnode_lightnode_proto_rawDescData = protoimpl.X.CompressGZIP(file_lightnode_lightnode_proto_rawDescData) + }) + return file_lightnode_lightnode_proto_rawDescData +} + +var file_lightnode_lightnode_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_lightnode_lightnode_proto_goTypes = []any{ + (*StreamAvailabilityStatusRequest)(nil), // 0: lightnode.StreamAvailabilityStatusRequest + (*common.ChunkKey)(nil), // 1: common.ChunkKey + (*common.ChunkData)(nil), // 2: common.ChunkData +} +var file_lightnode_lightnode_proto_depIdxs = []int32{ + 1, // 0: lightnode.LightNode.GetChunk:input_type -> common.ChunkKey + 0, // 1: lightnode.LightNode.StreamAvailabilityStatus:input_type -> lightnode.StreamAvailabilityStatusRequest + 2, // 2: lightnode.LightNode.GetChunk:output_type -> common.ChunkData + 1, // 3: lightnode.LightNode.StreamAvailabilityStatus:output_type -> common.ChunkKey + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_lightnode_lightnode_proto_init() } +func file_lightnode_lightnode_proto_init() { + if File_lightnode_lightnode_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_lightnode_lightnode_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*StreamAvailabilityStatusRequest); 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_lightnode_lightnode_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_lightnode_lightnode_proto_goTypes, + DependencyIndexes: file_lightnode_lightnode_proto_depIdxs, + MessageInfos: file_lightnode_lightnode_proto_msgTypes, + }.Build() + File_lightnode_lightnode_proto = out.File + file_lightnode_lightnode_proto_rawDesc = nil + file_lightnode_lightnode_proto_goTypes = nil + file_lightnode_lightnode_proto_depIdxs = nil +} diff --git a/api/grpc/lightnode/lightnode_grpc.pb.go b/api/grpc/lightnode/lightnode_grpc.pb.go new file mode 100644 index 0000000000..208dd336e7 --- /dev/null +++ b/api/grpc/lightnode/lightnode_grpc.pb.go @@ -0,0 +1,170 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.27.3 +// source: lightnode/lightnode.proto + +package lightnode + +import ( + context "context" + common "github.com/Layr-Labs/eigenda/api/grpc/common" + 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.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + LightNode_GetChunk_FullMethodName = "/lightnode.LightNode/GetChunk" + LightNode_StreamAvailabilityStatus_FullMethodName = "/lightnode.LightNode/StreamAvailabilityStatus" +) + +// LightNodeClient is the client API for LightNode 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 LightNodeClient interface { + // GetChunk retrieves a specific chunk held by the light node. + GetChunk(ctx context.Context, in *common.ChunkKey, opts ...grpc.CallOption) (*common.ChunkData, error) + // StreamAvailabilityStatus streams the availability status of all chunks assigned to the light node. + // For use by a DA node for monitoring the availability of chunks through its constellation of agent light nodes. + StreamAvailabilityStatus(ctx context.Context, in *StreamAvailabilityStatusRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[common.ChunkKey], error) +} + +type lightNodeClient struct { + cc grpc.ClientConnInterface +} + +func NewLightNodeClient(cc grpc.ClientConnInterface) LightNodeClient { + return &lightNodeClient{cc} +} + +func (c *lightNodeClient) GetChunk(ctx context.Context, in *common.ChunkKey, opts ...grpc.CallOption) (*common.ChunkData, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(common.ChunkData) + err := c.cc.Invoke(ctx, LightNode_GetChunk_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightNodeClient) StreamAvailabilityStatus(ctx context.Context, in *StreamAvailabilityStatusRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[common.ChunkKey], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &LightNode_ServiceDesc.Streams[0], LightNode_StreamAvailabilityStatus_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[StreamAvailabilityStatusRequest, common.ChunkKey]{ClientStream: stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type LightNode_StreamAvailabilityStatusClient = grpc.ServerStreamingClient[common.ChunkKey] + +// LightNodeServer is the server API for LightNode service. +// All implementations must embed UnimplementedLightNodeServer +// for forward compatibility. +type LightNodeServer interface { + // GetChunk retrieves a specific chunk held by the light node. + GetChunk(context.Context, *common.ChunkKey) (*common.ChunkData, error) + // StreamAvailabilityStatus streams the availability status of all chunks assigned to the light node. + // For use by a DA node for monitoring the availability of chunks through its constellation of agent light nodes. + StreamAvailabilityStatus(*StreamAvailabilityStatusRequest, grpc.ServerStreamingServer[common.ChunkKey]) error + mustEmbedUnimplementedLightNodeServer() +} + +// UnimplementedLightNodeServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedLightNodeServer struct{} + +func (UnimplementedLightNodeServer) GetChunk(context.Context, *common.ChunkKey) (*common.ChunkData, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") +} +func (UnimplementedLightNodeServer) StreamAvailabilityStatus(*StreamAvailabilityStatusRequest, grpc.ServerStreamingServer[common.ChunkKey]) error { + return status.Errorf(codes.Unimplemented, "method StreamAvailabilityStatus not implemented") +} +func (UnimplementedLightNodeServer) mustEmbedUnimplementedLightNodeServer() {} +func (UnimplementedLightNodeServer) testEmbeddedByValue() {} + +// UnsafeLightNodeServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to LightNodeServer will +// result in compilation errors. +type UnsafeLightNodeServer interface { + mustEmbedUnimplementedLightNodeServer() +} + +func RegisterLightNodeServer(s grpc.ServiceRegistrar, srv LightNodeServer) { + // If the following call pancis, it indicates UnimplementedLightNodeServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&LightNode_ServiceDesc, srv) +} + +func _LightNode_GetChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(common.ChunkKey) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightNodeServer).GetChunk(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightNode_GetChunk_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightNodeServer).GetChunk(ctx, req.(*common.ChunkKey)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightNode_StreamAvailabilityStatus_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamAvailabilityStatusRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(LightNodeServer).StreamAvailabilityStatus(m, &grpc.GenericServerStream[StreamAvailabilityStatusRequest, common.ChunkKey]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type LightNode_StreamAvailabilityStatusServer = grpc.ServerStreamingServer[common.ChunkKey] + +// LightNode_ServiceDesc is the grpc.ServiceDesc for LightNode service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var LightNode_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "lightnode.LightNode", + HandlerType: (*LightNodeServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetChunk", + Handler: _LightNode_GetChunk_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamAvailabilityStatus", + Handler: _LightNode_StreamAvailabilityStatus_Handler, + ServerStreams: true, + }, + }, + Metadata: "lightnode/lightnode.proto", +} diff --git a/api/grpc/node/node.pb.go b/api/grpc/node/node.pb.go index b81c23ed2a..8158ea4bc2 100644 --- a/api/grpc/node/node.pb.go +++ b/api/grpc/node/node.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v4.23.4 +// protoc-gen-go v1.34.2 +// protoc v5.27.3 // source: node/node.proto package node @@ -1262,6 +1262,278 @@ func (x *NodeInfoReply) GetMemBytes() uint64 { return 0 } +// Request that all chunks from a particular quorum for a blob be sent. +type GetChunksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlobKey *common.BlobKey `protobuf:"bytes,1,opt,name=blob_key,json=blobKey,proto3" json:"blob_key,omitempty"` + 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_node_proto_msgTypes[19] + 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_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 GetChunksRequest.ProtoReflect.Descriptor instead. +func (*GetChunksRequest) Descriptor() ([]byte, []int) { + return file_node_node_proto_rawDescGZIP(), []int{19} +} + +func (x *GetChunksRequest) GetBlobKey() *common.BlobKey { + if x != nil { + return x.BlobKey + } + return nil +} + +func (x *GetChunksRequest) GetQuorumId() uint32 { + if x != nil { + return x.QuorumId + } + return 0 +} + +// Reply to GetChunksRequest. +type GetChunksReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The indices of the chunks sent. Each index corresponds to the chunk at the same position in the chunks field. + ChunkIndices []uint32 `protobuf:"varint,1,rep,packed,name=chunk_indices,json=chunkIndices,proto3" json:"chunk_indices,omitempty"` + // The chunks this node has. + Chunks []*common.ChunkData `protobuf:"bytes,2,rep,name=chunks,proto3" json:"chunks,omitempty"` +} + +func (x *GetChunksReply) Reset() { + *x = GetChunksReply{} + if protoimpl.UnsafeEnabled { + mi := &file_node_node_proto_msgTypes[20] + 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_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 GetChunksReply.ProtoReflect.Descriptor instead. +func (*GetChunksReply) Descriptor() ([]byte, []int) { + return file_node_node_proto_rawDescGZIP(), []int{20} +} + +func (x *GetChunksReply) GetChunkIndices() []uint32 { + if x != nil { + return x.ChunkIndices + } + return nil +} + +func (x *GetChunksReply) GetChunks() []*common.ChunkData { + if x != nil { + return x.Chunks + } + return nil +} + +// Request that all new headers be sent. +type StreamHeadersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StreamHeadersRequest) Reset() { + *x = StreamHeadersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_node_node_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamHeadersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamHeadersRequest) ProtoMessage() {} + +func (x *StreamHeadersRequest) ProtoReflect() protoreflect.Message { + mi := &file_node_node_proto_msgTypes[21] + 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 StreamHeadersRequest.ProtoReflect.Descriptor instead. +func (*StreamHeadersRequest) Descriptor() ([]byte, []int) { + return file_node_node_proto_rawDescGZIP(), []int{21} +} + +// Node info request. +type GetNodeInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetNodeInfoRequest) Reset() { + *x = GetNodeInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_node_node_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNodeInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodeInfoRequest) ProtoMessage() {} + +func (x *GetNodeInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_node_node_proto_msgTypes[22] + 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 GetNodeInfoRequest.ProtoReflect.Descriptor instead. +func (*GetNodeInfoRequest) Descriptor() ([]byte, []int) { + return file_node_node_proto_rawDescGZIP(), []int{22} +} + +// Node info reply. +type GetNodeInfoReply 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 *GetNodeInfoReply) Reset() { + *x = GetNodeInfoReply{} + if protoimpl.UnsafeEnabled { + mi := &file_node_node_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNodeInfoReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodeInfoReply) ProtoMessage() {} + +func (x *GetNodeInfoReply) ProtoReflect() protoreflect.Message { + mi := &file_node_node_proto_msgTypes[23] + 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 GetNodeInfoReply.ProtoReflect.Descriptor instead. +func (*GetNodeInfoReply) Descriptor() ([]byte, []int) { + return file_node_node_proto_rawDescGZIP(), []int{23} +} + +func (x *GetNodeInfoReply) GetSemver() string { + if x != nil { + return x.Semver + } + return "" +} + +func (x *GetNodeInfoReply) GetArch() string { + if x != nil { + return x.Arch + } + return "" +} + +func (x *GetNodeInfoReply) GetOs() string { + if x != nil { + return x.Os + } + return "" +} + +func (x *GetNodeInfoReply) GetNumCpu() uint32 { + if x != nil { + return x.NumCpu + } + return 0 +} + +func (x *GetNodeInfoReply) GetMemBytes() uint64 { + if x != nil { + return x.MemBytes + } + return 0 +} + var File_node_node_proto protoreflect.FileDescriptor var file_node_node_proto_rawDesc = []byte{ @@ -1403,45 +1675,88 @@ 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, 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, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x5b, + 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, + 0x6f, 0x62, 0x4b, 0x65, 0x79, 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, 0x60, 0x0a, 0x0e, 0x47, + 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x23, 0x0a, + 0x0d, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0c, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x49, 0x6e, 0x64, 0x69, 0x63, + 0x65, 0x73, 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, 0x16, 0x0a, + 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x10, + 0x47, 0x65, 0x74, 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, 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, 0x94, 0x04, 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, 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, 0x12, 0x31, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x10, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x4b, 0x65, 0x79, + 0x1a, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x44, + 0x61, 0x74, 0x61, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x12, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x62, + 0x4b, 0x65, 0x79, 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, + 0x4b, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x12, 0x1a, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 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, 0x28, 0x01, 0x30, 0x01, 0x12, 0x41, 0x0a, 0x0b, + 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, + 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 ( @@ -1457,8 +1772,8 @@ 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, 19) -var file_node_node_proto_goTypes = []interface{}{ +var file_node_node_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_node_node_proto_goTypes = []any{ (ChunkEncodingFormat)(0), // 0: node.ChunkEncodingFormat (*StoreChunksRequest)(nil), // 1: node.StoreChunksRequest (*StoreChunksReply)(nil), // 2: node.StoreChunksReply @@ -1479,43 +1794,63 @@ var file_node_node_proto_goTypes = []interface{}{ (*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 + (*GetChunksRequest)(nil), // 20: node.GetChunksRequest + (*GetChunksReply)(nil), // 21: node.GetChunksReply + (*StreamHeadersRequest)(nil), // 22: node.StreamHeadersRequest + (*GetNodeInfoRequest)(nil), // 23: node.GetNodeInfoRequest + (*GetNodeInfoReply)(nil), // 24: node.GetNodeInfoReply + (*wrapperspb.BytesValue)(nil), // 25: google.protobuf.BytesValue + (*common.G1Commitment)(nil), // 26: common.G1Commitment + (*common.BlobKey)(nil), // 27: common.BlobKey + (*common.ChunkData)(nil), // 28: common.ChunkData + (*common.ChunkKey)(nil), // 29: common.ChunkKey } 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 - 20, // 3: node.StoreBlobsReply.signatures:type_name -> google.protobuf.BytesValue + 25, // 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 - 21, // 10: node.BlobHeader.commitment:type_name -> common.G1Commitment + 26, // 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 - 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 + 27, // 14: node.GetChunksRequest.blob_key:type_name -> common.BlobKey + 28, // 15: node.GetChunksReply.chunks:type_name -> common.ChunkData + 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.GetChunks:input_type -> node.GetChunksRequest + 29, // 24: node.Retrieval.GetChunk:input_type -> common.ChunkKey + 27, // 25: node.Retrieval.GetHeader:input_type -> common.BlobKey + 22, // 26: node.Retrieval.StreamHeaders:input_type -> node.StreamHeadersRequest + 23, // 27: node.Retrieval.GetNodeInfo:input_type -> node.GetNodeInfoRequest + 2, // 28: node.Dispersal.StoreChunks:output_type -> node.StoreChunksReply + 4, // 29: node.Dispersal.StoreBlobs:output_type -> node.StoreBlobsReply + 6, // 30: node.Dispersal.AttestBatch:output_type -> node.AttestBatchReply + 19, // 31: node.Dispersal.NodeInfo:output_type -> node.NodeInfoReply + 8, // 32: node.Retrieval.RetrieveChunks:output_type -> node.RetrieveChunksReply + 10, // 33: node.Retrieval.GetBlobHeader:output_type -> node.GetBlobHeaderReply + 19, // 34: node.Retrieval.NodeInfo:output_type -> node.NodeInfoReply + 21, // 35: node.Retrieval.GetChunks:output_type -> node.GetChunksReply + 28, // 36: node.Retrieval.GetChunk:output_type -> common.ChunkData + 10, // 37: node.Retrieval.GetHeader:output_type -> node.GetBlobHeaderReply + 10, // 38: node.Retrieval.StreamHeaders:output_type -> node.GetBlobHeaderReply + 24, // 39: node.Retrieval.GetNodeInfo:output_type -> node.GetNodeInfoReply + 28, // [28:40] is the sub-list for method output_type + 16, // [16:28] 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 } func init() { file_node_node_proto_init() } @@ -1524,7 +1859,7 @@ func file_node_node_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_node_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*StoreChunksRequest); i { case 0: return &v.state @@ -1536,7 +1871,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*StoreChunksReply); i { case 0: return &v.state @@ -1548,7 +1883,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*StoreBlobsRequest); i { case 0: return &v.state @@ -1560,7 +1895,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*StoreBlobsReply); i { case 0: return &v.state @@ -1572,7 +1907,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*AttestBatchRequest); i { case 0: return &v.state @@ -1584,7 +1919,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*AttestBatchReply); i { case 0: return &v.state @@ -1596,7 +1931,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*RetrieveChunksRequest); i { case 0: return &v.state @@ -1608,7 +1943,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*RetrieveChunksReply); i { case 0: return &v.state @@ -1620,7 +1955,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*GetBlobHeaderRequest); i { case 0: return &v.state @@ -1632,7 +1967,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*GetBlobHeaderReply); i { case 0: return &v.state @@ -1644,7 +1979,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*MerkleProof); i { case 0: return &v.state @@ -1656,7 +1991,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*Blob); i { case 0: return &v.state @@ -1668,7 +2003,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*Bundle); i { case 0: return &v.state @@ -1680,7 +2015,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*G2Commitment); i { case 0: return &v.state @@ -1692,7 +2027,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*BlobHeader); i { case 0: return &v.state @@ -1704,7 +2039,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*BlobQuorumInfo); i { case 0: return &v.state @@ -1716,7 +2051,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*BatchHeader); i { case 0: return &v.state @@ -1728,7 +2063,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*NodeInfoRequest); i { case 0: return &v.state @@ -1740,7 +2075,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*NodeInfoReply); i { case 0: return &v.state @@ -1752,6 +2087,66 @@ func file_node_node_proto_init() { return nil } } + file_node_node_proto_msgTypes[19].Exporter = func(v any, i int) any { + 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_node_proto_msgTypes[20].Exporter = func(v any, i int) any { + 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_node_proto_msgTypes[21].Exporter = func(v any, i int) any { + switch v := v.(*StreamHeadersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_node_node_proto_msgTypes[22].Exporter = func(v any, i int) any { + switch v := v.(*GetNodeInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_node_node_proto_msgTypes[23].Exporter = func(v any, i int) any { + switch v := v.(*GetNodeInfoReply); 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{ @@ -1759,7 +2154,7 @@ func file_node_node_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_node_node_proto_rawDesc, NumEnums: 1, - NumMessages: 19, + NumMessages: 24, NumExtensions: 0, NumServices: 2, }, diff --git a/api/grpc/node/node_grpc.pb.go b/api/grpc/node/node_grpc.pb.go index 28a516cec7..7d1bfbb030 100644 --- a/api/grpc/node/node_grpc.pb.go +++ b/api/grpc/node/node_grpc.pb.go @@ -1,13 +1,14 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v4.23.4 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.27.3 // source: node/node.proto package node import ( context "context" + common "github.com/Layr-Labs/eigenda/api/grpc/common" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -15,8 +16,8 @@ import ( // 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 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Dispersal_StoreChunks_FullMethodName = "/node.Dispersal/StoreChunks" @@ -56,8 +57,9 @@ func NewDispersalClient(cc grpc.ClientConnInterface) DispersalClient { } func (c *dispersalClient) StoreChunks(ctx context.Context, in *StoreChunksRequest, opts ...grpc.CallOption) (*StoreChunksReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StoreChunksReply) - err := c.cc.Invoke(ctx, Dispersal_StoreChunks_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Dispersal_StoreChunks_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -65,8 +67,9 @@ func (c *dispersalClient) StoreChunks(ctx context.Context, in *StoreChunksReques } func (c *dispersalClient) StoreBlobs(ctx context.Context, in *StoreBlobsRequest, opts ...grpc.CallOption) (*StoreBlobsReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StoreBlobsReply) - err := c.cc.Invoke(ctx, Dispersal_StoreBlobs_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Dispersal_StoreBlobs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -74,8 +77,9 @@ func (c *dispersalClient) StoreBlobs(ctx context.Context, in *StoreBlobsRequest, } func (c *dispersalClient) AttestBatch(ctx context.Context, in *AttestBatchRequest, opts ...grpc.CallOption) (*AttestBatchReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AttestBatchReply) - err := c.cc.Invoke(ctx, Dispersal_AttestBatch_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Dispersal_AttestBatch_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -83,8 +87,9 @@ func (c *dispersalClient) AttestBatch(ctx context.Context, in *AttestBatchReques } func (c *dispersalClient) NodeInfo(ctx context.Context, in *NodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(NodeInfoReply) - err := c.cc.Invoke(ctx, Dispersal_NodeInfo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Dispersal_NodeInfo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -93,7 +98,7 @@ func (c *dispersalClient) NodeInfo(ctx context.Context, in *NodeInfoRequest, opt // DispersalServer is the server API for Dispersal service. // All implementations must embed UnimplementedDispersalServer -// for forward compatibility +// for forward compatibility. type DispersalServer interface { // StoreChunks validates that the chunks match what the Node is supposed to receive ( // different Nodes are responsible for different chunks, as EigenDA is horizontally @@ -114,9 +119,12 @@ type DispersalServer interface { mustEmbedUnimplementedDispersalServer() } -// UnimplementedDispersalServer must be embedded to have forward compatible implementations. -type UnimplementedDispersalServer struct { -} +// UnimplementedDispersalServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedDispersalServer struct{} func (UnimplementedDispersalServer) StoreChunks(context.Context, *StoreChunksRequest) (*StoreChunksReply, error) { return nil, status.Errorf(codes.Unimplemented, "method StoreChunks not implemented") @@ -131,6 +139,7 @@ func (UnimplementedDispersalServer) NodeInfo(context.Context, *NodeInfoRequest) return nil, status.Errorf(codes.Unimplemented, "method NodeInfo not implemented") } func (UnimplementedDispersalServer) mustEmbedUnimplementedDispersalServer() {} +func (UnimplementedDispersalServer) testEmbeddedByValue() {} // 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 @@ -140,6 +149,13 @@ type UnsafeDispersalServer interface { } func RegisterDispersalServer(s grpc.ServiceRegistrar, srv DispersalServer) { + // If the following call pancis, it indicates UnimplementedDispersalServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Dispersal_ServiceDesc, srv) } @@ -247,6 +263,11 @@ const ( Retrieval_RetrieveChunks_FullMethodName = "/node.Retrieval/RetrieveChunks" Retrieval_GetBlobHeader_FullMethodName = "/node.Retrieval/GetBlobHeader" Retrieval_NodeInfo_FullMethodName = "/node.Retrieval/NodeInfo" + Retrieval_GetChunks_FullMethodName = "/node.Retrieval/GetChunks" + Retrieval_GetChunk_FullMethodName = "/node.Retrieval/GetChunk" + Retrieval_GetHeader_FullMethodName = "/node.Retrieval/GetHeader" + Retrieval_StreamHeaders_FullMethodName = "/node.Retrieval/StreamHeaders" + Retrieval_GetNodeInfo_FullMethodName = "/node.Retrieval/GetNodeInfo" ) // RetrievalClient is the client API for Retrieval service. @@ -259,6 +280,18 @@ 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) + // GetChunks retrieves all of the chunks from a specified quorum for a blob held by the node. + // Eventually this will replace RetrieveChunks. + GetChunks(ctx context.Context, in *GetChunksRequest, opts ...grpc.CallOption) (*GetChunksReply, error) + // GetChunk retrieves a specific chunk for a blob custodied at the Node. + GetChunk(ctx context.Context, in *common.ChunkKey, opts ...grpc.CallOption) (*common.ChunkData, error) + // GetHeader is similar to RetrieveChunks, this just returns the header of the blob. + // Eventually this will replace GetBlobHeader. + GetHeader(ctx context.Context, in *common.BlobKey, opts ...grpc.CallOption) (*GetBlobHeaderReply, error) + // StreamHeaders requests a stream all new headers. + StreamHeaders(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StreamHeadersRequest, GetBlobHeaderReply], error) + // Retrieve node info metadata. Eventually this will replace NodeInfo. + GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoReply, error) } type retrievalClient struct { @@ -270,8 +303,9 @@ func NewRetrievalClient(cc grpc.ClientConnInterface) RetrievalClient { } func (c *retrievalClient) RetrieveChunks(ctx context.Context, in *RetrieveChunksRequest, opts ...grpc.CallOption) (*RetrieveChunksReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RetrieveChunksReply) - err := c.cc.Invoke(ctx, Retrieval_RetrieveChunks_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Retrieval_RetrieveChunks_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -279,8 +313,9 @@ func (c *retrievalClient) RetrieveChunks(ctx context.Context, in *RetrieveChunks } func (c *retrievalClient) GetBlobHeader(ctx context.Context, in *GetBlobHeaderRequest, opts ...grpc.CallOption) (*GetBlobHeaderReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetBlobHeaderReply) - err := c.cc.Invoke(ctx, Retrieval_GetBlobHeader_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Retrieval_GetBlobHeader_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -288,8 +323,62 @@ func (c *retrievalClient) GetBlobHeader(ctx context.Context, in *GetBlobHeaderRe } func (c *retrievalClient) NodeInfo(ctx context.Context, in *NodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(NodeInfoReply) - err := c.cc.Invoke(ctx, Retrieval_NodeInfo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Retrieval_NodeInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *retrievalClient) GetChunks(ctx context.Context, in *GetChunksRequest, opts ...grpc.CallOption) (*GetChunksReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetChunksReply) + err := c.cc.Invoke(ctx, Retrieval_GetChunks_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *retrievalClient) GetChunk(ctx context.Context, in *common.ChunkKey, opts ...grpc.CallOption) (*common.ChunkData, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(common.ChunkData) + err := c.cc.Invoke(ctx, Retrieval_GetChunk_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *retrievalClient) GetHeader(ctx context.Context, in *common.BlobKey, opts ...grpc.CallOption) (*GetBlobHeaderReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetBlobHeaderReply) + err := c.cc.Invoke(ctx, Retrieval_GetHeader_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *retrievalClient) StreamHeaders(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StreamHeadersRequest, GetBlobHeaderReply], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Retrieval_ServiceDesc.Streams[0], Retrieval_StreamHeaders_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[StreamHeadersRequest, GetBlobHeaderReply]{ClientStream: stream} + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Retrieval_StreamHeadersClient = grpc.BidiStreamingClient[StreamHeadersRequest, GetBlobHeaderReply] + +func (c *retrievalClient) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetNodeInfoReply) + err := c.cc.Invoke(ctx, Retrieval_GetNodeInfo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -298,7 +387,7 @@ func (c *retrievalClient) NodeInfo(ctx context.Context, in *NodeInfoRequest, opt // RetrievalServer is the server API for Retrieval service. // All implementations must embed UnimplementedRetrievalServer -// for forward compatibility +// for forward compatibility. type RetrievalServer interface { // RetrieveChunks retrieves the chunks for a blob custodied at the Node. RetrieveChunks(context.Context, *RetrieveChunksRequest) (*RetrieveChunksReply, error) @@ -306,12 +395,27 @@ type RetrievalServer interface { GetBlobHeader(context.Context, *GetBlobHeaderRequest) (*GetBlobHeaderReply, error) // Retrieve node info metadata NodeInfo(context.Context, *NodeInfoRequest) (*NodeInfoReply, error) + // GetChunks retrieves all of the chunks from a specified quorum for a blob held by the node. + // Eventually this will replace RetrieveChunks. + GetChunks(context.Context, *GetChunksRequest) (*GetChunksReply, error) + // GetChunk retrieves a specific chunk for a blob custodied at the Node. + GetChunk(context.Context, *common.ChunkKey) (*common.ChunkData, error) + // GetHeader is similar to RetrieveChunks, this just returns the header of the blob. + // Eventually this will replace GetBlobHeader. + GetHeader(context.Context, *common.BlobKey) (*GetBlobHeaderReply, error) + // StreamHeaders requests a stream all new headers. + StreamHeaders(grpc.BidiStreamingServer[StreamHeadersRequest, GetBlobHeaderReply]) error + // Retrieve node info metadata. Eventually this will replace NodeInfo. + GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoReply, error) mustEmbedUnimplementedRetrievalServer() } -// UnimplementedRetrievalServer must be embedded to have forward compatible implementations. -type UnimplementedRetrievalServer struct { -} +// UnimplementedRetrievalServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedRetrievalServer struct{} func (UnimplementedRetrievalServer) RetrieveChunks(context.Context, *RetrieveChunksRequest) (*RetrieveChunksReply, error) { return nil, status.Errorf(codes.Unimplemented, "method RetrieveChunks not implemented") @@ -322,7 +426,23 @@ 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) GetChunks(context.Context, *GetChunksRequest) (*GetChunksReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetChunks not implemented") +} +func (UnimplementedRetrievalServer) GetChunk(context.Context, *common.ChunkKey) (*common.ChunkData, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") +} +func (UnimplementedRetrievalServer) GetHeader(context.Context, *common.BlobKey) (*GetBlobHeaderReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetHeader not implemented") +} +func (UnimplementedRetrievalServer) StreamHeaders(grpc.BidiStreamingServer[StreamHeadersRequest, GetBlobHeaderReply]) error { + return status.Errorf(codes.Unimplemented, "method StreamHeaders not implemented") +} +func (UnimplementedRetrievalServer) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNodeInfo not implemented") +} func (UnimplementedRetrievalServer) mustEmbedUnimplementedRetrievalServer() {} +func (UnimplementedRetrievalServer) testEmbeddedByValue() {} // 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 @@ -332,6 +452,13 @@ type UnsafeRetrievalServer interface { } func RegisterRetrievalServer(s grpc.ServiceRegistrar, srv RetrievalServer) { + // If the following call pancis, it indicates UnimplementedRetrievalServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Retrieval_ServiceDesc, srv) } @@ -389,6 +516,85 @@ func _Retrieval_NodeInfo_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +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_GetChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(common.ChunkKey) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RetrievalServer).GetChunk(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Retrieval_GetChunk_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RetrievalServer).GetChunk(ctx, req.(*common.ChunkKey)) + } + return interceptor(ctx, in, info, handler) +} + +func _Retrieval_GetHeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(common.BlobKey) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RetrievalServer).GetHeader(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Retrieval_GetHeader_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RetrievalServer).GetHeader(ctx, req.(*common.BlobKey)) + } + return interceptor(ctx, in, info, handler) +} + +func _Retrieval_StreamHeaders_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(RetrievalServer).StreamHeaders(&grpc.GenericServerStream[StreamHeadersRequest, GetBlobHeaderReply]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Retrieval_StreamHeadersServer = grpc.BidiStreamingServer[StreamHeadersRequest, GetBlobHeaderReply] + +func _Retrieval_GetNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNodeInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RetrievalServer).GetNodeInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Retrieval_GetNodeInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RetrievalServer).GetNodeInfo(ctx, req.(*GetNodeInfoRequest)) + } + 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) @@ -408,7 +614,30 @@ var Retrieval_ServiceDesc = grpc.ServiceDesc{ MethodName: "NodeInfo", Handler: _Retrieval_NodeInfo_Handler, }, + { + MethodName: "GetChunks", + Handler: _Retrieval_GetChunks_Handler, + }, + { + MethodName: "GetChunk", + Handler: _Retrieval_GetChunk_Handler, + }, + { + MethodName: "GetHeader", + Handler: _Retrieval_GetHeader_Handler, + }, + { + MethodName: "GetNodeInfo", + Handler: _Retrieval_GetNodeInfo_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamHeaders", + Handler: _Retrieval_StreamHeaders_Handler, + ServerStreams: true, + ClientStreams: true, + }, }, - Streams: []grpc.StreamDesc{}, Metadata: "node/node.proto", } diff --git a/api/grpc/retriever/retriever.pb.go b/api/grpc/retriever/retriever.pb.go index f8aeac8536..229c291985 100644 --- a/api/grpc/retriever/retriever.pb.go +++ b/api/grpc/retriever/retriever.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v4.23.4 +// protoc-gen-go v1.34.2 +// protoc v5.27.3 // source: retriever/retriever.proto package retriever 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" @@ -152,28 +153,33 @@ var File_retriever_retriever_proto protoreflect.FileDescriptor var file_retriever_retriever_proto_rawDesc = []byte{ 0x0a, 0x19, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x72, 0x65, 0x74, - 0x72, 0x69, 0x65, 0x76, 0x65, 0x72, 0x22, 0xab, 0x01, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x62, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x12, 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, 0x03, 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, 0x12, 0x1b, 0x0a, 0x09, 0x71, 0x75, 0x6f, 0x72, 0x75, - 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x71, 0x75, 0x6f, 0x72, - 0x75, 0x6d, 0x49, 0x64, 0x22, 0x1f, 0x0a, 0x09, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0x4b, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, - 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x0c, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x42, 0x6c, - 0x6f, 0x62, 0x12, 0x16, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x72, 0x2e, 0x42, - 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x72, 0x65, 0x74, - 0x72, 0x69, 0x65, 0x76, 0x65, 0x72, 0x2e, 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, 0x72, 0x65, 0x74, 0x72, - 0x69, 0x65, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x69, 0x65, 0x76, 0x65, 0x72, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xab, 0x01, 0x0a, 0x0b, + 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x5f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, 0x6f, + 0x62, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 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, 0x03, 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, 0x12, 0x1b, 0x0a, 0x09, + 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x08, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x49, 0x64, 0x22, 0x1f, 0x0a, 0x09, 0x42, 0x6c, 0x6f, + 0x62, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0x7b, 0x0a, 0x09, 0x52, 0x65, + 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x0c, 0x52, 0x65, 0x74, 0x72, 0x69, + 0x65, 0x76, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x16, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, + 0x76, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x14, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x62, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x2e, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x42, 0x6c, + 0x6f, 0x62, 0x12, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x62, + 0x4b, 0x65, 0x79, 0x1a, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, + 0x62, 0x44, 0x61, 0x74, 0x61, 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, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -189,15 +195,19 @@ func file_retriever_retriever_proto_rawDescGZIP() []byte { } var file_retriever_retriever_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_retriever_retriever_proto_goTypes = []interface{}{ - (*BlobRequest)(nil), // 0: retriever.BlobRequest - (*BlobReply)(nil), // 1: retriever.BlobReply +var file_retriever_retriever_proto_goTypes = []any{ + (*BlobRequest)(nil), // 0: retriever.BlobRequest + (*BlobReply)(nil), // 1: retriever.BlobReply + (*common.BlobKey)(nil), // 2: common.BlobKey + (*common.BlobData)(nil), // 3: common.BlobData } var file_retriever_retriever_proto_depIdxs = []int32{ 0, // 0: retriever.Retriever.RetrieveBlob:input_type -> retriever.BlobRequest - 1, // 1: retriever.Retriever.RetrieveBlob:output_type -> retriever.BlobReply - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type + 2, // 1: retriever.Retriever.GetBlob:input_type -> common.BlobKey + 1, // 2: retriever.Retriever.RetrieveBlob:output_type -> retriever.BlobReply + 3, // 3: retriever.Retriever.GetBlob:output_type -> common.BlobData + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] 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 @@ -209,7 +219,7 @@ func file_retriever_retriever_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_retriever_retriever_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_retriever_retriever_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*BlobRequest); i { case 0: return &v.state @@ -221,7 +231,7 @@ func file_retriever_retriever_proto_init() { return nil } } - file_retriever_retriever_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_retriever_retriever_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*BlobReply); i { case 0: return &v.state diff --git a/api/grpc/retriever/retriever_grpc.pb.go b/api/grpc/retriever/retriever_grpc.pb.go index ffd67f16f8..f49859851d 100644 --- a/api/grpc/retriever/retriever_grpc.pb.go +++ b/api/grpc/retriever/retriever_grpc.pb.go @@ -1,13 +1,14 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v4.23.4 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.27.3 // source: retriever/retriever.proto package retriever import ( context "context" + common "github.com/Layr-Labs/eigenda/api/grpc/common" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -15,20 +16,38 @@ import ( // 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 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Retriever_RetrieveBlob_FullMethodName = "/retriever.Retriever/RetrieveBlob" + Retriever_GetBlob_FullMethodName = "/retriever.Retriever/GetBlob" ) // RetrieverClient is the client API for Retriever service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// The Retriever is a service for retrieving chunks corresponding to a blob from +// the EigenDA operator nodes and reconstructing the original blob from the chunks. +// This is a client-side library that the users are supposed to operationalize. +// +// Note: Users generally have two ways to retrieve a blob from EigenDA: +// 1. Retrieve from the Disperser that the user initially used for dispersal: the API +// is Disperser.RetrieveBlob() as defined in api/proto/disperser/disperser.proto +// 2. Retrieve directly from the EigenDA Nodes, which is supported by this Retriever. +// +// The Disperser.RetrieveBlob() (the 1st approach) is generally faster and cheaper as the +// Disperser manages the blobs that it has processed, whereas the Retriever.RetrieveBlob() +// (the 2nd approach here) removes the need to trust the Disperser, with the downside of +// worse cost and performance. type RetrieverClient interface { // This fans out request to EigenDA Nodes to retrieve the chunks and returns the // reconstructed original blob in response. RetrieveBlob(ctx context.Context, in *BlobRequest, opts ...grpc.CallOption) (*BlobReply, error) + // Obtain the chunks necessary to reconstruct a blob and return it. + // Eventually this will replace RetrieveBlob. + GetBlob(ctx context.Context, in *common.BlobKey, opts ...grpc.CallOption) (*common.BlobData, error) } type retrieverClient struct { @@ -40,8 +59,19 @@ func NewRetrieverClient(cc grpc.ClientConnInterface) RetrieverClient { } func (c *retrieverClient) RetrieveBlob(ctx context.Context, in *BlobRequest, opts ...grpc.CallOption) (*BlobReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(BlobReply) - err := c.cc.Invoke(ctx, Retriever_RetrieveBlob_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Retriever_RetrieveBlob_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *retrieverClient) GetBlob(ctx context.Context, in *common.BlobKey, opts ...grpc.CallOption) (*common.BlobData, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(common.BlobData) + err := c.cc.Invoke(ctx, Retriever_GetBlob_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -50,22 +80,46 @@ func (c *retrieverClient) RetrieveBlob(ctx context.Context, in *BlobRequest, opt // RetrieverServer is the server API for Retriever service. // All implementations must embed UnimplementedRetrieverServer -// for forward compatibility +// for forward compatibility. +// +// The Retriever is a service for retrieving chunks corresponding to a blob from +// the EigenDA operator nodes and reconstructing the original blob from the chunks. +// This is a client-side library that the users are supposed to operationalize. +// +// Note: Users generally have two ways to retrieve a blob from EigenDA: +// 1. Retrieve from the Disperser that the user initially used for dispersal: the API +// is Disperser.RetrieveBlob() as defined in api/proto/disperser/disperser.proto +// 2. Retrieve directly from the EigenDA Nodes, which is supported by this Retriever. +// +// The Disperser.RetrieveBlob() (the 1st approach) is generally faster and cheaper as the +// Disperser manages the blobs that it has processed, whereas the Retriever.RetrieveBlob() +// (the 2nd approach here) removes the need to trust the Disperser, with the downside of +// worse cost and performance. type RetrieverServer interface { // This fans out request to EigenDA Nodes to retrieve the chunks and returns the // reconstructed original blob in response. RetrieveBlob(context.Context, *BlobRequest) (*BlobReply, error) + // Obtain the chunks necessary to reconstruct a blob and return it. + // Eventually this will replace RetrieveBlob. + GetBlob(context.Context, *common.BlobKey) (*common.BlobData, error) mustEmbedUnimplementedRetrieverServer() } -// UnimplementedRetrieverServer must be embedded to have forward compatible implementations. -type UnimplementedRetrieverServer struct { -} +// UnimplementedRetrieverServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedRetrieverServer struct{} func (UnimplementedRetrieverServer) RetrieveBlob(context.Context, *BlobRequest) (*BlobReply, error) { return nil, status.Errorf(codes.Unimplemented, "method RetrieveBlob not implemented") } +func (UnimplementedRetrieverServer) GetBlob(context.Context, *common.BlobKey) (*common.BlobData, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlob not implemented") +} func (UnimplementedRetrieverServer) mustEmbedUnimplementedRetrieverServer() {} +func (UnimplementedRetrieverServer) testEmbeddedByValue() {} // UnsafeRetrieverServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to RetrieverServer will @@ -75,6 +129,13 @@ type UnsafeRetrieverServer interface { } func RegisterRetrieverServer(s grpc.ServiceRegistrar, srv RetrieverServer) { + // If the following call pancis, it indicates UnimplementedRetrieverServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Retriever_ServiceDesc, srv) } @@ -96,6 +157,24 @@ func _Retriever_RetrieveBlob_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Retriever_GetBlob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(common.BlobKey) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RetrieverServer).GetBlob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Retriever_GetBlob_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RetrieverServer).GetBlob(ctx, req.(*common.BlobKey)) + } + return interceptor(ctx, in, info, handler) +} + // Retriever_ServiceDesc is the grpc.ServiceDesc for Retriever service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -107,6 +186,10 @@ var Retriever_ServiceDesc = grpc.ServiceDesc{ MethodName: "RetrieveBlob", Handler: _Retriever_RetrieveBlob_Handler, }, + { + MethodName: "GetBlob", + Handler: _Retriever_GetBlob_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "retriever/retriever.proto", diff --git a/disperser/api/grpc/encoder/encoder.pb.go b/disperser/api/grpc/encoder/encoder.pb.go index 908a5691ea..3c6644c336 100644 --- a/disperser/api/grpc/encoder/encoder.pb.go +++ b/disperser/api/grpc/encoder/encoder.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v4.23.4 +// protoc-gen-go v1.34.2 +// protoc v5.27.3 // source: encoder/encoder.proto package encoder @@ -318,7 +318,7 @@ func file_encoder_encoder_proto_rawDescGZIP() []byte { } var file_encoder_encoder_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_encoder_encoder_proto_goTypes = []interface{}{ +var file_encoder_encoder_proto_goTypes = []any{ (*BlobCommitment)(nil), // 0: encoder.BlobCommitment (*EncodingParams)(nil), // 1: encoder.EncodingParams (*EncodeBlobRequest)(nil), // 2: encoder.EncodeBlobRequest @@ -342,7 +342,7 @@ func file_encoder_encoder_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_encoder_encoder_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_encoder_encoder_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*BlobCommitment); i { case 0: return &v.state @@ -354,7 +354,7 @@ func file_encoder_encoder_proto_init() { return nil } } - file_encoder_encoder_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_encoder_encoder_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*EncodingParams); i { case 0: return &v.state @@ -366,7 +366,7 @@ func file_encoder_encoder_proto_init() { return nil } } - file_encoder_encoder_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_encoder_encoder_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*EncodeBlobRequest); i { case 0: return &v.state @@ -378,7 +378,7 @@ func file_encoder_encoder_proto_init() { return nil } } - file_encoder_encoder_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_encoder_encoder_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*EncodeBlobReply); i { case 0: return &v.state diff --git a/disperser/api/grpc/encoder/encoder_grpc.pb.go b/disperser/api/grpc/encoder/encoder_grpc.pb.go index 76285b6a2c..54d20f4c13 100644 --- a/disperser/api/grpc/encoder/encoder_grpc.pb.go +++ b/disperser/api/grpc/encoder/encoder_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v4.23.4 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.27.3 // source: encoder/encoder.proto package encoder @@ -15,8 +15,8 @@ import ( // 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 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Encoder_EncodeBlob_FullMethodName = "/encoder.Encoder/EncodeBlob" @@ -38,8 +38,9 @@ func NewEncoderClient(cc grpc.ClientConnInterface) EncoderClient { } func (c *encoderClient) EncodeBlob(ctx context.Context, in *EncodeBlobRequest, opts ...grpc.CallOption) (*EncodeBlobReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(EncodeBlobReply) - err := c.cc.Invoke(ctx, Encoder_EncodeBlob_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Encoder_EncodeBlob_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -48,20 +49,24 @@ func (c *encoderClient) EncodeBlob(ctx context.Context, in *EncodeBlobRequest, o // EncoderServer is the server API for Encoder service. // All implementations must embed UnimplementedEncoderServer -// for forward compatibility +// for forward compatibility. type EncoderServer interface { EncodeBlob(context.Context, *EncodeBlobRequest) (*EncodeBlobReply, error) mustEmbedUnimplementedEncoderServer() } -// UnimplementedEncoderServer must be embedded to have forward compatible implementations. -type UnimplementedEncoderServer struct { -} +// UnimplementedEncoderServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedEncoderServer struct{} func (UnimplementedEncoderServer) EncodeBlob(context.Context, *EncodeBlobRequest) (*EncodeBlobReply, error) { return nil, status.Errorf(codes.Unimplemented, "method EncodeBlob not implemented") } func (UnimplementedEncoderServer) mustEmbedUnimplementedEncoderServer() {} +func (UnimplementedEncoderServer) testEmbeddedByValue() {} // UnsafeEncoderServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to EncoderServer will @@ -71,6 +76,13 @@ type UnsafeEncoderServer interface { } func RegisterEncoderServer(s grpc.ServiceRegistrar, srv EncoderServer) { + // If the following call pancis, it indicates UnimplementedEncoderServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Encoder_ServiceDesc, srv) } diff --git a/go.mod b/go.mod index 429029d592..f3eaf61e11 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,7 @@ require ( go.uber.org/goleak v1.3.0 go.uber.org/mock v0.4.0 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - google.golang.org/grpc v1.59.0 + google.golang.org/grpc v1.64.0 ) require ( @@ -146,11 +146,11 @@ require ( go.uber.org/zap v1.27.0 // indirect golang.org/x/arch v0.4.0 // indirect golang.org/x/mod v0.17.0 // indirect - golang.org/x/oauth2 v0.16.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect golang.org/x/sync v0.7.0 // indirect golang.org/x/time v0.5.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/go.sum b/go.sum index deb4b2e74e..664de385de 100644 --- a/go.sum +++ b/go.sum @@ -246,7 +246,6 @@ github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzq github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -254,6 +253,7 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -563,7 +563,6 @@ golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= @@ -576,8 +575,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= -golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= -golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -631,6 +630,7 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= @@ -647,12 +647,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -660,6 +660,7 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= From d8e15e8b1c2943dfbbdba1992295e34223ac1f11 Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Thu, 29 Aug 2024 10:53:43 -0500 Subject: [PATCH 14/31] Add placeholder implementations. Signed-off-by: Cody Littley --- disperser/apiserver/server.go | 8 ++++++++ node/grpc/server.go | 23 +++++++++++++++++++++++ retriever/server.go | 7 +++++++ 3 files changed, 38 insertions(+) diff --git a/disperser/apiserver/server.go b/disperser/apiserver/server.go index 4dbf48de20..ca7595b20f 100644 --- a/disperser/apiserver/server.go +++ b/disperser/apiserver/server.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "google.golang.org/grpc/status" "math/rand" "net" "slices" @@ -776,6 +777,13 @@ func (s *DispersalServer) RetrieveBlob(ctx context.Context, req *pb.RetrieveBlob }, nil } +func (s *DispersalServer) GetBlob(context.Context, *commonpb.BlobKey) (*commonpb.BlobData, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlob not implemented") +} +func (s *DispersalServer) GetChunk(context.Context, *commonpb.ChunkKey) (*commonpb.ChunkData, 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 65ee30df61..f77bcfe0d2 100644 --- a/node/grpc/server.go +++ b/node/grpc/server.go @@ -5,6 +5,9 @@ import ( "encoding/hex" "errors" "fmt" + commonpb "github.com/Layr-Labs/eigenda/api/grpc/common" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" "reflect" "runtime" "sync" @@ -154,6 +157,26 @@ 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) GetChunks(context.Context, *pb.GetChunksRequest) (*pb.GetChunksReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetChunks not implemented") +} + +func (s *Server) GetChunk(context.Context, *commonpb.ChunkKey) (*commonpb.ChunkData, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") +} + +func (s *Server) GetHeader(context.Context, *commonpb.BlobKey) (*pb.GetBlobHeaderReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetHeader not implemented") +} + +func (s *Server) StreamHeaders(grpc.BidiStreamingServer[pb.StreamHeadersRequest, pb.GetBlobHeaderReply]) error { + return status.Errorf(codes.Unimplemented, "method StreamHeaders not implemented") +} + +func (s *Server) GetNodeInfo(context.Context, *pb.GetNodeInfoRequest) (*pb.GetNodeInfoReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNodeInfo not implemented") +} + func (s *Server) handleStoreChunksRequest(ctx context.Context, in *pb.StoreChunksRequest) (*pb.StoreChunksReply, error) { start := time.Now() diff --git a/retriever/server.go b/retriever/server.go index d49f8dbf7f..3127d40de9 100644 --- a/retriever/server.go +++ b/retriever/server.go @@ -3,6 +3,9 @@ package retriever import ( "context" "errors" + "github.com/Layr-Labs/eigenda/api/grpc/common" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" "math/big" "github.com/Layr-Labs/eigenda/api/clients" @@ -76,3 +79,7 @@ func (s *Server) RetrieveBlob(ctx context.Context, req *pb.BlobRequest) (*pb.Blo Data: data, }, nil } + +func (s *Server) GetBlob(context.Context, *common.BlobKey) (*common.BlobData, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlob not implemented") +} From cc291e41bd08e7ee12dbc88c67d1dcc753570654 Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Thu, 29 Aug 2024 13:26:29 -0500 Subject: [PATCH 15/31] Iterating on protos. Signed-off-by: Cody Littley --- api/grpc/churner/churner.pb.go | 2 +- api/grpc/churner/churner_grpc.pb.go | 2 +- api/grpc/common/common.pb.go | 2 +- api/grpc/disperser/disperser.pb.go | 2 +- api/grpc/disperser/disperser_grpc.pb.go | 2 +- api/grpc/lightnode/lightnode.pb.go | 2 +- api/grpc/lightnode/lightnode_grpc.pb.go | 2 +- api/grpc/node/node.pb.go | 2 +- api/grpc/node/node_grpc.pb.go | 2 +- api/grpc/retriever/retriever.pb.go | 2 +- api/grpc/retriever/retriever_grpc.pb.go | 2 +- disperser/api/grpc/encoder/encoder.pb.go | 2 +- disperser/api/grpc/encoder/encoder_grpc.pb.go | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/api/grpc/churner/churner.pb.go b/api/grpc/churner/churner.pb.go index 67947ff06d..8b43836213 100644 --- a/api/grpc/churner/churner.pb.go +++ b/api/grpc/churner/churner.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc v4.23.4 // source: churner/churner.proto package churner diff --git a/api/grpc/churner/churner_grpc.pb.go b/api/grpc/churner/churner_grpc.pb.go index c371618bea..70dc1a3d34 100644 --- a/api/grpc/churner/churner_grpc.pb.go +++ b/api/grpc/churner/churner_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.27.3 +// - protoc v4.23.4 // source: churner/churner.proto package churner diff --git a/api/grpc/common/common.pb.go b/api/grpc/common/common.pb.go index edf2081f06..9ab82a1581 100644 --- a/api/grpc/common/common.pb.go +++ b/api/grpc/common/common.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc v4.23.4 // source: common/common.proto package common diff --git a/api/grpc/disperser/disperser.pb.go b/api/grpc/disperser/disperser.pb.go index 945825c0bf..a155b983a4 100644 --- a/api/grpc/disperser/disperser.pb.go +++ b/api/grpc/disperser/disperser.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc v4.23.4 // source: disperser/disperser.proto package disperser diff --git a/api/grpc/disperser/disperser_grpc.pb.go b/api/grpc/disperser/disperser_grpc.pb.go index 004bf35139..0e80ecd51b 100644 --- a/api/grpc/disperser/disperser_grpc.pb.go +++ b/api/grpc/disperser/disperser_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.27.3 +// - protoc v4.23.4 // source: disperser/disperser.proto package disperser diff --git a/api/grpc/lightnode/lightnode.pb.go b/api/grpc/lightnode/lightnode.pb.go index 227721347c..010c6bb10c 100644 --- a/api/grpc/lightnode/lightnode.pb.go +++ b/api/grpc/lightnode/lightnode.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc v4.23.4 // source: lightnode/lightnode.proto package lightnode diff --git a/api/grpc/lightnode/lightnode_grpc.pb.go b/api/grpc/lightnode/lightnode_grpc.pb.go index 208dd336e7..60d4ca1e0d 100644 --- a/api/grpc/lightnode/lightnode_grpc.pb.go +++ b/api/grpc/lightnode/lightnode_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.27.3 +// - protoc v4.23.4 // source: lightnode/lightnode.proto package lightnode diff --git a/api/grpc/node/node.pb.go b/api/grpc/node/node.pb.go index 8158ea4bc2..f67a14892d 100644 --- a/api/grpc/node/node.pb.go +++ b/api/grpc/node/node.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc v4.23.4 // source: node/node.proto package node diff --git a/api/grpc/node/node_grpc.pb.go b/api/grpc/node/node_grpc.pb.go index 7d1bfbb030..ba2a8ec193 100644 --- a/api/grpc/node/node_grpc.pb.go +++ b/api/grpc/node/node_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.27.3 +// - protoc v4.23.4 // source: node/node.proto package node diff --git a/api/grpc/retriever/retriever.pb.go b/api/grpc/retriever/retriever.pb.go index 229c291985..10c23e145b 100644 --- a/api/grpc/retriever/retriever.pb.go +++ b/api/grpc/retriever/retriever.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc v4.23.4 // source: retriever/retriever.proto package retriever diff --git a/api/grpc/retriever/retriever_grpc.pb.go b/api/grpc/retriever/retriever_grpc.pb.go index f49859851d..21d67c4565 100644 --- a/api/grpc/retriever/retriever_grpc.pb.go +++ b/api/grpc/retriever/retriever_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.27.3 +// - protoc v4.23.4 // source: retriever/retriever.proto package retriever diff --git a/disperser/api/grpc/encoder/encoder.pb.go b/disperser/api/grpc/encoder/encoder.pb.go index 3c6644c336..cec3593b00 100644 --- a/disperser/api/grpc/encoder/encoder.pb.go +++ b/disperser/api/grpc/encoder/encoder.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc v4.23.4 // source: encoder/encoder.proto package encoder diff --git a/disperser/api/grpc/encoder/encoder_grpc.pb.go b/disperser/api/grpc/encoder/encoder_grpc.pb.go index 54d20f4c13..44948bbcca 100644 --- a/disperser/api/grpc/encoder/encoder_grpc.pb.go +++ b/disperser/api/grpc/encoder/encoder_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.27.3 +// - protoc v4.23.4 // source: encoder/encoder.proto package encoder From 60c0390d5e3c6903fe01e7cde860c0b89cc5af19 Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Thu, 29 Aug 2024 13:33:29 -0500 Subject: [PATCH 16/31] Fix proto versions. Signed-off-by: Cody Littley --- api/grpc/churner/churner.pb.go | 12 +- api/grpc/churner/churner_grpc.pb.go | 50 +------ api/grpc/common/common.pb.go | 20 +-- api/grpc/disperser/disperser.pb.go | 40 ++--- api/grpc/disperser/disperser_grpc.pb.go | 105 +++++++------ api/grpc/lightnode/lightnode.pb.go | 6 +- api/grpc/lightnode/lightnode_grpc.pb.go | 75 ++++++---- api/grpc/node/node.pb.go | 52 +++---- api/grpc/node/node_grpc.pb.go | 138 +++++++++--------- api/grpc/retriever/retriever.pb.go | 8 +- api/grpc/retriever/retriever_grpc.pb.go | 59 ++------ disperser/api/grpc/encoder/encoder.pb.go | 12 +- disperser/api/grpc/encoder/encoder_grpc.pb.go | 28 +--- 13 files changed, 275 insertions(+), 330 deletions(-) diff --git a/api/grpc/churner/churner.pb.go b/api/grpc/churner/churner.pb.go index 8b43836213..3cf597b918 100644 --- a/api/grpc/churner/churner.pb.go +++ b/api/grpc/churner/churner.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.28.1 // protoc v4.23.4 // source: churner/churner.proto @@ -399,7 +399,7 @@ func file_churner_churner_proto_rawDescGZIP() []byte { } var file_churner_churner_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_churner_churner_proto_goTypes = []any{ +var file_churner_churner_proto_goTypes = []interface{}{ (*ChurnRequest)(nil), // 0: churner.ChurnRequest (*ChurnReply)(nil), // 1: churner.ChurnReply (*SignatureWithSaltAndExpiry)(nil), // 2: churner.SignatureWithSaltAndExpiry @@ -423,7 +423,7 @@ func file_churner_churner_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_churner_churner_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_churner_churner_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ChurnRequest); i { case 0: return &v.state @@ -435,7 +435,7 @@ func file_churner_churner_proto_init() { return nil } } - file_churner_churner_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_churner_churner_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ChurnReply); i { case 0: return &v.state @@ -447,7 +447,7 @@ func file_churner_churner_proto_init() { return nil } } - file_churner_churner_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_churner_churner_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignatureWithSaltAndExpiry); i { case 0: return &v.state @@ -459,7 +459,7 @@ func file_churner_churner_proto_init() { return nil } } - file_churner_churner_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_churner_churner_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OperatorToChurn); i { case 0: return &v.state diff --git a/api/grpc/churner/churner_grpc.pb.go b/api/grpc/churner/churner_grpc.pb.go index 70dc1a3d34..9958c263ca 100644 --- a/api/grpc/churner/churner_grpc.pb.go +++ b/api/grpc/churner/churner_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 +// - protoc-gen-go-grpc v1.3.0 // - protoc v4.23.4 // source: churner/churner.proto @@ -15,8 +15,8 @@ import ( // 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.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 const ( Churner_Churn_FullMethodName = "/churner.Churner/Churn" @@ -25,17 +25,6 @@ const ( // ChurnerClient is the client API for Churner service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// The Churner is a service that handles churn requests from new operators trying to -// join the EigenDA network. -// When the EigenDA network reaches the maximum number of operators, any new operator -// trying to join will have to make a churn request to this Churner, which acts as the -// sole decision maker to decide whether this new operator could join, and if so, which -// existing operator will be churned out (so the max number of operators won't be -// exceeded). -// The max number of operators, as well as the rules to make churn decisions, are -// defined onchain, see details in OperatorSetParam at: -// https://github.com/Layr-Labs/eigenlayer-middleware/blob/master/src/interfaces/IBLSRegistryCoordinatorWithIndices.sol#L24. type ChurnerClient interface { Churn(ctx context.Context, in *ChurnRequest, opts ...grpc.CallOption) (*ChurnReply, error) } @@ -49,9 +38,8 @@ func NewChurnerClient(cc grpc.ClientConnInterface) ChurnerClient { } func (c *churnerClient) Churn(ctx context.Context, in *ChurnRequest, opts ...grpc.CallOption) (*ChurnReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ChurnReply) - err := c.cc.Invoke(ctx, Churner_Churn_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Churner_Churn_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -60,35 +48,20 @@ func (c *churnerClient) Churn(ctx context.Context, in *ChurnRequest, opts ...grp // ChurnerServer is the server API for Churner service. // All implementations must embed UnimplementedChurnerServer -// for forward compatibility. -// -// The Churner is a service that handles churn requests from new operators trying to -// join the EigenDA network. -// When the EigenDA network reaches the maximum number of operators, any new operator -// trying to join will have to make a churn request to this Churner, which acts as the -// sole decision maker to decide whether this new operator could join, and if so, which -// existing operator will be churned out (so the max number of operators won't be -// exceeded). -// The max number of operators, as well as the rules to make churn decisions, are -// defined onchain, see details in OperatorSetParam at: -// https://github.com/Layr-Labs/eigenlayer-middleware/blob/master/src/interfaces/IBLSRegistryCoordinatorWithIndices.sol#L24. +// for forward compatibility type ChurnerServer interface { Churn(context.Context, *ChurnRequest) (*ChurnReply, error) mustEmbedUnimplementedChurnerServer() } -// UnimplementedChurnerServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedChurnerServer struct{} +// UnimplementedChurnerServer must be embedded to have forward compatible implementations. +type UnimplementedChurnerServer struct { +} func (UnimplementedChurnerServer) Churn(context.Context, *ChurnRequest) (*ChurnReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Churn not implemented") } func (UnimplementedChurnerServer) mustEmbedUnimplementedChurnerServer() {} -func (UnimplementedChurnerServer) testEmbeddedByValue() {} // UnsafeChurnerServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ChurnerServer will @@ -98,13 +71,6 @@ type UnsafeChurnerServer interface { } func RegisterChurnerServer(s grpc.ServiceRegistrar, srv ChurnerServer) { - // If the following call pancis, it indicates UnimplementedChurnerServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&Churner_ServiceDesc, srv) } diff --git a/api/grpc/common/common.pb.go b/api/grpc/common/common.pb.go index 9ab82a1581..fb35070702 100644 --- a/api/grpc/common/common.pb.go +++ b/api/grpc/common/common.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.28.1 // protoc v4.23.4 // source: common/common.proto @@ -480,7 +480,7 @@ func file_common_common_proto_rawDescGZIP() []byte { } var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_common_common_proto_goTypes = []any{ +var file_common_common_proto_goTypes = []interface{}{ (*G1Commitment)(nil), // 0: common.G1Commitment (*BlobKey)(nil), // 1: common.BlobKey (*HeaderBlobKey)(nil), // 2: common.HeaderBlobKey @@ -506,7 +506,7 @@ func file_common_common_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_common_common_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_common_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*G1Commitment); i { case 0: return &v.state @@ -518,7 +518,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_common_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlobKey); i { case 0: return &v.state @@ -530,7 +530,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_common_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HeaderBlobKey); i { case 0: return &v.state @@ -542,7 +542,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_common_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CertificateBlobKey); i { case 0: return &v.state @@ -554,7 +554,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[4].Exporter = func(v any, i int) any { + file_common_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ChunkKey); i { case 0: return &v.state @@ -566,7 +566,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[5].Exporter = func(v any, i int) any { + file_common_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlobData); i { case 0: return &v.state @@ -578,7 +578,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[6].Exporter = func(v any, i int) any { + file_common_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ChunkData); i { case 0: return &v.state @@ -591,7 +591,7 @@ func file_common_common_proto_init() { } } } - file_common_common_proto_msgTypes[1].OneofWrappers = []any{ + file_common_common_proto_msgTypes[1].OneofWrappers = []interface{}{ (*BlobKey_HeaderBlobKey)(nil), (*BlobKey_CertificateBlobKey)(nil), } diff --git a/api/grpc/disperser/disperser.pb.go b/api/grpc/disperser/disperser.pb.go index a155b983a4..719ebaf5a6 100644 --- a/api/grpc/disperser/disperser.pb.go +++ b/api/grpc/disperser/disperser.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.28.1 // protoc v4.23.4 // source: disperser/disperser.proto @@ -1388,7 +1388,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, 16) -var file_disperser_disperser_proto_goTypes = []any{ +var file_disperser_disperser_proto_goTypes = []interface{}{ (BlobStatus)(0), // 0: disperser.BlobStatus (*AuthenticatedRequest)(nil), // 1: disperser.AuthenticatedRequest (*AuthenticatedReply)(nil), // 2: disperser.AuthenticatedReply @@ -1451,7 +1451,7 @@ func file_disperser_disperser_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_disperser_disperser_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_disperser_disperser_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AuthenticatedRequest); i { case 0: return &v.state @@ -1463,7 +1463,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_disperser_disperser_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AuthenticatedReply); i { case 0: return &v.state @@ -1475,7 +1475,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_disperser_disperser_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlobAuthHeader); i { case 0: return &v.state @@ -1487,7 +1487,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_disperser_disperser_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AuthenticationData); i { case 0: return &v.state @@ -1499,7 +1499,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[4].Exporter = func(v any, i int) any { + file_disperser_disperser_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DisperseBlobRequest); i { case 0: return &v.state @@ -1511,7 +1511,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[5].Exporter = func(v any, i int) any { + file_disperser_disperser_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DisperseBlobReply); i { case 0: return &v.state @@ -1523,7 +1523,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[6].Exporter = func(v any, i int) any { + file_disperser_disperser_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlobStatusRequest); i { case 0: return &v.state @@ -1535,7 +1535,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[7].Exporter = func(v any, i int) any { + file_disperser_disperser_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlobStatusReply); i { case 0: return &v.state @@ -1547,7 +1547,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[8].Exporter = func(v any, i int) any { + file_disperser_disperser_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RetrieveBlobRequest); i { case 0: return &v.state @@ -1559,7 +1559,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[9].Exporter = func(v any, i int) any { + file_disperser_disperser_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RetrieveBlobReply); i { case 0: return &v.state @@ -1571,7 +1571,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[10].Exporter = func(v any, i int) any { + file_disperser_disperser_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlobInfo); i { case 0: return &v.state @@ -1583,7 +1583,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[11].Exporter = func(v any, i int) any { + file_disperser_disperser_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlobHeader); i { case 0: return &v.state @@ -1595,7 +1595,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[12].Exporter = func(v any, i int) any { + file_disperser_disperser_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlobQuorumParam); i { case 0: return &v.state @@ -1607,7 +1607,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[13].Exporter = func(v any, i int) any { + file_disperser_disperser_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlobVerificationProof); i { case 0: return &v.state @@ -1619,7 +1619,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[14].Exporter = func(v any, i int) any { + file_disperser_disperser_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BatchMetadata); i { case 0: return &v.state @@ -1631,7 +1631,7 @@ func file_disperser_disperser_proto_init() { return nil } } - file_disperser_disperser_proto_msgTypes[15].Exporter = func(v any, i int) any { + file_disperser_disperser_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BatchHeader); i { case 0: return &v.state @@ -1644,11 +1644,11 @@ func file_disperser_disperser_proto_init() { } } } - file_disperser_disperser_proto_msgTypes[0].OneofWrappers = []any{ + file_disperser_disperser_proto_msgTypes[0].OneofWrappers = []interface{}{ (*AuthenticatedRequest_DisperseRequest)(nil), (*AuthenticatedRequest_AuthenticationData)(nil), } - file_disperser_disperser_proto_msgTypes[1].OneofWrappers = []any{ + file_disperser_disperser_proto_msgTypes[1].OneofWrappers = []interface{}{ (*AuthenticatedReply_BlobAuthHeader)(nil), (*AuthenticatedReply_DisperseReply)(nil), } diff --git a/api/grpc/disperser/disperser_grpc.pb.go b/api/grpc/disperser/disperser_grpc.pb.go index 0e80ecd51b..9ef223f642 100644 --- a/api/grpc/disperser/disperser_grpc.pb.go +++ b/api/grpc/disperser/disperser_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 +// - protoc-gen-go-grpc v1.3.0 // - protoc v4.23.4 // source: disperser/disperser.proto @@ -16,8 +16,8 @@ import ( // 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.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 const ( Disperser_DisperseBlob_FullMethodName = "/disperser.Disperser/DisperseBlob" @@ -31,8 +31,6 @@ const ( // 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. -// -// Disperser defines the public APIs for dispersing blobs. type DisperserClient interface { // This API accepts blob to disperse from clients. // This executes the dispersal async, i.e. it returns once the request @@ -47,7 +45,7 @@ type DisperserClient interface { // 3. The client verifies the BlobAuthHeader and sends back the signed BlobAuthHeader in an // AuthenticationData message. // 4. The Disperser verifies the signature and returns a DisperseBlobReply message. - DisperseBlobAuthenticated(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[AuthenticatedRequest, AuthenticatedReply], error) + DisperseBlobAuthenticated(ctx context.Context, opts ...grpc.CallOption) (Disperser_DisperseBlobAuthenticatedClient, error) // This API is meant to be polled for the blob status. GetBlobStatus(ctx context.Context, in *BlobStatusRequest, opts ...grpc.CallOption) (*BlobStatusReply, error) // This retrieves the requested blob from the Disperser's backend. @@ -74,32 +72,48 @@ func NewDisperserClient(cc grpc.ClientConnInterface) DisperserClient { } func (c *disperserClient) DisperseBlob(ctx context.Context, in *DisperseBlobRequest, opts ...grpc.CallOption) (*DisperseBlobReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DisperseBlobReply) - err := c.cc.Invoke(ctx, Disperser_DisperseBlob_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Disperser_DisperseBlob_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *disperserClient) DisperseBlobAuthenticated(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[AuthenticatedRequest, AuthenticatedReply], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &Disperser_ServiceDesc.Streams[0], Disperser_DisperseBlobAuthenticated_FullMethodName, cOpts...) +func (c *disperserClient) DisperseBlobAuthenticated(ctx context.Context, opts ...grpc.CallOption) (Disperser_DisperseBlobAuthenticatedClient, error) { + stream, err := c.cc.NewStream(ctx, &Disperser_ServiceDesc.Streams[0], Disperser_DisperseBlobAuthenticated_FullMethodName, opts...) if err != nil { return nil, err } - x := &grpc.GenericClientStream[AuthenticatedRequest, AuthenticatedReply]{ClientStream: stream} + x := &disperserDisperseBlobAuthenticatedClient{stream} return x, nil } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type Disperser_DisperseBlobAuthenticatedClient = grpc.BidiStreamingClient[AuthenticatedRequest, AuthenticatedReply] +type Disperser_DisperseBlobAuthenticatedClient interface { + Send(*AuthenticatedRequest) error + Recv() (*AuthenticatedReply, error) + grpc.ClientStream +} + +type disperserDisperseBlobAuthenticatedClient struct { + grpc.ClientStream +} + +func (x *disperserDisperseBlobAuthenticatedClient) Send(m *AuthenticatedRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *disperserDisperseBlobAuthenticatedClient) Recv() (*AuthenticatedReply, error) { + m := new(AuthenticatedReply) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} func (c *disperserClient) GetBlobStatus(ctx context.Context, in *BlobStatusRequest, opts ...grpc.CallOption) (*BlobStatusReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(BlobStatusReply) - err := c.cc.Invoke(ctx, Disperser_GetBlobStatus_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Disperser_GetBlobStatus_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -107,9 +121,8 @@ func (c *disperserClient) GetBlobStatus(ctx context.Context, in *BlobStatusReque } func (c *disperserClient) RetrieveBlob(ctx context.Context, in *RetrieveBlobRequest, opts ...grpc.CallOption) (*RetrieveBlobReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RetrieveBlobReply) - err := c.cc.Invoke(ctx, Disperser_RetrieveBlob_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Disperser_RetrieveBlob_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -117,9 +130,8 @@ func (c *disperserClient) RetrieveBlob(ctx context.Context, in *RetrieveBlobRequ } func (c *disperserClient) GetBlob(ctx context.Context, in *common.BlobKey, opts ...grpc.CallOption) (*common.BlobData, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(common.BlobData) - err := c.cc.Invoke(ctx, Disperser_GetBlob_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Disperser_GetBlob_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -127,9 +139,8 @@ func (c *disperserClient) GetBlob(ctx context.Context, in *common.BlobKey, opts } func (c *disperserClient) GetChunk(ctx context.Context, in *common.ChunkKey, opts ...grpc.CallOption) (*common.ChunkData, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(common.ChunkData) - err := c.cc.Invoke(ctx, Disperser_GetChunk_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Disperser_GetChunk_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -138,9 +149,7 @@ func (c *disperserClient) GetChunk(ctx context.Context, in *common.ChunkKey, opt // DisperserServer is the server API for Disperser service. // All implementations must embed UnimplementedDisperserServer -// for forward compatibility. -// -// Disperser defines the public APIs for dispersing blobs. +// for forward compatibility type DisperserServer interface { // This API accepts blob to disperse from clients. // This executes the dispersal async, i.e. it returns once the request @@ -155,7 +164,7 @@ type DisperserServer interface { // 3. The client verifies the BlobAuthHeader and sends back the signed BlobAuthHeader in an // AuthenticationData message. // 4. The Disperser verifies the signature and returns a DisperseBlobReply message. - DisperseBlobAuthenticated(grpc.BidiStreamingServer[AuthenticatedRequest, AuthenticatedReply]) error + DisperseBlobAuthenticated(Disperser_DisperseBlobAuthenticatedServer) error // This API is meant to be polled for the blob status. GetBlobStatus(context.Context, *BlobStatusRequest) (*BlobStatusReply, error) // This retrieves the requested blob from the Disperser's backend. @@ -174,17 +183,14 @@ type DisperserServer interface { mustEmbedUnimplementedDisperserServer() } -// UnimplementedDisperserServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedDisperserServer struct{} +// 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) DisperseBlobAuthenticated(grpc.BidiStreamingServer[AuthenticatedRequest, AuthenticatedReply]) error { +func (UnimplementedDisperserServer) DisperseBlobAuthenticated(Disperser_DisperseBlobAuthenticatedServer) error { return status.Errorf(codes.Unimplemented, "method DisperseBlobAuthenticated not implemented") } func (UnimplementedDisperserServer) GetBlobStatus(context.Context, *BlobStatusRequest) (*BlobStatusReply, error) { @@ -200,7 +206,6 @@ func (UnimplementedDisperserServer) GetChunk(context.Context, *common.ChunkKey) return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") } func (UnimplementedDisperserServer) mustEmbedUnimplementedDisperserServer() {} -func (UnimplementedDisperserServer) testEmbeddedByValue() {} // 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 @@ -210,13 +215,6 @@ type UnsafeDisperserServer interface { } func RegisterDisperserServer(s grpc.ServiceRegistrar, srv DisperserServer) { - // If the following call pancis, it indicates UnimplementedDisperserServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&Disperser_ServiceDesc, srv) } @@ -239,11 +237,30 @@ func _Disperser_DisperseBlob_Handler(srv interface{}, ctx context.Context, dec f } func _Disperser_DisperseBlobAuthenticated_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(DisperserServer).DisperseBlobAuthenticated(&grpc.GenericServerStream[AuthenticatedRequest, AuthenticatedReply]{ServerStream: stream}) + return srv.(DisperserServer).DisperseBlobAuthenticated(&disperserDisperseBlobAuthenticatedServer{stream}) +} + +type Disperser_DisperseBlobAuthenticatedServer interface { + Send(*AuthenticatedReply) error + Recv() (*AuthenticatedRequest, error) + grpc.ServerStream +} + +type disperserDisperseBlobAuthenticatedServer struct { + grpc.ServerStream } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type Disperser_DisperseBlobAuthenticatedServer = grpc.BidiStreamingServer[AuthenticatedRequest, AuthenticatedReply] +func (x *disperserDisperseBlobAuthenticatedServer) Send(m *AuthenticatedReply) error { + return x.ServerStream.SendMsg(m) +} + +func (x *disperserDisperseBlobAuthenticatedServer) Recv() (*AuthenticatedRequest, error) { + m := new(AuthenticatedRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} func _Disperser_GetBlobStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(BlobStatusRequest) diff --git a/api/grpc/lightnode/lightnode.pb.go b/api/grpc/lightnode/lightnode.pb.go index 010c6bb10c..a39b3fa2d2 100644 --- a/api/grpc/lightnode/lightnode.pb.go +++ b/api/grpc/lightnode/lightnode.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.28.1 // protoc v4.23.4 // source: lightnode/lightnode.proto @@ -112,7 +112,7 @@ func file_lightnode_lightnode_proto_rawDescGZIP() []byte { } var file_lightnode_lightnode_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_lightnode_lightnode_proto_goTypes = []any{ +var file_lightnode_lightnode_proto_goTypes = []interface{}{ (*StreamAvailabilityStatusRequest)(nil), // 0: lightnode.StreamAvailabilityStatusRequest (*common.ChunkKey)(nil), // 1: common.ChunkKey (*common.ChunkData)(nil), // 2: common.ChunkData @@ -135,7 +135,7 @@ func file_lightnode_lightnode_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_lightnode_lightnode_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_lightnode_lightnode_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamAvailabilityStatusRequest); i { case 0: return &v.state diff --git a/api/grpc/lightnode/lightnode_grpc.pb.go b/api/grpc/lightnode/lightnode_grpc.pb.go index 60d4ca1e0d..b0e3e7af44 100644 --- a/api/grpc/lightnode/lightnode_grpc.pb.go +++ b/api/grpc/lightnode/lightnode_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 +// - protoc-gen-go-grpc v1.3.0 // - protoc v4.23.4 // source: lightnode/lightnode.proto @@ -16,8 +16,8 @@ import ( // 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.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 const ( LightNode_GetChunk_FullMethodName = "/lightnode.LightNode/GetChunk" @@ -32,7 +32,7 @@ type LightNodeClient interface { GetChunk(ctx context.Context, in *common.ChunkKey, opts ...grpc.CallOption) (*common.ChunkData, error) // StreamAvailabilityStatus streams the availability status of all chunks assigned to the light node. // For use by a DA node for monitoring the availability of chunks through its constellation of agent light nodes. - StreamAvailabilityStatus(ctx context.Context, in *StreamAvailabilityStatusRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[common.ChunkKey], error) + StreamAvailabilityStatus(ctx context.Context, in *StreamAvailabilityStatusRequest, opts ...grpc.CallOption) (LightNode_StreamAvailabilityStatusClient, error) } type lightNodeClient struct { @@ -44,22 +44,20 @@ func NewLightNodeClient(cc grpc.ClientConnInterface) LightNodeClient { } func (c *lightNodeClient) GetChunk(ctx context.Context, in *common.ChunkKey, opts ...grpc.CallOption) (*common.ChunkData, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(common.ChunkData) - err := c.cc.Invoke(ctx, LightNode_GetChunk_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, LightNode_GetChunk_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *lightNodeClient) StreamAvailabilityStatus(ctx context.Context, in *StreamAvailabilityStatusRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[common.ChunkKey], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &LightNode_ServiceDesc.Streams[0], LightNode_StreamAvailabilityStatus_FullMethodName, cOpts...) +func (c *lightNodeClient) StreamAvailabilityStatus(ctx context.Context, in *StreamAvailabilityStatusRequest, opts ...grpc.CallOption) (LightNode_StreamAvailabilityStatusClient, error) { + stream, err := c.cc.NewStream(ctx, &LightNode_ServiceDesc.Streams[0], LightNode_StreamAvailabilityStatus_FullMethodName, opts...) if err != nil { return nil, err } - x := &grpc.GenericClientStream[StreamAvailabilityStatusRequest, common.ChunkKey]{ClientStream: stream} + x := &lightNodeStreamAvailabilityStatusClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -69,36 +67,46 @@ func (c *lightNodeClient) StreamAvailabilityStatus(ctx context.Context, in *Stre return x, nil } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type LightNode_StreamAvailabilityStatusClient = grpc.ServerStreamingClient[common.ChunkKey] +type LightNode_StreamAvailabilityStatusClient interface { + Recv() (*common.ChunkKey, error) + grpc.ClientStream +} + +type lightNodeStreamAvailabilityStatusClient struct { + grpc.ClientStream +} + +func (x *lightNodeStreamAvailabilityStatusClient) Recv() (*common.ChunkKey, error) { + m := new(common.ChunkKey) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} // LightNodeServer is the server API for LightNode service. // All implementations must embed UnimplementedLightNodeServer -// for forward compatibility. +// for forward compatibility type LightNodeServer interface { // GetChunk retrieves a specific chunk held by the light node. GetChunk(context.Context, *common.ChunkKey) (*common.ChunkData, error) // StreamAvailabilityStatus streams the availability status of all chunks assigned to the light node. // For use by a DA node for monitoring the availability of chunks through its constellation of agent light nodes. - StreamAvailabilityStatus(*StreamAvailabilityStatusRequest, grpc.ServerStreamingServer[common.ChunkKey]) error + StreamAvailabilityStatus(*StreamAvailabilityStatusRequest, LightNode_StreamAvailabilityStatusServer) error mustEmbedUnimplementedLightNodeServer() } -// UnimplementedLightNodeServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedLightNodeServer struct{} +// UnimplementedLightNodeServer must be embedded to have forward compatible implementations. +type UnimplementedLightNodeServer struct { +} func (UnimplementedLightNodeServer) GetChunk(context.Context, *common.ChunkKey) (*common.ChunkData, error) { return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") } -func (UnimplementedLightNodeServer) StreamAvailabilityStatus(*StreamAvailabilityStatusRequest, grpc.ServerStreamingServer[common.ChunkKey]) error { +func (UnimplementedLightNodeServer) StreamAvailabilityStatus(*StreamAvailabilityStatusRequest, LightNode_StreamAvailabilityStatusServer) error { return status.Errorf(codes.Unimplemented, "method StreamAvailabilityStatus not implemented") } func (UnimplementedLightNodeServer) mustEmbedUnimplementedLightNodeServer() {} -func (UnimplementedLightNodeServer) testEmbeddedByValue() {} // UnsafeLightNodeServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to LightNodeServer will @@ -108,13 +116,6 @@ type UnsafeLightNodeServer interface { } func RegisterLightNodeServer(s grpc.ServiceRegistrar, srv LightNodeServer) { - // If the following call pancis, it indicates UnimplementedLightNodeServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&LightNode_ServiceDesc, srv) } @@ -141,11 +142,21 @@ func _LightNode_StreamAvailabilityStatus_Handler(srv interface{}, stream grpc.Se if err := stream.RecvMsg(m); err != nil { return err } - return srv.(LightNodeServer).StreamAvailabilityStatus(m, &grpc.GenericServerStream[StreamAvailabilityStatusRequest, common.ChunkKey]{ServerStream: stream}) + return srv.(LightNodeServer).StreamAvailabilityStatus(m, &lightNodeStreamAvailabilityStatusServer{stream}) +} + +type LightNode_StreamAvailabilityStatusServer interface { + Send(*common.ChunkKey) error + grpc.ServerStream } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type LightNode_StreamAvailabilityStatusServer = grpc.ServerStreamingServer[common.ChunkKey] +type lightNodeStreamAvailabilityStatusServer struct { + grpc.ServerStream +} + +func (x *lightNodeStreamAvailabilityStatusServer) Send(m *common.ChunkKey) error { + return x.ServerStream.SendMsg(m) +} // LightNode_ServiceDesc is the grpc.ServiceDesc for LightNode service. // It's only intended for direct use with grpc.RegisterService, diff --git a/api/grpc/node/node.pb.go b/api/grpc/node/node.pb.go index f67a14892d..a6fb3b6de9 100644 --- a/api/grpc/node/node.pb.go +++ b/api/grpc/node/node.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.28.1 // protoc v4.23.4 // source: node/node.proto @@ -1773,7 +1773,7 @@ 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, 24) -var file_node_node_proto_goTypes = []any{ +var file_node_node_proto_goTypes = []interface{}{ (ChunkEncodingFormat)(0), // 0: node.ChunkEncodingFormat (*StoreChunksRequest)(nil), // 1: node.StoreChunksRequest (*StoreChunksReply)(nil), // 2: node.StoreChunksReply @@ -1859,7 +1859,7 @@ func file_node_node_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_node_node_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StoreChunksRequest); i { case 0: return &v.state @@ -1871,7 +1871,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StoreChunksReply); i { case 0: return &v.state @@ -1883,7 +1883,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StoreBlobsRequest); i { case 0: return &v.state @@ -1895,7 +1895,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StoreBlobsReply); i { case 0: return &v.state @@ -1907,7 +1907,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[4].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AttestBatchRequest); i { case 0: return &v.state @@ -1919,7 +1919,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[5].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AttestBatchReply); i { case 0: return &v.state @@ -1931,7 +1931,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[6].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RetrieveChunksRequest); i { case 0: return &v.state @@ -1943,7 +1943,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[7].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RetrieveChunksReply); i { case 0: return &v.state @@ -1955,7 +1955,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[8].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetBlobHeaderRequest); i { case 0: return &v.state @@ -1967,7 +1967,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[9].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetBlobHeaderReply); i { case 0: return &v.state @@ -1979,7 +1979,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[10].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MerkleProof); i { case 0: return &v.state @@ -1991,7 +1991,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[11].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Blob); i { case 0: return &v.state @@ -2003,7 +2003,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[12].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Bundle); i { case 0: return &v.state @@ -2015,7 +2015,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[13].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*G2Commitment); i { case 0: return &v.state @@ -2027,7 +2027,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[14].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlobHeader); i { case 0: return &v.state @@ -2039,7 +2039,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[15].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlobQuorumInfo); i { case 0: return &v.state @@ -2051,7 +2051,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[16].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BatchHeader); i { case 0: return &v.state @@ -2063,7 +2063,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[17].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NodeInfoRequest); i { case 0: return &v.state @@ -2075,7 +2075,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[18].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NodeInfoReply); i { case 0: return &v.state @@ -2087,7 +2087,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[19].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetChunksRequest); i { case 0: return &v.state @@ -2099,7 +2099,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[20].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetChunksReply); i { case 0: return &v.state @@ -2111,7 +2111,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[21].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamHeadersRequest); i { case 0: return &v.state @@ -2123,7 +2123,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[22].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetNodeInfoRequest); i { case 0: return &v.state @@ -2135,7 +2135,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[23].Exporter = func(v any, i int) any { + file_node_node_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetNodeInfoReply); i { case 0: return &v.state diff --git a/api/grpc/node/node_grpc.pb.go b/api/grpc/node/node_grpc.pb.go index ba2a8ec193..6243fc0fab 100644 --- a/api/grpc/node/node_grpc.pb.go +++ b/api/grpc/node/node_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 +// - protoc-gen-go-grpc v1.3.0 // - protoc v4.23.4 // source: node/node.proto @@ -16,8 +16,8 @@ import ( // 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.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 const ( Dispersal_StoreChunks_FullMethodName = "/node.Dispersal/StoreChunks" @@ -57,9 +57,8 @@ func NewDispersalClient(cc grpc.ClientConnInterface) DispersalClient { } func (c *dispersalClient) StoreChunks(ctx context.Context, in *StoreChunksRequest, opts ...grpc.CallOption) (*StoreChunksReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StoreChunksReply) - err := c.cc.Invoke(ctx, Dispersal_StoreChunks_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Dispersal_StoreChunks_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -67,9 +66,8 @@ func (c *dispersalClient) StoreChunks(ctx context.Context, in *StoreChunksReques } func (c *dispersalClient) StoreBlobs(ctx context.Context, in *StoreBlobsRequest, opts ...grpc.CallOption) (*StoreBlobsReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StoreBlobsReply) - err := c.cc.Invoke(ctx, Dispersal_StoreBlobs_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Dispersal_StoreBlobs_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -77,9 +75,8 @@ func (c *dispersalClient) StoreBlobs(ctx context.Context, in *StoreBlobsRequest, } func (c *dispersalClient) AttestBatch(ctx context.Context, in *AttestBatchRequest, opts ...grpc.CallOption) (*AttestBatchReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AttestBatchReply) - err := c.cc.Invoke(ctx, Dispersal_AttestBatch_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Dispersal_AttestBatch_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -87,9 +84,8 @@ func (c *dispersalClient) AttestBatch(ctx context.Context, in *AttestBatchReques } func (c *dispersalClient) NodeInfo(ctx context.Context, in *NodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(NodeInfoReply) - err := c.cc.Invoke(ctx, Dispersal_NodeInfo_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Dispersal_NodeInfo_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -98,7 +94,7 @@ func (c *dispersalClient) NodeInfo(ctx context.Context, in *NodeInfoRequest, opt // DispersalServer is the server API for Dispersal service. // All implementations must embed UnimplementedDispersalServer -// for forward compatibility. +// for forward compatibility type DispersalServer interface { // StoreChunks validates that the chunks match what the Node is supposed to receive ( // different Nodes are responsible for different chunks, as EigenDA is horizontally @@ -119,12 +115,9 @@ type DispersalServer interface { mustEmbedUnimplementedDispersalServer() } -// UnimplementedDispersalServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedDispersalServer struct{} +// 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") @@ -139,7 +132,6 @@ func (UnimplementedDispersalServer) NodeInfo(context.Context, *NodeInfoRequest) return nil, status.Errorf(codes.Unimplemented, "method NodeInfo not implemented") } func (UnimplementedDispersalServer) mustEmbedUnimplementedDispersalServer() {} -func (UnimplementedDispersalServer) testEmbeddedByValue() {} // 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 @@ -149,13 +141,6 @@ type UnsafeDispersalServer interface { } func RegisterDispersalServer(s grpc.ServiceRegistrar, srv DispersalServer) { - // If the following call pancis, it indicates UnimplementedDispersalServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&Dispersal_ServiceDesc, srv) } @@ -289,7 +274,7 @@ type RetrievalClient interface { // Eventually this will replace GetBlobHeader. GetHeader(ctx context.Context, in *common.BlobKey, opts ...grpc.CallOption) (*GetBlobHeaderReply, error) // StreamHeaders requests a stream all new headers. - StreamHeaders(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StreamHeadersRequest, GetBlobHeaderReply], error) + StreamHeaders(ctx context.Context, opts ...grpc.CallOption) (Retrieval_StreamHeadersClient, error) // Retrieve node info metadata. Eventually this will replace NodeInfo. GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoReply, error) } @@ -303,9 +288,8 @@ func NewRetrievalClient(cc grpc.ClientConnInterface) RetrievalClient { } func (c *retrievalClient) RetrieveChunks(ctx context.Context, in *RetrieveChunksRequest, opts ...grpc.CallOption) (*RetrieveChunksReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RetrieveChunksReply) - err := c.cc.Invoke(ctx, Retrieval_RetrieveChunks_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Retrieval_RetrieveChunks_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -313,9 +297,8 @@ func (c *retrievalClient) RetrieveChunks(ctx context.Context, in *RetrieveChunks } func (c *retrievalClient) GetBlobHeader(ctx context.Context, in *GetBlobHeaderRequest, opts ...grpc.CallOption) (*GetBlobHeaderReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetBlobHeaderReply) - err := c.cc.Invoke(ctx, Retrieval_GetBlobHeader_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Retrieval_GetBlobHeader_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -323,9 +306,8 @@ func (c *retrievalClient) GetBlobHeader(ctx context.Context, in *GetBlobHeaderRe } func (c *retrievalClient) NodeInfo(ctx context.Context, in *NodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(NodeInfoReply) - err := c.cc.Invoke(ctx, Retrieval_NodeInfo_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Retrieval_NodeInfo_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -333,9 +315,8 @@ func (c *retrievalClient) NodeInfo(ctx context.Context, in *NodeInfoRequest, opt } func (c *retrievalClient) GetChunks(ctx context.Context, in *GetChunksRequest, opts ...grpc.CallOption) (*GetChunksReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetChunksReply) - err := c.cc.Invoke(ctx, Retrieval_GetChunks_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Retrieval_GetChunks_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -343,9 +324,8 @@ func (c *retrievalClient) GetChunks(ctx context.Context, in *GetChunksRequest, o } func (c *retrievalClient) GetChunk(ctx context.Context, in *common.ChunkKey, opts ...grpc.CallOption) (*common.ChunkData, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(common.ChunkData) - err := c.cc.Invoke(ctx, Retrieval_GetChunk_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Retrieval_GetChunk_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -353,32 +333,48 @@ func (c *retrievalClient) GetChunk(ctx context.Context, in *common.ChunkKey, opt } func (c *retrievalClient) GetHeader(ctx context.Context, in *common.BlobKey, opts ...grpc.CallOption) (*GetBlobHeaderReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetBlobHeaderReply) - err := c.cc.Invoke(ctx, Retrieval_GetHeader_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Retrieval_GetHeader_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *retrievalClient) StreamHeaders(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StreamHeadersRequest, GetBlobHeaderReply], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &Retrieval_ServiceDesc.Streams[0], Retrieval_StreamHeaders_FullMethodName, cOpts...) +func (c *retrievalClient) StreamHeaders(ctx context.Context, opts ...grpc.CallOption) (Retrieval_StreamHeadersClient, error) { + stream, err := c.cc.NewStream(ctx, &Retrieval_ServiceDesc.Streams[0], Retrieval_StreamHeaders_FullMethodName, opts...) if err != nil { return nil, err } - x := &grpc.GenericClientStream[StreamHeadersRequest, GetBlobHeaderReply]{ClientStream: stream} + x := &retrievalStreamHeadersClient{stream} return x, nil } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type Retrieval_StreamHeadersClient = grpc.BidiStreamingClient[StreamHeadersRequest, GetBlobHeaderReply] +type Retrieval_StreamHeadersClient interface { + Send(*StreamHeadersRequest) error + Recv() (*GetBlobHeaderReply, error) + grpc.ClientStream +} + +type retrievalStreamHeadersClient struct { + grpc.ClientStream +} + +func (x *retrievalStreamHeadersClient) Send(m *StreamHeadersRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *retrievalStreamHeadersClient) Recv() (*GetBlobHeaderReply, error) { + m := new(GetBlobHeaderReply) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} func (c *retrievalClient) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetNodeInfoReply) - err := c.cc.Invoke(ctx, Retrieval_GetNodeInfo_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Retrieval_GetNodeInfo_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -387,7 +383,7 @@ func (c *retrievalClient) GetNodeInfo(ctx context.Context, in *GetNodeInfoReques // RetrievalServer is the server API for Retrieval service. // All implementations must embed UnimplementedRetrievalServer -// for forward compatibility. +// for forward compatibility type RetrievalServer interface { // RetrieveChunks retrieves the chunks for a blob custodied at the Node. RetrieveChunks(context.Context, *RetrieveChunksRequest) (*RetrieveChunksReply, error) @@ -404,18 +400,15 @@ type RetrievalServer interface { // Eventually this will replace GetBlobHeader. GetHeader(context.Context, *common.BlobKey) (*GetBlobHeaderReply, error) // StreamHeaders requests a stream all new headers. - StreamHeaders(grpc.BidiStreamingServer[StreamHeadersRequest, GetBlobHeaderReply]) error + StreamHeaders(Retrieval_StreamHeadersServer) error // Retrieve node info metadata. Eventually this will replace NodeInfo. GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoReply, error) mustEmbedUnimplementedRetrievalServer() } -// UnimplementedRetrievalServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedRetrievalServer struct{} +// UnimplementedRetrievalServer must be embedded to have forward compatible implementations. +type UnimplementedRetrievalServer struct { +} func (UnimplementedRetrievalServer) RetrieveChunks(context.Context, *RetrieveChunksRequest) (*RetrieveChunksReply, error) { return nil, status.Errorf(codes.Unimplemented, "method RetrieveChunks not implemented") @@ -435,14 +428,13 @@ func (UnimplementedRetrievalServer) GetChunk(context.Context, *common.ChunkKey) func (UnimplementedRetrievalServer) GetHeader(context.Context, *common.BlobKey) (*GetBlobHeaderReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetHeader not implemented") } -func (UnimplementedRetrievalServer) StreamHeaders(grpc.BidiStreamingServer[StreamHeadersRequest, GetBlobHeaderReply]) error { +func (UnimplementedRetrievalServer) StreamHeaders(Retrieval_StreamHeadersServer) error { return status.Errorf(codes.Unimplemented, "method StreamHeaders not implemented") } func (UnimplementedRetrievalServer) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNodeInfo not implemented") } func (UnimplementedRetrievalServer) mustEmbedUnimplementedRetrievalServer() {} -func (UnimplementedRetrievalServer) testEmbeddedByValue() {} // 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 @@ -452,13 +444,6 @@ type UnsafeRetrievalServer interface { } func RegisterRetrievalServer(s grpc.ServiceRegistrar, srv RetrievalServer) { - // If the following call pancis, it indicates UnimplementedRetrievalServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&Retrieval_ServiceDesc, srv) } @@ -571,11 +556,30 @@ func _Retrieval_GetHeader_Handler(srv interface{}, ctx context.Context, dec func } func _Retrieval_StreamHeaders_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(RetrievalServer).StreamHeaders(&grpc.GenericServerStream[StreamHeadersRequest, GetBlobHeaderReply]{ServerStream: stream}) + return srv.(RetrievalServer).StreamHeaders(&retrievalStreamHeadersServer{stream}) +} + +type Retrieval_StreamHeadersServer interface { + Send(*GetBlobHeaderReply) error + Recv() (*StreamHeadersRequest, error) + grpc.ServerStream +} + +type retrievalStreamHeadersServer struct { + grpc.ServerStream +} + +func (x *retrievalStreamHeadersServer) Send(m *GetBlobHeaderReply) error { + return x.ServerStream.SendMsg(m) } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type Retrieval_StreamHeadersServer = grpc.BidiStreamingServer[StreamHeadersRequest, GetBlobHeaderReply] +func (x *retrievalStreamHeadersServer) Recv() (*StreamHeadersRequest, error) { + m := new(StreamHeadersRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} func _Retrieval_GetNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetNodeInfoRequest) diff --git a/api/grpc/retriever/retriever.pb.go b/api/grpc/retriever/retriever.pb.go index 10c23e145b..8944f5f669 100644 --- a/api/grpc/retriever/retriever.pb.go +++ b/api/grpc/retriever/retriever.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.28.1 // protoc v4.23.4 // source: retriever/retriever.proto @@ -195,7 +195,7 @@ func file_retriever_retriever_proto_rawDescGZIP() []byte { } var file_retriever_retriever_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_retriever_retriever_proto_goTypes = []any{ +var file_retriever_retriever_proto_goTypes = []interface{}{ (*BlobRequest)(nil), // 0: retriever.BlobRequest (*BlobReply)(nil), // 1: retriever.BlobReply (*common.BlobKey)(nil), // 2: common.BlobKey @@ -219,7 +219,7 @@ func file_retriever_retriever_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_retriever_retriever_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_retriever_retriever_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlobRequest); i { case 0: return &v.state @@ -231,7 +231,7 @@ func file_retriever_retriever_proto_init() { return nil } } - file_retriever_retriever_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_retriever_retriever_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlobReply); i { case 0: return &v.state diff --git a/api/grpc/retriever/retriever_grpc.pb.go b/api/grpc/retriever/retriever_grpc.pb.go index 21d67c4565..56b05aee1a 100644 --- a/api/grpc/retriever/retriever_grpc.pb.go +++ b/api/grpc/retriever/retriever_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 +// - protoc-gen-go-grpc v1.3.0 // - protoc v4.23.4 // source: retriever/retriever.proto @@ -16,8 +16,8 @@ import ( // 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.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 const ( Retriever_RetrieveBlob_FullMethodName = "/retriever.Retriever/RetrieveBlob" @@ -27,20 +27,6 @@ const ( // RetrieverClient is the client API for Retriever service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// The Retriever is a service for retrieving chunks corresponding to a blob from -// the EigenDA operator nodes and reconstructing the original blob from the chunks. -// This is a client-side library that the users are supposed to operationalize. -// -// Note: Users generally have two ways to retrieve a blob from EigenDA: -// 1. Retrieve from the Disperser that the user initially used for dispersal: the API -// is Disperser.RetrieveBlob() as defined in api/proto/disperser/disperser.proto -// 2. Retrieve directly from the EigenDA Nodes, which is supported by this Retriever. -// -// The Disperser.RetrieveBlob() (the 1st approach) is generally faster and cheaper as the -// Disperser manages the blobs that it has processed, whereas the Retriever.RetrieveBlob() -// (the 2nd approach here) removes the need to trust the Disperser, with the downside of -// worse cost and performance. type RetrieverClient interface { // This fans out request to EigenDA Nodes to retrieve the chunks and returns the // reconstructed original blob in response. @@ -59,9 +45,8 @@ func NewRetrieverClient(cc grpc.ClientConnInterface) RetrieverClient { } func (c *retrieverClient) RetrieveBlob(ctx context.Context, in *BlobRequest, opts ...grpc.CallOption) (*BlobReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(BlobReply) - err := c.cc.Invoke(ctx, Retriever_RetrieveBlob_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Retriever_RetrieveBlob_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -69,9 +54,8 @@ func (c *retrieverClient) RetrieveBlob(ctx context.Context, in *BlobRequest, opt } func (c *retrieverClient) GetBlob(ctx context.Context, in *common.BlobKey, opts ...grpc.CallOption) (*common.BlobData, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(common.BlobData) - err := c.cc.Invoke(ctx, Retriever_GetBlob_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Retriever_GetBlob_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -80,21 +64,7 @@ func (c *retrieverClient) GetBlob(ctx context.Context, in *common.BlobKey, opts // RetrieverServer is the server API for Retriever service. // All implementations must embed UnimplementedRetrieverServer -// for forward compatibility. -// -// The Retriever is a service for retrieving chunks corresponding to a blob from -// the EigenDA operator nodes and reconstructing the original blob from the chunks. -// This is a client-side library that the users are supposed to operationalize. -// -// Note: Users generally have two ways to retrieve a blob from EigenDA: -// 1. Retrieve from the Disperser that the user initially used for dispersal: the API -// is Disperser.RetrieveBlob() as defined in api/proto/disperser/disperser.proto -// 2. Retrieve directly from the EigenDA Nodes, which is supported by this Retriever. -// -// The Disperser.RetrieveBlob() (the 1st approach) is generally faster and cheaper as the -// Disperser manages the blobs that it has processed, whereas the Retriever.RetrieveBlob() -// (the 2nd approach here) removes the need to trust the Disperser, with the downside of -// worse cost and performance. +// for forward compatibility type RetrieverServer interface { // This fans out request to EigenDA Nodes to retrieve the chunks and returns the // reconstructed original blob in response. @@ -105,12 +75,9 @@ type RetrieverServer interface { mustEmbedUnimplementedRetrieverServer() } -// UnimplementedRetrieverServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedRetrieverServer struct{} +// UnimplementedRetrieverServer must be embedded to have forward compatible implementations. +type UnimplementedRetrieverServer struct { +} func (UnimplementedRetrieverServer) RetrieveBlob(context.Context, *BlobRequest) (*BlobReply, error) { return nil, status.Errorf(codes.Unimplemented, "method RetrieveBlob not implemented") @@ -119,7 +86,6 @@ func (UnimplementedRetrieverServer) GetBlob(context.Context, *common.BlobKey) (* return nil, status.Errorf(codes.Unimplemented, "method GetBlob not implemented") } func (UnimplementedRetrieverServer) mustEmbedUnimplementedRetrieverServer() {} -func (UnimplementedRetrieverServer) testEmbeddedByValue() {} // UnsafeRetrieverServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to RetrieverServer will @@ -129,13 +95,6 @@ type UnsafeRetrieverServer interface { } func RegisterRetrieverServer(s grpc.ServiceRegistrar, srv RetrieverServer) { - // If the following call pancis, it indicates UnimplementedRetrieverServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&Retriever_ServiceDesc, srv) } diff --git a/disperser/api/grpc/encoder/encoder.pb.go b/disperser/api/grpc/encoder/encoder.pb.go index cec3593b00..908a5691ea 100644 --- a/disperser/api/grpc/encoder/encoder.pb.go +++ b/disperser/api/grpc/encoder/encoder.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.28.1 // protoc v4.23.4 // source: encoder/encoder.proto @@ -318,7 +318,7 @@ func file_encoder_encoder_proto_rawDescGZIP() []byte { } var file_encoder_encoder_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_encoder_encoder_proto_goTypes = []any{ +var file_encoder_encoder_proto_goTypes = []interface{}{ (*BlobCommitment)(nil), // 0: encoder.BlobCommitment (*EncodingParams)(nil), // 1: encoder.EncodingParams (*EncodeBlobRequest)(nil), // 2: encoder.EncodeBlobRequest @@ -342,7 +342,7 @@ func file_encoder_encoder_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_encoder_encoder_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_encoder_encoder_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlobCommitment); i { case 0: return &v.state @@ -354,7 +354,7 @@ func file_encoder_encoder_proto_init() { return nil } } - file_encoder_encoder_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_encoder_encoder_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EncodingParams); i { case 0: return &v.state @@ -366,7 +366,7 @@ func file_encoder_encoder_proto_init() { return nil } } - file_encoder_encoder_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_encoder_encoder_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EncodeBlobRequest); i { case 0: return &v.state @@ -378,7 +378,7 @@ func file_encoder_encoder_proto_init() { return nil } } - file_encoder_encoder_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_encoder_encoder_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EncodeBlobReply); i { case 0: return &v.state diff --git a/disperser/api/grpc/encoder/encoder_grpc.pb.go b/disperser/api/grpc/encoder/encoder_grpc.pb.go index 44948bbcca..76285b6a2c 100644 --- a/disperser/api/grpc/encoder/encoder_grpc.pb.go +++ b/disperser/api/grpc/encoder/encoder_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 +// - protoc-gen-go-grpc v1.3.0 // - protoc v4.23.4 // source: encoder/encoder.proto @@ -15,8 +15,8 @@ import ( // 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.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 const ( Encoder_EncodeBlob_FullMethodName = "/encoder.Encoder/EncodeBlob" @@ -38,9 +38,8 @@ func NewEncoderClient(cc grpc.ClientConnInterface) EncoderClient { } func (c *encoderClient) EncodeBlob(ctx context.Context, in *EncodeBlobRequest, opts ...grpc.CallOption) (*EncodeBlobReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(EncodeBlobReply) - err := c.cc.Invoke(ctx, Encoder_EncodeBlob_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Encoder_EncodeBlob_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -49,24 +48,20 @@ func (c *encoderClient) EncodeBlob(ctx context.Context, in *EncodeBlobRequest, o // EncoderServer is the server API for Encoder service. // All implementations must embed UnimplementedEncoderServer -// for forward compatibility. +// for forward compatibility type EncoderServer interface { EncodeBlob(context.Context, *EncodeBlobRequest) (*EncodeBlobReply, error) mustEmbedUnimplementedEncoderServer() } -// UnimplementedEncoderServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedEncoderServer struct{} +// UnimplementedEncoderServer must be embedded to have forward compatible implementations. +type UnimplementedEncoderServer struct { +} func (UnimplementedEncoderServer) EncodeBlob(context.Context, *EncodeBlobRequest) (*EncodeBlobReply, error) { return nil, status.Errorf(codes.Unimplemented, "method EncodeBlob not implemented") } func (UnimplementedEncoderServer) mustEmbedUnimplementedEncoderServer() {} -func (UnimplementedEncoderServer) testEmbeddedByValue() {} // UnsafeEncoderServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to EncoderServer will @@ -76,13 +71,6 @@ type UnsafeEncoderServer interface { } func RegisterEncoderServer(s grpc.ServiceRegistrar, srv EncoderServer) { - // If the following call pancis, it indicates UnimplementedEncoderServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&Encoder_ServiceDesc, srv) } From 0a29fb22e5ad7e52ac29d561c616392787d7ec95 Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Thu, 29 Aug 2024 13:40:10 -0500 Subject: [PATCH 17/31] Docker image for building protobufs. Signed-off-by: Cody Littley --- api/builder/Dockerfile | 38 ++++++++++++++++++++++++++++++++++ api/builder/build-docker.sh | 12 +++++++++++ api/builder/build-protobufs.sh | 10 +++++++++ api/builder/debug.sh | 14 +++++++++++++ 4 files changed, 74 insertions(+) create mode 100644 api/builder/Dockerfile create mode 100755 api/builder/build-docker.sh create mode 100755 api/builder/build-protobufs.sh create mode 100755 api/builder/debug.sh diff --git a/api/builder/Dockerfile b/api/builder/Dockerfile new file mode 100644 index 0000000000..48b6356638 --- /dev/null +++ b/api/builder/Dockerfile @@ -0,0 +1,38 @@ +FROM debian + +# Install core dependencies +RUN apt update +RUN apt install -y wget unzip bash build-essential + +# Set up user +RUN useradd -m -s /bin/bash user +USER user +WORKDIR /home/user +# Remove default crud +RUN rm .bashrc +RUN rm .bash_logout +RUN rm .profile + +# Install golang +RUN wget https://go.dev/dl/go1.21.12.linux-arm64.tar.gz +RUN tar -xf ./*.tar.gz +RUN rm ./*.tar.gz +RUN mkdir -p ~/.local/share +RUN mv go ~/.local/share/go + +# Install protoc +RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.4-linux-aarch_64.zip +RUN mkdir protoc +RUN cd protoc && unzip ../*.zip +RUN rm ./*.zip +RUN mv protoc ~/.local/share/protoc + +# Setup PATH +RUN touch ~/.bashrc +RUN echo 'export GOPATH=~/.local/share/go' >> ~/.bashrc +RUN echo 'export PATH=~/.local/share/go/bin:$PATH' >> ~/.bashrc +RUN echo 'export PATH=~/.local/share/protoc/bin:$PATH' >> ~/.bashrc + +# Install go protobuf extensions +RUN bash -c 'source ~/.bashrc && go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.1' +RUN bash -c 'source ~/.bashrc && go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0' diff --git a/api/builder/build-docker.sh b/api/builder/build-docker.sh new file mode 100755 index 0000000000..1ae4147ba4 --- /dev/null +++ b/api/builder/build-docker.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# The location where this script can be found. +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +# Add the --no-cache flag to force a rebuild. +# Add the --progress=plain flag to show verbose output during the build. + +docker build \ + -f "${SCRIPT_DIR}/Dockerfile" \ + --tag pbuf-compiler:latest \ + . \ No newline at end of file diff --git a/api/builder/build-protobufs.sh b/api/builder/build-protobufs.sh new file mode 100755 index 0000000000..824e1d9dc5 --- /dev/null +++ b/api/builder/build-protobufs.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# The location where this script can be found. +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +ROOT="${SCRIPT_DIR}/../.." + +docker container run \ + --rm \ + --mount "type=bind,source=${ROOT},target=/home/user/eigenda" \ + pbuf-compiler bash -c 'source .bashrc && cd eigenda && make protoc' diff --git a/api/builder/debug.sh b/api/builder/debug.sh new file mode 100755 index 0000000000..2f9cfa73f8 --- /dev/null +++ b/api/builder/debug.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# This is a handy little script for debugging the docker container. Attaches a bash shell to the container. + +# The location where this script can be found. +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +ROOT="${SCRIPT_DIR}/../.." + +docker container run \ + --rm \ + --mount "type=bind,source=${ROOT},target=/home/user/eigenda" \ + -it \ + pbuf-compiler bash + From 06005c7a97816c8148226cd5d2d44b5a02e41aa7 Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Fri, 30 Aug 2024 10:36:22 -0500 Subject: [PATCH 18/31] Made suggested changes. Signed-off-by: Cody Littley --- api/builder/Dockerfile | 38 ---------- api/builder/build-docker.sh | 12 ---- api/builder/build-protobufs.sh | 10 --- api/builder/debug.sh | 14 ---- api/grpc/common/common.pb.go | 123 +++++++++++++++------------------ api/proto/common/common.proto | 7 +- 6 files changed, 59 insertions(+), 145 deletions(-) delete mode 100644 api/builder/Dockerfile delete mode 100755 api/builder/build-docker.sh delete mode 100755 api/builder/build-protobufs.sh delete mode 100755 api/builder/debug.sh diff --git a/api/builder/Dockerfile b/api/builder/Dockerfile deleted file mode 100644 index 48b6356638..0000000000 --- a/api/builder/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -FROM debian - -# Install core dependencies -RUN apt update -RUN apt install -y wget unzip bash build-essential - -# Set up user -RUN useradd -m -s /bin/bash user -USER user -WORKDIR /home/user -# Remove default crud -RUN rm .bashrc -RUN rm .bash_logout -RUN rm .profile - -# Install golang -RUN wget https://go.dev/dl/go1.21.12.linux-arm64.tar.gz -RUN tar -xf ./*.tar.gz -RUN rm ./*.tar.gz -RUN mkdir -p ~/.local/share -RUN mv go ~/.local/share/go - -# Install protoc -RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.4-linux-aarch_64.zip -RUN mkdir protoc -RUN cd protoc && unzip ../*.zip -RUN rm ./*.zip -RUN mv protoc ~/.local/share/protoc - -# Setup PATH -RUN touch ~/.bashrc -RUN echo 'export GOPATH=~/.local/share/go' >> ~/.bashrc -RUN echo 'export PATH=~/.local/share/go/bin:$PATH' >> ~/.bashrc -RUN echo 'export PATH=~/.local/share/protoc/bin:$PATH' >> ~/.bashrc - -# Install go protobuf extensions -RUN bash -c 'source ~/.bashrc && go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.1' -RUN bash -c 'source ~/.bashrc && go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0' diff --git a/api/builder/build-docker.sh b/api/builder/build-docker.sh deleted file mode 100755 index 1ae4147ba4..0000000000 --- a/api/builder/build-docker.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -# The location where this script can be found. -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - -# Add the --no-cache flag to force a rebuild. -# Add the --progress=plain flag to show verbose output during the build. - -docker build \ - -f "${SCRIPT_DIR}/Dockerfile" \ - --tag pbuf-compiler:latest \ - . \ No newline at end of file diff --git a/api/builder/build-protobufs.sh b/api/builder/build-protobufs.sh deleted file mode 100755 index 824e1d9dc5..0000000000 --- a/api/builder/build-protobufs.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -# The location where this script can be found. -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -ROOT="${SCRIPT_DIR}/../.." - -docker container run \ - --rm \ - --mount "type=bind,source=${ROOT},target=/home/user/eigenda" \ - pbuf-compiler bash -c 'source .bashrc && cd eigenda && make protoc' diff --git a/api/builder/debug.sh b/api/builder/debug.sh deleted file mode 100755 index 2f9cfa73f8..0000000000 --- a/api/builder/debug.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -# This is a handy little script for debugging the docker container. Attaches a bash shell to the container. - -# The location where this script can be found. -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -ROOT="${SCRIPT_DIR}/../.." - -docker container run \ - --rm \ - --mount "type=bind,source=${ROOT},target=/home/user/eigenda" \ - -it \ - pbuf-compiler bash - diff --git a/api/grpc/common/common.pb.go b/api/grpc/common/common.pb.go index fb35070702..84df04d695 100644 --- a/api/grpc/common/common.pb.go +++ b/api/grpc/common/common.pb.go @@ -86,7 +86,7 @@ type BlobKey struct { // Types that are assignable to Key: // // *BlobKey_HeaderBlobKey - // *BlobKey_CertificateBlobKey + // *BlobKey_BatchBlobKey Key isBlobKey_Key `protobuf_oneof:"key"` } @@ -136,9 +136,9 @@ func (x *BlobKey) GetHeaderBlobKey() *HeaderBlobKey { return nil } -func (x *BlobKey) GetCertificateBlobKey() *CertificateBlobKey { - if x, ok := x.GetKey().(*BlobKey_CertificateBlobKey); ok { - return x.CertificateBlobKey +func (x *BlobKey) GetBatchBlobKey() *BatchBlobKey { + if x, ok := x.GetKey().(*BlobKey_BatchBlobKey); ok { + return x.BatchBlobKey } return nil } @@ -151,13 +151,13 @@ type BlobKey_HeaderBlobKey struct { HeaderBlobKey *HeaderBlobKey `protobuf:"bytes,1,opt,name=header_blob_key,json=headerBlobKey,proto3,oneof"` } -type BlobKey_CertificateBlobKey struct { - CertificateBlobKey *CertificateBlobKey `protobuf:"bytes,2,opt,name=certificate_blob_key,json=certificateBlobKey,proto3,oneof"` +type BlobKey_BatchBlobKey struct { + BatchBlobKey *BatchBlobKey `protobuf:"bytes,2,opt,name=batch_blob_key,json=batchBlobKey,proto3,oneof"` } func (*BlobKey_HeaderBlobKey) isBlobKey_Key() {} -func (*BlobKey_CertificateBlobKey) isBlobKey_Key() {} +func (*BlobKey_BatchBlobKey) isBlobKey_Key() {} // Uniquely identifies a blob based on its blob header hash. type HeaderBlobKey struct { @@ -208,7 +208,7 @@ func (x *HeaderBlobKey) GetHeaderHash() []byte { } // Uniquely identifies a blob based on its certificate hash and blob index. -type CertificateBlobKey struct { +type BatchBlobKey struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -217,8 +217,8 @@ type CertificateBlobKey struct { BlobIndex uint32 `protobuf:"varint,2,opt,name=blob_index,json=blobIndex,proto3" json:"blob_index,omitempty"` } -func (x *CertificateBlobKey) Reset() { - *x = CertificateBlobKey{} +func (x *BatchBlobKey) Reset() { + *x = BatchBlobKey{} if protoimpl.UnsafeEnabled { mi := &file_common_common_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -226,13 +226,13 @@ func (x *CertificateBlobKey) Reset() { } } -func (x *CertificateBlobKey) String() string { +func (x *BatchBlobKey) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CertificateBlobKey) ProtoMessage() {} +func (*BatchBlobKey) ProtoMessage() {} -func (x *CertificateBlobKey) ProtoReflect() protoreflect.Message { +func (x *BatchBlobKey) ProtoReflect() protoreflect.Message { mi := &file_common_common_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -244,19 +244,19 @@ func (x *CertificateBlobKey) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CertificateBlobKey.ProtoReflect.Descriptor instead. -func (*CertificateBlobKey) Descriptor() ([]byte, []int) { +// Deprecated: Use BatchBlobKey.ProtoReflect.Descriptor instead. +func (*BatchBlobKey) Descriptor() ([]byte, []int) { return file_common_common_proto_rawDescGZIP(), []int{3} } -func (x *CertificateBlobKey) GetCertificateHash() []byte { +func (x *BatchBlobKey) GetCertificateHash() []byte { if x != nil { return x.CertificateHash } return nil } -func (x *CertificateBlobKey) GetBlobIndex() uint32 { +func (x *BatchBlobKey) GetBlobIndex() uint32 { if x != nil { return x.BlobIndex } @@ -270,8 +270,7 @@ type ChunkKey struct { unknownFields protoimpl.UnknownFields BlobKey *BlobKey `protobuf:"bytes,1,opt,name=blob_key,json=blobKey,proto3" json:"blob_key,omitempty"` - QuorumId uint32 `protobuf:"varint,2,opt,name=quorum_id,json=quorumId,proto3" json:"quorum_id,omitempty"` - ChunkIndex uint32 `protobuf:"varint,3,opt,name=chunk_index,json=chunkIndex,proto3" json:"chunk_index,omitempty"` + ChunkIndex uint32 `protobuf:"varint,2,opt,name=chunk_index,json=chunkIndex,proto3" json:"chunk_index,omitempty"` } func (x *ChunkKey) Reset() { @@ -313,13 +312,6 @@ func (x *ChunkKey) GetBlobKey() *BlobKey { return nil } -func (x *ChunkKey) GetQuorumId() uint32 { - if x != nil { - return x.QuorumId - } - return 0 -} - func (x *ChunkKey) GetChunkIndex() uint32 { if x != nil { return x.ChunkIndex @@ -430,41 +422,38 @@ 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, 0xa1, 0x01, 0x0a, 0x07, 0x42, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x01, 0x79, 0x22, 0x8f, 0x01, 0x0a, 0x07, 0x42, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x0d, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, - 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x4e, 0x0a, 0x14, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, - 0x48, 0x00, 0x52, 0x12, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, - 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x42, 0x05, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x30, 0x0a, - 0x0d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 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, 0x22, - 0x5e, 0x0a, 0x12, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x6c, - 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, - 0x74, 0x0a, 0x08, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x4b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x08, 0x62, - 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 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, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x63, 0x68, 0x75, 0x6e, 0x6b, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x1e, 0x0a, 0x08, 0x42, 0x6c, 0x6f, 0x62, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 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, + 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x3c, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, + 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x6c, 0x6f, + 0x62, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x63, 0x68, 0x42, 0x6c, 0x6f, + 0x62, 0x4b, 0x65, 0x79, 0x42, 0x05, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x30, 0x0a, 0x0d, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 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, 0x22, 0x58, 0x0a, + 0x0c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x29, 0x0a, + 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x62, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, + 0x6f, 0x62, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x57, 0x0a, 0x08, 0x43, 0x68, 0x75, 0x6e, 0x6b, + 0x4b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, + 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 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, 0x1e, 0x0a, 0x08, 0x42, 0x6c, 0x6f, 0x62, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 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 ( @@ -481,17 +470,17 @@ func file_common_common_proto_rawDescGZIP() []byte { var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_common_common_proto_goTypes = []interface{}{ - (*G1Commitment)(nil), // 0: common.G1Commitment - (*BlobKey)(nil), // 1: common.BlobKey - (*HeaderBlobKey)(nil), // 2: common.HeaderBlobKey - (*CertificateBlobKey)(nil), // 3: common.CertificateBlobKey - (*ChunkKey)(nil), // 4: common.ChunkKey - (*BlobData)(nil), // 5: common.BlobData - (*ChunkData)(nil), // 6: common.ChunkData + (*G1Commitment)(nil), // 0: common.G1Commitment + (*BlobKey)(nil), // 1: common.BlobKey + (*HeaderBlobKey)(nil), // 2: common.HeaderBlobKey + (*BatchBlobKey)(nil), // 3: common.BatchBlobKey + (*ChunkKey)(nil), // 4: common.ChunkKey + (*BlobData)(nil), // 5: common.BlobData + (*ChunkData)(nil), // 6: common.ChunkData } var file_common_common_proto_depIdxs = []int32{ 2, // 0: common.BlobKey.header_blob_key:type_name -> common.HeaderBlobKey - 3, // 1: common.BlobKey.certificate_blob_key:type_name -> common.CertificateBlobKey + 3, // 1: common.BlobKey.batch_blob_key:type_name -> common.BatchBlobKey 1, // 2: common.ChunkKey.blob_key:type_name -> common.BlobKey 3, // [3:3] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type @@ -543,7 +532,7 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CertificateBlobKey); i { + switch v := v.(*BatchBlobKey); i { case 0: return &v.state case 1: @@ -593,7 +582,7 @@ func file_common_common_proto_init() { } file_common_common_proto_msgTypes[1].OneofWrappers = []interface{}{ (*BlobKey_HeaderBlobKey)(nil), - (*BlobKey_CertificateBlobKey)(nil), + (*BlobKey_BatchBlobKey)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/api/proto/common/common.proto b/api/proto/common/common.proto index fc520592fb..093156b961 100644 --- a/api/proto/common/common.proto +++ b/api/proto/common/common.proto @@ -17,7 +17,7 @@ message G1Commitment { message BlobKey { oneof key { HeaderBlobKey header_blob_key = 1; - CertificateBlobKey certificate_blob_key = 2; + BatchBlobKey batch_blob_key = 2; } } @@ -27,7 +27,7 @@ message HeaderBlobKey { } // Uniquely identifies a blob based on its certificate hash and blob index. -message CertificateBlobKey { +message BatchBlobKey { bytes certificate_hash = 1; uint32 blob_index = 2; } @@ -35,8 +35,7 @@ message CertificateBlobKey { // A unique identifier for a chunk. message ChunkKey { BlobKey blob_key = 1; - uint32 quorum_id = 2; - uint32 chunk_index = 3; + uint32 chunk_index = 2; } // A blob. From 0d88c86e590a4f9914da97a03d5f7e468e83ffcb Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Fri, 30 Aug 2024 10:39:15 -0500 Subject: [PATCH 19/31] Revert changes to dependencies. Signed-off-by: Cody Littley --- go.mod | 8 ++++---- go.sum | 21 ++++++++++----------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index f3eaf61e11..429029d592 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,7 @@ require ( go.uber.org/goleak v1.3.0 go.uber.org/mock v0.4.0 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - google.golang.org/grpc v1.64.0 + google.golang.org/grpc v1.59.0 ) require ( @@ -146,11 +146,11 @@ require ( go.uber.org/zap v1.27.0 // indirect golang.org/x/arch v0.4.0 // indirect golang.org/x/mod v0.17.0 // indirect - golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/oauth2 v0.16.0 // indirect golang.org/x/sync v0.7.0 // indirect golang.org/x/time v0.5.0 // indirect - google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/go.sum b/go.sum index 664de385de..deb4b2e74e 100644 --- a/go.sum +++ b/go.sum @@ -246,6 +246,7 @@ github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzq github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -253,7 +254,6 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -563,6 +563,7 @@ golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= @@ -575,8 +576,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= -golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= -golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -630,7 +631,6 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= @@ -647,12 +647,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -660,7 +660,6 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= From 3659a68b8758aa3bdc91941b7cee669204ca283b Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Fri, 30 Aug 2024 10:43:12 -0500 Subject: [PATCH 20/31] Fix build issue. Signed-off-by: Cody Littley --- node/grpc/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/grpc/server.go b/node/grpc/server.go index f77bcfe0d2..993ccdfe07 100644 --- a/node/grpc/server.go +++ b/node/grpc/server.go @@ -169,7 +169,7 @@ func (s *Server) GetHeader(context.Context, *commonpb.BlobKey) (*pb.GetBlobHeade return nil, status.Errorf(codes.Unimplemented, "method GetHeader not implemented") } -func (s *Server) StreamHeaders(grpc.BidiStreamingServer[pb.StreamHeadersRequest, pb.GetBlobHeaderReply]) error { +func (s *Server) StreamHeaders(pb.Retrieval_StreamHeadersServer) error { return status.Errorf(codes.Unimplemented, "method StreamHeaders not implemented") } From 28f3e20cd9d3cd6544c2b487f8a5b2bece80e09c Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Wed, 4 Sep 2024 08:09:56 -0500 Subject: [PATCH 21/31] Make requested changes. Signed-off-by: Cody Littley --- api/grpc/common/common.pb.go | 44 +++++++++++++++++------------------ api/proto/common/common.proto | 2 +- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/api/grpc/common/common.pb.go b/api/grpc/common/common.pb.go index 84df04d695..a83529a8fb 100644 --- a/api/grpc/common/common.pb.go +++ b/api/grpc/common/common.pb.go @@ -213,7 +213,7 @@ type BatchBlobKey struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - CertificateHash []byte `protobuf:"bytes,1,opt,name=certificate_hash,json=certificateHash,proto3" json:"certificate_hash,omitempty"` + BatchHeaderHash []byte `protobuf:"bytes,1,opt,name=batch_header_hash,json=batchHeaderHash,proto3" json:"batch_header_hash,omitempty"` BlobIndex uint32 `protobuf:"varint,2,opt,name=blob_index,json=blobIndex,proto3" json:"blob_index,omitempty"` } @@ -249,9 +249,9 @@ func (*BatchBlobKey) Descriptor() ([]byte, []int) { return file_common_common_proto_rawDescGZIP(), []int{3} } -func (x *BatchBlobKey) GetCertificateHash() []byte { +func (x *BatchBlobKey) GetBatchHeaderHash() []byte { if x != nil { - return x.CertificateHash + return x.BatchHeaderHash } return nil } @@ -434,26 +434,26 @@ var file_common_common_proto_rawDesc = []byte{ 0x62, 0x4b, 0x65, 0x79, 0x42, 0x05, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x30, 0x0a, 0x0d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 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, 0x22, 0x58, 0x0a, - 0x0c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x29, 0x0a, - 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x62, - 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, - 0x6f, 0x62, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x57, 0x0a, 0x08, 0x43, 0x68, 0x75, 0x6e, 0x6b, - 0x4b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, - 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 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, 0x1e, 0x0a, 0x08, 0x42, 0x6c, 0x6f, 0x62, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x22, 0x1f, 0x0a, 0x09, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, + 0x0c, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x22, 0x59, 0x0a, + 0x0c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x2a, 0x0a, + 0x11, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, + 0x62, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, + 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x57, 0x0a, 0x08, 0x43, 0x68, 0x75, 0x6e, + 0x6b, 0x4b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x42, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, + 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, 0x1e, 0x0a, 0x08, 0x42, 0x6c, 0x6f, 0x62, 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, + 0x61, 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 ( diff --git a/api/proto/common/common.proto b/api/proto/common/common.proto index 093156b961..0da5d7e504 100644 --- a/api/proto/common/common.proto +++ b/api/proto/common/common.proto @@ -28,7 +28,7 @@ message HeaderBlobKey { // Uniquely identifies a blob based on its certificate hash and blob index. message BatchBlobKey { - bytes certificate_hash = 1; + bytes batch_header_hash = 1; uint32 blob_index = 2; } From bcf4718b511d4e510f9fd007af0450a0ada1620a Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Fri, 6 Sep 2024 09:13:28 -0500 Subject: [PATCH 22/31] Made suggested changes. Signed-off-by: Cody Littley --- api/proto/common/common.proto | 2 +- api/proto/node/node.proto | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/proto/common/common.proto b/api/proto/common/common.proto index 0da5d7e504..0324fa9026 100644 --- a/api/proto/common/common.proto +++ b/api/proto/common/common.proto @@ -26,7 +26,7 @@ message HeaderBlobKey { bytes header_hash = 1; } -// Uniquely identifies a blob based on its certificate hash and blob index. +// Uniquely identifies a blob based on its batch header hash and blob index. message BatchBlobKey { bytes batch_header_hash = 1; uint32 blob_index = 2; diff --git a/api/proto/node/node.proto b/api/proto/node/node.proto index c52c2fed12..f3b452b6a4 100644 --- a/api/proto/node/node.proto +++ b/api/proto/node/node.proto @@ -43,7 +43,7 @@ service Retrieval { rpc GetChunks(GetChunksRequest) returns (GetChunksReply) {} // GetChunk retrieves a specific chunk for a blob custodied at the Node. rpc GetChunk(common.ChunkKey) returns (common.ChunkData) {} - // GetHeader is similar to RetrieveChunks, this just returns the header of the blob. + // Get the header of a blob. // Eventually this will replace GetBlobHeader. rpc GetHeader(common.BlobKey) returns (GetBlobHeaderReply) {} // StreamHeaders requests a stream all new headers. @@ -238,7 +238,7 @@ message NodeInfoReply { // Messages for WIP RPCs. These are subject to change, do not consider these to be stable API. // ///////////////////////////////////////////////////////////////////////////////////////////////// -// Request that all chunks from a particular quorum for a blob be sent. +// Request all custodied chunks from a particular quorum message GetChunksRequest { common.BlobKey blob_key = 1; uint32 quorum_id = 2; @@ -246,7 +246,7 @@ message GetChunksRequest { // Reply to GetChunksRequest. message GetChunksReply { - // The indices of the chunks sent. Each index corresponds to the chunk at the same position in the chunks field. + // The indices of the chunks custodied. Each index corresponds to the chunk at the same position in the chunks field. repeated uint32 chunk_indices = 1; // The chunks this node has. repeated common.ChunkData chunks = 2; From 267b0c6a68ea6775a6b2d1e85d2be757b73497ac Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Fri, 6 Sep 2024 09:14:07 -0500 Subject: [PATCH 23/31] Rebuilt protos. Signed-off-by: Cody Littley --- api/grpc/common/common.pb.go | 2 +- api/grpc/node/node.pb.go | 4 ++-- api/grpc/node/node_grpc.pb.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/grpc/common/common.pb.go b/api/grpc/common/common.pb.go index a83529a8fb..c9dc6204c2 100644 --- a/api/grpc/common/common.pb.go +++ b/api/grpc/common/common.pb.go @@ -207,7 +207,7 @@ func (x *HeaderBlobKey) GetHeaderHash() []byte { return nil } -// Uniquely identifies a blob based on its certificate hash and blob index. +// Uniquely identifies a blob based on its batch header hash and blob index. type BatchBlobKey struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/api/grpc/node/node.pb.go b/api/grpc/node/node.pb.go index a6fb3b6de9..a01ac7c8eb 100644 --- a/api/grpc/node/node.pb.go +++ b/api/grpc/node/node.pb.go @@ -1262,7 +1262,7 @@ func (x *NodeInfoReply) GetMemBytes() uint64 { return 0 } -// Request that all chunks from a particular quorum for a blob be sent. +// Request all custodied chunks from a particular quorum type GetChunksRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1324,7 +1324,7 @@ type GetChunksReply struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The indices of the chunks sent. Each index corresponds to the chunk at the same position in the chunks field. + // The indices of the chunks custodied. Each index corresponds to the chunk at the same position in the chunks field. ChunkIndices []uint32 `protobuf:"varint,1,rep,packed,name=chunk_indices,json=chunkIndices,proto3" json:"chunk_indices,omitempty"` // The chunks this node has. Chunks []*common.ChunkData `protobuf:"bytes,2,rep,name=chunks,proto3" json:"chunks,omitempty"` diff --git a/api/grpc/node/node_grpc.pb.go b/api/grpc/node/node_grpc.pb.go index 6243fc0fab..b08e865b81 100644 --- a/api/grpc/node/node_grpc.pb.go +++ b/api/grpc/node/node_grpc.pb.go @@ -270,7 +270,7 @@ type RetrievalClient interface { GetChunks(ctx context.Context, in *GetChunksRequest, opts ...grpc.CallOption) (*GetChunksReply, error) // GetChunk retrieves a specific chunk for a blob custodied at the Node. GetChunk(ctx context.Context, in *common.ChunkKey, opts ...grpc.CallOption) (*common.ChunkData, error) - // GetHeader is similar to RetrieveChunks, this just returns the header of the blob. + // Get the header of a blob. // Eventually this will replace GetBlobHeader. GetHeader(ctx context.Context, in *common.BlobKey, opts ...grpc.CallOption) (*GetBlobHeaderReply, error) // StreamHeaders requests a stream all new headers. @@ -396,7 +396,7 @@ type RetrievalServer interface { GetChunks(context.Context, *GetChunksRequest) (*GetChunksReply, error) // GetChunk retrieves a specific chunk for a blob custodied at the Node. GetChunk(context.Context, *common.ChunkKey) (*common.ChunkData, error) - // GetHeader is similar to RetrieveChunks, this just returns the header of the blob. + // Get the header of a blob. // Eventually this will replace GetBlobHeader. GetHeader(context.Context, *common.BlobKey) (*GetBlobHeaderReply, error) // StreamHeaders requests a stream all new headers. From e8fec17487e854cd6d3010fe47f56e4483640b5a Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Fri, 6 Sep 2024 10:01:30 -0500 Subject: [PATCH 24/31] Made suggested changes. Signed-off-by: Cody Littley --- api/proto/common/common.proto | 30 ++++++++++++++--------------- api/proto/disperser/disperser.proto | 16 +++++++-------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/api/proto/common/common.proto b/api/proto/common/common.proto index 0324fa9026..740de4ae2d 100644 --- a/api/proto/common/common.proto +++ b/api/proto/common/common.proto @@ -3,10 +3,10 @@ package common; option go_package = "github.com/Layr-Labs/eigenda/api/grpc/common"; message G1Commitment { - // The X coordinate of the KZG commitment. This is the raw byte representation of the field element. - bytes x = 1; - // The Y coordinate of the KZG commitment. This is the raw byte representation of the field element. - bytes y = 2; + // The X coordinate of the KZG commitment. This is the raw byte representation of the field element. + bytes x = 1; + // The Y coordinate of the KZG commitment. This is the raw byte representation of the field element. + bytes y = 2; } ///////////////////////////////////////////////////////////////////////////////////////////////// @@ -15,35 +15,35 @@ message G1Commitment { // A unique identifier for a blob. message BlobKey { - oneof key { - HeaderBlobKey header_blob_key = 1; - BatchBlobKey batch_blob_key = 2; - } + oneof key { + HeaderBlobKey header_blob_key = 1; + BatchBlobKey batch_blob_key = 2; + } } // Uniquely identifies a blob based on its blob header hash. message HeaderBlobKey { - bytes header_hash = 1; + bytes header_hash = 1; } // Uniquely identifies a blob based on its batch header hash and blob index. message BatchBlobKey { - bytes batch_header_hash = 1; - uint32 blob_index = 2; + bytes batch_header_hash = 1; + uint32 blob_index = 2; } // A unique identifier for a chunk. message ChunkKey { - BlobKey blob_key = 1; - uint32 chunk_index = 2; + BlobKey blob_key = 1; + uint32 chunk_index = 2; } // A blob. message BlobData { - bytes data = 1; + bytes data = 1; } // A chunk of a blob. message ChunkData { - bytes data = 1; + bytes data = 1; } \ No newline at end of file diff --git a/api/proto/disperser/disperser.proto b/api/proto/disperser/disperser.proto index 468121e049..ac35590c84 100644 --- a/api/proto/disperser/disperser.proto +++ b/api/proto/disperser/disperser.proto @@ -51,17 +51,17 @@ service Disperser { // Authenicated Message Types message AuthenticatedRequest { - oneof payload { - DisperseBlobRequest disperse_request = 1; - AuthenticationData authentication_data = 2; - } + oneof payload { + DisperseBlobRequest disperse_request = 1; + AuthenticationData authentication_data = 2; + } } message AuthenticatedReply { - oneof payload { - BlobAuthHeader blob_auth_header = 1; - DisperseBlobReply disperse_reply = 2; - } + oneof payload { + BlobAuthHeader blob_auth_header = 1; + DisperseBlobReply disperse_reply = 2; + } } // BlobAuthHeader contains information about the blob for the client to verify and sign. From ad6c5877537c172d3c12f2f6f7980eb0b1a7ae0e Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Mon, 9 Sep 2024 09:09:57 -0500 Subject: [PATCH 25/31] Make suggested changes. Signed-off-by: Cody Littley --- api/grpc/common/common.pb.go | 425 ++---------------------- api/grpc/disperser/disperser.pb.go | 250 ++++++++++---- api/grpc/disperser/disperser_grpc.pb.go | 58 +--- api/grpc/lightnode/lightnode.pb.go | 273 ++++++++++++--- api/grpc/lightnode/lightnode_grpc.pb.go | 25 +- api/grpc/node/node.pb.go | 413 +++++++++-------------- api/grpc/node/node_grpc.pb.go | 146 +------- api/grpc/retriever/retriever.pb.go | 64 ++-- api/grpc/retriever/retriever_grpc.pb.go | 42 --- api/proto/common/common.proto | 30 -- api/proto/disperser/disperser.proto | 25 +- api/proto/lightnode/lightnode.proto | 21 +- api/proto/node/node.proto | 51 ++- api/proto/retriever/retriever.proto | 9 - disperser/apiserver/server.go | 5 +- node/grpc/server.go | 15 +- retriever/server.go | 7 - 17 files changed, 719 insertions(+), 1140 deletions(-) diff --git a/api/grpc/common/common.pb.go b/api/grpc/common/common.pb.go index c9dc6204c2..0bc1aa56fa 100644 --- a/api/grpc/common/common.pb.go +++ b/api/grpc/common/common.pb.go @@ -77,296 +77,6 @@ func (x *G1Commitment) GetY() []byte { return nil } -// A unique identifier for a blob. -type BlobKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Key: - // - // *BlobKey_HeaderBlobKey - // *BlobKey_BatchBlobKey - Key isBlobKey_Key `protobuf_oneof:"key"` -} - -func (x *BlobKey) Reset() { - *x = BlobKey{} - if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BlobKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BlobKey) ProtoMessage() {} - -func (x *BlobKey) 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 BlobKey.ProtoReflect.Descriptor instead. -func (*BlobKey) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{1} -} - -func (m *BlobKey) GetKey() isBlobKey_Key { - if m != nil { - return m.Key - } - return nil -} - -func (x *BlobKey) GetHeaderBlobKey() *HeaderBlobKey { - if x, ok := x.GetKey().(*BlobKey_HeaderBlobKey); ok { - return x.HeaderBlobKey - } - return nil -} - -func (x *BlobKey) GetBatchBlobKey() *BatchBlobKey { - if x, ok := x.GetKey().(*BlobKey_BatchBlobKey); ok { - return x.BatchBlobKey - } - return nil -} - -type isBlobKey_Key interface { - isBlobKey_Key() -} - -type BlobKey_HeaderBlobKey struct { - HeaderBlobKey *HeaderBlobKey `protobuf:"bytes,1,opt,name=header_blob_key,json=headerBlobKey,proto3,oneof"` -} - -type BlobKey_BatchBlobKey struct { - BatchBlobKey *BatchBlobKey `protobuf:"bytes,2,opt,name=batch_blob_key,json=batchBlobKey,proto3,oneof"` -} - -func (*BlobKey_HeaderBlobKey) isBlobKey_Key() {} - -func (*BlobKey_BatchBlobKey) isBlobKey_Key() {} - -// Uniquely identifies a blob based on its blob header hash. -type HeaderBlobKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HeaderHash []byte `protobuf:"bytes,1,opt,name=header_hash,json=headerHash,proto3" json:"header_hash,omitempty"` -} - -func (x *HeaderBlobKey) Reset() { - *x = HeaderBlobKey{} - if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeaderBlobKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeaderBlobKey) ProtoMessage() {} - -func (x *HeaderBlobKey) 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 HeaderBlobKey.ProtoReflect.Descriptor instead. -func (*HeaderBlobKey) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{2} -} - -func (x *HeaderBlobKey) GetHeaderHash() []byte { - if x != nil { - return x.HeaderHash - } - return nil -} - -// Uniquely identifies a blob based on its batch header hash and blob index. -type BatchBlobKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BatchHeaderHash []byte `protobuf:"bytes,1,opt,name=batch_header_hash,json=batchHeaderHash,proto3" json:"batch_header_hash,omitempty"` - BlobIndex uint32 `protobuf:"varint,2,opt,name=blob_index,json=blobIndex,proto3" json:"blob_index,omitempty"` -} - -func (x *BatchBlobKey) Reset() { - *x = BatchBlobKey{} - if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BatchBlobKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BatchBlobKey) ProtoMessage() {} - -func (x *BatchBlobKey) 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 BatchBlobKey.ProtoReflect.Descriptor instead. -func (*BatchBlobKey) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{3} -} - -func (x *BatchBlobKey) GetBatchHeaderHash() []byte { - if x != nil { - return x.BatchHeaderHash - } - return nil -} - -func (x *BatchBlobKey) GetBlobIndex() uint32 { - if x != nil { - return x.BlobIndex - } - return 0 -} - -// A unique identifier for a chunk. -type ChunkKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlobKey *BlobKey `protobuf:"bytes,1,opt,name=blob_key,json=blobKey,proto3" json:"blob_key,omitempty"` - ChunkIndex uint32 `protobuf:"varint,2,opt,name=chunk_index,json=chunkIndex,proto3" json:"chunk_index,omitempty"` -} - -func (x *ChunkKey) Reset() { - *x = ChunkKey{} - if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChunkKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChunkKey) ProtoMessage() {} - -func (x *ChunkKey) ProtoReflect() protoreflect.Message { - mi := &file_common_common_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 ChunkKey.ProtoReflect.Descriptor instead. -func (*ChunkKey) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{4} -} - -func (x *ChunkKey) GetBlobKey() *BlobKey { - if x != nil { - return x.BlobKey - } - return nil -} - -func (x *ChunkKey) GetChunkIndex() uint32 { - if x != nil { - return x.ChunkIndex - } - return 0 -} - -// A blob. -type BlobData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *BlobData) Reset() { - *x = BlobData{} - if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[5] - 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_common_common_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 BlobData.ProtoReflect.Descriptor instead. -func (*BlobData) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{5} -} - -func (x *BlobData) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - // A chunk of a blob. type ChunkData struct { state protoimpl.MessageState @@ -379,7 +89,7 @@ type ChunkData struct { func (x *ChunkData) Reset() { *x = ChunkData{} if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[6] + mi := &file_common_common_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -392,7 +102,7 @@ func (x *ChunkData) String() string { func (*ChunkData) ProtoMessage() {} func (x *ChunkData) ProtoReflect() protoreflect.Message { - mi := &file_common_common_proto_msgTypes[6] + mi := &file_common_common_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -405,7 +115,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{6} + return file_common_common_proto_rawDescGZIP(), []int{1} } func (x *ChunkData) GetData() []byte { @@ -422,38 +132,13 @@ 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, 0x8f, 0x01, 0x0a, 0x07, 0x42, 0x6c, - 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, - 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x6c, - 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x0d, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, - 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x3c, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, - 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x6c, 0x6f, - 0x62, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x63, 0x68, 0x42, 0x6c, 0x6f, - 0x62, 0x4b, 0x65, 0x79, 0x42, 0x05, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x30, 0x0a, 0x0d, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 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, 0x22, 0x59, 0x0a, - 0x0c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x2a, 0x0a, - 0x11, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, - 0x62, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, - 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x57, 0x0a, 0x08, 0x43, 0x68, 0x75, 0x6e, - 0x6b, 0x4b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x42, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x65, 0x79, - 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, 0x1e, 0x0a, 0x08, 0x42, 0x6c, 0x6f, 0x62, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, - 0x61, 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, 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 ( @@ -468,25 +153,17 @@ func file_common_common_proto_rawDescGZIP() []byte { return file_common_common_proto_rawDescData } -var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_common_common_proto_goTypes = []interface{}{ - (*G1Commitment)(nil), // 0: common.G1Commitment - (*BlobKey)(nil), // 1: common.BlobKey - (*HeaderBlobKey)(nil), // 2: common.HeaderBlobKey - (*BatchBlobKey)(nil), // 3: common.BatchBlobKey - (*ChunkKey)(nil), // 4: common.ChunkKey - (*BlobData)(nil), // 5: common.BlobData - (*ChunkData)(nil), // 6: common.ChunkData + (*G1Commitment)(nil), // 0: common.G1Commitment + (*ChunkData)(nil), // 1: common.ChunkData } var file_common_common_proto_depIdxs = []int32{ - 2, // 0: common.BlobKey.header_blob_key:type_name -> common.HeaderBlobKey - 3, // 1: common.BlobKey.batch_blob_key:type_name -> common.BatchBlobKey - 1, // 2: common.ChunkKey.blob_key:type_name -> common.BlobKey - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] 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 + 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 } func init() { file_common_common_proto_init() } @@ -508,66 +185,6 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlobKey); 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.(*HeaderBlobKey); 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.(*BatchBlobKey); 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.(*ChunkKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_common_common_proto_msgTypes[5].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_common_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ChunkData); i { case 0: return &v.state @@ -580,17 +197,13 @@ func file_common_common_proto_init() { } } } - file_common_common_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*BlobKey_HeaderBlobKey)(nil), - (*BlobKey_BatchBlobKey)(nil), - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_common_common_proto_rawDesc, NumEnums: 0, - NumMessages: 7, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, diff --git a/api/grpc/disperser/disperser.pb.go b/api/grpc/disperser/disperser.pb.go index 719ebaf5a6..d0fb615b35 100644 --- a/api/grpc/disperser/disperser.pb.go +++ b/api/grpc/disperser/disperser.pb.go @@ -1182,6 +1182,113 @@ 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. + HeaderHash []byte `protobuf:"bytes,1,opt,name=header_hash,json=headerHash,proto3" json:"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) GetHeaderHash() []byte { + if x != nil { + return x.HeaderHash + } + 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{ @@ -1331,43 +1438,50 @@ 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, 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, 0xbc, 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, + 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 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, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0a, 0x68, 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, 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, 0x2e, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x42, 0x6c, - 0x6f, 0x62, 0x12, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x62, - 0x4b, 0x65, 0x79, 0x1a, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, - 0x62, 0x44, 0x61, 0x74, 0x61, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x43, 0x68, - 0x75, 0x6e, 0x6b, 0x12, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x75, - 0x6e, 0x6b, 0x4b, 0x65, 0x79, 0x1a, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, - 0x68, 0x75, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x22, 0x00, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, + 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, @@ -1387,7 +1501,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, 16) +var file_disperser_disperser_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_disperser_disperser_proto_goTypes = []interface{}{ (BlobStatus)(0), // 0: disperser.BlobStatus (*AuthenticatedRequest)(nil), // 1: disperser.AuthenticatedRequest @@ -1406,11 +1520,10 @@ var file_disperser_disperser_proto_goTypes = []interface{}{ (*BlobVerificationProof)(nil), // 14: disperser.BlobVerificationProof (*BatchMetadata)(nil), // 15: disperser.BatchMetadata (*BatchHeader)(nil), // 16: disperser.BatchHeader - (*common.G1Commitment)(nil), // 17: common.G1Commitment - (*common.BlobKey)(nil), // 18: common.BlobKey - (*common.ChunkKey)(nil), // 19: common.ChunkKey - (*common.BlobData)(nil), // 20: common.BlobData - (*common.ChunkData)(nil), // 21: common.ChunkData + (*GetChunkRequest)(nil), // 17: disperser.GetChunkRequest + (*GetChunkReply)(nil), // 18: disperser.GetChunkReply + (*common.G1Commitment)(nil), // 19: common.G1Commitment + (*common.ChunkData)(nil), // 20: common.ChunkData } var file_disperser_disperser_proto_depIdxs = []int32{ 5, // 0: disperser.AuthenticatedRequest.disperse_request:type_name -> disperser.DisperseBlobRequest @@ -1422,27 +1535,26 @@ 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 - 17, // 9: disperser.BlobHeader.commitment:type_name -> common.G1Commitment + 19, // 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 - 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 - 18, // 17: disperser.Disperser.GetBlob:input_type -> common.BlobKey - 19, // 18: disperser.Disperser.GetChunk:input_type -> common.ChunkKey + 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 - 20, // 23: disperser.Disperser.GetBlob:output_type -> common.BlobData - 21, // 24: disperser.Disperser.GetChunk:output_type -> common.ChunkData - 19, // [19:25] is the sub-list for method output_type - 13, // [13:19] 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 + 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 } func init() { file_disperser_disperser_proto_init() } @@ -1643,6 +1755,30 @@ 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), @@ -1658,7 +1794,7 @@ func file_disperser_disperser_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_disperser_disperser_proto_rawDesc, NumEnums: 1, - NumMessages: 16, + NumMessages: 18, NumExtensions: 0, NumServices: 1, }, diff --git a/api/grpc/disperser/disperser_grpc.pb.go b/api/grpc/disperser/disperser_grpc.pb.go index 9ef223f642..d76bd1638e 100644 --- a/api/grpc/disperser/disperser_grpc.pb.go +++ b/api/grpc/disperser/disperser_grpc.pb.go @@ -8,7 +8,6 @@ package disperser import ( context "context" - common "github.com/Layr-Labs/eigenda/api/grpc/common" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -24,7 +23,6 @@ const ( Disperser_DisperseBlobAuthenticated_FullMethodName = "/disperser.Disperser/DisperseBlobAuthenticated" Disperser_GetBlobStatus_FullMethodName = "/disperser.Disperser/GetBlobStatus" Disperser_RetrieveBlob_FullMethodName = "/disperser.Disperser/RetrieveBlob" - Disperser_GetBlob_FullMethodName = "/disperser.Disperser/GetBlob" Disperser_GetChunk_FullMethodName = "/disperser.Disperser/GetChunk" ) @@ -55,12 +53,8 @@ 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 blob from the disperser's backend. - // This RPC is is a work in progress with undefined behavior, use with caution. - GetBlob(ctx context.Context, in *common.BlobKey, opts ...grpc.CallOption) (*common.BlobData, error) // Retrieves the requested chunk from the Disperser's backend. - // This RPC is is a work in progress with undefined behavior, use with caution. - GetChunk(ctx context.Context, in *common.ChunkKey, opts ...grpc.CallOption) (*common.ChunkData, error) + GetChunk(ctx context.Context, in *GetChunkRequest, opts ...grpc.CallOption) (*GetChunkReply, error) } type disperserClient struct { @@ -129,17 +123,8 @@ func (c *disperserClient) RetrieveBlob(ctx context.Context, in *RetrieveBlobRequ return out, nil } -func (c *disperserClient) GetBlob(ctx context.Context, in *common.BlobKey, opts ...grpc.CallOption) (*common.BlobData, error) { - out := new(common.BlobData) - err := c.cc.Invoke(ctx, Disperser_GetBlob_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *disperserClient) GetChunk(ctx context.Context, in *common.ChunkKey, opts ...grpc.CallOption) (*common.ChunkData, error) { - out := new(common.ChunkData) +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 @@ -174,12 +159,8 @@ 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 blob from the disperser's backend. - // This RPC is is a work in progress with undefined behavior, use with caution. - GetBlob(context.Context, *common.BlobKey) (*common.BlobData, error) // Retrieves the requested chunk from the Disperser's backend. - // This RPC is is a work in progress with undefined behavior, use with caution. - GetChunk(context.Context, *common.ChunkKey) (*common.ChunkData, error) + GetChunk(context.Context, *GetChunkRequest) (*GetChunkReply, error) mustEmbedUnimplementedDisperserServer() } @@ -199,10 +180,7 @@ 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) GetBlob(context.Context, *common.BlobKey) (*common.BlobData, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlob not implemented") -} -func (UnimplementedDisperserServer) GetChunk(context.Context, *common.ChunkKey) (*common.ChunkData, error) { +func (UnimplementedDisperserServer) GetChunk(context.Context, *GetChunkRequest) (*GetChunkReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") } func (UnimplementedDisperserServer) mustEmbedUnimplementedDisperserServer() {} @@ -298,26 +276,8 @@ func _Disperser_RetrieveBlob_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } -func _Disperser_GetBlob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(common.BlobKey) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DisperserServer).GetBlob(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Disperser_GetBlob_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DisperserServer).GetBlob(ctx, req.(*common.BlobKey)) - } - 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(common.ChunkKey) + in := new(GetChunkRequest) if err := dec(in); err != nil { return nil, err } @@ -329,7 +289,7 @@ func _Disperser_GetChunk_Handler(srv interface{}, ctx context.Context, dec func( FullMethod: Disperser_GetChunk_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DisperserServer).GetChunk(ctx, req.(*common.ChunkKey)) + return srv.(DisperserServer).GetChunk(ctx, req.(*GetChunkRequest)) } return interceptor(ctx, in, info, handler) } @@ -353,10 +313,6 @@ var Disperser_ServiceDesc = grpc.ServiceDesc{ MethodName: "RetrieveBlob", Handler: _Disperser_RetrieveBlob_Handler, }, - { - MethodName: "GetBlob", - Handler: _Disperser_GetBlob_Handler, - }, { MethodName: "GetChunk", Handler: _Disperser_GetChunk_Handler, diff --git a/api/grpc/lightnode/lightnode.pb.go b/api/grpc/lightnode/lightnode.pb.go index a39b3fa2d2..c965bfa6d4 100644 --- a/api/grpc/lightnode/lightnode.pb.go +++ b/api/grpc/lightnode/lightnode.pb.go @@ -21,6 +21,103 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// A request for a specific chunk from a light node. +type GetChunkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HeaderHash []byte `protobuf:"bytes,1,opt,name=header_hash,json=headerHash,proto3" json:"header_hash,omitempty"` +} + +func (x *GetChunkRequest) Reset() { + *x = GetChunkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_lightnode_lightnode_proto_msgTypes[0] + 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_lightnode_lightnode_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 GetChunkRequest.ProtoReflect.Descriptor instead. +func (*GetChunkRequest) Descriptor() ([]byte, []int) { + return file_lightnode_lightnode_proto_rawDescGZIP(), []int{0} +} + +func (x *GetChunkRequest) GetHeaderHash() []byte { + if x != nil { + return x.HeaderHash + } + return nil +} + +// A reply to a GetChunk request. +type GetChunkReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The chunk data. + Chunk *common.ChunkData `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` +} + +func (x *GetChunkReply) Reset() { + *x = GetChunkReply{} + if protoimpl.UnsafeEnabled { + mi := &file_lightnode_lightnode_proto_msgTypes[1] + 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_lightnode_lightnode_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 GetChunkReply.ProtoReflect.Descriptor instead. +func (*GetChunkReply) Descriptor() ([]byte, []int) { + return file_lightnode_lightnode_proto_rawDescGZIP(), []int{1} +} + +func (x *GetChunkReply) GetChunk() *common.ChunkData { + if x != nil { + return x.Chunk + } + return nil +} + // A request from a DA node to an agent light node to stream the availability status of all chunks // assigned to the light node. type StreamAvailabilityStatusRequest struct { @@ -28,14 +125,13 @@ type StreamAvailabilityStatusRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // TODO describe protocol for authentication AuthenticationToken []byte `protobuf:"bytes,1,opt,name=authentication_token,json=authenticationToken,proto3" json:"authentication_token,omitempty"` } func (x *StreamAvailabilityStatusRequest) Reset() { *x = StreamAvailabilityStatusRequest{} if protoimpl.UnsafeEnabled { - mi := &file_lightnode_lightnode_proto_msgTypes[0] + mi := &file_lightnode_lightnode_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -48,7 +144,7 @@ func (x *StreamAvailabilityStatusRequest) String() string { func (*StreamAvailabilityStatusRequest) ProtoMessage() {} func (x *StreamAvailabilityStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_lightnode_lightnode_proto_msgTypes[0] + mi := &file_lightnode_lightnode_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -61,7 +157,7 @@ func (x *StreamAvailabilityStatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamAvailabilityStatusRequest.ProtoReflect.Descriptor instead. func (*StreamAvailabilityStatusRequest) Descriptor() ([]byte, []int) { - return file_lightnode_lightnode_proto_rawDescGZIP(), []int{0} + return file_lightnode_lightnode_proto_rawDescGZIP(), []int{2} } func (x *StreamAvailabilityStatusRequest) GetAuthenticationToken() []byte { @@ -71,32 +167,94 @@ func (x *StreamAvailabilityStatusRequest) GetAuthenticationToken() []byte { return nil } +// A reply to a StreamAvailabilityStatus request. +type StreamAvailabilityStatusReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HeaderHash []byte `protobuf:"bytes,1,opt,name=header_hash,json=headerHash,proto3" json:"header_hash,omitempty"` +} + +func (x *StreamAvailabilityStatusReply) Reset() { + *x = StreamAvailabilityStatusReply{} + if protoimpl.UnsafeEnabled { + mi := &file_lightnode_lightnode_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamAvailabilityStatusReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamAvailabilityStatusReply) ProtoMessage() {} + +func (x *StreamAvailabilityStatusReply) ProtoReflect() protoreflect.Message { + mi := &file_lightnode_lightnode_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 StreamAvailabilityStatusReply.ProtoReflect.Descriptor instead. +func (*StreamAvailabilityStatusReply) Descriptor() ([]byte, []int) { + return file_lightnode_lightnode_proto_rawDescGZIP(), []int{3} +} + +func (x *StreamAvailabilityStatusReply) GetHeaderHash() []byte { + if x != nil { + return x.HeaderHash + } + return nil +} + 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, 0x54, 0x0a, 0x1f, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x32, 0x9c, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, - 0x31, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x10, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x4b, 0x65, 0x79, 0x1a, 0x11, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, - 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x18, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x76, 0x61, 0x69, - 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, - 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x4b, 0x65, 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, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x32, 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, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 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, 0x22, 0x54, 0x0a, 0x1f, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 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, + 0x40, 0x0a, 0x1d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xc5, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x42, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x1a, 0x2e, 0x6c, 0x69, + 0x67, 0x68, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x22, 0x00, 0x12, 0x74, 0x0a, 0x18, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x2a, 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6c, 0x69, + 0x67, 0x68, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 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 ( @@ -111,22 +269,25 @@ func file_lightnode_lightnode_proto_rawDescGZIP() []byte { return file_lightnode_lightnode_proto_rawDescData } -var file_lightnode_lightnode_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_lightnode_lightnode_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_lightnode_lightnode_proto_goTypes = []interface{}{ - (*StreamAvailabilityStatusRequest)(nil), // 0: lightnode.StreamAvailabilityStatusRequest - (*common.ChunkKey)(nil), // 1: common.ChunkKey - (*common.ChunkData)(nil), // 2: common.ChunkData + (*GetChunkRequest)(nil), // 0: lightnode.GetChunkRequest + (*GetChunkReply)(nil), // 1: lightnode.GetChunkReply + (*StreamAvailabilityStatusRequest)(nil), // 2: lightnode.StreamAvailabilityStatusRequest + (*StreamAvailabilityStatusReply)(nil), // 3: lightnode.StreamAvailabilityStatusReply + (*common.ChunkData)(nil), // 4: common.ChunkData } var file_lightnode_lightnode_proto_depIdxs = []int32{ - 1, // 0: lightnode.LightNode.GetChunk:input_type -> common.ChunkKey - 0, // 1: lightnode.LightNode.StreamAvailabilityStatus:input_type -> lightnode.StreamAvailabilityStatusRequest - 2, // 2: lightnode.LightNode.GetChunk:output_type -> common.ChunkData - 1, // 3: lightnode.LightNode.StreamAvailabilityStatus:output_type -> common.ChunkKey - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] 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 + 4, // 0: lightnode.GetChunkReply.chunk:type_name -> common.ChunkData + 0, // 1: lightnode.LightNode.GetChunk:input_type -> lightnode.GetChunkRequest + 2, // 2: lightnode.LightNode.StreamAvailabilityStatus:input_type -> lightnode.StreamAvailabilityStatusRequest + 1, // 3: lightnode.LightNode.GetChunk:output_type -> lightnode.GetChunkReply + 3, // 4: lightnode.LightNode.StreamAvailabilityStatus:output_type -> lightnode.StreamAvailabilityStatusReply + 3, // [3:5] is the sub-list for method output_type + 1, // [1:3] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_lightnode_lightnode_proto_init() } @@ -136,6 +297,30 @@ func file_lightnode_lightnode_proto_init() { } if !protoimpl.UnsafeEnabled { file_lightnode_lightnode_proto_msgTypes[0].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_lightnode_lightnode_proto_msgTypes[1].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_lightnode_lightnode_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamAvailabilityStatusRequest); i { case 0: return &v.state @@ -147,6 +332,18 @@ func file_lightnode_lightnode_proto_init() { return nil } } + file_lightnode_lightnode_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamAvailabilityStatusReply); 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{ @@ -154,7 +351,7 @@ func file_lightnode_lightnode_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_lightnode_lightnode_proto_rawDesc, NumEnums: 0, - NumMessages: 1, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, diff --git a/api/grpc/lightnode/lightnode_grpc.pb.go b/api/grpc/lightnode/lightnode_grpc.pb.go index b0e3e7af44..2da1ae0870 100644 --- a/api/grpc/lightnode/lightnode_grpc.pb.go +++ b/api/grpc/lightnode/lightnode_grpc.pb.go @@ -8,7 +8,6 @@ package lightnode import ( context "context" - common "github.com/Layr-Labs/eigenda/api/grpc/common" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -29,7 +28,7 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type LightNodeClient interface { // GetChunk retrieves a specific chunk held by the light node. - GetChunk(ctx context.Context, in *common.ChunkKey, opts ...grpc.CallOption) (*common.ChunkData, error) + GetChunk(ctx context.Context, in *GetChunkRequest, opts ...grpc.CallOption) (*GetChunkReply, error) // StreamAvailabilityStatus streams the availability status of all chunks assigned to the light node. // For use by a DA node for monitoring the availability of chunks through its constellation of agent light nodes. StreamAvailabilityStatus(ctx context.Context, in *StreamAvailabilityStatusRequest, opts ...grpc.CallOption) (LightNode_StreamAvailabilityStatusClient, error) @@ -43,8 +42,8 @@ func NewLightNodeClient(cc grpc.ClientConnInterface) LightNodeClient { return &lightNodeClient{cc} } -func (c *lightNodeClient) GetChunk(ctx context.Context, in *common.ChunkKey, opts ...grpc.CallOption) (*common.ChunkData, error) { - out := new(common.ChunkData) +func (c *lightNodeClient) GetChunk(ctx context.Context, in *GetChunkRequest, opts ...grpc.CallOption) (*GetChunkReply, error) { + out := new(GetChunkReply) err := c.cc.Invoke(ctx, LightNode_GetChunk_FullMethodName, in, out, opts...) if err != nil { return nil, err @@ -68,7 +67,7 @@ func (c *lightNodeClient) StreamAvailabilityStatus(ctx context.Context, in *Stre } type LightNode_StreamAvailabilityStatusClient interface { - Recv() (*common.ChunkKey, error) + Recv() (*StreamAvailabilityStatusReply, error) grpc.ClientStream } @@ -76,8 +75,8 @@ type lightNodeStreamAvailabilityStatusClient struct { grpc.ClientStream } -func (x *lightNodeStreamAvailabilityStatusClient) Recv() (*common.ChunkKey, error) { - m := new(common.ChunkKey) +func (x *lightNodeStreamAvailabilityStatusClient) Recv() (*StreamAvailabilityStatusReply, error) { + m := new(StreamAvailabilityStatusReply) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } @@ -89,7 +88,7 @@ func (x *lightNodeStreamAvailabilityStatusClient) Recv() (*common.ChunkKey, erro // for forward compatibility type LightNodeServer interface { // GetChunk retrieves a specific chunk held by the light node. - GetChunk(context.Context, *common.ChunkKey) (*common.ChunkData, error) + GetChunk(context.Context, *GetChunkRequest) (*GetChunkReply, error) // StreamAvailabilityStatus streams the availability status of all chunks assigned to the light node. // For use by a DA node for monitoring the availability of chunks through its constellation of agent light nodes. StreamAvailabilityStatus(*StreamAvailabilityStatusRequest, LightNode_StreamAvailabilityStatusServer) error @@ -100,7 +99,7 @@ type LightNodeServer interface { type UnimplementedLightNodeServer struct { } -func (UnimplementedLightNodeServer) GetChunk(context.Context, *common.ChunkKey) (*common.ChunkData, error) { +func (UnimplementedLightNodeServer) GetChunk(context.Context, *GetChunkRequest) (*GetChunkReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") } func (UnimplementedLightNodeServer) StreamAvailabilityStatus(*StreamAvailabilityStatusRequest, LightNode_StreamAvailabilityStatusServer) error { @@ -120,7 +119,7 @@ func RegisterLightNodeServer(s grpc.ServiceRegistrar, srv LightNodeServer) { } func _LightNode_GetChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(common.ChunkKey) + in := new(GetChunkRequest) if err := dec(in); err != nil { return nil, err } @@ -132,7 +131,7 @@ func _LightNode_GetChunk_Handler(srv interface{}, ctx context.Context, dec func( FullMethod: LightNode_GetChunk_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LightNodeServer).GetChunk(ctx, req.(*common.ChunkKey)) + return srv.(LightNodeServer).GetChunk(ctx, req.(*GetChunkRequest)) } return interceptor(ctx, in, info, handler) } @@ -146,7 +145,7 @@ func _LightNode_StreamAvailabilityStatus_Handler(srv interface{}, stream grpc.Se } type LightNode_StreamAvailabilityStatusServer interface { - Send(*common.ChunkKey) error + Send(*StreamAvailabilityStatusReply) error grpc.ServerStream } @@ -154,7 +153,7 @@ type lightNodeStreamAvailabilityStatusServer struct { grpc.ServerStream } -func (x *lightNodeStreamAvailabilityStatusServer) Send(m *common.ChunkKey) error { +func (x *lightNodeStreamAvailabilityStatusServer) Send(m *StreamAvailabilityStatusReply) error { return x.ServerStream.SendMsg(m) } diff --git a/api/grpc/node/node.pb.go b/api/grpc/node/node.pb.go index a01ac7c8eb..7c2dc1456e 100644 --- a/api/grpc/node/node.pb.go +++ b/api/grpc/node/node.pb.go @@ -1262,18 +1262,20 @@ func (x *NodeInfoReply) GetMemBytes() uint64 { return 0 } -// Request all custodied chunks from a particular quorum -type GetChunksRequest struct { +// Request a specific chunk +type GetChunkRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - BlobKey *common.BlobKey `protobuf:"bytes,1,opt,name=blob_key,json=blobKey,proto3" json:"blob_key,omitempty"` - QuorumId uint32 `protobuf:"varint,2,opt,name=quorum_id,json=quorumId,proto3" json:"quorum_id,omitempty"` + // The hash of the blob's header. + HeaderHash []byte `protobuf:"bytes,1,opt,name=header_hash,json=headerHash,proto3" json:"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 *GetChunksRequest) Reset() { - *x = GetChunksRequest{} +func (x *GetChunkRequest) Reset() { + *x = GetChunkRequest{} if protoimpl.UnsafeEnabled { mi := &file_node_node_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1281,13 +1283,13 @@ func (x *GetChunksRequest) Reset() { } } -func (x *GetChunksRequest) String() string { +func (x *GetChunkRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetChunksRequest) ProtoMessage() {} +func (*GetChunkRequest) ProtoMessage() {} -func (x *GetChunksRequest) ProtoReflect() protoreflect.Message { +func (x *GetChunkRequest) ProtoReflect() protoreflect.Message { mi := &file_node_node_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1299,39 +1301,37 @@ func (x *GetChunksRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetChunksRequest.ProtoReflect.Descriptor instead. -func (*GetChunksRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetChunkRequest.ProtoReflect.Descriptor instead. +func (*GetChunkRequest) Descriptor() ([]byte, []int) { return file_node_node_proto_rawDescGZIP(), []int{19} } -func (x *GetChunksRequest) GetBlobKey() *common.BlobKey { +func (x *GetChunkRequest) GetHeaderHash() []byte { if x != nil { - return x.BlobKey + return x.HeaderHash } return nil } -func (x *GetChunksRequest) GetQuorumId() uint32 { +func (x *GetChunkRequest) GetChunkIndex() uint32 { if x != nil { - return x.QuorumId + return x.ChunkIndex } return 0 } -// Reply to GetChunksRequest. -type GetChunksReply struct { +// Reply to GetChunkRequest +type GetChunkReply struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The indices of the chunks custodied. Each index corresponds to the chunk at the same position in the chunks field. - ChunkIndices []uint32 `protobuf:"varint,1,rep,packed,name=chunk_indices,json=chunkIndices,proto3" json:"chunk_indices,omitempty"` - // The chunks this node has. - Chunks []*common.ChunkData `protobuf:"bytes,2,rep,name=chunks,proto3" json:"chunks,omitempty"` + // The chunk requested. + Chunk *common.ChunkData `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` } -func (x *GetChunksReply) Reset() { - *x = GetChunksReply{} +func (x *GetChunkReply) Reset() { + *x = GetChunkReply{} if protoimpl.UnsafeEnabled { mi := &file_node_node_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1339,13 +1339,13 @@ func (x *GetChunksReply) Reset() { } } -func (x *GetChunksReply) String() string { +func (x *GetChunkReply) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetChunksReply) ProtoMessage() {} +func (*GetChunkReply) ProtoMessage() {} -func (x *GetChunksReply) ProtoReflect() protoreflect.Message { +func (x *GetChunkReply) ProtoReflect() protoreflect.Message { mi := &file_node_node_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1357,21 +1357,14 @@ func (x *GetChunksReply) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetChunksReply.ProtoReflect.Descriptor instead. -func (*GetChunksReply) Descriptor() ([]byte, []int) { +// Deprecated: Use GetChunkReply.ProtoReflect.Descriptor instead. +func (*GetChunkReply) Descriptor() ([]byte, []int) { return file_node_node_proto_rawDescGZIP(), []int{20} } -func (x *GetChunksReply) GetChunkIndices() []uint32 { +func (x *GetChunkReply) GetChunk() *common.ChunkData { if x != nil { - return x.ChunkIndices - } - return nil -} - -func (x *GetChunksReply) GetChunks() []*common.ChunkData { - if x != nil { - return x.Chunks + return x.Chunk } return nil } @@ -1415,15 +1408,22 @@ func (*StreamHeadersRequest) Descriptor() ([]byte, []int) { return file_node_node_proto_rawDescGZIP(), []int{21} } -// Node info request. -type GetNodeInfoRequest struct { +// 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 *GetNodeInfoRequest) Reset() { - *x = GetNodeInfoRequest{} +func (x *StreamHeadersReply) Reset() { + *x = StreamHeadersReply{} if protoimpl.UnsafeEnabled { mi := &file_node_node_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1431,13 +1431,13 @@ func (x *GetNodeInfoRequest) Reset() { } } -func (x *GetNodeInfoRequest) String() string { +func (x *StreamHeadersReply) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetNodeInfoRequest) ProtoMessage() {} +func (*StreamHeadersReply) ProtoMessage() {} -func (x *GetNodeInfoRequest) ProtoReflect() protoreflect.Message { +func (x *StreamHeadersReply) ProtoReflect() protoreflect.Message { mi := &file_node_node_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1449,89 +1449,23 @@ func (x *GetNodeInfoRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetNodeInfoRequest.ProtoReflect.Descriptor instead. -func (*GetNodeInfoRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use StreamHeadersReply.ProtoReflect.Descriptor instead. +func (*StreamHeadersReply) Descriptor() ([]byte, []int) { return file_node_node_proto_rawDescGZIP(), []int{22} } -// Node info reply. -type GetNodeInfoReply 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 *GetNodeInfoReply) Reset() { - *x = GetNodeInfoReply{} - if protoimpl.UnsafeEnabled { - mi := &file_node_node_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNodeInfoReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNodeInfoReply) ProtoMessage() {} - -func (x *GetNodeInfoReply) ProtoReflect() protoreflect.Message { - mi := &file_node_node_proto_msgTypes[23] - 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 GetNodeInfoReply.ProtoReflect.Descriptor instead. -func (*GetNodeInfoReply) Descriptor() ([]byte, []int) { - return file_node_node_proto_rawDescGZIP(), []int{23} -} - -func (x *GetNodeInfoReply) GetSemver() string { - if x != nil { - return x.Semver - } - return "" -} - -func (x *GetNodeInfoReply) GetArch() string { +func (x *StreamHeadersReply) GetBlobHeader() *BlobHeader { if x != nil { - return x.Arch - } - return "" -} - -func (x *GetNodeInfoReply) GetOs() string { - if x != nil { - return x.Os - } - return "" -} - -func (x *GetNodeInfoReply) GetNumCpu() uint32 { - if x != nil { - return x.NumCpu + return x.BlobHeader } - return 0 + return nil } -func (x *GetNodeInfoReply) GetMemBytes() uint64 { +func (x *StreamHeadersReply) GetProof() *MerkleProof { if x != nil { - return x.MemBytes + return x.Proof } - return 0 + return nil } var File_node_node_proto protoreflect.FileDescriptor @@ -1675,88 +1609,71 @@ 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, 0x5b, - 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, - 0x6f, 0x62, 0x4b, 0x65, 0x79, 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, 0x60, 0x0a, 0x0e, 0x47, - 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x23, 0x0a, - 0x0d, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0c, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x49, 0x6e, 0x64, 0x69, 0x63, - 0x65, 0x73, 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, 0x16, 0x0a, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x42, 0x79, 0x74, 0x65, 0x73, 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, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x68, 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, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x10, - 0x47, 0x65, 0x74, 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, 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, 0x94, 0x04, 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, 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, 0x12, 0x31, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x10, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x4b, 0x65, 0x79, - 0x1a, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x44, - 0x61, 0x74, 0x61, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x12, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x62, - 0x4b, 0x65, 0x79, 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, - 0x4b, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x12, 0x1a, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 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, 0x28, 0x01, 0x30, 0x01, 0x12, 0x41, 0x0a, 0x0b, - 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, - 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, + 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, 0xe1, 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, 0x38, 0x0a, 0x08, 0x47, 0x65, + 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x15, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 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, } var ( @@ -1772,7 +1689,7 @@ 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, 24) +var file_node_node_proto_msgTypes = make([]protoimpl.MessageInfo, 23) var file_node_node_proto_goTypes = []interface{}{ (ChunkEncodingFormat)(0), // 0: node.ChunkEncodingFormat (*StoreChunksRequest)(nil), // 1: node.StoreChunksRequest @@ -1794,63 +1711,55 @@ var file_node_node_proto_goTypes = []interface{}{ (*BatchHeader)(nil), // 17: node.BatchHeader (*NodeInfoRequest)(nil), // 18: node.NodeInfoRequest (*NodeInfoReply)(nil), // 19: node.NodeInfoReply - (*GetChunksRequest)(nil), // 20: node.GetChunksRequest - (*GetChunksReply)(nil), // 21: node.GetChunksReply + (*GetChunkRequest)(nil), // 20: node.GetChunkRequest + (*GetChunkReply)(nil), // 21: node.GetChunkReply (*StreamHeadersRequest)(nil), // 22: node.StreamHeadersRequest - (*GetNodeInfoRequest)(nil), // 23: node.GetNodeInfoRequest - (*GetNodeInfoReply)(nil), // 24: node.GetNodeInfoReply - (*wrapperspb.BytesValue)(nil), // 25: google.protobuf.BytesValue - (*common.G1Commitment)(nil), // 26: common.G1Commitment - (*common.BlobKey)(nil), // 27: common.BlobKey - (*common.ChunkData)(nil), // 28: common.ChunkData - (*common.ChunkKey)(nil), // 29: common.ChunkKey + (*StreamHeadersReply)(nil), // 23: node.StreamHeadersReply + (*wrapperspb.BytesValue)(nil), // 24: google.protobuf.BytesValue + (*common.G1Commitment)(nil), // 25: common.G1Commitment + (*common.ChunkData)(nil), // 26: common.ChunkData } 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 - 25, // 3: node.StoreBlobsReply.signatures:type_name -> google.protobuf.BytesValue + 24, // 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 - 26, // 10: node.BlobHeader.commitment:type_name -> common.G1Commitment + 25, // 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 - 27, // 14: node.GetChunksRequest.blob_key:type_name -> common.BlobKey - 28, // 15: node.GetChunksReply.chunks:type_name -> common.ChunkData - 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.GetChunks:input_type -> node.GetChunksRequest - 29, // 24: node.Retrieval.GetChunk:input_type -> common.ChunkKey - 27, // 25: node.Retrieval.GetHeader:input_type -> common.BlobKey - 22, // 26: node.Retrieval.StreamHeaders:input_type -> node.StreamHeadersRequest - 23, // 27: node.Retrieval.GetNodeInfo:input_type -> node.GetNodeInfoRequest - 2, // 28: node.Dispersal.StoreChunks:output_type -> node.StoreChunksReply - 4, // 29: node.Dispersal.StoreBlobs:output_type -> node.StoreBlobsReply - 6, // 30: node.Dispersal.AttestBatch:output_type -> node.AttestBatchReply - 19, // 31: node.Dispersal.NodeInfo:output_type -> node.NodeInfoReply - 8, // 32: node.Retrieval.RetrieveChunks:output_type -> node.RetrieveChunksReply - 10, // 33: node.Retrieval.GetBlobHeader:output_type -> node.GetBlobHeaderReply - 19, // 34: node.Retrieval.NodeInfo:output_type -> node.NodeInfoReply - 21, // 35: node.Retrieval.GetChunks:output_type -> node.GetChunksReply - 28, // 36: node.Retrieval.GetChunk:output_type -> common.ChunkData - 10, // 37: node.Retrieval.GetHeader:output_type -> node.GetBlobHeaderReply - 10, // 38: node.Retrieval.StreamHeaders:output_type -> node.GetBlobHeaderReply - 24, // 39: node.Retrieval.GetNodeInfo:output_type -> node.GetNodeInfoReply - 28, // [28:40] is the sub-list for method output_type - 16, // [16:28] 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 + 26, // 14: node.GetChunkReply.chunk:type_name -> common.ChunkData + 15, // 15: node.StreamHeadersReply.blob_header:type_name -> node.BlobHeader + 11, // 16: node.StreamHeadersReply.proof:type_name -> node.MerkleProof + 1, // 17: node.Dispersal.StoreChunks:input_type -> node.StoreChunksRequest + 3, // 18: node.Dispersal.StoreBlobs:input_type -> node.StoreBlobsRequest + 5, // 19: node.Dispersal.AttestBatch:input_type -> node.AttestBatchRequest + 18, // 20: node.Dispersal.NodeInfo:input_type -> node.NodeInfoRequest + 7, // 21: node.Retrieval.RetrieveChunks:input_type -> node.RetrieveChunksRequest + 9, // 22: node.Retrieval.GetBlobHeader:input_type -> node.GetBlobHeaderRequest + 18, // 23: node.Retrieval.NodeInfo:input_type -> node.NodeInfoRequest + 20, // 24: node.Retrieval.GetChunk:input_type -> node.GetChunkRequest + 22, // 25: node.Retrieval.StreamHeaders:input_type -> node.StreamHeadersRequest + 2, // 26: node.Dispersal.StoreChunks:output_type -> node.StoreChunksReply + 4, // 27: node.Dispersal.StoreBlobs:output_type -> node.StoreBlobsReply + 6, // 28: node.Dispersal.AttestBatch:output_type -> node.AttestBatchReply + 19, // 29: node.Dispersal.NodeInfo:output_type -> node.NodeInfoReply + 8, // 30: node.Retrieval.RetrieveChunks:output_type -> node.RetrieveChunksReply + 10, // 31: node.Retrieval.GetBlobHeader:output_type -> node.GetBlobHeaderReply + 19, // 32: node.Retrieval.NodeInfo:output_type -> node.NodeInfoReply + 21, // 33: node.Retrieval.GetChunk:output_type -> node.GetChunkReply + 23, // 34: node.Retrieval.StreamHeaders:output_type -> node.StreamHeadersReply + 26, // [26:35] is the sub-list for method output_type + 17, // [17:26] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name } func init() { file_node_node_proto_init() } @@ -2088,7 +1997,7 @@ func file_node_node_proto_init() { } } file_node_node_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetChunksRequest); i { + switch v := v.(*GetChunkRequest); i { case 0: return &v.state case 1: @@ -2100,7 +2009,7 @@ func file_node_node_proto_init() { } } file_node_node_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetChunksReply); i { + switch v := v.(*GetChunkReply); i { case 0: return &v.state case 1: @@ -2124,19 +2033,7 @@ func file_node_node_proto_init() { } } file_node_node_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNodeInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_node_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNodeInfoReply); i { + switch v := v.(*StreamHeadersReply); i { case 0: return &v.state case 1: @@ -2154,7 +2051,7 @@ func file_node_node_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_node_node_proto_rawDesc, NumEnums: 1, - NumMessages: 24, + NumMessages: 23, NumExtensions: 0, NumServices: 2, }, diff --git a/api/grpc/node/node_grpc.pb.go b/api/grpc/node/node_grpc.pb.go index b08e865b81..ff2de899eb 100644 --- a/api/grpc/node/node_grpc.pb.go +++ b/api/grpc/node/node_grpc.pb.go @@ -8,7 +8,6 @@ package node import ( context "context" - common "github.com/Layr-Labs/eigenda/api/grpc/common" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -248,11 +247,8 @@ const ( Retrieval_RetrieveChunks_FullMethodName = "/node.Retrieval/RetrieveChunks" Retrieval_GetBlobHeader_FullMethodName = "/node.Retrieval/GetBlobHeader" Retrieval_NodeInfo_FullMethodName = "/node.Retrieval/NodeInfo" - Retrieval_GetChunks_FullMethodName = "/node.Retrieval/GetChunks" Retrieval_GetChunk_FullMethodName = "/node.Retrieval/GetChunk" - Retrieval_GetHeader_FullMethodName = "/node.Retrieval/GetHeader" Retrieval_StreamHeaders_FullMethodName = "/node.Retrieval/StreamHeaders" - Retrieval_GetNodeInfo_FullMethodName = "/node.Retrieval/GetNodeInfo" ) // RetrievalClient is the client API for Retrieval service. @@ -265,18 +261,10 @@ 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) - // GetChunks retrieves all of the chunks from a specified quorum for a blob held by the node. - // Eventually this will replace RetrieveChunks. - GetChunks(ctx context.Context, in *GetChunksRequest, opts ...grpc.CallOption) (*GetChunksReply, error) // GetChunk retrieves a specific chunk for a blob custodied at the Node. - GetChunk(ctx context.Context, in *common.ChunkKey, opts ...grpc.CallOption) (*common.ChunkData, error) - // Get the header of a blob. - // Eventually this will replace GetBlobHeader. - GetHeader(ctx context.Context, in *common.BlobKey, opts ...grpc.CallOption) (*GetBlobHeaderReply, error) + GetChunk(ctx context.Context, in *GetChunkRequest, opts ...grpc.CallOption) (*GetChunkReply, error) // StreamHeaders requests a stream all new headers. StreamHeaders(ctx context.Context, opts ...grpc.CallOption) (Retrieval_StreamHeadersClient, error) - // Retrieve node info metadata. Eventually this will replace NodeInfo. - GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoReply, error) } type retrievalClient struct { @@ -314,17 +302,8 @@ func (c *retrievalClient) NodeInfo(ctx context.Context, in *NodeInfoRequest, opt return out, nil } -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) GetChunk(ctx context.Context, in *common.ChunkKey, opts ...grpc.CallOption) (*common.ChunkData, error) { - out := new(common.ChunkData) +func (c *retrievalClient) GetChunk(ctx context.Context, in *GetChunkRequest, opts ...grpc.CallOption) (*GetChunkReply, error) { + out := new(GetChunkReply) err := c.cc.Invoke(ctx, Retrieval_GetChunk_FullMethodName, in, out, opts...) if err != nil { return nil, err @@ -332,15 +311,6 @@ func (c *retrievalClient) GetChunk(ctx context.Context, in *common.ChunkKey, opt return out, nil } -func (c *retrievalClient) GetHeader(ctx context.Context, in *common.BlobKey, opts ...grpc.CallOption) (*GetBlobHeaderReply, error) { - out := new(GetBlobHeaderReply) - err := c.cc.Invoke(ctx, Retrieval_GetHeader_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *retrievalClient) StreamHeaders(ctx context.Context, opts ...grpc.CallOption) (Retrieval_StreamHeadersClient, error) { stream, err := c.cc.NewStream(ctx, &Retrieval_ServiceDesc.Streams[0], Retrieval_StreamHeaders_FullMethodName, opts...) if err != nil { @@ -352,7 +322,7 @@ func (c *retrievalClient) StreamHeaders(ctx context.Context, opts ...grpc.CallOp type Retrieval_StreamHeadersClient interface { Send(*StreamHeadersRequest) error - Recv() (*GetBlobHeaderReply, error) + Recv() (*StreamHeadersReply, error) grpc.ClientStream } @@ -364,23 +334,14 @@ func (x *retrievalStreamHeadersClient) Send(m *StreamHeadersRequest) error { return x.ClientStream.SendMsg(m) } -func (x *retrievalStreamHeadersClient) Recv() (*GetBlobHeaderReply, error) { - m := new(GetBlobHeaderReply) +func (x *retrievalStreamHeadersClient) Recv() (*StreamHeadersReply, error) { + m := new(StreamHeadersReply) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } -func (c *retrievalClient) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoReply, error) { - out := new(GetNodeInfoReply) - err := c.cc.Invoke(ctx, Retrieval_GetNodeInfo_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 @@ -391,18 +352,10 @@ type RetrievalServer interface { GetBlobHeader(context.Context, *GetBlobHeaderRequest) (*GetBlobHeaderReply, error) // Retrieve node info metadata NodeInfo(context.Context, *NodeInfoRequest) (*NodeInfoReply, error) - // GetChunks retrieves all of the chunks from a specified quorum for a blob held by the node. - // Eventually this will replace RetrieveChunks. - GetChunks(context.Context, *GetChunksRequest) (*GetChunksReply, error) // GetChunk retrieves a specific chunk for a blob custodied at the Node. - GetChunk(context.Context, *common.ChunkKey) (*common.ChunkData, error) - // Get the header of a blob. - // Eventually this will replace GetBlobHeader. - GetHeader(context.Context, *common.BlobKey) (*GetBlobHeaderReply, error) + GetChunk(context.Context, *GetChunkRequest) (*GetChunkReply, error) // StreamHeaders requests a stream all new headers. StreamHeaders(Retrieval_StreamHeadersServer) error - // Retrieve node info metadata. Eventually this will replace NodeInfo. - GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoReply, error) mustEmbedUnimplementedRetrievalServer() } @@ -419,21 +372,12 @@ 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) GetChunks(context.Context, *GetChunksRequest) (*GetChunksReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetChunks not implemented") -} -func (UnimplementedRetrievalServer) GetChunk(context.Context, *common.ChunkKey) (*common.ChunkData, error) { +func (UnimplementedRetrievalServer) GetChunk(context.Context, *GetChunkRequest) (*GetChunkReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") } -func (UnimplementedRetrievalServer) GetHeader(context.Context, *common.BlobKey) (*GetBlobHeaderReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetHeader not implemented") -} func (UnimplementedRetrievalServer) StreamHeaders(Retrieval_StreamHeadersServer) error { return status.Errorf(codes.Unimplemented, "method StreamHeaders not implemented") } -func (UnimplementedRetrievalServer) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNodeInfo not implemented") -} func (UnimplementedRetrievalServer) mustEmbedUnimplementedRetrievalServer() {} // UnsafeRetrievalServer may be embedded to opt out of forward compatibility for this service. @@ -501,26 +445,8 @@ func _Retrieval_NodeInfo_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -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_GetChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(common.ChunkKey) + in := new(GetChunkRequest) if err := dec(in); err != nil { return nil, err } @@ -532,25 +458,7 @@ func _Retrieval_GetChunk_Handler(srv interface{}, ctx context.Context, dec func( FullMethod: Retrieval_GetChunk_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RetrievalServer).GetChunk(ctx, req.(*common.ChunkKey)) - } - return interceptor(ctx, in, info, handler) -} - -func _Retrieval_GetHeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(common.BlobKey) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RetrievalServer).GetHeader(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Retrieval_GetHeader_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RetrievalServer).GetHeader(ctx, req.(*common.BlobKey)) + return srv.(RetrievalServer).GetChunk(ctx, req.(*GetChunkRequest)) } return interceptor(ctx, in, info, handler) } @@ -560,7 +468,7 @@ func _Retrieval_StreamHeaders_Handler(srv interface{}, stream grpc.ServerStream) } type Retrieval_StreamHeadersServer interface { - Send(*GetBlobHeaderReply) error + Send(*StreamHeadersReply) error Recv() (*StreamHeadersRequest, error) grpc.ServerStream } @@ -569,7 +477,7 @@ type retrievalStreamHeadersServer struct { grpc.ServerStream } -func (x *retrievalStreamHeadersServer) Send(m *GetBlobHeaderReply) error { +func (x *retrievalStreamHeadersServer) Send(m *StreamHeadersReply) error { return x.ServerStream.SendMsg(m) } @@ -581,24 +489,6 @@ func (x *retrievalStreamHeadersServer) Recv() (*StreamHeadersRequest, error) { return m, nil } -func _Retrieval_GetNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNodeInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RetrievalServer).GetNodeInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Retrieval_GetNodeInfo_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RetrievalServer).GetNodeInfo(ctx, req.(*GetNodeInfoRequest)) - } - 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) @@ -618,22 +508,10 @@ var Retrieval_ServiceDesc = grpc.ServiceDesc{ MethodName: "NodeInfo", Handler: _Retrieval_NodeInfo_Handler, }, - { - MethodName: "GetChunks", - Handler: _Retrieval_GetChunks_Handler, - }, { MethodName: "GetChunk", Handler: _Retrieval_GetChunk_Handler, }, - { - MethodName: "GetHeader", - Handler: _Retrieval_GetHeader_Handler, - }, - { - MethodName: "GetNodeInfo", - Handler: _Retrieval_GetNodeInfo_Handler, - }, }, Streams: []grpc.StreamDesc{ { diff --git a/api/grpc/retriever/retriever.pb.go b/api/grpc/retriever/retriever.pb.go index 8944f5f669..f8aeac8536 100644 --- a/api/grpc/retriever/retriever.pb.go +++ b/api/grpc/retriever/retriever.pb.go @@ -7,7 +7,6 @@ package retriever 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" @@ -153,33 +152,28 @@ var File_retriever_retriever_proto protoreflect.FileDescriptor var file_retriever_retriever_proto_rawDesc = []byte{ 0x0a, 0x19, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x72, 0x65, 0x74, - 0x72, 0x69, 0x65, 0x76, 0x65, 0x72, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xab, 0x01, 0x0a, 0x0b, - 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x62, - 0x61, 0x74, 0x63, 0x68, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x5f, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, 0x6f, - 0x62, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 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, 0x03, 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, 0x12, 0x1b, 0x0a, 0x09, - 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x08, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x49, 0x64, 0x22, 0x1f, 0x0a, 0x09, 0x42, 0x6c, 0x6f, - 0x62, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0x7b, 0x0a, 0x09, 0x52, 0x65, - 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x0c, 0x52, 0x65, 0x74, 0x72, 0x69, - 0x65, 0x76, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x16, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, - 0x76, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x14, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x62, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x2e, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x42, 0x6c, - 0x6f, 0x62, 0x12, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x62, - 0x4b, 0x65, 0x79, 0x1a, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, - 0x62, 0x44, 0x61, 0x74, 0x61, 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, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x72, 0x69, 0x65, 0x76, 0x65, 0x72, 0x22, 0xab, 0x01, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x62, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x12, 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, 0x03, 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, 0x12, 0x1b, 0x0a, 0x09, 0x71, 0x75, 0x6f, 0x72, 0x75, + 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x71, 0x75, 0x6f, 0x72, + 0x75, 0x6d, 0x49, 0x64, 0x22, 0x1f, 0x0a, 0x09, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0x4b, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, + 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x0c, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x42, 0x6c, + 0x6f, 0x62, 0x12, 0x16, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x72, 0x2e, 0x42, + 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x72, 0x65, 0x74, + 0x72, 0x69, 0x65, 0x76, 0x65, 0x72, 0x2e, 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, 0x72, 0x65, 0x74, 0x72, + 0x69, 0x65, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -196,18 +190,14 @@ func file_retriever_retriever_proto_rawDescGZIP() []byte { var file_retriever_retriever_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_retriever_retriever_proto_goTypes = []interface{}{ - (*BlobRequest)(nil), // 0: retriever.BlobRequest - (*BlobReply)(nil), // 1: retriever.BlobReply - (*common.BlobKey)(nil), // 2: common.BlobKey - (*common.BlobData)(nil), // 3: common.BlobData + (*BlobRequest)(nil), // 0: retriever.BlobRequest + (*BlobReply)(nil), // 1: retriever.BlobReply } var file_retriever_retriever_proto_depIdxs = []int32{ 0, // 0: retriever.Retriever.RetrieveBlob:input_type -> retriever.BlobRequest - 2, // 1: retriever.Retriever.GetBlob:input_type -> common.BlobKey - 1, // 2: retriever.Retriever.RetrieveBlob:output_type -> retriever.BlobReply - 3, // 3: retriever.Retriever.GetBlob:output_type -> common.BlobData - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type + 1, // 1: retriever.Retriever.RetrieveBlob:output_type -> retriever.BlobReply + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/api/grpc/retriever/retriever_grpc.pb.go b/api/grpc/retriever/retriever_grpc.pb.go index 56b05aee1a..ffd67f16f8 100644 --- a/api/grpc/retriever/retriever_grpc.pb.go +++ b/api/grpc/retriever/retriever_grpc.pb.go @@ -8,7 +8,6 @@ package retriever import ( context "context" - common "github.com/Layr-Labs/eigenda/api/grpc/common" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -21,7 +20,6 @@ const _ = grpc.SupportPackageIsVersion7 const ( Retriever_RetrieveBlob_FullMethodName = "/retriever.Retriever/RetrieveBlob" - Retriever_GetBlob_FullMethodName = "/retriever.Retriever/GetBlob" ) // RetrieverClient is the client API for Retriever service. @@ -31,9 +29,6 @@ type RetrieverClient interface { // This fans out request to EigenDA Nodes to retrieve the chunks and returns the // reconstructed original blob in response. RetrieveBlob(ctx context.Context, in *BlobRequest, opts ...grpc.CallOption) (*BlobReply, error) - // Obtain the chunks necessary to reconstruct a blob and return it. - // Eventually this will replace RetrieveBlob. - GetBlob(ctx context.Context, in *common.BlobKey, opts ...grpc.CallOption) (*common.BlobData, error) } type retrieverClient struct { @@ -53,15 +48,6 @@ func (c *retrieverClient) RetrieveBlob(ctx context.Context, in *BlobRequest, opt return out, nil } -func (c *retrieverClient) GetBlob(ctx context.Context, in *common.BlobKey, opts ...grpc.CallOption) (*common.BlobData, error) { - out := new(common.BlobData) - err := c.cc.Invoke(ctx, Retriever_GetBlob_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // RetrieverServer is the server API for Retriever service. // All implementations must embed UnimplementedRetrieverServer // for forward compatibility @@ -69,9 +55,6 @@ type RetrieverServer interface { // This fans out request to EigenDA Nodes to retrieve the chunks and returns the // reconstructed original blob in response. RetrieveBlob(context.Context, *BlobRequest) (*BlobReply, error) - // Obtain the chunks necessary to reconstruct a blob and return it. - // Eventually this will replace RetrieveBlob. - GetBlob(context.Context, *common.BlobKey) (*common.BlobData, error) mustEmbedUnimplementedRetrieverServer() } @@ -82,9 +65,6 @@ type UnimplementedRetrieverServer struct { func (UnimplementedRetrieverServer) RetrieveBlob(context.Context, *BlobRequest) (*BlobReply, error) { return nil, status.Errorf(codes.Unimplemented, "method RetrieveBlob not implemented") } -func (UnimplementedRetrieverServer) GetBlob(context.Context, *common.BlobKey) (*common.BlobData, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlob not implemented") -} func (UnimplementedRetrieverServer) mustEmbedUnimplementedRetrieverServer() {} // UnsafeRetrieverServer may be embedded to opt out of forward compatibility for this service. @@ -116,24 +96,6 @@ func _Retriever_RetrieveBlob_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } -func _Retriever_GetBlob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(common.BlobKey) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RetrieverServer).GetBlob(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Retriever_GetBlob_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RetrieverServer).GetBlob(ctx, req.(*common.BlobKey)) - } - return interceptor(ctx, in, info, handler) -} - // Retriever_ServiceDesc is the grpc.ServiceDesc for Retriever service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -145,10 +107,6 @@ var Retriever_ServiceDesc = grpc.ServiceDesc{ MethodName: "RetrieveBlob", Handler: _Retriever_RetrieveBlob_Handler, }, - { - MethodName: "GetBlob", - Handler: _Retriever_GetBlob_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "retriever/retriever.proto", diff --git a/api/proto/common/common.proto b/api/proto/common/common.proto index 740de4ae2d..8253bd86b4 100644 --- a/api/proto/common/common.proto +++ b/api/proto/common/common.proto @@ -13,36 +13,6 @@ message G1Commitment { // Messages for WIP RPCs. These are subject to change, do not consider these to be stable API. // ///////////////////////////////////////////////////////////////////////////////////////////////// -// A unique identifier for a blob. -message BlobKey { - oneof key { - HeaderBlobKey header_blob_key = 1; - BatchBlobKey batch_blob_key = 2; - } -} - -// Uniquely identifies a blob based on its blob header hash. -message HeaderBlobKey { - bytes header_hash = 1; -} - -// Uniquely identifies a blob based on its batch header hash and blob index. -message BatchBlobKey { - bytes batch_header_hash = 1; - uint32 blob_index = 2; -} - -// A unique identifier for a chunk. -message ChunkKey { - BlobKey blob_key = 1; - uint32 chunk_index = 2; -} - -// A blob. -message BlobData { - bytes data = 1; -} - // A chunk of a blob. message ChunkData { bytes data = 1; diff --git a/api/proto/disperser/disperser.proto b/api/proto/disperser/disperser.proto index ac35590c84..404d6b637f 100644 --- a/api/proto/disperser/disperser.proto +++ b/api/proto/disperser/disperser.proto @@ -37,13 +37,8 @@ service Disperser { // These RPCs are a work in progress and are not yet fully functional. API may not be stable. // //////////////////////////////////////////////////////////////////////////////////////////////// - // Retrieves the requested blob from the disperser's backend. - // This RPC is is a work in progress with undefined behavior, use with caution. - rpc GetBlob(common.BlobKey) returns (common.BlobData) {} - // Retrieves the requested chunk from the Disperser's backend. - // This RPC is is a work in progress with undefined behavior, use with caution. - rpc GetChunk(common.ChunkKey) returns (common.ChunkData) {} + rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} } // Requests and Responses @@ -261,4 +256,22 @@ message BatchHeader { // The Disperser will encode and disperse the blobs based on the onchain info // (e.g. operator stakes) at this block number. uint32 reference_block_number = 4; +} + +///////////////////////////////////////////////////////////////////////////////////////////////// +// Messages for WIP RPCs. These are subject to change, do not consider these to be stable API. // +///////////////////////////////////////////////////////////////////////////////////////////////// + +// Request a specific chunk +message GetChunkRequest { + // The hash of the blob's header. + bytes 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/lightnode/lightnode.proto b/api/proto/lightnode/lightnode.proto index 0bfdcf7043..504bc0f9a1 100644 --- a/api/proto/lightnode/lightnode.proto +++ b/api/proto/lightnode/lightnode.proto @@ -9,16 +9,31 @@ option go_package = "github.com/Layr-Labs/eigenda/api/grpc/lightnode"; service LightNode { // GetChunk retrieves a specific chunk held by the light node. - rpc GetChunk(common.ChunkKey) returns (common.ChunkData) {} + rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} // StreamAvailabilityStatus streams the availability status of all chunks assigned to the light node. // For use by a DA node for monitoring the availability of chunks through its constellation of agent light nodes. - rpc StreamAvailabilityStatus(StreamAvailabilityStatusRequest) returns (stream common.ChunkKey) {} + rpc StreamAvailabilityStatus(StreamAvailabilityStatusRequest) returns (stream StreamAvailabilityStatusReply) {} +} + +// A request for a specific chunk from a light node. +message GetChunkRequest { + bytes header_hash = 1; +} + +// A reply to a GetChunk request. +message GetChunkReply { + // The chunk data. + common.ChunkData chunk = 1; } // A request from a DA node to an agent light node to stream the availability status of all chunks // assigned to the light node. message StreamAvailabilityStatusRequest { - // TODO describe protocol for authentication bytes authentication_token = 1; +} + +// A reply to a StreamAvailabilityStatus request. +message StreamAvailabilityStatusReply { + bytes header_hash = 1; } \ No newline at end of file diff --git a/api/proto/node/node.proto b/api/proto/node/node.proto index f3b452b6a4..744bd589ac 100644 --- a/api/proto/node/node.proto +++ b/api/proto/node/node.proto @@ -38,18 +38,10 @@ service Retrieval { // These RPCs are a work in progress and are not yet fully functional. API may not be stable. // //////////////////////////////////////////////////////////////////////////////////////////////// - // GetChunks retrieves all of the chunks from a specified quorum for a blob held by the node. - // Eventually this will replace RetrieveChunks. - rpc GetChunks(GetChunksRequest) returns (GetChunksReply) {} // GetChunk retrieves a specific chunk for a blob custodied at the Node. - rpc GetChunk(common.ChunkKey) returns (common.ChunkData) {} - // Get the header of a blob. - // Eventually this will replace GetBlobHeader. - rpc GetHeader(common.BlobKey) returns (GetBlobHeaderReply) {} + rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} // StreamHeaders requests a stream all new headers. - rpc StreamHeaders(stream StreamHeadersRequest) returns (stream GetBlobHeaderReply) {} - // Retrieve node info metadata. Eventually this will replace NodeInfo. - rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoReply) {} + rpc StreamHeaders(stream StreamHeadersRequest) returns (stream StreamHeadersReply) {} } // Requests and replies @@ -238,33 +230,30 @@ message NodeInfoReply { // Messages for WIP RPCs. These are subject to change, do not consider these to be stable API. // ///////////////////////////////////////////////////////////////////////////////////////////////// -// Request all custodied chunks from a particular quorum -message GetChunksRequest { - common.BlobKey blob_key = 1; - uint32 quorum_id = 2; +// Request a specific chunk +message GetChunkRequest { + // The hash of the blob's header. + bytes header_hash = 1; + // The index of the chunk within the blob. + uint32 chunk_index = 2; } -// Reply to GetChunksRequest. -message GetChunksReply { - // The indices of the chunks custodied. Each index corresponds to the chunk at the same position in the chunks field. - repeated uint32 chunk_indices = 1; - // The chunks this node has. - repeated common.ChunkData chunks = 2; +// Reply to GetChunkRequest +message GetChunkReply { + // The chunk requested. + common.ChunkData chunk = 1; } // Request that all new headers be sent. message StreamHeadersRequest { } -// Node info request. -message GetNodeInfoRequest { +// 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; } - -// Node info reply. -message GetNodeInfoReply { - string semver = 1; - string arch = 2; - string os = 3; - uint32 num_cpu = 4; - uint64 mem_bytes = 5; -} \ No newline at end of file diff --git a/api/proto/retriever/retriever.proto b/api/proto/retriever/retriever.proto index 7ba70fb00d..754a9348fb 100644 --- a/api/proto/retriever/retriever.proto +++ b/api/proto/retriever/retriever.proto @@ -1,7 +1,6 @@ syntax = "proto3"; option go_package = "github.com/Layr-Labs/eigenda/api/grpc/retriever"; -import "common/common.proto"; package retriever; // The Retriever is a service for retrieving chunks corresponding to a blob from @@ -21,14 +20,6 @@ service Retriever { // This fans out request to EigenDA Nodes to retrieve the chunks and returns the // reconstructed original blob in response. rpc RetrieveBlob(BlobRequest) returns (BlobReply) {} - - //////////////////////////////////////////////////////////////////////////////////////////////// - // These RPCs are a work in progress and are not yet fully functional. API may not be stable. // - //////////////////////////////////////////////////////////////////////////////////////////////// - - // Obtain the chunks necessary to reconstruct a blob and return it. - // Eventually this will replace RetrieveBlob. - rpc GetBlob(common.BlobKey) returns (common.BlobData) {} } message BlobRequest { diff --git a/disperser/apiserver/server.go b/disperser/apiserver/server.go index 4ade60c003..b2c14220e6 100644 --- a/disperser/apiserver/server.go +++ b/disperser/apiserver/server.go @@ -774,10 +774,7 @@ func (s *DispersalServer) RetrieveBlob(ctx context.Context, req *pb.RetrieveBlob }, nil } -func (s *DispersalServer) GetBlob(context.Context, *commonpb.BlobKey) (*commonpb.BlobData, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlob not implemented") -} -func (s *DispersalServer) GetChunk(context.Context, *commonpb.ChunkKey) (*commonpb.ChunkData, error) { +func (s *DispersalServer) GetChunk(context.Context, *pb.GetChunkRequest) (*pb.GetChunkReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") } diff --git a/node/grpc/server.go b/node/grpc/server.go index 67e08f9bc9..b6d91bda6f 100644 --- a/node/grpc/server.go +++ b/node/grpc/server.go @@ -5,7 +5,6 @@ import ( "encoding/hex" "errors" "fmt" - commonpb "github.com/Layr-Labs/eigenda/api/grpc/common" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "reflect" @@ -157,26 +156,14 @@ 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) GetChunks(context.Context, *pb.GetChunksRequest) (*pb.GetChunksReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetChunks not implemented") -} - -func (s *Server) GetChunk(context.Context, *commonpb.ChunkKey) (*commonpb.ChunkData, error) { +func (s *Server) GetChunk(context.Context, *pb.GetChunkRequest) (*pb.GetChunkReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") } -func (s *Server) GetHeader(context.Context, *commonpb.BlobKey) (*pb.GetBlobHeaderReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetHeader not implemented") -} - func (s *Server) StreamHeaders(pb.Retrieval_StreamHeadersServer) error { return status.Errorf(codes.Unimplemented, "method StreamHeaders not implemented") } -func (s *Server) GetNodeInfo(context.Context, *pb.GetNodeInfoRequest) (*pb.GetNodeInfoReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNodeInfo not implemented") -} - func (s *Server) handleStoreChunksRequest(ctx context.Context, in *pb.StoreChunksRequest) (*pb.StoreChunksReply, error) { start := time.Now() diff --git a/retriever/server.go b/retriever/server.go index 3127d40de9..d49f8dbf7f 100644 --- a/retriever/server.go +++ b/retriever/server.go @@ -3,9 +3,6 @@ package retriever import ( "context" "errors" - "github.com/Layr-Labs/eigenda/api/grpc/common" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" "math/big" "github.com/Layr-Labs/eigenda/api/clients" @@ -79,7 +76,3 @@ func (s *Server) RetrieveBlob(ctx context.Context, req *pb.BlobRequest) (*pb.Blo Data: data, }, nil } - -func (s *Server) GetBlob(context.Context, *common.BlobKey) (*common.BlobData, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlob not implemented") -} From a524c0b3c194f004443a3767219e5e4e6e0e4d8c Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Mon, 9 Sep 2024 09:17:35 -0500 Subject: [PATCH 26/31] Fix whitespace. Signed-off-by: Cody Littley --- api/proto/disperser/disperser.proto | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/api/proto/disperser/disperser.proto b/api/proto/disperser/disperser.proto index 404d6b637f..864c589ecd 100644 --- a/api/proto/disperser/disperser.proto +++ b/api/proto/disperser/disperser.proto @@ -46,17 +46,17 @@ service Disperser { // Authenicated Message Types message AuthenticatedRequest { - oneof payload { - DisperseBlobRequest disperse_request = 1; - AuthenticationData authentication_data = 2; - } + oneof payload { + DisperseBlobRequest disperse_request = 1; + AuthenticationData authentication_data = 2; + } } message AuthenticatedReply { - oneof payload { - BlobAuthHeader blob_auth_header = 1; - DisperseBlobReply disperse_reply = 2; - } + oneof payload { + BlobAuthHeader blob_auth_header = 1; + DisperseBlobReply disperse_reply = 2; + } } // BlobAuthHeader contains information about the blob for the client to verify and sign. From d3a9be4f94e62e06acee79e15e53c9255b4f1aa4 Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Mon, 16 Sep 2024 08:08:55 -0500 Subject: [PATCH 27/31] Made suggested changes. Signed-off-by: Cody Littley --- api/grpc/disperser/disperser.pb.go | 102 +++++++-------- api/grpc/lightnode/lightnode.pb.go | 2 + api/grpc/node/node.pb.go | 191 ++++++++++++++-------------- api/grpc/node/node_grpc.pb.go | 54 ++++---- api/proto/common/common.proto | 6 +- api/proto/disperser/disperser.proto | 14 +- api/proto/lightnode/lightnode.proto | 8 +- api/proto/node/node.proto | 18 +-- node/grpc/server.go | 4 +- 9 files changed, 202 insertions(+), 197 deletions(-) diff --git a/api/grpc/disperser/disperser.pb.go b/api/grpc/disperser/disperser.pb.go index d0fb615b35..0737f0e465 100644 --- a/api/grpc/disperser/disperser.pb.go +++ b/api/grpc/disperser/disperser.pb.go @@ -1189,7 +1189,7 @@ type GetChunkRequest struct { unknownFields protoimpl.UnknownFields // The hash of the blob's header. - HeaderHash []byte `protobuf:"bytes,1,opt,name=header_hash,json=headerHash,proto3" json:"header_hash,omitempty"` + 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"` } @@ -1226,9 +1226,9 @@ func (*GetChunkRequest) Descriptor() ([]byte, []int) { return file_disperser_disperser_proto_rawDescGZIP(), []int{16} } -func (x *GetChunkRequest) GetHeaderHash() []byte { +func (x *GetChunkRequest) GetBlobHeaderHash() []byte { if x != nil { - return x.HeaderHash + return x.BlobHeaderHash } return nil } @@ -1438,54 +1438,54 @@ 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, 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, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x0a, 0x68, 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, 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, } var ( diff --git a/api/grpc/lightnode/lightnode.pb.go b/api/grpc/lightnode/lightnode.pb.go index c965bfa6d4..e54cbb6f54 100644 --- a/api/grpc/lightnode/lightnode.pb.go +++ b/api/grpc/lightnode/lightnode.pb.go @@ -173,6 +173,8 @@ type StreamAvailabilityStatusReply struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The hash of a blob header corresponding to a chunk the agent received and verified. From the light node's + // perspective, the blob is available if the chunk is available. HeaderHash []byte `protobuf:"bytes,1,opt,name=header_hash,json=headerHash,proto3" json:"header_hash,omitempty"` } diff --git a/api/grpc/node/node.pb.go b/api/grpc/node/node.pb.go index 7c2dc1456e..9b7cf4ea7f 100644 --- a/api/grpc/node/node.pb.go +++ b/api/grpc/node/node.pb.go @@ -1369,15 +1369,15 @@ func (x *GetChunkReply) GetChunk() *common.ChunkData { return nil } -// Request that all new headers be sent. -type StreamHeadersRequest struct { +// Request that all new blob headers be sent. +type StreamBlobHeadersRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *StreamHeadersRequest) Reset() { - *x = StreamHeadersRequest{} +func (x *StreamBlobHeadersRequest) Reset() { + *x = StreamBlobHeadersRequest{} if protoimpl.UnsafeEnabled { mi := &file_node_node_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1385,13 +1385,13 @@ func (x *StreamHeadersRequest) Reset() { } } -func (x *StreamHeadersRequest) String() string { +func (x *StreamBlobHeadersRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StreamHeadersRequest) ProtoMessage() {} +func (*StreamBlobHeadersRequest) ProtoMessage() {} -func (x *StreamHeadersRequest) ProtoReflect() protoreflect.Message { +func (x *StreamBlobHeadersRequest) ProtoReflect() protoreflect.Message { mi := &file_node_node_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1403,8 +1403,8 @@ func (x *StreamHeadersRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StreamHeadersRequest.ProtoReflect.Descriptor instead. -func (*StreamHeadersRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use StreamBlobHeadersRequest.ProtoReflect.Descriptor instead. +func (*StreamBlobHeadersRequest) Descriptor() ([]byte, []int) { return file_node_node_proto_rawDescGZIP(), []int{21} } @@ -1618,62 +1618,63 @@ var file_node_node_proto_rawDesc = []byte{ 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, 0x22, 0x16, 0x0a, - 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 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, 0xe1, 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, 0x38, 0x0a, 0x08, 0x47, 0x65, - 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x15, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, - 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 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, + 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 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, 0xe9, 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, 0x38, + 0x0a, 0x08, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x15, 0x2e, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x13, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, + 0x6b, 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, } var ( @@ -1691,33 +1692,33 @@ 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, 23) 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 - (*GetChunkRequest)(nil), // 20: node.GetChunkRequest - (*GetChunkReply)(nil), // 21: node.GetChunkReply - (*StreamHeadersRequest)(nil), // 22: node.StreamHeadersRequest - (*StreamHeadersReply)(nil), // 23: node.StreamHeadersReply - (*wrapperspb.BytesValue)(nil), // 24: google.protobuf.BytesValue - (*common.G1Commitment)(nil), // 25: common.G1Commitment - (*common.ChunkData)(nil), // 26: common.ChunkData + (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 + (*GetChunkRequest)(nil), // 20: node.GetChunkRequest + (*GetChunkReply)(nil), // 21: node.GetChunkReply + (*StreamBlobHeadersRequest)(nil), // 22: node.StreamBlobHeadersRequest + (*StreamHeadersReply)(nil), // 23: node.StreamHeadersReply + (*wrapperspb.BytesValue)(nil), // 24: google.protobuf.BytesValue + (*common.G1Commitment)(nil), // 25: common.G1Commitment + (*common.ChunkData)(nil), // 26: common.ChunkData } var file_node_node_proto_depIdxs = []int32{ 17, // 0: node.StoreChunksRequest.batch_header:type_name -> node.BatchHeader @@ -1745,7 +1746,7 @@ var file_node_node_proto_depIdxs = []int32{ 9, // 22: node.Retrieval.GetBlobHeader:input_type -> node.GetBlobHeaderRequest 18, // 23: node.Retrieval.NodeInfo:input_type -> node.NodeInfoRequest 20, // 24: node.Retrieval.GetChunk:input_type -> node.GetChunkRequest - 22, // 25: node.Retrieval.StreamHeaders:input_type -> node.StreamHeadersRequest + 22, // 25: node.Retrieval.StreamBlobHeaders:input_type -> node.StreamBlobHeadersRequest 2, // 26: node.Dispersal.StoreChunks:output_type -> node.StoreChunksReply 4, // 27: node.Dispersal.StoreBlobs:output_type -> node.StoreBlobsReply 6, // 28: node.Dispersal.AttestBatch:output_type -> node.AttestBatchReply @@ -1754,7 +1755,7 @@ var file_node_node_proto_depIdxs = []int32{ 10, // 31: node.Retrieval.GetBlobHeader:output_type -> node.GetBlobHeaderReply 19, // 32: node.Retrieval.NodeInfo:output_type -> node.NodeInfoReply 21, // 33: node.Retrieval.GetChunk:output_type -> node.GetChunkReply - 23, // 34: node.Retrieval.StreamHeaders:output_type -> node.StreamHeadersReply + 23, // 34: node.Retrieval.StreamBlobHeaders:output_type -> node.StreamHeadersReply 26, // [26:35] is the sub-list for method output_type 17, // [17:26] is the sub-list for method input_type 17, // [17:17] is the sub-list for extension type_name @@ -2021,7 +2022,7 @@ func file_node_node_proto_init() { } } file_node_node_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamHeadersRequest); i { + switch v := v.(*StreamBlobHeadersRequest); i { case 0: return &v.state case 1: diff --git a/api/grpc/node/node_grpc.pb.go b/api/grpc/node/node_grpc.pb.go index ff2de899eb..6790973ae4 100644 --- a/api/grpc/node/node_grpc.pb.go +++ b/api/grpc/node/node_grpc.pb.go @@ -244,11 +244,11 @@ 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_GetChunk_FullMethodName = "/node.Retrieval/GetChunk" - Retrieval_StreamHeaders_FullMethodName = "/node.Retrieval/StreamHeaders" + Retrieval_RetrieveChunks_FullMethodName = "/node.Retrieval/RetrieveChunks" + Retrieval_GetBlobHeader_FullMethodName = "/node.Retrieval/GetBlobHeader" + Retrieval_NodeInfo_FullMethodName = "/node.Retrieval/NodeInfo" + Retrieval_GetChunk_FullMethodName = "/node.Retrieval/GetChunk" + Retrieval_StreamBlobHeaders_FullMethodName = "/node.Retrieval/StreamBlobHeaders" ) // RetrievalClient is the client API for Retrieval service. @@ -264,7 +264,7 @@ type RetrievalClient interface { // GetChunk retrieves a specific chunk for a blob custodied at the Node. GetChunk(ctx context.Context, in *GetChunkRequest, opts ...grpc.CallOption) (*GetChunkReply, error) // StreamHeaders requests a stream all new headers. - StreamHeaders(ctx context.Context, opts ...grpc.CallOption) (Retrieval_StreamHeadersClient, error) + StreamBlobHeaders(ctx context.Context, opts ...grpc.CallOption) (Retrieval_StreamBlobHeadersClient, error) } type retrievalClient struct { @@ -311,30 +311,30 @@ func (c *retrievalClient) GetChunk(ctx context.Context, in *GetChunkRequest, opt return out, nil } -func (c *retrievalClient) StreamHeaders(ctx context.Context, opts ...grpc.CallOption) (Retrieval_StreamHeadersClient, error) { - stream, err := c.cc.NewStream(ctx, &Retrieval_ServiceDesc.Streams[0], Retrieval_StreamHeaders_FullMethodName, opts...) +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 := &retrievalStreamHeadersClient{stream} + x := &retrievalStreamBlobHeadersClient{stream} return x, nil } -type Retrieval_StreamHeadersClient interface { - Send(*StreamHeadersRequest) error +type Retrieval_StreamBlobHeadersClient interface { + Send(*StreamBlobHeadersRequest) error Recv() (*StreamHeadersReply, error) grpc.ClientStream } -type retrievalStreamHeadersClient struct { +type retrievalStreamBlobHeadersClient struct { grpc.ClientStream } -func (x *retrievalStreamHeadersClient) Send(m *StreamHeadersRequest) error { +func (x *retrievalStreamBlobHeadersClient) Send(m *StreamBlobHeadersRequest) error { return x.ClientStream.SendMsg(m) } -func (x *retrievalStreamHeadersClient) Recv() (*StreamHeadersReply, error) { +func (x *retrievalStreamBlobHeadersClient) Recv() (*StreamHeadersReply, error) { m := new(StreamHeadersReply) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err @@ -355,7 +355,7 @@ type RetrievalServer interface { // GetChunk retrieves a specific chunk for a blob custodied at the Node. GetChunk(context.Context, *GetChunkRequest) (*GetChunkReply, error) // StreamHeaders requests a stream all new headers. - StreamHeaders(Retrieval_StreamHeadersServer) error + StreamBlobHeaders(Retrieval_StreamBlobHeadersServer) error mustEmbedUnimplementedRetrievalServer() } @@ -375,8 +375,8 @@ func (UnimplementedRetrievalServer) NodeInfo(context.Context, *NodeInfoRequest) func (UnimplementedRetrievalServer) GetChunk(context.Context, *GetChunkRequest) (*GetChunkReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") } -func (UnimplementedRetrievalServer) StreamHeaders(Retrieval_StreamHeadersServer) error { - return status.Errorf(codes.Unimplemented, "method StreamHeaders not implemented") +func (UnimplementedRetrievalServer) StreamBlobHeaders(Retrieval_StreamBlobHeadersServer) error { + return status.Errorf(codes.Unimplemented, "method StreamBlobHeaders not implemented") } func (UnimplementedRetrievalServer) mustEmbedUnimplementedRetrievalServer() {} @@ -463,26 +463,26 @@ func _Retrieval_GetChunk_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -func _Retrieval_StreamHeaders_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(RetrievalServer).StreamHeaders(&retrievalStreamHeadersServer{stream}) +func _Retrieval_StreamBlobHeaders_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(RetrievalServer).StreamBlobHeaders(&retrievalStreamBlobHeadersServer{stream}) } -type Retrieval_StreamHeadersServer interface { +type Retrieval_StreamBlobHeadersServer interface { Send(*StreamHeadersReply) error - Recv() (*StreamHeadersRequest, error) + Recv() (*StreamBlobHeadersRequest, error) grpc.ServerStream } -type retrievalStreamHeadersServer struct { +type retrievalStreamBlobHeadersServer struct { grpc.ServerStream } -func (x *retrievalStreamHeadersServer) Send(m *StreamHeadersReply) error { +func (x *retrievalStreamBlobHeadersServer) Send(m *StreamHeadersReply) error { return x.ServerStream.SendMsg(m) } -func (x *retrievalStreamHeadersServer) Recv() (*StreamHeadersRequest, error) { - m := new(StreamHeadersRequest) +func (x *retrievalStreamBlobHeadersServer) Recv() (*StreamBlobHeadersRequest, error) { + m := new(StreamBlobHeadersRequest) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } @@ -515,8 +515,8 @@ var Retrieval_ServiceDesc = grpc.ServiceDesc{ }, Streams: []grpc.StreamDesc{ { - StreamName: "StreamHeaders", - Handler: _Retrieval_StreamHeaders_Handler, + StreamName: "StreamBlobHeaders", + Handler: _Retrieval_StreamBlobHeaders_Handler, ServerStreams: true, ClientStreams: true, }, diff --git a/api/proto/common/common.proto b/api/proto/common/common.proto index 8253bd86b4..c2dd9d5518 100644 --- a/api/proto/common/common.proto +++ b/api/proto/common/common.proto @@ -9,9 +9,9 @@ message G1Commitment { bytes y = 2; } -///////////////////////////////////////////////////////////////////////////////////////////////// -// Messages for WIP RPCs. These are subject to change, do not consider these to be stable API. // -///////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////// +// Experimental: the following definitions are experimental and subject to change. // +///////////////////////////////////////////////////////////////////////////////////// // A chunk of a blob. message ChunkData { diff --git a/api/proto/disperser/disperser.proto b/api/proto/disperser/disperser.proto index 864c589ecd..536ef182c8 100644 --- a/api/proto/disperser/disperser.proto +++ b/api/proto/disperser/disperser.proto @@ -33,9 +33,9 @@ service Disperser { // for this API to work. rpc RetrieveBlob(RetrieveBlobRequest) returns (RetrieveBlobReply) {} - //////////////////////////////////////////////////////////////////////////////////////////////// - // These RPCs are a work in progress and are not yet fully functional. API may not be stable. // - //////////////////////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + // Experimental: the following RPCs are experimental and subject to change. // + ////////////////////////////////////////////////////////////////////////////// // Retrieves the requested chunk from the Disperser's backend. rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} @@ -258,14 +258,14 @@ message BatchHeader { uint32 reference_block_number = 4; } -///////////////////////////////////////////////////////////////////////////////////////////////// -// Messages for WIP RPCs. These are subject to change, do not consider these to be stable API. // -///////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////// +// Experimental: the following definitions are experimental and subject to change. // +///////////////////////////////////////////////////////////////////////////////////// // Request a specific chunk message GetChunkRequest { // The hash of the blob's header. - bytes header_hash = 1; + bytes blob_header_hash = 1; // The index of the chunk within the blob. uint32 chunk_index = 2; } diff --git a/api/proto/lightnode/lightnode.proto b/api/proto/lightnode/lightnode.proto index 504bc0f9a1..1647a0bd75 100644 --- a/api/proto/lightnode/lightnode.proto +++ b/api/proto/lightnode/lightnode.proto @@ -3,9 +3,9 @@ package lightnode; import "common/common.proto"; option go_package = "github.com/Layr-Labs/eigenda/api/grpc/lightnode"; -/////////////////////////////////////////////////////////////////////////////////// -// Warning: light node APIs are currently in flux. This is not yet a stable API. // -/////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////// +// Experimental: the following definitions are experimental and subject to change. // +///////////////////////////////////////////////////////////////////////////////////// service LightNode { // GetChunk retrieves a specific chunk held by the light node. @@ -35,5 +35,7 @@ message StreamAvailabilityStatusRequest { // A reply to a StreamAvailabilityStatus request. message StreamAvailabilityStatusReply { + // The hash of a blob header corresponding to a chunk the agent received and verified. From the light node's + // perspective, the blob is available if the chunk is available. bytes header_hash = 1; } \ No newline at end of file diff --git a/api/proto/node/node.proto b/api/proto/node/node.proto index 744bd589ac..9b9226445b 100644 --- a/api/proto/node/node.proto +++ b/api/proto/node/node.proto @@ -34,14 +34,14 @@ service Retrieval { // Retrieve node info metadata rpc NodeInfo(NodeInfoRequest) returns (NodeInfoReply) {} - //////////////////////////////////////////////////////////////////////////////////////////////// - // These RPCs are a work in progress and are not yet fully functional. API may not be stable. // - //////////////////////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + // Experimental: the following RPCs are experimental and subject to change. // + ////////////////////////////////////////////////////////////////////////////// // GetChunk retrieves a specific chunk for a blob custodied at the Node. rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} // StreamHeaders requests a stream all new headers. - rpc StreamHeaders(stream StreamHeadersRequest) returns (stream StreamHeadersReply) {} + rpc StreamBlobHeaders(stream StreamBlobHeadersRequest) returns (stream StreamHeadersReply) {} } // Requests and replies @@ -226,9 +226,9 @@ message NodeInfoReply { uint64 mem_bytes = 5; } -///////////////////////////////////////////////////////////////////////////////////////////////// -// Messages for WIP RPCs. These are subject to change, do not consider these to be stable API. // -///////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////// +// Experimental: the following definitions are experimental and subject to change. // +///////////////////////////////////////////////////////////////////////////////////// // Request a specific chunk message GetChunkRequest { @@ -244,8 +244,8 @@ message GetChunkReply { common.ChunkData chunk = 1; } -// Request that all new headers be sent. -message StreamHeadersRequest { +// Request that all new blob headers be sent. +message StreamBlobHeadersRequest { } // Reply to StreamHeadersRequest diff --git a/node/grpc/server.go b/node/grpc/server.go index b6d91bda6f..bb56cdef9b 100644 --- a/node/grpc/server.go +++ b/node/grpc/server.go @@ -160,8 +160,8 @@ func (s *Server) GetChunk(context.Context, *pb.GetChunkRequest) (*pb.GetChunkRep return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") } -func (s *Server) StreamHeaders(pb.Retrieval_StreamHeadersServer) error { - return status.Errorf(codes.Unimplemented, "method StreamHeaders not implemented") +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) { From ad0a710d2a10188ffeb213794589255631d3101e Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Tue, 17 Sep 2024 08:30:32 -0500 Subject: [PATCH 28/31] Moved getChunk to relay Signed-off-by: Cody Littley --- api/grpc/node/node.pb.go | 332 +++++++++----------------------- api/grpc/node/node_grpc.pb.go | 39 ---- api/grpc/relay/relay.pb.go | 237 +++++++++++++++++++++++ api/grpc/relay/relay_grpc.pb.go | 111 +++++++++++ api/proto/node/node.proto | 16 -- api/proto/relay/relay.proto | 30 +++ node/grpc/server.go | 4 - 7 files changed, 469 insertions(+), 300 deletions(-) create mode 100644 api/grpc/relay/relay.pb.go create mode 100644 api/grpc/relay/relay_grpc.pb.go create mode 100644 api/proto/relay/relay.proto diff --git a/api/grpc/node/node.pb.go b/api/grpc/node/node.pb.go index 9b7cf4ea7f..d765284378 100644 --- a/api/grpc/node/node.pb.go +++ b/api/grpc/node/node.pb.go @@ -1262,113 +1262,6 @@ func (x *NodeInfoReply) GetMemBytes() uint64 { 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. - HeaderHash []byte `protobuf:"bytes,1,opt,name=header_hash,json=headerHash,proto3" json:"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_node_node_proto_msgTypes[19] - 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_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 GetChunkRequest.ProtoReflect.Descriptor instead. -func (*GetChunkRequest) Descriptor() ([]byte, []int) { - return file_node_node_proto_rawDescGZIP(), []int{19} -} - -func (x *GetChunkRequest) GetHeaderHash() []byte { - if x != nil { - return x.HeaderHash - } - 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_node_node_proto_msgTypes[20] - 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_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 GetChunkReply.ProtoReflect.Descriptor instead. -func (*GetChunkReply) Descriptor() ([]byte, []int) { - return file_node_node_proto_rawDescGZIP(), []int{20} -} - -func (x *GetChunkReply) GetChunk() *common.ChunkData { - if x != nil { - return x.Chunk - } - return nil -} - // Request that all new blob headers be sent. type StreamBlobHeadersRequest struct { state protoimpl.MessageState @@ -1379,7 +1272,7 @@ type StreamBlobHeadersRequest struct { func (x *StreamBlobHeadersRequest) Reset() { *x = StreamBlobHeadersRequest{} if protoimpl.UnsafeEnabled { - mi := &file_node_node_proto_msgTypes[21] + mi := &file_node_node_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1392,7 +1285,7 @@ func (x *StreamBlobHeadersRequest) String() string { func (*StreamBlobHeadersRequest) ProtoMessage() {} func (x *StreamBlobHeadersRequest) ProtoReflect() protoreflect.Message { - mi := &file_node_node_proto_msgTypes[21] + mi := &file_node_node_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1405,7 +1298,7 @@ func (x *StreamBlobHeadersRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamBlobHeadersRequest.ProtoReflect.Descriptor instead. func (*StreamBlobHeadersRequest) Descriptor() ([]byte, []int) { - return file_node_node_proto_rawDescGZIP(), []int{21} + return file_node_node_proto_rawDescGZIP(), []int{19} } // Reply to StreamHeadersRequest @@ -1425,7 +1318,7 @@ type StreamHeadersReply struct { func (x *StreamHeadersReply) Reset() { *x = StreamHeadersReply{} if protoimpl.UnsafeEnabled { - mi := &file_node_node_proto_msgTypes[22] + mi := &file_node_node_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1438,7 +1331,7 @@ func (x *StreamHeadersReply) String() string { func (*StreamHeadersReply) ProtoMessage() {} func (x *StreamHeadersReply) ProtoReflect() protoreflect.Message { - mi := &file_node_node_proto_msgTypes[22] + mi := &file_node_node_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1451,7 +1344,7 @@ func (x *StreamHeadersReply) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamHeadersReply.ProtoReflect.Descriptor instead. func (*StreamHeadersReply) Descriptor() ([]byte, []int) { - return file_node_node_proto_rawDescGZIP(), []int{22} + return file_node_node_proto_rawDescGZIP(), []int{20} } func (x *StreamHeadersReply) GetBlobHeader() *BlobHeader { @@ -1609,72 +1502,59 @@ 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, 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, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x68, 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, 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, 0xe9, 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, 0x38, - 0x0a, 0x08, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x15, 0x2e, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x13, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, - 0x6b, 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, 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, } var ( @@ -1690,7 +1570,7 @@ 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, 23) +var file_node_node_proto_msgTypes = make([]protoimpl.MessageInfo, 21) var file_node_node_proto_goTypes = []interface{}{ (ChunkEncodingFormat)(0), // 0: node.ChunkEncodingFormat (*StoreChunksRequest)(nil), // 1: node.StoreChunksRequest @@ -1712,55 +1592,49 @@ var file_node_node_proto_goTypes = []interface{}{ (*BatchHeader)(nil), // 17: node.BatchHeader (*NodeInfoRequest)(nil), // 18: node.NodeInfoRequest (*NodeInfoReply)(nil), // 19: node.NodeInfoReply - (*GetChunkRequest)(nil), // 20: node.GetChunkRequest - (*GetChunkReply)(nil), // 21: node.GetChunkReply - (*StreamBlobHeadersRequest)(nil), // 22: node.StreamBlobHeadersRequest - (*StreamHeadersReply)(nil), // 23: node.StreamHeadersReply - (*wrapperspb.BytesValue)(nil), // 24: google.protobuf.BytesValue - (*common.G1Commitment)(nil), // 25: common.G1Commitment - (*common.ChunkData)(nil), // 26: common.ChunkData + (*StreamBlobHeadersRequest)(nil), // 20: node.StreamBlobHeadersRequest + (*StreamHeadersReply)(nil), // 21: node.StreamHeadersReply + (*wrapperspb.BytesValue)(nil), // 22: google.protobuf.BytesValue + (*common.G1Commitment)(nil), // 23: 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 - 24, // 3: node.StoreBlobsReply.signatures:type_name -> google.protobuf.BytesValue + 22, // 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 - 25, // 10: node.BlobHeader.commitment:type_name -> common.G1Commitment + 23, // 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 - 26, // 14: node.GetChunkReply.chunk:type_name -> common.ChunkData - 15, // 15: node.StreamHeadersReply.blob_header:type_name -> node.BlobHeader - 11, // 16: node.StreamHeadersReply.proof:type_name -> node.MerkleProof - 1, // 17: node.Dispersal.StoreChunks:input_type -> node.StoreChunksRequest - 3, // 18: node.Dispersal.StoreBlobs:input_type -> node.StoreBlobsRequest - 5, // 19: node.Dispersal.AttestBatch:input_type -> node.AttestBatchRequest - 18, // 20: node.Dispersal.NodeInfo:input_type -> node.NodeInfoRequest - 7, // 21: node.Retrieval.RetrieveChunks:input_type -> node.RetrieveChunksRequest - 9, // 22: node.Retrieval.GetBlobHeader:input_type -> node.GetBlobHeaderRequest - 18, // 23: node.Retrieval.NodeInfo:input_type -> node.NodeInfoRequest - 20, // 24: node.Retrieval.GetChunk:input_type -> node.GetChunkRequest - 22, // 25: node.Retrieval.StreamBlobHeaders:input_type -> node.StreamBlobHeadersRequest - 2, // 26: node.Dispersal.StoreChunks:output_type -> node.StoreChunksReply - 4, // 27: node.Dispersal.StoreBlobs:output_type -> node.StoreBlobsReply - 6, // 28: node.Dispersal.AttestBatch:output_type -> node.AttestBatchReply - 19, // 29: node.Dispersal.NodeInfo:output_type -> node.NodeInfoReply - 8, // 30: node.Retrieval.RetrieveChunks:output_type -> node.RetrieveChunksReply - 10, // 31: node.Retrieval.GetBlobHeader:output_type -> node.GetBlobHeaderReply - 19, // 32: node.Retrieval.NodeInfo:output_type -> node.NodeInfoReply - 21, // 33: node.Retrieval.GetChunk:output_type -> node.GetChunkReply - 23, // 34: node.Retrieval.StreamBlobHeaders:output_type -> node.StreamHeadersReply - 26, // [26:35] is the sub-list for method output_type - 17, // [17:26] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name + 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 } func init() { file_node_node_proto_init() } @@ -1998,30 +1872,6 @@ func file_node_node_proto_init() { } } file_node_node_proto_msgTypes[19].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_node_node_proto_msgTypes[20].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_node_node_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamBlobHeadersRequest); i { case 0: return &v.state @@ -2033,7 +1883,7 @@ func file_node_node_proto_init() { return nil } } - file_node_node_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_node_node_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamHeadersReply); i { case 0: return &v.state @@ -2052,7 +1902,7 @@ func file_node_node_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_node_node_proto_rawDesc, NumEnums: 1, - NumMessages: 23, + NumMessages: 21, NumExtensions: 0, NumServices: 2, }, diff --git a/api/grpc/node/node_grpc.pb.go b/api/grpc/node/node_grpc.pb.go index 6790973ae4..a30bbbdeff 100644 --- a/api/grpc/node/node_grpc.pb.go +++ b/api/grpc/node/node_grpc.pb.go @@ -247,7 +247,6 @@ const ( Retrieval_RetrieveChunks_FullMethodName = "/node.Retrieval/RetrieveChunks" Retrieval_GetBlobHeader_FullMethodName = "/node.Retrieval/GetBlobHeader" Retrieval_NodeInfo_FullMethodName = "/node.Retrieval/NodeInfo" - Retrieval_GetChunk_FullMethodName = "/node.Retrieval/GetChunk" Retrieval_StreamBlobHeaders_FullMethodName = "/node.Retrieval/StreamBlobHeaders" ) @@ -261,8 +260,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) - // GetChunk retrieves a specific chunk for a blob custodied at the Node. - GetChunk(ctx context.Context, in *GetChunkRequest, opts ...grpc.CallOption) (*GetChunkReply, error) // StreamHeaders requests a stream all new headers. StreamBlobHeaders(ctx context.Context, opts ...grpc.CallOption) (Retrieval_StreamBlobHeadersClient, error) } @@ -302,15 +299,6 @@ func (c *retrievalClient) NodeInfo(ctx context.Context, in *NodeInfoRequest, opt return out, nil } -func (c *retrievalClient) GetChunk(ctx context.Context, in *GetChunkRequest, opts ...grpc.CallOption) (*GetChunkReply, error) { - out := new(GetChunkReply) - err := c.cc.Invoke(ctx, Retrieval_GetChunk_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - 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 { @@ -352,8 +340,6 @@ type RetrievalServer interface { GetBlobHeader(context.Context, *GetBlobHeaderRequest) (*GetBlobHeaderReply, error) // Retrieve node info metadata NodeInfo(context.Context, *NodeInfoRequest) (*NodeInfoReply, error) - // GetChunk retrieves a specific chunk for a blob custodied at the Node. - GetChunk(context.Context, *GetChunkRequest) (*GetChunkReply, error) // StreamHeaders requests a stream all new headers. StreamBlobHeaders(Retrieval_StreamBlobHeadersServer) error mustEmbedUnimplementedRetrievalServer() @@ -372,9 +358,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) GetChunk(context.Context, *GetChunkRequest) (*GetChunkReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") -} func (UnimplementedRetrievalServer) StreamBlobHeaders(Retrieval_StreamBlobHeadersServer) error { return status.Errorf(codes.Unimplemented, "method StreamBlobHeaders not implemented") } @@ -445,24 +428,6 @@ func _Retrieval_NodeInfo_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -func _Retrieval_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.(RetrievalServer).GetChunk(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Retrieval_GetChunk_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RetrievalServer).GetChunk(ctx, req.(*GetChunkRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Retrieval_StreamBlobHeaders_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(RetrievalServer).StreamBlobHeaders(&retrievalStreamBlobHeadersServer{stream}) } @@ -508,10 +473,6 @@ var Retrieval_ServiceDesc = grpc.ServiceDesc{ MethodName: "NodeInfo", Handler: _Retrieval_NodeInfo_Handler, }, - { - MethodName: "GetChunk", - Handler: _Retrieval_GetChunk_Handler, - }, }, Streams: []grpc.StreamDesc{ { diff --git a/api/grpc/relay/relay.pb.go b/api/grpc/relay/relay.pb.go new file mode 100644 index 0000000000..1d6b078c9b --- /dev/null +++ b/api/grpc/relay/relay.pb.go @@ -0,0 +1,237 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v4.23.4 +// source: relay/relay.proto + +package relay + +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" +) + +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) +) + +// Request a specific chunk +type GetChunkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The hash of the blob's header. + HeaderHash []byte `protobuf:"bytes,1,opt,name=header_hash,json=headerHash,proto3" json:"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_relay_relay_proto_msgTypes[0] + 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_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 GetChunkRequest.ProtoReflect.Descriptor instead. +func (*GetChunkRequest) Descriptor() ([]byte, []int) { + return file_relay_relay_proto_rawDescGZIP(), []int{0} +} + +func (x *GetChunkRequest) GetHeaderHash() []byte { + if x != nil { + return x.HeaderHash + } + 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_relay_relay_proto_msgTypes[1] + 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_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 GetChunkReply.ProtoReflect.Descriptor instead. +func (*GetChunkReply) Descriptor() ([]byte, []int) { + return file_relay_relay_proto_rawDescGZIP(), []int{1} +} + +func (x *GetChunkReply) GetChunk() *common.ChunkData { + if x != nil { + return x.Chunk + } + return nil +} + +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, + 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, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x68, 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, 0x32, 0x41, 0x0a, + 0x05, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x38, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, + 0x6e, 0x6b, 0x12, 0x15, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, + 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 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 ( + file_relay_relay_proto_rawDescOnce sync.Once + file_relay_relay_proto_rawDescData = file_relay_relay_proto_rawDesc +) + +func file_relay_relay_proto_rawDescGZIP() []byte { + file_relay_relay_proto_rawDescOnce.Do(func() { + file_relay_relay_proto_rawDescData = protoimpl.X.CompressGZIP(file_relay_relay_proto_rawDescData) + }) + return file_relay_relay_proto_rawDescData +} + +var file_relay_relay_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_relay_relay_proto_goTypes = []interface{}{ + (*GetChunkRequest)(nil), // 0: node.GetChunkRequest + (*GetChunkReply)(nil), // 1: node.GetChunkReply + (*common.ChunkData)(nil), // 2: common.ChunkData +} +var file_relay_relay_proto_depIdxs = []int32{ + 2, // 0: node.GetChunkReply.chunk:type_name -> common.ChunkData + 0, // 1: node.Relay.GetChunk:input_type -> node.GetChunkRequest + 1, // 2: node.Relay.GetChunk:output_type -> node.GetChunkReply + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_relay_relay_proto_init() } +func file_relay_relay_proto_init() { + if File_relay_relay_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_relay_relay_proto_msgTypes[0].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_relay_relay_proto_msgTypes[1].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 + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_relay_relay_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_relay_relay_proto_goTypes, + DependencyIndexes: file_relay_relay_proto_depIdxs, + MessageInfos: file_relay_relay_proto_msgTypes, + }.Build() + File_relay_relay_proto = out.File + file_relay_relay_proto_rawDesc = nil + file_relay_relay_proto_goTypes = nil + file_relay_relay_proto_depIdxs = nil +} diff --git a/api/grpc/relay/relay_grpc.pb.go b/api/grpc/relay/relay_grpc.pb.go new file mode 100644 index 0000000000..07bfc09d3b --- /dev/null +++ b/api/grpc/relay/relay_grpc.pb.go @@ -0,0 +1,111 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.23.4 +// source: relay/relay.proto + +package relay + +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 ( + Relay_GetChunk_FullMethodName = "/node.Relay/GetChunk" +) + +// RelayClient is the client API for Relay 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 RelayClient interface { + // GetChunk retrieves a specific chunk for a blob custodied at the Node. + GetChunk(ctx context.Context, in *GetChunkRequest, opts ...grpc.CallOption) (*GetChunkReply, error) +} + +type relayClient struct { + cc grpc.ClientConnInterface +} + +func NewRelayClient(cc grpc.ClientConnInterface) RelayClient { + return &relayClient{cc} +} + +func (c *relayClient) GetChunk(ctx context.Context, in *GetChunkRequest, opts ...grpc.CallOption) (*GetChunkReply, error) { + out := new(GetChunkReply) + err := c.cc.Invoke(ctx, Relay_GetChunk_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RelayServer is the server API for Relay service. +// All implementations must embed UnimplementedRelayServer +// for forward compatibility +type RelayServer interface { + // GetChunk retrieves a specific chunk for a blob custodied at the Node. + GetChunk(context.Context, *GetChunkRequest) (*GetChunkReply, error) + mustEmbedUnimplementedRelayServer() +} + +// UnimplementedRelayServer must be embedded to have forward compatible implementations. +type UnimplementedRelayServer struct { +} + +func (UnimplementedRelayServer) GetChunk(context.Context, *GetChunkRequest) (*GetChunkReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") +} +func (UnimplementedRelayServer) mustEmbedUnimplementedRelayServer() {} + +// UnsafeRelayServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RelayServer will +// result in compilation errors. +type UnsafeRelayServer interface { + mustEmbedUnimplementedRelayServer() +} + +func RegisterRelayServer(s grpc.ServiceRegistrar, srv RelayServer) { + s.RegisterService(&Relay_ServiceDesc, srv) +} + +func _Relay_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.(RelayServer).GetChunk(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Relay_GetChunk_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RelayServer).GetChunk(ctx, req.(*GetChunkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Relay_ServiceDesc is the grpc.ServiceDesc for Relay service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Relay_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "node.Relay", + HandlerType: (*RelayServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetChunk", + Handler: _Relay_GetChunk_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "relay/relay.proto", +} diff --git a/api/proto/node/node.proto b/api/proto/node/node.proto index 9b9226445b..b9fb54144f 100644 --- a/api/proto/node/node.proto +++ b/api/proto/node/node.proto @@ -38,8 +38,6 @@ service Retrieval { // Experimental: the following RPCs are experimental and subject to change. // ////////////////////////////////////////////////////////////////////////////// - // GetChunk retrieves a specific chunk for a blob custodied at the Node. - rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} // StreamHeaders requests a stream all new headers. rpc StreamBlobHeaders(stream StreamBlobHeadersRequest) returns (stream StreamHeadersReply) {} } @@ -230,20 +228,6 @@ message NodeInfoReply { // Experimental: the following definitions are experimental and subject to change. // ///////////////////////////////////////////////////////////////////////////////////// -// Request a specific chunk -message GetChunkRequest { - // The hash of the blob's header. - bytes 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; -} - // Request that all new blob headers be sent. message StreamBlobHeadersRequest { } diff --git a/api/proto/relay/relay.proto b/api/proto/relay/relay.proto new file mode 100644 index 0000000000..de5c429e0c --- /dev/null +++ b/api/proto/relay/relay.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +package node; +import "google/protobuf/wrappers.proto"; +import "common/common.proto"; +option go_package = "github.com/Layr-Labs/eigenda/api/grpc/relay"; + +///////////////////////////////////////////////////////////////////////////////////// +// Experimental: the following definitions are experimental and subject to change. // +///////////////////////////////////////////////////////////////////////////////////// + +service Relay { + // Note: the relay API is still being fleshed out. This definition is not yet complete. + + // GetChunk retrieves a specific chunk for a blob custodied at the Node. + rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} +} + +// Request a specific chunk +message GetChunkRequest { + // The hash of the blob's header. + bytes 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/node/grpc/server.go b/node/grpc/server.go index bb56cdef9b..7c262fa57e 100644 --- a/node/grpc/server.go +++ b/node/grpc/server.go @@ -156,10 +156,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) GetChunk(context.Context, *pb.GetChunkRequest) (*pb.GetChunkReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") -} - func (s *Server) StreamBlobHeaders(pb.Retrieval_StreamBlobHeadersServer) error { return status.Errorf(codes.Unimplemented, "method StreamBlobHeaders not implemented") } From 9f4442127f0b104ea68e64b8bd80e66285c2459a Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Tue, 17 Sep 2024 08:36:53 -0500 Subject: [PATCH 29/31] Made suggested change. Signed-off-by: Cody Littley --- api/grpc/lightnode/lightnode.pb.go | 107 ++++++++++++------------ api/grpc/lightnode/lightnode_grpc.pb.go | 46 +++++----- api/proto/lightnode/lightnode.proto | 6 +- 3 files changed, 79 insertions(+), 80 deletions(-) diff --git a/api/grpc/lightnode/lightnode.pb.go b/api/grpc/lightnode/lightnode.pb.go index e54cbb6f54..b28033a3c8 100644 --- a/api/grpc/lightnode/lightnode.pb.go +++ b/api/grpc/lightnode/lightnode.pb.go @@ -120,7 +120,7 @@ func (x *GetChunkReply) GetChunk() *common.ChunkData { // A request from a DA node to an agent light node to stream the availability status of all chunks // assigned to the light node. -type StreamAvailabilityStatusRequest struct { +type StreamChunkAvailabilityRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -128,8 +128,8 @@ type StreamAvailabilityStatusRequest struct { AuthenticationToken []byte `protobuf:"bytes,1,opt,name=authentication_token,json=authenticationToken,proto3" json:"authentication_token,omitempty"` } -func (x *StreamAvailabilityStatusRequest) Reset() { - *x = StreamAvailabilityStatusRequest{} +func (x *StreamChunkAvailabilityRequest) Reset() { + *x = StreamChunkAvailabilityRequest{} if protoimpl.UnsafeEnabled { mi := &file_lightnode_lightnode_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -137,13 +137,13 @@ func (x *StreamAvailabilityStatusRequest) Reset() { } } -func (x *StreamAvailabilityStatusRequest) String() string { +func (x *StreamChunkAvailabilityRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StreamAvailabilityStatusRequest) ProtoMessage() {} +func (*StreamChunkAvailabilityRequest) ProtoMessage() {} -func (x *StreamAvailabilityStatusRequest) ProtoReflect() protoreflect.Message { +func (x *StreamChunkAvailabilityRequest) ProtoReflect() protoreflect.Message { mi := &file_lightnode_lightnode_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -155,12 +155,12 @@ func (x *StreamAvailabilityStatusRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StreamAvailabilityStatusRequest.ProtoReflect.Descriptor instead. -func (*StreamAvailabilityStatusRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use StreamChunkAvailabilityRequest.ProtoReflect.Descriptor instead. +func (*StreamChunkAvailabilityRequest) Descriptor() ([]byte, []int) { return file_lightnode_lightnode_proto_rawDescGZIP(), []int{2} } -func (x *StreamAvailabilityStatusRequest) GetAuthenticationToken() []byte { +func (x *StreamChunkAvailabilityRequest) GetAuthenticationToken() []byte { if x != nil { return x.AuthenticationToken } @@ -168,7 +168,7 @@ func (x *StreamAvailabilityStatusRequest) GetAuthenticationToken() []byte { } // A reply to a StreamAvailabilityStatus request. -type StreamAvailabilityStatusReply struct { +type StreamChunkAvailabilityReply struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -178,8 +178,8 @@ type StreamAvailabilityStatusReply struct { HeaderHash []byte `protobuf:"bytes,1,opt,name=header_hash,json=headerHash,proto3" json:"header_hash,omitempty"` } -func (x *StreamAvailabilityStatusReply) Reset() { - *x = StreamAvailabilityStatusReply{} +func (x *StreamChunkAvailabilityReply) Reset() { + *x = StreamChunkAvailabilityReply{} if protoimpl.UnsafeEnabled { mi := &file_lightnode_lightnode_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -187,13 +187,13 @@ func (x *StreamAvailabilityStatusReply) Reset() { } } -func (x *StreamAvailabilityStatusReply) String() string { +func (x *StreamChunkAvailabilityReply) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StreamAvailabilityStatusReply) ProtoMessage() {} +func (*StreamChunkAvailabilityReply) ProtoMessage() {} -func (x *StreamAvailabilityStatusReply) ProtoReflect() protoreflect.Message { +func (x *StreamChunkAvailabilityReply) ProtoReflect() protoreflect.Message { mi := &file_lightnode_lightnode_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -205,12 +205,12 @@ func (x *StreamAvailabilityStatusReply) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StreamAvailabilityStatusReply.ProtoReflect.Descriptor instead. -func (*StreamAvailabilityStatusReply) Descriptor() ([]byte, []int) { +// Deprecated: Use StreamChunkAvailabilityReply.ProtoReflect.Descriptor instead. +func (*StreamChunkAvailabilityReply) Descriptor() ([]byte, []int) { return file_lightnode_lightnode_proto_rawDescGZIP(), []int{3} } -func (x *StreamAvailabilityStatusReply) GetHeaderHash() []byte { +func (x *StreamChunkAvailabilityReply) GetHeaderHash() []byte { if x != nil { return x.HeaderHash } @@ -230,33 +230,32 @@ var file_lightnode_lightnode_proto_rawDesc = []byte{ 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, 0x22, 0x54, 0x0a, 0x1f, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 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, - 0x40, 0x0a, 0x1d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xc5, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, - 0x42, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x1a, 0x2e, 0x6c, 0x69, - 0x67, 0x68, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x22, 0x00, 0x12, 0x74, 0x0a, 0x18, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x76, 0x61, - 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x2a, 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6c, 0x69, - 0x67, 0x68, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x76, - 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 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, + 0x74, 0x61, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 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, 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, + 0xc2, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x42, 0x0a, + 0x08, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x1a, 0x2e, 0x6c, 0x69, 0x67, 0x68, + 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, + 0x00, 0x12, 0x71, 0x0a, 0x17, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x68, 0x75, 0x6e, 0x6b, + 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, 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 ( @@ -273,18 +272,18 @@ func file_lightnode_lightnode_proto_rawDescGZIP() []byte { var file_lightnode_lightnode_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_lightnode_lightnode_proto_goTypes = []interface{}{ - (*GetChunkRequest)(nil), // 0: lightnode.GetChunkRequest - (*GetChunkReply)(nil), // 1: lightnode.GetChunkReply - (*StreamAvailabilityStatusRequest)(nil), // 2: lightnode.StreamAvailabilityStatusRequest - (*StreamAvailabilityStatusReply)(nil), // 3: lightnode.StreamAvailabilityStatusReply - (*common.ChunkData)(nil), // 4: common.ChunkData + (*GetChunkRequest)(nil), // 0: lightnode.GetChunkRequest + (*GetChunkReply)(nil), // 1: lightnode.GetChunkReply + (*StreamChunkAvailabilityRequest)(nil), // 2: lightnode.StreamChunkAvailabilityRequest + (*StreamChunkAvailabilityReply)(nil), // 3: lightnode.StreamChunkAvailabilityReply + (*common.ChunkData)(nil), // 4: common.ChunkData } var file_lightnode_lightnode_proto_depIdxs = []int32{ 4, // 0: lightnode.GetChunkReply.chunk:type_name -> common.ChunkData 0, // 1: lightnode.LightNode.GetChunk:input_type -> lightnode.GetChunkRequest - 2, // 2: lightnode.LightNode.StreamAvailabilityStatus:input_type -> lightnode.StreamAvailabilityStatusRequest + 2, // 2: lightnode.LightNode.StreamChunkAvailability:input_type -> lightnode.StreamChunkAvailabilityRequest 1, // 3: lightnode.LightNode.GetChunk:output_type -> lightnode.GetChunkReply - 3, // 4: lightnode.LightNode.StreamAvailabilityStatus:output_type -> lightnode.StreamAvailabilityStatusReply + 3, // 4: lightnode.LightNode.StreamChunkAvailability:output_type -> lightnode.StreamChunkAvailabilityReply 3, // [3:5] is the sub-list for method output_type 1, // [1:3] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -323,7 +322,7 @@ func file_lightnode_lightnode_proto_init() { } } file_lightnode_lightnode_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamAvailabilityStatusRequest); i { + switch v := v.(*StreamChunkAvailabilityRequest); i { case 0: return &v.state case 1: @@ -335,7 +334,7 @@ func file_lightnode_lightnode_proto_init() { } } file_lightnode_lightnode_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamAvailabilityStatusReply); i { + switch v := v.(*StreamChunkAvailabilityReply); i { case 0: return &v.state case 1: diff --git a/api/grpc/lightnode/lightnode_grpc.pb.go b/api/grpc/lightnode/lightnode_grpc.pb.go index 2da1ae0870..559e04a2b3 100644 --- a/api/grpc/lightnode/lightnode_grpc.pb.go +++ b/api/grpc/lightnode/lightnode_grpc.pb.go @@ -19,8 +19,8 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - LightNode_GetChunk_FullMethodName = "/lightnode.LightNode/GetChunk" - LightNode_StreamAvailabilityStatus_FullMethodName = "/lightnode.LightNode/StreamAvailabilityStatus" + LightNode_GetChunk_FullMethodName = "/lightnode.LightNode/GetChunk" + LightNode_StreamChunkAvailability_FullMethodName = "/lightnode.LightNode/StreamChunkAvailability" ) // LightNodeClient is the client API for LightNode service. @@ -31,7 +31,7 @@ type LightNodeClient interface { GetChunk(ctx context.Context, in *GetChunkRequest, opts ...grpc.CallOption) (*GetChunkReply, error) // StreamAvailabilityStatus streams the availability status of all chunks assigned to the light node. // For use by a DA node for monitoring the availability of chunks through its constellation of agent light nodes. - StreamAvailabilityStatus(ctx context.Context, in *StreamAvailabilityStatusRequest, opts ...grpc.CallOption) (LightNode_StreamAvailabilityStatusClient, error) + StreamChunkAvailability(ctx context.Context, in *StreamChunkAvailabilityRequest, opts ...grpc.CallOption) (LightNode_StreamChunkAvailabilityClient, error) } type lightNodeClient struct { @@ -51,12 +51,12 @@ func (c *lightNodeClient) GetChunk(ctx context.Context, in *GetChunkRequest, opt return out, nil } -func (c *lightNodeClient) StreamAvailabilityStatus(ctx context.Context, in *StreamAvailabilityStatusRequest, opts ...grpc.CallOption) (LightNode_StreamAvailabilityStatusClient, error) { - stream, err := c.cc.NewStream(ctx, &LightNode_ServiceDesc.Streams[0], LightNode_StreamAvailabilityStatus_FullMethodName, opts...) +func (c *lightNodeClient) StreamChunkAvailability(ctx context.Context, in *StreamChunkAvailabilityRequest, opts ...grpc.CallOption) (LightNode_StreamChunkAvailabilityClient, error) { + stream, err := c.cc.NewStream(ctx, &LightNode_ServiceDesc.Streams[0], LightNode_StreamChunkAvailability_FullMethodName, opts...) if err != nil { return nil, err } - x := &lightNodeStreamAvailabilityStatusClient{stream} + x := &lightNodeStreamChunkAvailabilityClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -66,17 +66,17 @@ func (c *lightNodeClient) StreamAvailabilityStatus(ctx context.Context, in *Stre return x, nil } -type LightNode_StreamAvailabilityStatusClient interface { - Recv() (*StreamAvailabilityStatusReply, error) +type LightNode_StreamChunkAvailabilityClient interface { + Recv() (*StreamChunkAvailabilityReply, error) grpc.ClientStream } -type lightNodeStreamAvailabilityStatusClient struct { +type lightNodeStreamChunkAvailabilityClient struct { grpc.ClientStream } -func (x *lightNodeStreamAvailabilityStatusClient) Recv() (*StreamAvailabilityStatusReply, error) { - m := new(StreamAvailabilityStatusReply) +func (x *lightNodeStreamChunkAvailabilityClient) Recv() (*StreamChunkAvailabilityReply, error) { + m := new(StreamChunkAvailabilityReply) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } @@ -91,7 +91,7 @@ type LightNodeServer interface { GetChunk(context.Context, *GetChunkRequest) (*GetChunkReply, error) // StreamAvailabilityStatus streams the availability status of all chunks assigned to the light node. // For use by a DA node for monitoring the availability of chunks through its constellation of agent light nodes. - StreamAvailabilityStatus(*StreamAvailabilityStatusRequest, LightNode_StreamAvailabilityStatusServer) error + StreamChunkAvailability(*StreamChunkAvailabilityRequest, LightNode_StreamChunkAvailabilityServer) error mustEmbedUnimplementedLightNodeServer() } @@ -102,8 +102,8 @@ type UnimplementedLightNodeServer struct { func (UnimplementedLightNodeServer) GetChunk(context.Context, *GetChunkRequest) (*GetChunkReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") } -func (UnimplementedLightNodeServer) StreamAvailabilityStatus(*StreamAvailabilityStatusRequest, LightNode_StreamAvailabilityStatusServer) error { - return status.Errorf(codes.Unimplemented, "method StreamAvailabilityStatus not implemented") +func (UnimplementedLightNodeServer) StreamChunkAvailability(*StreamChunkAvailabilityRequest, LightNode_StreamChunkAvailabilityServer) error { + return status.Errorf(codes.Unimplemented, "method StreamChunkAvailability not implemented") } func (UnimplementedLightNodeServer) mustEmbedUnimplementedLightNodeServer() {} @@ -136,24 +136,24 @@ func _LightNode_GetChunk_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -func _LightNode_StreamAvailabilityStatus_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(StreamAvailabilityStatusRequest) +func _LightNode_StreamChunkAvailability_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamChunkAvailabilityRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(LightNodeServer).StreamAvailabilityStatus(m, &lightNodeStreamAvailabilityStatusServer{stream}) + return srv.(LightNodeServer).StreamChunkAvailability(m, &lightNodeStreamChunkAvailabilityServer{stream}) } -type LightNode_StreamAvailabilityStatusServer interface { - Send(*StreamAvailabilityStatusReply) error +type LightNode_StreamChunkAvailabilityServer interface { + Send(*StreamChunkAvailabilityReply) error grpc.ServerStream } -type lightNodeStreamAvailabilityStatusServer struct { +type lightNodeStreamChunkAvailabilityServer struct { grpc.ServerStream } -func (x *lightNodeStreamAvailabilityStatusServer) Send(m *StreamAvailabilityStatusReply) error { +func (x *lightNodeStreamChunkAvailabilityServer) Send(m *StreamChunkAvailabilityReply) error { return x.ServerStream.SendMsg(m) } @@ -171,8 +171,8 @@ var LightNode_ServiceDesc = grpc.ServiceDesc{ }, Streams: []grpc.StreamDesc{ { - StreamName: "StreamAvailabilityStatus", - Handler: _LightNode_StreamAvailabilityStatus_Handler, + StreamName: "StreamChunkAvailability", + Handler: _LightNode_StreamChunkAvailability_Handler, ServerStreams: true, }, }, diff --git a/api/proto/lightnode/lightnode.proto b/api/proto/lightnode/lightnode.proto index 1647a0bd75..16eae36a84 100644 --- a/api/proto/lightnode/lightnode.proto +++ b/api/proto/lightnode/lightnode.proto @@ -13,7 +13,7 @@ service LightNode { // StreamAvailabilityStatus streams the availability status of all chunks assigned to the light node. // For use by a DA node for monitoring the availability of chunks through its constellation of agent light nodes. - rpc StreamAvailabilityStatus(StreamAvailabilityStatusRequest) returns (stream StreamAvailabilityStatusReply) {} + rpc StreamChunkAvailability(StreamChunkAvailabilityRequest) returns (stream StreamChunkAvailabilityReply) {} } // A request for a specific chunk from a light node. @@ -29,12 +29,12 @@ message GetChunkReply { // A request from a DA node to an agent light node to stream the availability status of all chunks // assigned to the light node. -message StreamAvailabilityStatusRequest { +message StreamChunkAvailabilityRequest { bytes authentication_token = 1; } // A reply to a StreamAvailabilityStatus request. -message StreamAvailabilityStatusReply { +message StreamChunkAvailabilityReply { // The hash of a blob header corresponding to a chunk the agent received and verified. From the light node's // perspective, the blob is available if the chunk is available. bytes header_hash = 1; From 9ac39654c00e8f363104c5f0a48ed7b1cc7b8a0e Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Wed, 18 Sep 2024 08:02:00 -0500 Subject: [PATCH 30/31] Made suggested change, removed RPC that won't be used in v1 Signed-off-by: Cody Littley --- api/proto/lightnode/lightnode.proto | 24 ++++++------------------ api/proto/relay/relay.proto | 18 +++++++++--------- 2 files changed, 15 insertions(+), 27 deletions(-) diff --git a/api/proto/lightnode/lightnode.proto b/api/proto/lightnode/lightnode.proto index 16eae36a84..90b0527212 100644 --- a/api/proto/lightnode/lightnode.proto +++ b/api/proto/lightnode/lightnode.proto @@ -8,23 +8,11 @@ option go_package = "github.com/Layr-Labs/eigenda/api/grpc/lightnode"; ///////////////////////////////////////////////////////////////////////////////////// service LightNode { - // GetChunk retrieves a specific chunk held by the light node. - rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} - - // StreamAvailabilityStatus streams the availability status of all chunks assigned to the light node. - // For use by a DA node for monitoring the availability of chunks through its constellation of agent light nodes. - rpc StreamChunkAvailability(StreamChunkAvailabilityRequest) returns (stream StreamChunkAvailabilityReply) {} -} - -// A request for a specific chunk from a light node. -message GetChunkRequest { - bytes header_hash = 1; -} - -// A reply to a GetChunk request. -message GetChunkReply { - // The chunk data. - common.ChunkData chunk = 1; + // StreamBlobAvailability streams the availability status blobs from the light node's perspective. + // A light node considers a blob to be available if all chunks it wants to sample are available. + // This API is for use by a DA node for monitoring the availability of chunks through its + // constellation of agent light nodes. + rpc StreamBlobAvailability(StreamChunkAvailabilityRequest) returns (stream StreamChunkAvailabilityReply) {} } // A request from a DA node to an agent light node to stream the availability status of all chunks @@ -36,6 +24,6 @@ message StreamChunkAvailabilityRequest { // A reply to a StreamAvailabilityStatus request. message StreamChunkAvailabilityReply { // The hash of a blob header corresponding to a chunk the agent received and verified. From the light node's - // perspective, the blob is available if the chunk is available. + // perspective, the blob is available if all chunks the light node wants to sample are available. bytes header_hash = 1; } \ No newline at end of file diff --git a/api/proto/relay/relay.proto b/api/proto/relay/relay.proto index de5c429e0c..d92f605761 100644 --- a/api/proto/relay/relay.proto +++ b/api/proto/relay/relay.proto @@ -9,22 +9,22 @@ option go_package = "github.com/Layr-Labs/eigenda/api/grpc/relay"; ///////////////////////////////////////////////////////////////////////////////////// service Relay { - // Note: the relay API is still being fleshed out. This definition is not yet complete. + // Note: the relay API is still being fleshed out. This definition is not yet complete. - // GetChunk retrieves a specific chunk for a blob custodied at the Node. - rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} + // GetChunk retrieves a specific chunk for a blob custodied at the Node. + rpc GetChunk(GetChunkRequest) returns (GetChunkReply) {} } // Request a specific chunk message GetChunkRequest { - // The hash of the blob's header. - bytes header_hash = 1; - // The index of the chunk within the blob. - uint32 chunk_index = 2; + // The hash of the blob's header. + bytes 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; + // The chunk requested. + common.ChunkData chunk = 1; } \ No newline at end of file From 4be81a39751042ca1acbed603bee1283b072c8a1 Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Wed, 18 Sep 2024 08:03:03 -0500 Subject: [PATCH 31/31] Compile protobufs. Signed-off-by: Cody Littley --- api/grpc/lightnode/lightnode.pb.go | 220 +++++------------------- api/grpc/lightnode/lightnode_grpc.pb.go | 90 +++------- 2 files changed, 68 insertions(+), 242 deletions(-) diff --git a/api/grpc/lightnode/lightnode.pb.go b/api/grpc/lightnode/lightnode.pb.go index b28033a3c8..f820a8916d 100644 --- a/api/grpc/lightnode/lightnode.pb.go +++ b/api/grpc/lightnode/lightnode.pb.go @@ -7,7 +7,7 @@ package lightnode import ( - common "github.com/Layr-Labs/eigenda/api/grpc/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" @@ -21,103 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// A request for a specific chunk from a light node. -type GetChunkRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HeaderHash []byte `protobuf:"bytes,1,opt,name=header_hash,json=headerHash,proto3" json:"header_hash,omitempty"` -} - -func (x *GetChunkRequest) Reset() { - *x = GetChunkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_lightnode_lightnode_proto_msgTypes[0] - 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_lightnode_lightnode_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 GetChunkRequest.ProtoReflect.Descriptor instead. -func (*GetChunkRequest) Descriptor() ([]byte, []int) { - return file_lightnode_lightnode_proto_rawDescGZIP(), []int{0} -} - -func (x *GetChunkRequest) GetHeaderHash() []byte { - if x != nil { - return x.HeaderHash - } - return nil -} - -// A reply to a GetChunk request. -type GetChunkReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The chunk data. - Chunk *common.ChunkData `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` -} - -func (x *GetChunkReply) Reset() { - *x = GetChunkReply{} - if protoimpl.UnsafeEnabled { - mi := &file_lightnode_lightnode_proto_msgTypes[1] - 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_lightnode_lightnode_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 GetChunkReply.ProtoReflect.Descriptor instead. -func (*GetChunkReply) Descriptor() ([]byte, []int) { - return file_lightnode_lightnode_proto_rawDescGZIP(), []int{1} -} - -func (x *GetChunkReply) GetChunk() *common.ChunkData { - if x != nil { - return x.Chunk - } - return nil -} - // A request from a DA node to an agent light node to stream the availability status of all chunks // assigned to the light node. type StreamChunkAvailabilityRequest struct { @@ -131,7 +34,7 @@ type StreamChunkAvailabilityRequest struct { func (x *StreamChunkAvailabilityRequest) Reset() { *x = StreamChunkAvailabilityRequest{} if protoimpl.UnsafeEnabled { - mi := &file_lightnode_lightnode_proto_msgTypes[2] + mi := &file_lightnode_lightnode_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -144,7 +47,7 @@ func (x *StreamChunkAvailabilityRequest) String() string { func (*StreamChunkAvailabilityRequest) ProtoMessage() {} func (x *StreamChunkAvailabilityRequest) ProtoReflect() protoreflect.Message { - mi := &file_lightnode_lightnode_proto_msgTypes[2] + mi := &file_lightnode_lightnode_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -157,7 +60,7 @@ func (x *StreamChunkAvailabilityRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamChunkAvailabilityRequest.ProtoReflect.Descriptor instead. func (*StreamChunkAvailabilityRequest) Descriptor() ([]byte, []int) { - return file_lightnode_lightnode_proto_rawDescGZIP(), []int{2} + return file_lightnode_lightnode_proto_rawDescGZIP(), []int{0} } func (x *StreamChunkAvailabilityRequest) GetAuthenticationToken() []byte { @@ -174,14 +77,14 @@ type StreamChunkAvailabilityReply struct { unknownFields protoimpl.UnknownFields // The hash of a blob header corresponding to a chunk the agent received and verified. From the light node's - // perspective, the blob is available if the chunk is available. + // perspective, the blob is available if all chunks the light node wants to sample are available. HeaderHash []byte `protobuf:"bytes,1,opt,name=header_hash,json=headerHash,proto3" json:"header_hash,omitempty"` } func (x *StreamChunkAvailabilityReply) Reset() { *x = StreamChunkAvailabilityReply{} if protoimpl.UnsafeEnabled { - mi := &file_lightnode_lightnode_proto_msgTypes[3] + mi := &file_lightnode_lightnode_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -194,7 +97,7 @@ func (x *StreamChunkAvailabilityReply) String() string { func (*StreamChunkAvailabilityReply) ProtoMessage() {} func (x *StreamChunkAvailabilityReply) ProtoReflect() protoreflect.Message { - mi := &file_lightnode_lightnode_proto_msgTypes[3] + mi := &file_lightnode_lightnode_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -207,7 +110,7 @@ func (x *StreamChunkAvailabilityReply) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamChunkAvailabilityReply.ProtoReflect.Descriptor instead. func (*StreamChunkAvailabilityReply) Descriptor() ([]byte, []int) { - return file_lightnode_lightnode_proto_rawDescGZIP(), []int{3} + return file_lightnode_lightnode_proto_rawDescGZIP(), []int{1} } func (x *StreamChunkAvailabilityReply) GetHeaderHash() []byte { @@ -223,39 +126,28 @@ 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, 0x32, 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, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 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, 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, 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, - 0xc2, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x42, 0x0a, - 0x08, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x1a, 0x2e, 0x6c, 0x69, 0x67, 0x68, - 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, - 0x00, 0x12, 0x71, 0x0a, 0x17, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x68, 0x75, 0x6e, 0x6b, - 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, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x41, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 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, 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, + 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, + 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 ( @@ -270,25 +162,19 @@ func file_lightnode_lightnode_proto_rawDescGZIP() []byte { return file_lightnode_lightnode_proto_rawDescData } -var file_lightnode_lightnode_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_lightnode_lightnode_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_lightnode_lightnode_proto_goTypes = []interface{}{ - (*GetChunkRequest)(nil), // 0: lightnode.GetChunkRequest - (*GetChunkReply)(nil), // 1: lightnode.GetChunkReply - (*StreamChunkAvailabilityRequest)(nil), // 2: lightnode.StreamChunkAvailabilityRequest - (*StreamChunkAvailabilityReply)(nil), // 3: lightnode.StreamChunkAvailabilityReply - (*common.ChunkData)(nil), // 4: common.ChunkData + (*StreamChunkAvailabilityRequest)(nil), // 0: lightnode.StreamChunkAvailabilityRequest + (*StreamChunkAvailabilityReply)(nil), // 1: lightnode.StreamChunkAvailabilityReply } var file_lightnode_lightnode_proto_depIdxs = []int32{ - 4, // 0: lightnode.GetChunkReply.chunk:type_name -> common.ChunkData - 0, // 1: lightnode.LightNode.GetChunk:input_type -> lightnode.GetChunkRequest - 2, // 2: lightnode.LightNode.StreamChunkAvailability:input_type -> lightnode.StreamChunkAvailabilityRequest - 1, // 3: lightnode.LightNode.GetChunk:output_type -> lightnode.GetChunkReply - 3, // 4: lightnode.LightNode.StreamChunkAvailability:output_type -> lightnode.StreamChunkAvailabilityReply - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 0, // 0: lightnode.LightNode.StreamBlobAvailability:input_type -> lightnode.StreamChunkAvailabilityRequest + 1, // 1: lightnode.LightNode.StreamBlobAvailability:output_type -> lightnode.StreamChunkAvailabilityReply + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } func init() { file_lightnode_lightnode_proto_init() } @@ -298,30 +184,6 @@ func file_lightnode_lightnode_proto_init() { } if !protoimpl.UnsafeEnabled { file_lightnode_lightnode_proto_msgTypes[0].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_lightnode_lightnode_proto_msgTypes[1].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_lightnode_lightnode_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamChunkAvailabilityRequest); i { case 0: return &v.state @@ -333,7 +195,7 @@ func file_lightnode_lightnode_proto_init() { return nil } } - file_lightnode_lightnode_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_lightnode_lightnode_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamChunkAvailabilityReply); i { case 0: return &v.state @@ -352,7 +214,7 @@ func file_lightnode_lightnode_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_lightnode_lightnode_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 2, NumExtensions: 0, NumServices: 1, }, diff --git a/api/grpc/lightnode/lightnode_grpc.pb.go b/api/grpc/lightnode/lightnode_grpc.pb.go index 559e04a2b3..f30844e918 100644 --- a/api/grpc/lightnode/lightnode_grpc.pb.go +++ b/api/grpc/lightnode/lightnode_grpc.pb.go @@ -19,19 +19,18 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - LightNode_GetChunk_FullMethodName = "/lightnode.LightNode/GetChunk" - LightNode_StreamChunkAvailability_FullMethodName = "/lightnode.LightNode/StreamChunkAvailability" + LightNode_StreamBlobAvailability_FullMethodName = "/lightnode.LightNode/StreamBlobAvailability" ) // LightNodeClient is the client API for LightNode 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 LightNodeClient interface { - // GetChunk retrieves a specific chunk held by the light node. - GetChunk(ctx context.Context, in *GetChunkRequest, opts ...grpc.CallOption) (*GetChunkReply, error) - // StreamAvailabilityStatus streams the availability status of all chunks assigned to the light node. - // For use by a DA node for monitoring the availability of chunks through its constellation of agent light nodes. - StreamChunkAvailability(ctx context.Context, in *StreamChunkAvailabilityRequest, opts ...grpc.CallOption) (LightNode_StreamChunkAvailabilityClient, error) + // StreamBlobAvailability streams the availability status blobs from the light node's perspective. + // A light node considers a blob to be available if all chunks it wants to sample are available. + // This API is for use by a DA node for monitoring the availability of chunks through its + // constellation of agent light nodes. + StreamBlobAvailability(ctx context.Context, in *StreamChunkAvailabilityRequest, opts ...grpc.CallOption) (LightNode_StreamBlobAvailabilityClient, error) } type lightNodeClient struct { @@ -42,21 +41,12 @@ func NewLightNodeClient(cc grpc.ClientConnInterface) LightNodeClient { return &lightNodeClient{cc} } -func (c *lightNodeClient) GetChunk(ctx context.Context, in *GetChunkRequest, opts ...grpc.CallOption) (*GetChunkReply, error) { - out := new(GetChunkReply) - err := c.cc.Invoke(ctx, LightNode_GetChunk_FullMethodName, in, out, opts...) +func (c *lightNodeClient) StreamBlobAvailability(ctx context.Context, in *StreamChunkAvailabilityRequest, opts ...grpc.CallOption) (LightNode_StreamBlobAvailabilityClient, error) { + stream, err := c.cc.NewStream(ctx, &LightNode_ServiceDesc.Streams[0], LightNode_StreamBlobAvailability_FullMethodName, opts...) if err != nil { return nil, err } - return out, nil -} - -func (c *lightNodeClient) StreamChunkAvailability(ctx context.Context, in *StreamChunkAvailabilityRequest, opts ...grpc.CallOption) (LightNode_StreamChunkAvailabilityClient, error) { - stream, err := c.cc.NewStream(ctx, &LightNode_ServiceDesc.Streams[0], LightNode_StreamChunkAvailability_FullMethodName, opts...) - if err != nil { - return nil, err - } - x := &lightNodeStreamChunkAvailabilityClient{stream} + x := &lightNodeStreamBlobAvailabilityClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -66,16 +56,16 @@ func (c *lightNodeClient) StreamChunkAvailability(ctx context.Context, in *Strea return x, nil } -type LightNode_StreamChunkAvailabilityClient interface { +type LightNode_StreamBlobAvailabilityClient interface { Recv() (*StreamChunkAvailabilityReply, error) grpc.ClientStream } -type lightNodeStreamChunkAvailabilityClient struct { +type lightNodeStreamBlobAvailabilityClient struct { grpc.ClientStream } -func (x *lightNodeStreamChunkAvailabilityClient) Recv() (*StreamChunkAvailabilityReply, error) { +func (x *lightNodeStreamBlobAvailabilityClient) Recv() (*StreamChunkAvailabilityReply, error) { m := new(StreamChunkAvailabilityReply) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err @@ -87,11 +77,11 @@ func (x *lightNodeStreamChunkAvailabilityClient) Recv() (*StreamChunkAvailabilit // All implementations must embed UnimplementedLightNodeServer // for forward compatibility type LightNodeServer interface { - // GetChunk retrieves a specific chunk held by the light node. - GetChunk(context.Context, *GetChunkRequest) (*GetChunkReply, error) - // StreamAvailabilityStatus streams the availability status of all chunks assigned to the light node. - // For use by a DA node for monitoring the availability of chunks through its constellation of agent light nodes. - StreamChunkAvailability(*StreamChunkAvailabilityRequest, LightNode_StreamChunkAvailabilityServer) error + // StreamBlobAvailability streams the availability status blobs from the light node's perspective. + // A light node considers a blob to be available if all chunks it wants to sample are available. + // This API is for use by a DA node for monitoring the availability of chunks through its + // constellation of agent light nodes. + StreamBlobAvailability(*StreamChunkAvailabilityRequest, LightNode_StreamBlobAvailabilityServer) error mustEmbedUnimplementedLightNodeServer() } @@ -99,11 +89,8 @@ type LightNodeServer interface { type UnimplementedLightNodeServer struct { } -func (UnimplementedLightNodeServer) GetChunk(context.Context, *GetChunkRequest) (*GetChunkReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetChunk not implemented") -} -func (UnimplementedLightNodeServer) StreamChunkAvailability(*StreamChunkAvailabilityRequest, LightNode_StreamChunkAvailabilityServer) error { - return status.Errorf(codes.Unimplemented, "method StreamChunkAvailability not implemented") +func (UnimplementedLightNodeServer) StreamBlobAvailability(*StreamChunkAvailabilityRequest, LightNode_StreamBlobAvailabilityServer) error { + return status.Errorf(codes.Unimplemented, "method StreamBlobAvailability not implemented") } func (UnimplementedLightNodeServer) mustEmbedUnimplementedLightNodeServer() {} @@ -118,42 +105,24 @@ func RegisterLightNodeServer(s grpc.ServiceRegistrar, srv LightNodeServer) { s.RegisterService(&LightNode_ServiceDesc, srv) } -func _LightNode_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.(LightNodeServer).GetChunk(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: LightNode_GetChunk_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LightNodeServer).GetChunk(ctx, req.(*GetChunkRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _LightNode_StreamChunkAvailability_Handler(srv interface{}, stream grpc.ServerStream) error { +func _LightNode_StreamBlobAvailability_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(StreamChunkAvailabilityRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(LightNodeServer).StreamChunkAvailability(m, &lightNodeStreamChunkAvailabilityServer{stream}) + return srv.(LightNodeServer).StreamBlobAvailability(m, &lightNodeStreamBlobAvailabilityServer{stream}) } -type LightNode_StreamChunkAvailabilityServer interface { +type LightNode_StreamBlobAvailabilityServer interface { Send(*StreamChunkAvailabilityReply) error grpc.ServerStream } -type lightNodeStreamChunkAvailabilityServer struct { +type lightNodeStreamBlobAvailabilityServer struct { grpc.ServerStream } -func (x *lightNodeStreamChunkAvailabilityServer) Send(m *StreamChunkAvailabilityReply) error { +func (x *lightNodeStreamBlobAvailabilityServer) Send(m *StreamChunkAvailabilityReply) error { return x.ServerStream.SendMsg(m) } @@ -163,16 +132,11 @@ func (x *lightNodeStreamChunkAvailabilityServer) Send(m *StreamChunkAvailability var LightNode_ServiceDesc = grpc.ServiceDesc{ ServiceName: "lightnode.LightNode", HandlerType: (*LightNodeServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetChunk", - Handler: _LightNode_GetChunk_Handler, - }, - }, + Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { - StreamName: "StreamChunkAvailability", - Handler: _LightNode_StreamChunkAvailability_Handler, + StreamName: "StreamBlobAvailability", + Handler: _LightNode_StreamBlobAvailability_Handler, ServerStreams: true, }, },