diff --git a/api/builder/generate-docs.sh b/api/builder/generate-docs.sh index 3701e1b4b..0f7946abb 100755 --- a/api/builder/generate-docs.sh +++ b/api/builder/generate-docs.sh @@ -23,6 +23,9 @@ for i in "${!PROTO_FILES[@]}"; do PROTO_FILES[$i]=$(relativePath "${PROTO_FILES[$i]}" "${PROTO_DIR}") done +# Sort the proto files alphabetically. Required for deterministic output. +IFS=$'\n' PROTO_FILES=($(sort <<<"${PROTO_FILES[*]}")); unset IFS + # Generate HTML doc docker run --rm \ -v "${DOCS_DIR}":/out \ diff --git a/api/docs/eigenda-protos.html b/api/docs/eigenda-protos.html index 933cd7d59..fd338b03d 100644 --- a/api/docs/eigenda-protos.html +++ b/api/docs/eigenda-protos.html @@ -206,23 +206,23 @@

Table of Contents

  • - retriever/retriever.proto + common/common.proto
  • @@ -256,164 +256,141 @@

    Table of Contents

  • - common/common.proto + disperser/disperser.proto -
  • - - -
  • - node/node.proto - +
  • + + +
  • + disperser/v2/disperser_v2.proto + -
  • - - -
  • - node/v2/node_v2.proto - @@ -421,141 +398,141 @@

    Table of Contents

  • - disperser/v2/disperser_v2.proto + node/node.proto -
  • - - -
  • - disperser/disperser.proto - +
  • + + +
  • + node/v2/node_v2.proto + @@ -604,6 +581,29 @@

    Table of Contents

  • + +
  • + retriever/retriever.proto + +
  • +
  • Scalar Value Types
  • @@ -834,13 +834,13 @@

    Churner

    -

    retriever/retriever.proto

    Top +

    common/common.proto

    Top

    -

    BlobReply

    -

    +

    BlobCommitment

    +

    BlobCommitment represents commitment of a specific blob, containing its

    KZG commitment, degree proof, the actual degree, and data length in number of symbols.

    @@ -850,59 +850,62 @@

    BlobReply

    - + - + - -
    datacommitment bytes

    The blob retrieved and reconstructed from the EigenDA Nodes per BlobRequest.

    - - - - - -

    BlobRequest

    -

    - - - - - - - - - + - + - - + + - + - + - + + +
    FieldTypeLabelDescription
    batch_header_hashlength_commitment bytes

    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.

    blob_indexuint32length_proofbytes

    Which blob in the batch this is requesting for (note: a batch is logically an -ordered list of blobs).

    reference_block_numberlength uint32

    The Ethereum block number at which the batch for this blob was constructed.

    + + + + + +

    G1Commitment

    +

    + + + + + + + + - - + + - + + + + + + + + @@ -912,32 +915,50 @@

    BlobRequest

    +

    PaymentHeader

    +

    + + +
    FieldTypeLabelDescription
    quorum_iduint32xbytes

    Which quorum of the blob this is requesting for (note a blob can participate in -multiple quorums).

    The X coordinate of the KZG commitment. This is the raw byte representation of the field element.

    ybytes

    The Y coordinate of the KZG commitment. This is the raw byte representation of the field element.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    account_idstring

    bin_indexuint32

    cumulative_paymentbytes

    + + + -

    Retriever

    -

    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.

    - - - - - - - - - - - - - - -
    Method NameRequest TypeResponse TypeDescription
    RetrieveBlobBlobRequestBlobReply

    This fans out request to EigenDA Nodes to retrieve the chunks and returns the -reconstructed original blob in response.

    - +
    @@ -1100,13 +1121,13 @@

    BlobHeader

    -

    common/common.proto

    Top +

    disperser/disperser.proto

    Top

    -

    BlobCommitment

    -

    BlobCommitment represents commitment of a specific blob, containing its

    KZG commitment, degree proof, the actual degree, and data length in number of symbols.

    +

    AuthenticatedReply

    +

    @@ -1116,29 +1137,46 @@

    BlobCommitment

    - - + + - - + + + +
    commitmentbytesblob_auth_headerBlobAuthHeader

    length_commitmentbytesdisperse_replyDisperseBlobReply

    + + + + + +

    AuthenticatedRequest

    +

    + + + + + + + + - - + + - - + + @@ -1150,8 +1188,8 @@

    BlobCommitment

    -

    G1Commitment

    -

    +

    AuthenticationData

    +

    AuthenticationData contains the signature of the BlobAuthHeader.

    FieldTypeLabelDescription
    length_proofbytesdisperse_requestDisperseBlobRequest

    lengthuint32authentication_dataAuthenticationData

    @@ -1161,17 +1199,10 @@

    G1Commitment

    - - - - - - - - + - + @@ -1181,7 +1212,7 @@

    G1Commitment

    -

    PaymentHeader

    +

    BatchHeader

    @@ -1192,24 +1223,35 @@

    PaymentHeader

    - - + + - + - - + + - + - + - + + + + + + + + @@ -1219,21 +1261,7 @@

    PaymentHeader

    - - - - - - - - -
    -

    node/node.proto

    Top -
    -

    - - -

    AttestBatchReply

    +

    BatchMetadata

    @@ -1244,12 +1272,43 @@

    AttestBatchReply

    - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    xbytes

    The X coordinate of the KZG commitment. This is the raw byte representation of the field element.

    yauthentication_data bytes

    The Y coordinate of the KZG commitment. This is the raw byte representation of the field element.

    account_idstringbatch_rootbytes

    The root of the merkle tree with the hashes of blob headers as leaves.

    bin_indexuint32quorum_numbersbytes

    All quorums associated with blobs in this batch. Sorted in ascending order. +Ex. [0, 2, 1] => 0x000102

    cumulative_paymentquorum_signed_percentages bytes

    The percentage of stake that has signed for this batch. +The quorum_signed_percentages[i] is percentage for the quorum_numbers[i].

    reference_block_numberuint32

    The Ethereum block number at which the batch was created. +The Disperser will encode and disperse the blobs based on the onchain info +(e.g. operator stakes) at this block number.

    signaturebytesbatch_headerBatchHeader

    signatory_record_hashbytes

    The hash of all public keys of the operators that did not sign the batch.

    feebytes

    The fee payment paid by users for dispersing this batch. It's the bytes +representation of a big.Int value.

    confirmation_block_numberuint32

    The Ethereum block number at which the batch is confirmed onchain.

    batch_header_hashbytes

    This is the hash of the ReducedBatchHeader defined onchain, see: +https://github.com/Layr-Labs/eigenda/blob/master/contracts/src/interfaces/IEigenDAServiceManager.sol#L43 +The is the message that the operators will sign their signatures on.

    @@ -1257,8 +1316,8 @@

    AttestBatchReply

    -

    AttestBatchRequest

    -

    +

    BlobAuthHeader

    +

    BlobAuthHeader contains information about the blob for the client to verify and sign.

    - Once payments are enabled, the BlobAuthHeader will contain the KZG commitment to the blob, which the client

    will verify and sign. Having the client verify the KZG commitment instead of calculating it avoids

    the need for the client to have the KZG structured reference string (SRS), which can be large.

    The signed KZG commitment prevents the disperser from sending a different blob to the DA Nodes

    than the one the client sent.

    - In the meantime, the BlobAuthHeader contains a simple challenge parameter is used to prevent

    replay attacks in the event that a signature is leaked.

    @@ -1268,17 +1327,10 @@

    AttestBatchRequest

    - - + + - - - - - - - - + @@ -1288,8 +1340,8 @@

    AttestBatchRequest

    -

    BatchHeader

    -

    BatchHeader (see core/data.go#BatchHeader)

    +

    BlobHeader

    +

    batch_headerBatchHeaderchallenge_parameteruint32

    header of the batch

    blob_header_hashesbytesrepeated

    the header hashes of all blobs in the batch

    @@ -1299,17 +1351,24 @@

    BatchHeader

    - - + + - + - + - + + + + + + + + @@ -1319,8 +1378,8 @@

    BatchHeader

    -

    Blob

    -

    In EigenDA, the original blob to disperse is encoded as a polynomial via taking

    taking different point evaluations (i.e. erasure coding). These points are split

    into disjoint subsets which are assigned to different operator nodes in the EigenDA

    network.

    The data in this message is a subset of these points that are assigned to a

    single operator node.

    +

    BlobInfo

    +

    BlobInfo contains information needed to confirm the blob against the EigenDA contracts

    batch_rootbytescommitmentcommon.G1Commitment

    The root of the merkle tree with hashes of blob headers as leaves.

    KZG commitment of the blob.

    reference_block_numberdata_length uint32

    The Ethereum block number at which the batch is dispersed.

    The length of the blob in symbols (each symbol is 32 bytes).

    blob_quorum_paramsBlobQuorumParamrepeated

    The params of the quorums that this blob participates in.

    @@ -1330,21 +1389,17 @@

    Blob

    - - + + - + - - - - + + + + @@ -1354,7 +1409,7 @@

    Blob

    -

    BlobHeader

    +

    BlobQuorumParam

    @@ -1365,55 +1420,34 @@

    BlobHeader

    - - - - - - - - - - - - - - - - + + - + - + - - - - - - - - + - - + + - + - + - + @@ -1423,8 +1457,8 @@

    BlobHeader

    -

    BlobQuorumInfo

    -

    See BlobQuorumParam as defined in

    api/proto/disperser/disperser.proto

    +

    BlobStatusReply

    +

    headerBlobHeaderblob_headerBlobHeader

    Which (original) blob this is for.

    bundlesBundlerepeated

    Each bundle contains all chunks for a single quorum of the blob. -The number of bundles must be equal to the total number of quorums associated -with the blob, and the ordering must be the same as BlobHeader.quorum_headers. -Note: an operator may be in some but not all of the quorums; in that case the -bundle corresponding to that quorum will be empty.

    blob_verification_proofBlobVerificationProof

    commitmentcommon.G1Commitment

    The KZG commitment to the polynomial representing the blob.

    length_commitmentG2Commitment

    The KZG commitment to the polynomial representing the blob on G2, it is used -for proving the degree of the polynomial

    length_proofG2Commitmentquorum_numberuint32

    The low degree proof. It's the KZG commitment to the polynomial shifted to -the largest SRS degree.

    The ID of the quorum.

    lengthadversary_threshold_percentage uint32

    The length of the original blob in number of symbols (in the field where -the polynomial is defined).

    quorum_headersBlobQuorumInforepeated

    The params of the quorums that this blob participates in.

    The max percentage of stake within the quorum that can be held by or delegated +to adversarial operators. Currently, this and the next parameter are standardized +across the quorum using values read from the EigenDA contracts.

    account_idstringconfirmation_threshold_percentageuint32

    The ID of the user who is dispersing this blob to EigenDA.

    The min percentage of stake that must attest in order to consider +the dispersal is successful.

    reference_block_numberchunk_length uint32

    The reference block number whose state is used to encode the blob

    The length of each chunk.

    @@ -1434,38 +1468,17 @@

    BlobQuorumInfo

    - - - - - - - - - - - - - - - - - - - - - - - + + - + - - + + - + @@ -1475,8 +1488,8 @@

    BlobQuorumInfo

    -

    Bundle

    -

    A Bundle is the collection of chunks associated with a single blob, for a single

    operator and a single quorum.

    +

    BlobStatusRequest

    +

    BlobStatusRequest is used to query the status of a blob.

    quorum_iduint32

    adversary_thresholduint32

    confirmation_thresholduint32

    chunk_lengthuint32statusBlobStatus

    The status of the blob.

    ratelimituint32infoBlobInfo

    The blob info needed for clients to confirm the blob against the EigenDA contracts.

    @@ -1486,18 +1499,10 @@

    Bundle

    - - - - - - - - + - + @@ -1507,7 +1512,7 @@

    Bundle

    -

    G2Commitment

    +

    BlobVerificationProof

    @@ -1518,31 +1523,54 @@

    G2Commitment

    - - + + - + - - + + - + - + + + + + + + + - + - + - + @@ -1552,7 +1580,7 @@

    G2Commitment

    -

    GetBlobHeaderReply

    +

    DisperseBlobReply

    @@ -1563,19 +1591,24 @@

    GetBlobHeaderReply

    - - + + - + - - + + - + @@ -1585,8 +1618,8 @@

    GetBlobHeaderReply

    -

    GetBlobHeaderRequest

    -

    See RetrieveChunksRequest for documentation of each parameter of GetBlobHeaderRequest.

    +

    DisperseBlobRequest

    +

    chunksbytesrepeated

    Each chunk corresponds to a collection of points on the polynomial. -Each chunk has same number of points.

    bundlerequest_id bytes

    All chunks of the bundle encoded in a byte array.

    x_a0bytesbatch_iduint32

    The A0 element of the X coordinate of G2 point.

    batch_id is an incremental ID assigned to a batch by EigenDAServiceManager

    x_a1bytesblob_indexuint32

    The A1 element of the X coordinate of G2 point.

    The index of the blob in the batch (which is logically an ordered list of blobs).

    y_a0batch_metadataBatchMetadata

    inclusion_proof bytes

    The A0 element of the Y coordinate of G2 point.

    inclusion_proof is a merkle proof for a blob header's inclusion in a batch

    y_a1quorum_indexes bytes

    The A1 element of the Y coordinate of G2 point.

    indexes of quorums in BatchHeader.quorum_numbers that match the quorums in BlobHeader.blob_quorum_params +Ex. BlobHeader.blob_quorum_params = [ + { + quorum_number = 0, + ... + }, + { + quorum_number = 3, + ... + }, + { + quorum_number = 5, + ... + }, +] +BatchHeader.quorum_numbers = [0, 5, 3] => 0x000503 +Then, quorum_indexes = [0, 2, 1] => 0x000201

    blob_headerBlobHeaderresultBlobStatus

    The header of the blob requested per GetBlobHeaderRequest.

    The status of the blob associated with the request_id. Will always be PROCESSING.

    proofMerkleProofrequest_idbytes

    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.

    The request ID generated by the disperser. +Once a request is accepted (although not processed), a unique request ID will be +generated. +Two different DisperseBlobRequests (determined by the hash of the DisperseBlobRequest) +will have different IDs, and the same DisperseBlobRequest sent repeatedly at different +times will also have different IDs. +The client should use this ID to query the processing status of the request (via +the GetBlobStatus API).

    @@ -1596,24 +1629,33 @@

    GetBlobHeaderRequest

    - + - + - + - - + + - - + + - + @@ -1623,7 +1665,7 @@

    GetBlobHeaderRequest

    -

    MerkleProof

    +

    DispersePaidBlobRequest

    @@ -1634,69 +1676,31 @@

    MerkleProof

    - + - - + + - + - - - - - -
    batch_header_hashdata bytes

    The data to be dispersed. +The size of data must be <= 16MiB. Every 32 bytes of data is interpreted as an integer in big endian format +where the lower address has more significant bits. The integer must stay in the valid range to be interpreted +as a field element on the bn254 curve. The valid range is +0 <= x < 21888242871839275222246405745257275088548364400416034343698204186575808495617 +If any one of the 32 bytes elements is outside the range, the whole request is deemed as invalid, and rejected.

    blob_indexcustom_quorum_numbers uint32

    repeated

    The quorums to which the blob will be sent, in addition to the required quorums which are configured +on the EigenDA smart contract. If required quorums are included here, an error will be returned. +The disperser will ensure that the encoded blobs for each quorum are all processed +within the same batch.

    quorum_iduint32account_idstring

    The account ID of the client. This should be a hex-encoded string of the ECSDA public key +corresponding to the key used by the client to sign the BlobAuthHeader.

    hashesdata bytesrepeated

    The proof itself.

    The data to be dispersed. Same requirements as DisperseBlobRequest.

    indexquorum_numbers uint32

    Which index (the leaf of the Merkle tree) this proof is for.

    - - - - - -

    NodeInfoReply

    -

    Node info reply

    - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + - + - - + + - + @@ -1706,15 +1710,8 @@

    NodeInfoReply

    -

    NodeInfoRequest

    -

    Node info request

    - - - - - -

    RetrieveChunksReply

    -

    +

    RetrieveBlobReply

    +

    RetrieveBlobReply contains the retrieved blob data

    FieldTypeLabelDescription
    semverstring

    archstring

    osstring

    repeated

    The quorums to which the blob to be sent

    num_cpuuint32payment_headercommon.PaymentHeader

    Payment header contains AccountID, BinIndex, and CumulativePayment

    mem_bytesuint64payment_signaturebytes

    signature of payment_header

    @@ -1724,17 +1721,10 @@

    RetrieveChunksReply

    - + - - - - - - - - + @@ -1744,8 +1734,8 @@

    RetrieveChunksReply

    -

    RetrieveChunksRequest

    -

    +

    RetrieveBlobRequest

    +

    RetrieveBlobRequest contains parameters to retrieve the blob.

    chunksdata bytesrepeated

    All chunks the Node is storing for the requested blob per RetrieveChunksRequest.

    chunk_encoding_formatChunkEncodingFormat

    How the above chunks are encoded.

    @@ -1758,138 +1748,14 @@

    RetrieveChunksRequest

    - + - - - - - - - - - - - -
    batch_header_hash bytes

    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.

    blob_index uint32

    Which blob in the batch to retrieve for (note: a batch is logically an ordered -list of blobs).

    quorum_iduint32

    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].

    - - - - - -

    StoreBlobsReply

    -

    - - - - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    signaturesgoogle.protobuf.BytesValuerepeated

    The operator's BLS sgnature signed on the blob header hashes. -The ordering of the signatures must match the ordering of the blobs sent -in the request, with empty signatures in the places for discarded blobs.

    - - - - - -

    StoreBlobsRequest

    -

    - - - - - - - - - - - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    blobsBlobrepeated

    Blobs to store

    reference_block_numberuint32

    The reference block number whose state is used to encode the blobs

    - - - - - -

    StoreChunksReply

    -

    - - - - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    signaturebytes

    The operator's BLS signature signed on the batch header hash.

    - - - - - -

    StoreChunksRequest

    -

    - - - - - - - - - - - - - - - - - - - - + @@ -1901,8 +1767,8 @@

    StoreChunksRequest

    -

    ChunkEncodingFormat

    -

    This describes how the chunks returned in RetrieveChunksReply are encoded.

    Used to facilitate the decoding of chunks.

    +

    BlobStatus

    +

    BlobStatus represents the status of a blob.

    The status of a blob is updated as the blob is processed by the disperser.

    The status of a blob can be queried by the client using the GetBlobStatus API.

    Intermediate states are states that the blob can be in while being processed, and it can be updated to a differet state:

    - PROCESSING

    - DISPERSING

    - CONFIRMED

    Terminal states are states that will not be updated to a different state:

    - FAILED

    - FINALIZED

    - INSUFFICIENT_SIGNATURES

    FieldTypeLabelDescription
    batch_headerBatchHeader

    Which batch this request is for.

    blobsBlobrepeated

    The chunks for each blob in the batch to be stored in an EigenDA Node.

    @@ -1916,15 +1782,49 @@

    ChunkEncodingFormat

    - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1934,8 +1834,8 @@

    ChunkEncodingFormat

    -

    Dispersal

    -

    +

    Disperser

    +

    Disperser defines the public APIs for dispersing blobs.

    NameNumberDescription
    GNARKPROCESSING 1

    PROCESSING means that the blob is currently being processed by the disperser

    GOBCONFIRMED 2

    CONFIRMED means that the blob has been dispersed to DA Nodes and the dispersed +batch containing the blob has been confirmed onchain

    FAILED3

    FAILED means that the blob has failed permanently (for reasons other than insufficient +signatures, which is a separate state). This status is somewhat of a catch-all category, +containg (but not necessarily exclusively as errors can be added in the future): + - blob has expired + - internal logic error while requesting encoding + - blob retry has exceeded its limit while waiting for blob finalization after confirmation. + Most likely triggered by a chain reorg: see https://github.com/Layr-Labs/eigenda/blob/master/disperser/batcher/finalizer.go#L179-L189.

    FINALIZED4

    FINALIZED means that the block containing the blob's confirmation transaction has been finalized on Ethereum

    INSUFFICIENT_SIGNATURES5

    INSUFFICIENT_SIGNATURES means that the confirmation threshold for the blob was not met +for at least one quorum.

    DISPERSING6

    The DISPERSING state is comprised of two separate phases: + - Dispersing to DA nodes and collecting signature + - Submitting the transaction on chain and waiting for tx receipt

    @@ -1943,74 +1843,52 @@

    Dispersal

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Method NameRequest TypeResponse TypeDescription
    StoreChunksStoreChunksRequestStoreChunksReply

    StoreChunks validates that the chunks match what the Node is supposed to receive ( -different Nodes are responsible for different chunks, as EigenDA is horizontally -sharded) and is correctly coded (e.g. each chunk must be a valid KZG multiproof) -according to the EigenDA protocol. It also stores the chunks along with metadata -for the protocol-defined length of custody. It will return a signature at the -end to attest to the data in this request it has processed.

    StoreBlobsStoreBlobsRequestStoreBlobsReply

    StoreBlobs is simiar to StoreChunks, but it stores the blobs using a different storage schema -so that the stored blobs can later be aggregated by AttestBatch method to a bigger batch. -StoreBlobs + AttestBatch will eventually replace and deprecate StoreChunks method. -DEPRECATED: StoreBlobs method is not used

    AttestBatchAttestBatchRequestAttestBatchReply

    AttestBatch is used to aggregate the batches stored by StoreBlobs method to a bigger batch. -It will return a signature at the end to attest to the aggregated batch. -DEPRECATED: AttestBatch method is not used

    NodeInfoNodeInfoRequestNodeInfoReply

    Retrieve node info metadata

    + DisperseBlob + DisperseBlobRequest + DisperseBlobReply +

    DisperseBlob accepts a single blob to be dispersed. +This executes the dispersal async, i.e. it returns once the request +is accepted. The client should use GetBlobStatus() API to poll the +processing status of the blob. - -

    Retrieval

    -

    - - - - - +If DisperseBlob returns the following error codes: +INVALID_ARGUMENT (400): request is invalid for a reason specified in the error msg. +RESOURCE_EXHAUSTED (429): request is rate limited for the quorum specified in the error msg. + user should retry after the specified duration. +INTERNAL (500): serious error, user should NOT retry.

    + - - - - + + + + - - - - + + + + - - - - + + + + @@ -2020,12 +1898,12 @@

    Retrieval

    -

    node/v2/node_v2.proto

    Top +

    disperser/v2/disperser_v2.proto

    Top

    -

    GetChunksReply

    +

    Attestation

    @@ -2036,10 +1914,38 @@

    GetChunksReply

    - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2049,7 +1955,7 @@

    GetChunksReply

    -

    GetChunksRequest

    +

    BlobCommitmentReply

    @@ -2060,21 +1966,12 @@

    GetChunksRequest

    - - + + - - - - - - -
    Method NameRequest TypeResponse TypeDescription
    RetrieveChunksRetrieveChunksRequestRetrieveChunksReply

    RetrieveChunks retrieves the chunks for a blob custodied at the Node.

    DisperseBlobAuthenticatedAuthenticatedRequest streamAuthenticatedReply stream

    DisperseBlobAuthenticated is similar to DisperseBlob, except that it requires the +client to authenticate itself via the AuthenticationData message. The protoco is as follows: +1. The client sends a DisperseBlobAuthenticated request with the DisperseBlobRequest message +2. The Disperser sends back a BlobAuthHeader message containing information for the client to + verify and sign. +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.

    GetBlobHeaderGetBlobHeaderRequestGetBlobHeaderReply

    GetBlobHeader is similar to RetrieveChunks, this just returns the header of the blob.

    GetBlobStatusBlobStatusRequestBlobStatusReply

    This API is meant to be polled for the blob status.

    NodeInfoNodeInfoRequestNodeInfoReply

    Retrieve node info metadata

    RetrieveBlobRetrieveBlobRequestRetrieveBlobReply

    This retrieves the requested blob from the Disperser's backend. +This is a more efficient way to retrieve blobs than directly retrieving +from the DA Nodes (see detail about this approach in +api/proto/retriever/retriever.proto). +The blob should have been initially dispersed via this Disperser service +for this API to work.

    chunksnon_signer_pubkeys bytes repeated

    All chunks the Node is storing for the requested blob per RetrieveChunksRequest.

    Serialized bytes of non signer public keys (G1 points)

    apk_g2bytes

    Serialized bytes of G2 point that represents aggregate public key of all signers

    quorum_apksbytesrepeated

    Serialized bytes of aggregate public keys (G1 points) from all nodes for each quorum

    sigmabytes

    Serialized bytes of aggregate signature

    quorum_numbersuint32repeated

    Relevant quorum numbers for the attestation

    blob_keybytesblob_commitmentcommon.BlobCommitment

    quorum_iduint32

    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].

    @@ -2082,8 +1979,8 @@

    GetChunksRequest

    -

    NodeInfoReply

    -

    Node info reply

    +

    BlobCommitmentRequest

    +

    Utility method used to generate the commitment of blob given its data.

    This can be used to construct BlobHeader.commitment

    @@ -2093,36 +1990,46 @@

    NodeInfoReply

    - - + + - - - - - - + +
    semverstringdatabytes

    archstring

    + + + + + +

    BlobStatusReply

    +

    + + + + + + + - - + + - + - - + + - + - - + + @@ -2134,15 +2041,32 @@

    NodeInfoReply

    -

    NodeInfoRequest

    -

    Node info request

    +

    BlobStatusRequest

    +

    BlobStatusRequest is used to query the status of a blob.

    +
    FieldTypeLabelDescription
    osstringstatusBlobStatus

    The status of the blob.

    num_cpuuint32signed_batchSignedBatch

    The signed batch

    mem_bytesuint64blob_verification_infoBlobVerificationInfo

    + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    blob_keybytes

    + + -

    StoreChunksReply

    -

    +

    BlobVerificationInfo

    +

    BlobVerificationInfo is the information needed to verify the inclusion of a blob in a batch.

    @@ -2152,12 +2076,26 @@

    StoreChunksReply

    - - + + + + + + + + + + + + + + + +
    signaturebytesblob_certificatecommon.v2.BlobCertificate

    blob_indexuint32

    blob_index is the index of the blob in the batch

    inclusion_proofbytes

    inclusion_proof is the inclusion proof of the blob in the batch

    @@ -2165,7 +2103,7 @@

    StoreChunksReply

    -

    StoreChunksRequest

    +

    DisperseBlobReply

    @@ -2176,10 +2114,17 @@

    StoreChunksRequest

    - batch - common.v2.Batch + result + BlobStatus -

    batch of blobs to store

    +

    The status of the blob associated with the blob key.

    + + + + blob_key + bytes + +

    @@ -2189,40 +2134,130 @@

    StoreChunksRequest

    +

    DisperseBlobRequest

    +

    - - - - - -

    Dispersal

    -

    WARNING: the following RPCs are experimental and subject to change.

    - - - + +
    Method NameRequest TypeResponse TypeDescription
    + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    databytes

    The data to be dispersed. +The size of data must be <= 16MiB. Every 32 bytes of data is interpreted as an integer in big endian format +where the lower address has more significant bits. The integer must stay in the valid range to be interpreted +as a field element on the bn254 curve. The valid range is +0 <= x < 21888242871839275222246405745257275088548364400416034343698204186575808495617 +If any one of the 32 bytes elements is outside the range, the whole request is deemed as invalid, and rejected.

    blob_headercommon.v2.BlobHeader

    + + + + + +

    SignedBatch

    +

    SignedBatch is a batch of blobs with a signature.

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    headercommon.v2.BatchHeader

    header contains metadata about the batch

    attestationAttestation

    attestation on the batch

    + + + + + + + +

    BlobStatus

    +

    BlobStatus represents the status of a blob.

    The status of a blob is updated as the blob is processed by the disperser.

    The status of a blob can be queried by the client using the GetBlobStatus API.

    Intermediate states are states that the blob can be in while being processed, and it can be updated to a differet state:

    - QUEUED

    - ENCODED

    Terminal states are states that will not be updated to a different state:

    - CERTIFIED

    - FAILED

    - INSUFFICIENT_SIGNATURES

    + + + - - - + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameNumberDescription
    StoreChunksStoreChunksRequestStoreChunksReplyUNKNOWN0

    NodeInfoNodeInfoRequestNodeInfoReply

    QUEUED1

    QUEUED means that the blob has been queued by the disperser for processing

    ENCODED2

    ENCODED means that the blob has been encoded and is ready to be dispersed to DA Nodes

    CERTIFIED3

    CERTIFIED means the blob has been dispersed and attested by the DA nodes

    FAILED4

    FAILED means that the blob has failed permanently (for reasons other than insufficient +signatures, which is a separate state)

    INSUFFICIENT_SIGNATURES5

    INSUFFICIENT_SIGNATURES means that the confirmation threshold for the blob was not met +for at least one quorum.

    + - -

    Retrieval

    -

    + + + +

    Disperser

    +

    Disperser defines the public APIs for dispersing blobs.

    @@ -2230,17 +2265,27 @@

    Retrieval

    - - - - + + + + - - - - + + + + + + + + + + + @@ -2250,12 +2295,12 @@

    Retrieval

    -

    disperser/v2/disperser_v2.proto

    Top +

    node/node.proto

    Top

    -

    Attestation

    +

    AttestBatchReply

    @@ -2266,38 +2311,10 @@

    Attestation

    - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - + @@ -2307,7 +2324,7 @@

    Attestation

    -

    BlobCommitmentReply

    +

    AttestBatchRequest

    @@ -2318,10 +2335,17 @@

    BlobCommitmentReply

    - - + + - + + + + + + + + @@ -2331,8 +2355,8 @@

    BlobCommitmentReply

    -

    BlobCommitmentRequest

    -

    Utility method used to generate the commitment of blob given its data.

    This can be used to construct BlobHeader.commitment

    +

    BatchHeader

    +

    BatchHeader (see core/data.go#BatchHeader)

    Method NameRequest TypeResponse TypeDescription
    GetChunksGetChunksRequestGetChunksReply

    GetChunks retrieves the chunks for a blob custodied at the Node.

    DisperseBlobDisperseBlobRequestDisperseBlobReply

    DisperseBlob accepts blob to disperse from clients. +This executes the dispersal asynchronously, i.e. it returns once the request +is accepted. The client could use GetBlobStatus() API to poll the the +processing status of the blob.

    NodeInfoNodeInfoRequestNodeInfoReply

    Retrieve node info metadata

    GetBlobStatusBlobStatusRequestBlobStatusReply

    GetBlobStatus is meant to be polled for the blob status.

    GetBlobCommitmentBlobCommitmentRequestBlobCommitmentReply

    GetBlobCommitment is a utility method that calculates commitment for a blob payload.

    non_signer_pubkeysbytesrepeated

    Serialized bytes of non signer public keys (G1 points)

    apk_g2bytes

    Serialized bytes of G2 point that represents aggregate public key of all signers

    quorum_apksbytesrepeated

    Serialized bytes of aggregate public keys (G1 points) from all nodes for each quorum

    sigmasignature bytes

    Serialized bytes of aggregate signature

    quorum_numbersuint32repeated

    Relevant quorum numbers for the attestation

    blob_commitmentcommon.BlobCommitmentbatch_headerBatchHeader

    header of the batch

    blob_header_hashesbytesrepeated

    the header hashes of all blobs in the batch

    @@ -2342,10 +2366,17 @@

    BlobCommitmentRequest

    - + - + + + + + + + + @@ -2355,8 +2386,8 @@

    BlobCommitmentRequest

    -

    BlobStatusReply

    -

    +

    Blob

    +

    In EigenDA, the original blob to disperse is encoded as a polynomial via taking

    taking different point evaluations (i.e. erasure coding). These points are split

    into disjoint subsets which are assigned to different operator nodes in the EigenDA

    network.

    The data in this message is a subset of these points that are assigned to a

    single operator node.

    databatch_root bytes

    The root of the merkle tree with hashes of blob headers as leaves.

    reference_block_numberuint32

    The Ethereum block number at which the batch is dispersed.

    @@ -2366,24 +2397,21 @@

    BlobStatusReply

    - - - - - - - - - + + - + - - - - + + + + @@ -2393,8 +2421,8 @@

    BlobStatusReply

    -

    BlobStatusRequest

    -

    BlobStatusRequest is used to query the status of a blob.

    +

    BlobHeader

    +

    statusBlobStatus

    The status of the blob.

    signed_batchSignedBatchheaderBlobHeader

    The signed batch

    Which (original) blob this is for.

    blob_verification_infoBlobVerificationInfo

    bundlesBundlerepeated

    Each bundle contains all chunks for a single quorum of the blob. +The number of bundles must be equal to the total number of quorums associated +with the blob, and the ordering must be the same as BlobHeader.quorum_headers. +Note: an operator may be in some but not all of the quorums; in that case the +bundle corresponding to that quorum will be empty.

    @@ -2404,48 +2432,55 @@

    BlobStatusRequest

    - - + + - + - -
    blob_keybytescommitmentcommon.G1Commitment

    The KZG commitment to the polynomial representing the blob.

    - - - - - -

    BlobVerificationInfo

    -

    BlobVerificationInfo is the information needed to verify the inclusion of a blob in a batch.

    - - - - - - - + + + + + + - - + + - + - + - + - - + + + + + + + + + - + + + + + + + + @@ -2455,8 +2490,8 @@

    BlobVerificationInfo

    -

    DisperseBlobReply

    -

    +

    BlobQuorumInfo

    +

    See BlobQuorumParam as defined in

    api/proto/disperser/disperser.proto

    FieldTypeLabelDescription
    length_commitmentG2Commitment

    The KZG commitment to the polynomial representing the blob on G2, it is used +for proving the degree of the polynomial

    blob_certificatecommon.v2.BlobCertificatelength_proofG2Commitment

    The low degree proof. It's the KZG commitment to the polynomial shifted to +the largest SRS degree.

    blob_indexlength uint32

    blob_index is the index of the blob in the batch

    The length of the original blob in number of symbols (in the field where +the polynomial is defined).

    inclusion_proofbytesquorum_headersBlobQuorumInforepeated

    The params of the quorums that this blob participates in.

    account_idstring

    inclusion_proof is the inclusion proof of the blob in the batch

    The ID of the user who is dispersing this blob to EigenDA.

    reference_block_numberuint32

    The reference block number whose state is used to encode the blob

    @@ -2466,15 +2501,36 @@

    DisperseBlobReply

    - - + + - + - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2486,8 +2542,8 @@

    DisperseBlobReply

    -

    DisperseBlobRequest

    -

    +

    Bundle

    +

    A Bundle is the collection of chunks associated with a single blob, for a single

    operator and a single quorum.

    resultBlobStatusquorum_iduint32

    The status of the blob associated with the blob key.

    blob_keybytesadversary_thresholduint32

    confirmation_thresholduint32

    chunk_lengthuint32

    ratelimituint32

    @@ -2497,22 +2553,18 @@

    DisperseBlobRequest

    - + - - + + - - + + - + @@ -2522,8 +2574,8 @@

    DisperseBlobRequest

    -

    SignedBatch

    -

    SignedBatch is a batch of blobs with a signature.

    +

    G2Commitment

    +

    datachunks bytes

    The data to be dispersed. -The size of data must be <= 16MiB. Every 32 bytes of data is interpreted as an integer in big endian format -where the lower address has more significant bits. The integer must stay in the valid range to be interpreted -as a field element on the bn254 curve. The valid range is -0 <= x < 21888242871839275222246405745257275088548364400416034343698204186575808495617 -If any one of the 32 bytes elements is outside the range, the whole request is deemed as invalid, and rejected.

    repeated

    Each chunk corresponds to a collection of points on the polynomial. +Each chunk has same number of points.

    blob_headercommon.v2.BlobHeaderbundlebytes

    All chunks of the bundle encoded in a byte array.

    @@ -2533,17 +2585,31 @@

    SignedBatch

    - - + + - + - - + + - + + + + + + + + + + + + + + + @@ -2553,106 +2619,7 @@

    SignedBatch

    - - -

    BlobStatus

    -

    BlobStatus represents the status of a blob.

    The status of a blob is updated as the blob is processed by the disperser.

    The status of a blob can be queried by the client using the GetBlobStatus API.

    Intermediate states are states that the blob can be in while being processed, and it can be updated to a differet state:

    - QUEUED

    - ENCODED

    Terminal states are states that will not be updated to a different state:

    - CERTIFIED

    - FAILED

    - INSUFFICIENT_SIGNATURES

    -
    headercommon.v2.BatchHeaderx_a0bytes

    header contains metadata about the batch

    The A0 element of the X coordinate of G2 point.

    attestationAttestationx_a1bytes

    attestation on the batch

    The A1 element of the X coordinate of G2 point.

    y_a0bytes

    The A0 element of the Y coordinate of G2 point.

    y_a1bytes

    The A1 element of the Y coordinate of G2 point.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameNumberDescription
    UNKNOWN0

    QUEUED1

    QUEUED means that the blob has been queued by the disperser for processing

    ENCODED2

    ENCODED means that the blob has been encoded and is ready to be dispersed to DA Nodes

    CERTIFIED3

    CERTIFIED means the blob has been dispersed and attested by the DA nodes

    FAILED4

    FAILED means that the blob has failed permanently (for reasons other than insufficient -signatures, which is a separate state)

    INSUFFICIENT_SIGNATURES5

    INSUFFICIENT_SIGNATURES means that the confirmation threshold for the blob was not met -for at least one quorum.

    - - - - - -

    Disperser

    -

    Disperser defines the public APIs for dispersing blobs.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Method NameRequest TypeResponse TypeDescription
    DisperseBlobDisperseBlobRequestDisperseBlobReply

    DisperseBlob accepts blob to disperse from clients. -This executes the dispersal asynchronously, i.e. it returns once the request -is accepted. The client could use GetBlobStatus() API to poll the the -processing status of the blob.

    GetBlobStatusBlobStatusRequestBlobStatusReply

    GetBlobStatus is meant to be polled for the blob status.

    GetBlobCommitmentBlobCommitmentRequestBlobCommitmentReply

    GetBlobCommitment is a utility method that calculates commitment for a blob payload.

    - - - - -
    -

    disperser/disperser.proto

    Top -
    -

    - - -

    AuthenticatedReply

    +

    GetBlobHeaderReply

    @@ -2663,17 +2630,19 @@

    AuthenticatedReply

    - blob_auth_header - BlobAuthHeader + blob_header + BlobHeader -

    +

    The header of the blob requested per GetBlobHeaderRequest.

    - disperse_reply - DisperseBlobReply + proof + MerkleProof -

    +

    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.

    @@ -2683,8 +2652,8 @@

    AuthenticatedReply

    -

    AuthenticatedRequest

    -

    +

    GetBlobHeaderRequest

    +

    See RetrieveChunksRequest for documentation of each parameter of GetBlobHeaderRequest.

    @@ -2694,39 +2663,22 @@

    AuthenticatedRequest

    - - + + - - + + - -
    disperse_requestDisperseBlobRequestbatch_header_hashbytes

    authentication_dataAuthenticationDatablob_indexuint32

    - - - - - -

    AuthenticationData

    -

    AuthenticationData contains the signature of the BlobAuthHeader.

    - - - - - - - - - - + + @@ -2738,7 +2690,7 @@

    AuthenticationData

    -

    BatchHeader

    +

    MerkleProof

    @@ -2749,35 +2701,17 @@

    BatchHeader

    - - - - - - - - - - - - - - - + - - + + - + - + @@ -2787,8 +2721,8 @@

    BatchHeader

    -

    BatchMetadata

    -

    +

    NodeInfoReply

    +

    Node info reply

    FieldTypeLabelDescription
    authentication_databytesquorum_iduint32

    batch_rootbytes

    The root of the merkle tree with the hashes of blob headers as leaves.

    quorum_numbersbytes

    All quorums associated with blobs in this batch. Sorted in ascending order. -Ex. [0, 2, 1] => 0x000102

    quorum_signed_percentageshashes bytes

    The percentage of stake that has signed for this batch. -The quorum_signed_percentages[i] is percentage for the quorum_numbers[i].

    repeated

    The proof itself.

    reference_block_numberindex uint32

    The Ethereum block number at which the batch was created. -The Disperser will encode and disperse the blobs based on the onchain info -(e.g. operator stakes) at this block number.

    Which index (the leaf of the Merkle tree) this proof is for.

    @@ -2798,41 +2732,38 @@

    BatchMetadata

    - - + + - - + + - + - - + + - + - + - + - - + + - + @@ -2842,31 +2773,14 @@

    BatchMetadata

    -

    BlobAuthHeader

    -

    BlobAuthHeader contains information about the blob for the client to verify and sign.

    - Once payments are enabled, the BlobAuthHeader will contain the KZG commitment to the blob, which the client

    will verify and sign. Having the client verify the KZG commitment instead of calculating it avoids

    the need for the client to have the KZG structured reference string (SRS), which can be large.

    The signed KZG commitment prevents the disperser from sending a different blob to the DA Nodes

    than the one the client sent.

    - In the meantime, the BlobAuthHeader contains a simple challenge parameter is used to prevent

    replay attacks in the event that a signature is leaked.

    +

    NodeInfoRequest

    +

    Node info request

    -
    batch_headerBatchHeadersemverstring

    signatory_record_hashbytesarchstring

    The hash of all public keys of the operators that did not sign the batch.

    feebytesosstring

    The fee payment paid by users for dispersing this batch. It's the bytes -representation of a big.Int value.

    confirmation_block_numbernum_cpu uint32

    The Ethereum block number at which the batch is confirmed onchain.

    batch_header_hashbytesmem_bytesuint64

    This is the hash of the ReducedBatchHeader defined onchain, see: -https://github.com/Layr-Labs/eigenda/blob/master/contracts/src/interfaces/IEigenDAServiceManager.sol#L43 -The is the message that the operators will sign their signatures on.

    - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    challenge_parameteruint32

    - - -

    BlobHeader

    +

    RetrieveChunksReply

    @@ -2877,24 +2791,17 @@

    BlobHeader

    - commitment - common.G1Commitment - -

    KZG commitment of the blob.

    + chunks + bytes + repeated +

    All chunks the Node is storing for the requested blob per RetrieveChunksRequest.

    - data_length - uint32 + chunk_encoding_format + ChunkEncodingFormat -

    The length of the blob in symbols (each symbol is 32 bytes).

    - - - - blob_quorum_params - BlobQuorumParam - repeated -

    The params of the quorums that this blob participates in.

    +

    How the above chunks are encoded.

    @@ -2904,8 +2811,8 @@

    BlobHeader

    -

    BlobInfo

    -

    BlobInfo contains information needed to confirm the blob against the EigenDA contracts

    +

    RetrieveChunksRequest

    +

    @@ -2915,17 +2822,29 @@

    BlobInfo

    - - + + - + - - + + - + + + + + + + + @@ -2935,7 +2854,7 @@

    BlobInfo

    -

    BlobQuorumParam

    +

    StoreBlobsReply

    @@ -2946,34 +2865,12 @@

    BlobQuorumParam

    - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -2983,7 +2880,7 @@

    BlobQuorumParam

    -

    BlobStatusReply

    +

    StoreBlobsRequest

    @@ -2994,17 +2891,17 @@

    BlobStatusReply

    - - - - + + + + - - + + - + @@ -3014,8 +2911,8 @@

    BlobStatusReply

    -

    BlobStatusRequest

    -

    BlobStatusRequest is used to query the status of a blob.

    +

    StoreChunksReply

    +

    blob_headerBlobHeaderbatch_header_hashbytes

    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.

    blob_verification_proofBlobVerificationProofblob_indexuint32

    Which blob in the batch to retrieve for (note: a batch is logically an ordered +list of blobs).

    quorum_iduint32

    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].

    quorum_numberuint32

    The ID of the quorum.

    adversary_threshold_percentageuint32

    The max percentage of stake within the quorum that can be held by or delegated -to adversarial operators. Currently, this and the next parameter are standardized -across the quorum using values read from the EigenDA contracts.

    confirmation_threshold_percentageuint32

    The min percentage of stake that must attest in order to consider -the dispersal is successful.

    chunk_lengthuint32

    The length of each chunk.

    signaturesgoogle.protobuf.BytesValuerepeated

    The operator's BLS sgnature signed on the blob header hashes. +The ordering of the signatures must match the ordering of the blobs sent +in the request, with empty signatures in the places for discarded blobs.

    statusBlobStatus

    The status of the blob.

    blobsBlobrepeated

    Blobs to store

    infoBlobInforeference_block_numberuint32

    The blob info needed for clients to confirm the blob against the EigenDA contracts.

    The reference block number whose state is used to encode the blobs

    @@ -3025,10 +2922,10 @@

    BlobStatusRequest

    - + - + @@ -3038,7 +2935,7 @@

    BlobStatusRequest

    -

    BlobVerificationProof

    +

    StoreChunksRequest

    @@ -3049,54 +2946,17 @@

    BlobVerificationProof

    - - - - - - - - - - - - - - - - - - - - - - - + + - + - - - - + + + + @@ -3106,7 +2966,133 @@

    BlobVerificationProof

    -

    DisperseBlobReply

    + + +

    ChunkEncodingFormat

    +

    This describes how the chunks returned in RetrieveChunksReply are encoded.

    Used to facilitate the decoding of chunks.

    +
    request_idsignature bytes

    The operator's BLS signature signed on the batch header hash.

    batch_iduint32

    batch_id is an incremental ID assigned to a batch by EigenDAServiceManager

    blob_indexuint32

    The index of the blob in the batch (which is logically an ordered list of blobs).

    batch_metadataBatchMetadata

    inclusion_proofbytesbatch_headerBatchHeader

    inclusion_proof is a merkle proof for a blob header's inclusion in a batch

    Which batch this request is for.

    quorum_indexesbytes

    indexes of quorums in BatchHeader.quorum_numbers that match the quorums in BlobHeader.blob_quorum_params -Ex. BlobHeader.blob_quorum_params = [ - { - quorum_number = 0, - ... - }, - { - quorum_number = 3, - ... - }, - { - quorum_number = 5, - ... - }, -] -BatchHeader.quorum_numbers = [0, 5, 3] => 0x000503 -Then, quorum_indexes = [0, 2, 1] => 0x000201

    blobsBlobrepeated

    The chunks for each blob in the batch to be stored in an EigenDA Node.

    + + + + + + + + + + + + + + + + + + + + + + + + +
    NameNumberDescription
    UNKNOWN0

    GNARK1

    GOB2

    + + + + + +

    Dispersal

    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Method NameRequest TypeResponse TypeDescription
    StoreChunksStoreChunksRequestStoreChunksReply

    StoreChunks validates that the chunks match what the Node is supposed to receive ( +different Nodes are responsible for different chunks, as EigenDA is horizontally +sharded) and is correctly coded (e.g. each chunk must be a valid KZG multiproof) +according to the EigenDA protocol. It also stores the chunks along with metadata +for the protocol-defined length of custody. It will return a signature at the +end to attest to the data in this request it has processed.

    StoreBlobsStoreBlobsRequestStoreBlobsReply

    StoreBlobs is simiar to StoreChunks, but it stores the blobs using a different storage schema +so that the stored blobs can later be aggregated by AttestBatch method to a bigger batch. +StoreBlobs + AttestBatch will eventually replace and deprecate StoreChunks method. +DEPRECATED: StoreBlobs method is not used

    AttestBatchAttestBatchRequestAttestBatchReply

    AttestBatch is used to aggregate the batches stored by StoreBlobs method to a bigger batch. +It will return a signature at the end to attest to the aggregated batch. +DEPRECATED: AttestBatch method is not used

    NodeInfoNodeInfoRequestNodeInfoReply

    Retrieve node info metadata

    + + +

    Retrieval

    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Method NameRequest TypeResponse TypeDescription
    RetrieveChunksRetrieveChunksRequestRetrieveChunksReply

    RetrieveChunks retrieves the chunks for a blob custodied at the Node.

    GetBlobHeaderGetBlobHeaderRequestGetBlobHeaderReply

    GetBlobHeader is similar to RetrieveChunks, this just returns the header of the blob.

    NodeInfoNodeInfoRequestNodeInfoReply

    Retrieve node info metadata

    + + + + +
    +

    node/v2/node_v2.proto

    Top +
    +

    + + +

    GetChunksReply

    @@ -3117,24 +3103,10 @@

    DisperseBlobReply

    - result - BlobStatus - -

    The status of the blob associated with the request_id. Will always be PROCESSING.

    - - - - request_id + chunks bytes - -

    The request ID generated by the disperser. -Once a request is accepted (although not processed), a unique request ID will be -generated. -Two different DisperseBlobRequests (determined by the hash of the DisperseBlobRequest) -will have different IDs, and the same DisperseBlobRequest sent repeatedly at different -times will also have different IDs. -The client should use this ID to query the processing status of the request (via -the GetBlobStatus API).

    + repeated +

    All chunks the Node is storing for the requested blob per RetrieveChunksRequest.

    @@ -3144,7 +3116,7 @@

    DisperseBlobReply

    -

    DisperseBlobRequest

    +

    GetChunksRequest

    @@ -3155,33 +3127,19 @@

    DisperseBlobRequest

    - data + blob_key bytes -

    The data to be dispersed. -The size of data must be <= 16MiB. Every 32 bytes of data is interpreted as an integer in big endian format -where the lower address has more significant bits. The integer must stay in the valid range to be interpreted -as a field element on the bn254 curve. The valid range is -0 <= x < 21888242871839275222246405745257275088548364400416034343698204186575808495617 -If any one of the 32 bytes elements is outside the range, the whole request is deemed as invalid, and rejected.

    +

    - custom_quorum_numbers + quorum_id uint32 - repeated -

    The quorums to which the blob will be sent, in addition to the required quorums which are configured -on the EigenDA smart contract. If required quorums are included here, an error will be returned. -The disperser will ensure that the encoded blobs for each quorum are all processed -within the same batch.

    - - - - account_id - string -

    The account ID of the client. This should be a hex-encoded string of the ECSDA public key -corresponding to the key used by the client to sign the BlobAuthHeader.

    +

    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].

    @@ -3191,8 +3149,8 @@

    DisperseBlobRequest

    -

    DispersePaidBlobRequest

    -

    +

    NodeInfoReply

    +

    Node info reply

    @@ -3202,42 +3160,56 @@

    DispersePaidBlobRequest

    - - + + - + - - - - + + + + - - + + - + - - + + - + + + + + + + +
    databytessemverstring

    The data to be dispersed. Same requirements as DisperseBlobRequest.

    quorum_numbersuint32repeated

    The quorums to which the blob to be sent

    archstring

    payment_headercommon.PaymentHeaderosstring

    Payment header contains AccountID, BinIndex, and CumulativePayment

    payment_signaturebytesnum_cpuuint32

    signature of payment_header

    mem_bytesuint64

    - + + + + +

    NodeInfoRequest

    +

    Node info request

    + + -

    RetrieveBlobReply

    -

    RetrieveBlobReply contains the retrieved blob data

    +

    StoreChunksReply

    +

    @@ -3247,7 +3219,7 @@

    RetrieveBlobReply

    - + @@ -3260,8 +3232,8 @@

    RetrieveBlobReply

    -

    RetrieveBlobRequest

    -

    RetrieveBlobRequest contains parameters to retrieve the blob.

    +

    StoreChunksRequest

    +

    datasignature bytes

    @@ -3271,17 +3243,10 @@

    RetrieveBlobRequest

    - - - - - - - - - + + - + @@ -3293,75 +3258,38 @@

    RetrieveBlobRequest

    -

    BlobStatus

    -

    BlobStatus represents the status of a blob.

    The status of a blob is updated as the blob is processed by the disperser.

    The status of a blob can be queried by the client using the GetBlobStatus API.

    Intermediate states are states that the blob can be in while being processed, and it can be updated to a differet state:

    - PROCESSING

    - DISPERSING

    - CONFIRMED

    Terminal states are states that will not be updated to a different state:

    - FAILED

    - FINALIZED

    - INSUFFICIENT_SIGNATURES

    + + + + +

    Dispersal

    +

    WARNING: the following RPCs are experimental and subject to change.

    batch_header_hashbytes

    blob_indexuint32batchcommon.v2.Batch

    batch of blobs to store

    - + - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +
    NameNumberDescription
    Method NameRequest TypeResponse TypeDescription
    UNKNOWN0StoreChunksStoreChunksRequestStoreChunksReply

    PROCESSING1

    PROCESSING means that the blob is currently being processed by the disperser

    CONFIRMED2

    CONFIRMED means that the blob has been dispersed to DA Nodes and the dispersed -batch containing the blob has been confirmed onchain

    FAILED3

    FAILED means that the blob has failed permanently (for reasons other than insufficient -signatures, which is a separate state). This status is somewhat of a catch-all category, -containg (but not necessarily exclusively as errors can be added in the future): - - blob has expired - - internal logic error while requesting encoding - - blob retry has exceeded its limit while waiting for blob finalization after confirmation. - Most likely triggered by a chain reorg: see https://github.com/Layr-Labs/eigenda/blob/master/disperser/batcher/finalizer.go#L179-L189.

    FINALIZED4

    FINALIZED means that the block containing the blob's confirmation transaction has been finalized on Ethereum

    INSUFFICIENT_SIGNATURES5

    INSUFFICIENT_SIGNATURES means that the confirmation threshold for the blob was not met -for at least one quorum.

    DISPERSING6

    The DISPERSING state is comprised of two separate phases: - - Dispersing to DA nodes and collecting signature - - Submitting the transaction on chain and waiting for tx receipt

    NodeInfoNodeInfoRequestNodeInfoReply

    - - - - -

    Disperser

    -

    Disperser defines the public APIs for dispersing blobs.

    + +

    Retrieval

    +

    @@ -3369,52 +3297,17 @@

    Disperser

    - - - - - - - - - - - - - - - - - - + + + + - - - - + + + + @@ -3694,6 +3587,113 @@

    Relay

    + +
    +

    retriever/retriever.proto

    Top +
    +

    + + +

    BlobReply

    +

    + + +
    Method NameRequest TypeResponse TypeDescription
    DisperseBlobDisperseBlobRequestDisperseBlobReply

    DisperseBlob accepts a single blob to be dispersed. -This executes the dispersal async, i.e. it returns once the request -is accepted. The client should use GetBlobStatus() API to poll the -processing status of the blob. - -If DisperseBlob returns the following error codes: -INVALID_ARGUMENT (400): request is invalid for a reason specified in the error msg. -RESOURCE_EXHAUSTED (429): request is rate limited for the quorum specified in the error msg. - user should retry after the specified duration. -INTERNAL (500): serious error, user should NOT retry.

    DisperseBlobAuthenticatedAuthenticatedRequest streamAuthenticatedReply stream

    DisperseBlobAuthenticated is similar to DisperseBlob, except that it requires the -client to authenticate itself via the AuthenticationData message. The protoco is as follows: -1. The client sends a DisperseBlobAuthenticated request with the DisperseBlobRequest message -2. The Disperser sends back a BlobAuthHeader message containing information for the client to - verify and sign. -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.

    GetBlobStatusBlobStatusRequestBlobStatusReply

    This API is meant to be polled for the blob status.

    GetChunksGetChunksRequestGetChunksReply

    GetChunks retrieves the chunks for a blob custodied at the Node.

    RetrieveBlobRetrieveBlobRequestRetrieveBlobReply

    This retrieves the requested blob from the Disperser's backend. -This is a more efficient way to retrieve blobs than directly retrieving -from the DA Nodes (see detail about this approach in -api/proto/retriever/retriever.proto). -The blob should have been initially dispersed via this Disperser service -for this API to work.

    NodeInfoNodeInfoRequestNodeInfoReply

    Retrieve node info metadata

    + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    databytes

    The blob retrieved and reconstructed from the EigenDA Nodes per BlobRequest.

    + + + + + +

    BlobRequest

    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    batch_header_hashbytes

    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.

    blob_indexuint32

    Which blob in the batch this is requesting for (note: a batch is logically an +ordered list of blobs).

    reference_block_numberuint32

    The Ethereum block number at which the batch for this blob was constructed.

    quorum_iduint32

    Which quorum of the blob this is requesting for (note a blob can participate in +multiple quorums).

    + + + + + + + + + + + +

    Retriever

    +

    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.

    + + + + + + + + + + + + + + +
    Method NameRequest TypeResponse TypeDescription
    RetrieveBlobBlobRequestBlobReply

    This fans out request to EigenDA Nodes to retrieve the chunks and returns the +reconstructed original blob in response.

    + + +

    Scalar Value Types

    diff --git a/api/docs/eigenda-protos.md b/api/docs/eigenda-protos.md index a5a01cac1..ad012427c 100644 --- a/api/docs/eigenda-protos.md +++ b/api/docs/eigenda-protos.md @@ -11,11 +11,10 @@ - [Churner](#churner-Churner) -- [retriever/retriever.proto](#retriever_retriever-proto) - - [BlobReply](#retriever-BlobReply) - - [BlobRequest](#retriever-BlobRequest) - - - [Retriever](#retriever-Retriever) +- [common/common.proto](#common_common-proto) + - [BlobCommitment](#common-BlobCommitment) + - [G1Commitment](#common-G1Commitment) + - [PaymentHeader](#common-PaymentHeader) - [common/v2/common.proto](#common_v2_common-proto) - [Batch](#common-v2-Batch) @@ -23,10 +22,43 @@ - [BlobCertificate](#common-v2-BlobCertificate) - [BlobHeader](#common-v2-BlobHeader) -- [common/common.proto](#common_common-proto) - - [BlobCommitment](#common-BlobCommitment) - - [G1Commitment](#common-G1Commitment) - - [PaymentHeader](#common-PaymentHeader) +- [disperser/disperser.proto](#disperser_disperser-proto) + - [AuthenticatedReply](#disperser-AuthenticatedReply) + - [AuthenticatedRequest](#disperser-AuthenticatedRequest) + - [AuthenticationData](#disperser-AuthenticationData) + - [BatchHeader](#disperser-BatchHeader) + - [BatchMetadata](#disperser-BatchMetadata) + - [BlobAuthHeader](#disperser-BlobAuthHeader) + - [BlobHeader](#disperser-BlobHeader) + - [BlobInfo](#disperser-BlobInfo) + - [BlobQuorumParam](#disperser-BlobQuorumParam) + - [BlobStatusReply](#disperser-BlobStatusReply) + - [BlobStatusRequest](#disperser-BlobStatusRequest) + - [BlobVerificationProof](#disperser-BlobVerificationProof) + - [DisperseBlobReply](#disperser-DisperseBlobReply) + - [DisperseBlobRequest](#disperser-DisperseBlobRequest) + - [DispersePaidBlobRequest](#disperser-DispersePaidBlobRequest) + - [RetrieveBlobReply](#disperser-RetrieveBlobReply) + - [RetrieveBlobRequest](#disperser-RetrieveBlobRequest) + + - [BlobStatus](#disperser-BlobStatus) + + - [Disperser](#disperser-Disperser) + +- [disperser/v2/disperser_v2.proto](#disperser_v2_disperser_v2-proto) + - [Attestation](#disperser-v2-Attestation) + - [BlobCommitmentReply](#disperser-v2-BlobCommitmentReply) + - [BlobCommitmentRequest](#disperser-v2-BlobCommitmentRequest) + - [BlobStatusReply](#disperser-v2-BlobStatusReply) + - [BlobStatusRequest](#disperser-v2-BlobStatusRequest) + - [BlobVerificationInfo](#disperser-v2-BlobVerificationInfo) + - [DisperseBlobReply](#disperser-v2-DisperseBlobReply) + - [DisperseBlobRequest](#disperser-v2-DisperseBlobRequest) + - [SignedBatch](#disperser-v2-SignedBatch) + + - [BlobStatus](#disperser-v2-BlobStatus) + + - [Disperser](#disperser-v2-Disperser) - [node/node.proto](#node_node-proto) - [AttestBatchReply](#node-AttestBatchReply) @@ -65,44 +97,6 @@ - [Dispersal](#node-v2-Dispersal) - [Retrieval](#node-v2-Retrieval) -- [disperser/v2/disperser_v2.proto](#disperser_v2_disperser_v2-proto) - - [Attestation](#disperser-v2-Attestation) - - [BlobCommitmentReply](#disperser-v2-BlobCommitmentReply) - - [BlobCommitmentRequest](#disperser-v2-BlobCommitmentRequest) - - [BlobStatusReply](#disperser-v2-BlobStatusReply) - - [BlobStatusRequest](#disperser-v2-BlobStatusRequest) - - [BlobVerificationInfo](#disperser-v2-BlobVerificationInfo) - - [DisperseBlobReply](#disperser-v2-DisperseBlobReply) - - [DisperseBlobRequest](#disperser-v2-DisperseBlobRequest) - - [SignedBatch](#disperser-v2-SignedBatch) - - - [BlobStatus](#disperser-v2-BlobStatus) - - - [Disperser](#disperser-v2-Disperser) - -- [disperser/disperser.proto](#disperser_disperser-proto) - - [AuthenticatedReply](#disperser-AuthenticatedReply) - - [AuthenticatedRequest](#disperser-AuthenticatedRequest) - - [AuthenticationData](#disperser-AuthenticationData) - - [BatchHeader](#disperser-BatchHeader) - - [BatchMetadata](#disperser-BatchMetadata) - - [BlobAuthHeader](#disperser-BlobAuthHeader) - - [BlobHeader](#disperser-BlobHeader) - - [BlobInfo](#disperser-BlobInfo) - - [BlobQuorumParam](#disperser-BlobQuorumParam) - - [BlobStatusReply](#disperser-BlobStatusReply) - - [BlobStatusRequest](#disperser-BlobStatusRequest) - - [BlobVerificationProof](#disperser-BlobVerificationProof) - - [DisperseBlobReply](#disperser-DisperseBlobReply) - - [DisperseBlobRequest](#disperser-DisperseBlobRequest) - - [DispersePaidBlobRequest](#disperser-DispersePaidBlobRequest) - - [RetrieveBlobReply](#disperser-RetrieveBlobReply) - - [RetrieveBlobRequest](#disperser-RetrieveBlobRequest) - - - [BlobStatus](#disperser-BlobStatus) - - - [Disperser](#disperser-Disperser) - - [relay/relay.proto](#relay_relay-proto) - [ChunkRequest](#node-ChunkRequest) - [ChunkRequestByIndex](#node-ChunkRequestByIndex) @@ -114,6 +108,12 @@ - [Relay](#node-Relay) +- [retriever/retriever.proto](#retriever_retriever-proto) + - [BlobReply](#retriever-BlobReply) + - [BlobRequest](#retriever-BlobRequest) + + - [Retriever](#retriever-Retriever) + - [Scalar Value Types](#scalar-value-types) @@ -225,72 +225,69 @@ https://github.com/Layr-Labs/eigenlayer-middleware/blob/master/src/interfaces/IB - +

    Top

    -## retriever/retriever.proto - +## common/common.proto - -### BlobReply + +### BlobCommitment +BlobCommitment represents commitment of a specific blob, containing its +KZG commitment, degree proof, the actual degree, and data length in number of symbols. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| data | [bytes](#bytes) | | The blob retrieved and reconstructed from the EigenDA Nodes per BlobRequest. | +| commitment | [bytes](#bytes) | | | +| length_commitment | [bytes](#bytes) | | | +| length_proof | [bytes](#bytes) | | | +| length | [uint32](#uint32) | | | - + -### BlobRequest +### G1Commitment | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| batch_header_hash | [bytes](#bytes) | | 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. | -| blob_index | [uint32](#uint32) | | Which blob in the batch this is requesting for (note: a batch is logically an ordered list of blobs). | -| reference_block_number | [uint32](#uint32) | | The Ethereum block number at which the batch for this blob was constructed. | -| quorum_id | [uint32](#uint32) | | Which quorum of the blob this is requesting for (note a blob can participate in multiple quorums). | +| x | [bytes](#bytes) | | The X coordinate of the KZG commitment. This is the raw byte representation of the field element. | +| y | [bytes](#bytes) | | The Y coordinate of the KZG commitment. This is the raw byte representation of the field element. | - - + - +### PaymentHeader - -### Retriever -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. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| account_id | [string](#string) | | | +| bin_index | [uint32](#uint32) | | | +| cumulative_payment | [bytes](#bytes) | | | -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. -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| RetrieveBlob | [BlobRequest](#retriever-BlobRequest) | [BlobReply](#retriever-BlobReply) | This fans out request to EigenDA Nodes to retrieve the chunks and returns the reconstructed original blob in response. | + + + + + + + @@ -379,392 +376,296 @@ BlobCertificate is what gets attested by the network - +

    Top

    -## common/common.proto +## disperser/disperser.proto - + + +### AuthenticatedReply -### BlobCommitment -BlobCommitment represents commitment of a specific blob, containing its -KZG commitment, degree proof, the actual degree, and data length in number of symbols. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| commitment | [bytes](#bytes) | | | -| length_commitment | [bytes](#bytes) | | | -| length_proof | [bytes](#bytes) | | | -| length | [uint32](#uint32) | | | +| blob_auth_header | [BlobAuthHeader](#disperser-BlobAuthHeader) | | | +| disperse_reply | [DisperseBlobReply](#disperser-DisperseBlobReply) | | | - + -### G1Commitment +### AuthenticatedRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| x | [bytes](#bytes) | | The X coordinate of the KZG commitment. This is the raw byte representation of the field element. | -| y | [bytes](#bytes) | | The Y coordinate of the KZG commitment. This is the raw byte representation of the field element. | - +| disperse_request | [DisperseBlobRequest](#disperser-DisperseBlobRequest) | | | +| authentication_data | [AuthenticationData](#disperser-AuthenticationData) | | | - -### PaymentHeader + +### AuthenticationData +AuthenticationData contains the signature of the BlobAuthHeader. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| account_id | [string](#string) | | | -| bin_index | [uint32](#uint32) | | | -| cumulative_payment | [bytes](#bytes) | | | +| authentication_data | [bytes](#bytes) | | | - - + - +### BatchHeader - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| batch_root | [bytes](#bytes) | | The root of the merkle tree with the hashes of blob headers as leaves. | +| quorum_numbers | [bytes](#bytes) | | All quorums associated with blobs in this batch. Sorted in ascending order. Ex. [0, 2, 1] => 0x000102 | +| quorum_signed_percentages | [bytes](#bytes) | | The percentage of stake that has signed for this batch. The quorum_signed_percentages[i] is percentage for the quorum_numbers[i]. | +| reference_block_number | [uint32](#uint32) | | The Ethereum block number at which the batch was created. The Disperser will encode and disperse the blobs based on the onchain info (e.g. operator stakes) at this block number. | + - -

    Top

    -## node/node.proto - + -### AttestBatchReply +### BatchMetadata | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| signature | [bytes](#bytes) | | | - +| batch_header | [BatchHeader](#disperser-BatchHeader) | | | +| signatory_record_hash | [bytes](#bytes) | | The hash of all public keys of the operators that did not sign the batch. | +| fee | [bytes](#bytes) | | The fee payment paid by users for dispersing this batch. It's the bytes representation of a big.Int value. | +| confirmation_block_number | [uint32](#uint32) | | The Ethereum block number at which the batch is confirmed onchain. | +| batch_header_hash | [bytes](#bytes) | | This is the hash of the ReducedBatchHeader defined onchain, see: https://github.com/Layr-Labs/eigenda/blob/master/contracts/src/interfaces/IEigenDAServiceManager.sol#L43 The is the message that the operators will sign their signatures on. | - -### AttestBatchRequest + +### BlobAuthHeader +BlobAuthHeader contains information about the blob for the client to verify and sign. +- Once payments are enabled, the BlobAuthHeader will contain the KZG commitment to the blob, which the client +will verify and sign. Having the client verify the KZG commitment instead of calculating it avoids +the need for the client to have the KZG structured reference string (SRS), which can be large. +The signed KZG commitment prevents the disperser from sending a different blob to the DA Nodes +than the one the client sent. +- In the meantime, the BlobAuthHeader contains a simple challenge parameter is used to prevent +replay attacks in the event that a signature is leaked. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| batch_header | [BatchHeader](#node-BatchHeader) | | header of the batch | -| blob_header_hashes | [bytes](#bytes) | repeated | the header hashes of all blobs in the batch | +| challenge_parameter | [uint32](#uint32) | | | - + + +### BlobHeader -### BatchHeader -BatchHeader (see core/data.go#BatchHeader) | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| batch_root | [bytes](#bytes) | | The root of the merkle tree with hashes of blob headers as leaves. | -| reference_block_number | [uint32](#uint32) | | The Ethereum block number at which the batch is dispersed. | +| commitment | [common.G1Commitment](#common-G1Commitment) | | KZG commitment of the blob. | +| data_length | [uint32](#uint32) | | The length of the blob in symbols (each symbol is 32 bytes). | +| blob_quorum_params | [BlobQuorumParam](#disperser-BlobQuorumParam) | repeated | The params of the quorums that this blob participates in. | - + -### Blob -In EigenDA, the original blob to disperse is encoded as a polynomial via taking -taking different point evaluations (i.e. erasure coding). These points are split -into disjoint subsets which are assigned to different operator nodes in the EigenDA -network. -The data in this message is a subset of these points that are assigned to a -single operator node. +### BlobInfo +BlobInfo contains information needed to confirm the blob against the EigenDA contracts | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| header | [BlobHeader](#node-BlobHeader) | | Which (original) blob this is for. | -| bundles | [Bundle](#node-Bundle) | repeated | Each bundle contains all chunks for a single quorum of the blob. The number of bundles must be equal to the total number of quorums associated with the blob, and the ordering must be the same as BlobHeader.quorum_headers. Note: an operator may be in some but not all of the quorums; in that case the bundle corresponding to that quorum will be empty. | +| blob_header | [BlobHeader](#disperser-BlobHeader) | | | +| blob_verification_proof | [BlobVerificationProof](#disperser-BlobVerificationProof) | | | - - -### BlobHeader - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| commitment | [common.G1Commitment](#common-G1Commitment) | | The KZG commitment to the polynomial representing the blob. | -| length_commitment | [G2Commitment](#node-G2Commitment) | | The KZG commitment to the polynomial representing the blob on G2, it is used for proving the degree of the polynomial | -| length_proof | [G2Commitment](#node-G2Commitment) | | The low degree proof. It's the KZG commitment to the polynomial shifted to the largest SRS degree. | -| length | [uint32](#uint32) | | The length of the original blob in number of symbols (in the field where the polynomial is defined). | -| quorum_headers | [BlobQuorumInfo](#node-BlobQuorumInfo) | repeated | The params of the quorums that this blob participates in. | -| account_id | [string](#string) | | The ID of the user who is dispersing this blob to EigenDA. | -| reference_block_number | [uint32](#uint32) | | The reference block number whose state is used to encode the blob | - - - - - - - - -### BlobQuorumInfo -See BlobQuorumParam as defined in -api/proto/disperser/disperser.proto - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| quorum_id | [uint32](#uint32) | | | -| adversary_threshold | [uint32](#uint32) | | | -| confirmation_threshold | [uint32](#uint32) | | | -| chunk_length | [uint32](#uint32) | | | -| ratelimit | [uint32](#uint32) | | | - - - - - - - - -### Bundle -A Bundle is the collection of chunks associated with a single blob, for a single -operator and a single quorum. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| chunks | [bytes](#bytes) | repeated | Each chunk corresponds to a collection of points on the polynomial. Each chunk has same number of points. | -| bundle | [bytes](#bytes) | | All chunks of the bundle encoded in a byte array. | - - - - - - - - -### G2Commitment - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| x_a0 | [bytes](#bytes) | | The A0 element of the X coordinate of G2 point. | -| x_a1 | [bytes](#bytes) | | The A1 element of the X coordinate of G2 point. | -| y_a0 | [bytes](#bytes) | | The A0 element of the Y coordinate of G2 point. | -| y_a1 | [bytes](#bytes) | | The A1 element of the Y coordinate of G2 point. | - - - - - - - - -### GetBlobHeaderReply - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| blob_header | [BlobHeader](#node-BlobHeader) | | The header of the blob requested per GetBlobHeaderRequest. | -| proof | [MerkleProof](#node-MerkleProof) | | 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. | - - - - - + - +### BlobQuorumParam -### GetBlobHeaderRequest -See RetrieveChunksRequest for documentation of each parameter of GetBlobHeaderRequest. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| batch_header_hash | [bytes](#bytes) | | | -| blob_index | [uint32](#uint32) | | | -| quorum_id | [uint32](#uint32) | | | +| quorum_number | [uint32](#uint32) | | The ID of the quorum. | +| adversary_threshold_percentage | [uint32](#uint32) | | The max percentage of stake within the quorum that can be held by or delegated to adversarial operators. Currently, this and the next parameter are standardized across the quorum using values read from the EigenDA contracts. | +| confirmation_threshold_percentage | [uint32](#uint32) | | The min percentage of stake that must attest in order to consider the dispersal is successful. | +| chunk_length | [uint32](#uint32) | | The length of each chunk. | - + -### MerkleProof +### BlobStatusReply | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| hashes | [bytes](#bytes) | repeated | The proof itself. | -| index | [uint32](#uint32) | | Which index (the leaf of the Merkle tree) this proof is for. | +| status | [BlobStatus](#disperser-BlobStatus) | | The status of the blob. | +| info | [BlobInfo](#disperser-BlobInfo) | | The blob info needed for clients to confirm the blob against the EigenDA contracts. | - + -### NodeInfoReply -Node info reply +### BlobStatusRequest +BlobStatusRequest is used to query the status of a blob. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| semver | [string](#string) | | | -| arch | [string](#string) | | | -| os | [string](#string) | | | -| num_cpu | [uint32](#uint32) | | | -| mem_bytes | [uint64](#uint64) | | | - - - - - - - - -### NodeInfoRequest -Node info request +| request_id | [bytes](#bytes) | | | - + -### RetrieveChunksReply +### BlobVerificationProof | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| chunks | [bytes](#bytes) | repeated | All chunks the Node is storing for the requested blob per RetrieveChunksRequest. | -| chunk_encoding_format | [ChunkEncodingFormat](#node-ChunkEncodingFormat) | | How the above chunks are encoded. | +| batch_id | [uint32](#uint32) | | batch_id is an incremental ID assigned to a batch by EigenDAServiceManager | +| blob_index | [uint32](#uint32) | | The index of the blob in the batch (which is logically an ordered list of blobs). | +| batch_metadata | [BatchMetadata](#disperser-BatchMetadata) | | | +| inclusion_proof | [bytes](#bytes) | | inclusion_proof is a merkle proof for a blob header's inclusion in a batch | +| quorum_indexes | [bytes](#bytes) | | indexes of quorums in BatchHeader.quorum_numbers that match the quorums in BlobHeader.blob_quorum_params Ex. BlobHeader.blob_quorum_params = [ { quorum_number = 0, ... }, { quorum_number = 3, ... }, { quorum_number = 5, ... }, ] BatchHeader.quorum_numbers = [0, 5, 3] => 0x000503 Then, quorum_indexes = [0, 2, 1] => 0x000201 | - + -### RetrieveChunksRequest +### DisperseBlobReply | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| batch_header_hash | [bytes](#bytes) | | 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. | -| blob_index | [uint32](#uint32) | | Which blob in the batch to retrieve for (note: a batch is logically an ordered list of blobs). | -| quorum_id | [uint32](#uint32) | | 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]. | +| result | [BlobStatus](#disperser-BlobStatus) | | The status of the blob associated with the request_id. Will always be PROCESSING. | +| request_id | [bytes](#bytes) | | The request ID generated by the disperser. Once a request is accepted (although not processed), a unique request ID will be generated. Two different DisperseBlobRequests (determined by the hash of the DisperseBlobRequest) will have different IDs, and the same DisperseBlobRequest sent repeatedly at different times will also have different IDs. The client should use this ID to query the processing status of the request (via the GetBlobStatus API). | - + -### StoreBlobsReply +### DisperseBlobRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| signatures | [google.protobuf.BytesValue](#google-protobuf-BytesValue) | repeated | The operator's BLS sgnature signed on the blob header hashes. The ordering of the signatures must match the ordering of the blobs sent in the request, with empty signatures in the places for discarded blobs. | +| data | [bytes](#bytes) | | The data to be dispersed. The size of data must be <= 16MiB. Every 32 bytes of data is interpreted as an integer in big endian format where the lower address has more significant bits. The integer must stay in the valid range to be interpreted as a field element on the bn254 curve. The valid range is 0 <= x < 21888242871839275222246405745257275088548364400416034343698204186575808495617 If any one of the 32 bytes elements is outside the range, the whole request is deemed as invalid, and rejected. | +| custom_quorum_numbers | [uint32](#uint32) | repeated | The quorums to which the blob will be sent, in addition to the required quorums which are configured on the EigenDA smart contract. If required quorums are included here, an error will be returned. The disperser will ensure that the encoded blobs for each quorum are all processed within the same batch. | +| account_id | [string](#string) | | The account ID of the client. This should be a hex-encoded string of the ECSDA public key corresponding to the key used by the client to sign the BlobAuthHeader. | - + -### StoreBlobsRequest +### DispersePaidBlobRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| blobs | [Blob](#node-Blob) | repeated | Blobs to store | -| reference_block_number | [uint32](#uint32) | | The reference block number whose state is used to encode the blobs | - +| data | [bytes](#bytes) | | The data to be dispersed. Same requirements as DisperseBlobRequest. | +| quorum_numbers | [uint32](#uint32) | repeated | The quorums to which the blob to be sent | +| payment_header | [common.PaymentHeader](#common-PaymentHeader) | | Payment header contains AccountID, BinIndex, and CumulativePayment | +| payment_signature | [bytes](#bytes) | | signature of payment_header | - -### StoreChunksReply + +### RetrieveBlobReply +RetrieveBlobReply contains the retrieved blob data | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| signature | [bytes](#bytes) | | The operator's BLS signature signed on the batch header hash. | - +| data | [bytes](#bytes) | | | - -### StoreChunksRequest + +### RetrieveBlobRequest +RetrieveBlobRequest contains parameters to retrieve the blob. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| batch_header | [BatchHeader](#node-BatchHeader) | | Which batch this request is for. | -| blobs | [Blob](#node-Blob) | repeated | The chunks for each blob in the batch to be stored in an EigenDA Node. | +| batch_header_hash | [bytes](#bytes) | | | +| blob_index | [uint32](#uint32) | | | @@ -773,175 +674,50 @@ Node info request - + -### ChunkEncodingFormat -This describes how the chunks returned in RetrieveChunksReply are encoded. -Used to facilitate the decoding of chunks. +### BlobStatus +BlobStatus represents the status of a blob. +The status of a blob is updated as the blob is processed by the disperser. +The status of a blob can be queried by the client using the GetBlobStatus API. +Intermediate states are states that the blob can be in while being processed, and it can be updated to a differet state: +- PROCESSING +- DISPERSING +- CONFIRMED +Terminal states are states that will not be updated to a different state: +- FAILED +- FINALIZED +- INSUFFICIENT_SIGNATURES | Name | Number | Description | | ---- | ------ | ----------- | | UNKNOWN | 0 | | -| GNARK | 1 | | -| GOB | 2 | | - - - - - - - - - -### Dispersal - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| StoreChunks | [StoreChunksRequest](#node-StoreChunksRequest) | [StoreChunksReply](#node-StoreChunksReply) | StoreChunks validates that the chunks match what the Node is supposed to receive ( different Nodes are responsible for different chunks, as EigenDA is horizontally sharded) and is correctly coded (e.g. each chunk must be a valid KZG multiproof) according to the EigenDA protocol. It also stores the chunks along with metadata for the protocol-defined length of custody. It will return a signature at the end to attest to the data in this request it has processed. | -| StoreBlobs | [StoreBlobsRequest](#node-StoreBlobsRequest) | [StoreBlobsReply](#node-StoreBlobsReply) | StoreBlobs is simiar to StoreChunks, but it stores the blobs using a different storage schema so that the stored blobs can later be aggregated by AttestBatch method to a bigger batch. StoreBlobs + AttestBatch will eventually replace and deprecate StoreChunks method. DEPRECATED: StoreBlobs method is not used | -| AttestBatch | [AttestBatchRequest](#node-AttestBatchRequest) | [AttestBatchReply](#node-AttestBatchReply) | AttestBatch is used to aggregate the batches stored by StoreBlobs method to a bigger batch. It will return a signature at the end to attest to the aggregated batch. DEPRECATED: AttestBatch method is not used | -| NodeInfo | [NodeInfoRequest](#node-NodeInfoRequest) | [NodeInfoReply](#node-NodeInfoReply) | Retrieve node info metadata | - - - - -### Retrieval - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| RetrieveChunks | [RetrieveChunksRequest](#node-RetrieveChunksRequest) | [RetrieveChunksReply](#node-RetrieveChunksReply) | RetrieveChunks retrieves the chunks for a blob custodied at the Node. | -| GetBlobHeader | [GetBlobHeaderRequest](#node-GetBlobHeaderRequest) | [GetBlobHeaderReply](#node-GetBlobHeaderReply) | GetBlobHeader is similar to RetrieveChunks, this just returns the header of the blob. | -| NodeInfo | [NodeInfoRequest](#node-NodeInfoRequest) | [NodeInfoReply](#node-NodeInfoReply) | Retrieve node info metadata | - - - - - - -

    Top

    - -## node/v2/node_v2.proto - - - - - -### GetChunksReply - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| chunks | [bytes](#bytes) | repeated | All chunks the Node is storing for the requested blob per RetrieveChunksRequest. | - - - - - - - - -### GetChunksRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| blob_key | [bytes](#bytes) | | | -| quorum_id | [uint32](#uint32) | | 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]. | - - - - - - - - -### NodeInfoReply -Node info reply - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| semver | [string](#string) | | | -| arch | [string](#string) | | | -| os | [string](#string) | | | -| num_cpu | [uint32](#uint32) | | | -| mem_bytes | [uint64](#uint64) | | | - - - - - - - - -### NodeInfoRequest -Node info request - - - - - - - - -### StoreChunksReply - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| signature | [bytes](#bytes) | | | - - - - - - - - -### StoreChunksRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| batch | [common.v2.Batch](#common-v2-Batch) | | batch of blobs to store | - - - - - - - - - - - - - - -### Dispersal -WARNING: the following RPCs are experimental and subject to change. - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| StoreChunks | [StoreChunksRequest](#node-v2-StoreChunksRequest) | [StoreChunksReply](#node-v2-StoreChunksReply) | | -| NodeInfo | [NodeInfoRequest](#node-v2-NodeInfoRequest) | [NodeInfoReply](#node-v2-NodeInfoReply) | | +| PROCESSING | 1 | PROCESSING means that the blob is currently being processed by the disperser | +| CONFIRMED | 2 | CONFIRMED means that the blob has been dispersed to DA Nodes and the dispersed batch containing the blob has been confirmed onchain | +| FAILED | 3 | FAILED means that the blob has failed permanently (for reasons other than insufficient signatures, which is a separate state). This status is somewhat of a catch-all category, containg (but not necessarily exclusively as errors can be added in the future): - blob has expired - internal logic error while requesting encoding - blob retry has exceeded its limit while waiting for blob finalization after confirmation. Most likely triggered by a chain reorg: see https://github.com/Layr-Labs/eigenda/blob/master/disperser/batcher/finalizer.go#L179-L189. | +| FINALIZED | 4 | FINALIZED means that the block containing the blob's confirmation transaction has been finalized on Ethereum | +| INSUFFICIENT_SIGNATURES | 5 | INSUFFICIENT_SIGNATURES means that the confirmation threshold for the blob was not met for at least one quorum. | +| DISPERSING | 6 | The DISPERSING state is comprised of two separate phases: - Dispersing to DA nodes and collecting signature - Submitting the transaction on chain and waiting for tx receipt | - + -### Retrieval + + + + +### Disperser +Disperser defines the public APIs for dispersing blobs. | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| -| GetChunks | [GetChunksRequest](#node-v2-GetChunksRequest) | [GetChunksReply](#node-v2-GetChunksReply) | GetChunks retrieves the chunks for a blob custodied at the Node. | -| NodeInfo | [NodeInfoRequest](#node-v2-NodeInfoRequest) | [NodeInfoReply](#node-v2-NodeInfoReply) | Retrieve node info metadata | +| DisperseBlob | [DisperseBlobRequest](#disperser-DisperseBlobRequest) | [DisperseBlobReply](#disperser-DisperseBlobReply) | DisperseBlob accepts a single blob to be dispersed. This executes the dispersal async, i.e. it returns once the request is accepted. The client should use GetBlobStatus() API to poll the processing status of the blob. + +If DisperseBlob returns the following error codes: INVALID_ARGUMENT (400): request is invalid for a reason specified in the error msg. RESOURCE_EXHAUSTED (429): request is rate limited for the quorum specified in the error msg. user should retry after the specified duration. INTERNAL (500): serious error, user should NOT retry. | +| DisperseBlobAuthenticated | [AuthenticatedRequest](#disperser-AuthenticatedRequest) stream | [AuthenticatedReply](#disperser-AuthenticatedReply) stream | DisperseBlobAuthenticated is similar to DisperseBlob, except that it requires the client to authenticate itself via the AuthenticationData message. The protoco is as follows: 1. The client sends a DisperseBlobAuthenticated request with the DisperseBlobRequest message 2. The Disperser sends back a BlobAuthHeader message containing information for the client to verify and sign. 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. | +| GetBlobStatus | [BlobStatusRequest](#disperser-BlobStatusRequest) | [BlobStatusReply](#disperser-BlobStatusReply) | This API is meant to be polled for the blob status. | +| RetrieveBlob | [RetrieveBlobRequest](#disperser-RetrieveBlobRequest) | [RetrieveBlobReply](#disperser-RetrieveBlobReply) | This retrieves the requested blob from the Disperser's backend. This is a more efficient way to retrieve blobs than directly retrieving from the DA Nodes (see detail about this approach in api/proto/retriever/retriever.proto). The blob should have been initially dispersed via this Disperser service for this API to work. | @@ -1147,296 +923,469 @@ Disperser defines the public APIs for dispersing blobs. - +

    Top

    -## disperser/disperser.proto +## node/node.proto - + -### AuthenticatedReply +### AttestBatchReply | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| blob_auth_header | [BlobAuthHeader](#disperser-BlobAuthHeader) | | | -| disperse_reply | [DisperseBlobReply](#disperser-DisperseBlobReply) | | | +| signature | [bytes](#bytes) | | | - + -### AuthenticatedRequest +### AttestBatchRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| disperse_request | [DisperseBlobRequest](#disperser-DisperseBlobRequest) | | | -| authentication_data | [AuthenticationData](#disperser-AuthenticationData) | | | +| batch_header | [BatchHeader](#node-BatchHeader) | | header of the batch | +| blob_header_hashes | [bytes](#bytes) | repeated | the header hashes of all blobs in the batch | - + -### AuthenticationData -AuthenticationData contains the signature of the BlobAuthHeader. +### BatchHeader +BatchHeader (see core/data.go#BatchHeader) | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| authentication_data | [bytes](#bytes) | | | +| batch_root | [bytes](#bytes) | | The root of the merkle tree with hashes of blob headers as leaves. | +| reference_block_number | [uint32](#uint32) | | The Ethereum block number at which the batch is dispersed. | - + + +### Blob +In EigenDA, the original blob to disperse is encoded as a polynomial via taking +taking different point evaluations (i.e. erasure coding). These points are split +into disjoint subsets which are assigned to different operator nodes in the EigenDA +network. +The data in this message is a subset of these points that are assigned to a +single operator node. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| header | [BlobHeader](#node-BlobHeader) | | Which (original) blob this is for. | +| bundles | [Bundle](#node-Bundle) | repeated | Each bundle contains all chunks for a single quorum of the blob. The number of bundles must be equal to the total number of quorums associated with the blob, and the ordering must be the same as BlobHeader.quorum_headers. Note: an operator may be in some but not all of the quorums; in that case the bundle corresponding to that quorum will be empty. | + -### BatchHeader + + + + + + +### BlobHeader | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| batch_root | [bytes](#bytes) | | The root of the merkle tree with the hashes of blob headers as leaves. | -| quorum_numbers | [bytes](#bytes) | | All quorums associated with blobs in this batch. Sorted in ascending order. Ex. [0, 2, 1] => 0x000102 | -| quorum_signed_percentages | [bytes](#bytes) | | The percentage of stake that has signed for this batch. The quorum_signed_percentages[i] is percentage for the quorum_numbers[i]. | -| reference_block_number | [uint32](#uint32) | | The Ethereum block number at which the batch was created. The Disperser will encode and disperse the blobs based on the onchain info (e.g. operator stakes) at this block number. | +| commitment | [common.G1Commitment](#common-G1Commitment) | | The KZG commitment to the polynomial representing the blob. | +| length_commitment | [G2Commitment](#node-G2Commitment) | | The KZG commitment to the polynomial representing the blob on G2, it is used for proving the degree of the polynomial | +| length_proof | [G2Commitment](#node-G2Commitment) | | The low degree proof. It's the KZG commitment to the polynomial shifted to the largest SRS degree. | +| length | [uint32](#uint32) | | The length of the original blob in number of symbols (in the field where the polynomial is defined). | +| quorum_headers | [BlobQuorumInfo](#node-BlobQuorumInfo) | repeated | The params of the quorums that this blob participates in. | +| account_id | [string](#string) | | The ID of the user who is dispersing this blob to EigenDA. | +| reference_block_number | [uint32](#uint32) | | The reference block number whose state is used to encode the blob | - + -### BatchMetadata +### BlobQuorumInfo +See BlobQuorumParam as defined in +api/proto/disperser/disperser.proto + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| quorum_id | [uint32](#uint32) | | | +| adversary_threshold | [uint32](#uint32) | | | +| confirmation_threshold | [uint32](#uint32) | | | +| chunk_length | [uint32](#uint32) | | | +| ratelimit | [uint32](#uint32) | | | + + + + + + + +### Bundle +A Bundle is the collection of chunks associated with a single blob, for a single +operator and a single quorum. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| batch_header | [BatchHeader](#disperser-BatchHeader) | | | -| signatory_record_hash | [bytes](#bytes) | | The hash of all public keys of the operators that did not sign the batch. | -| fee | [bytes](#bytes) | | The fee payment paid by users for dispersing this batch. It's the bytes representation of a big.Int value. | -| confirmation_block_number | [uint32](#uint32) | | The Ethereum block number at which the batch is confirmed onchain. | -| batch_header_hash | [bytes](#bytes) | | This is the hash of the ReducedBatchHeader defined onchain, see: https://github.com/Layr-Labs/eigenda/blob/master/contracts/src/interfaces/IEigenDAServiceManager.sol#L43 The is the message that the operators will sign their signatures on. | +| chunks | [bytes](#bytes) | repeated | Each chunk corresponds to a collection of points on the polynomial. Each chunk has same number of points. | +| bundle | [bytes](#bytes) | | All chunks of the bundle encoded in a byte array. | - + + +### G2Commitment + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| x_a0 | [bytes](#bytes) | | The A0 element of the X coordinate of G2 point. | +| x_a1 | [bytes](#bytes) | | The A1 element of the X coordinate of G2 point. | +| y_a0 | [bytes](#bytes) | | The A0 element of the Y coordinate of G2 point. | +| y_a1 | [bytes](#bytes) | | The A1 element of the Y coordinate of G2 point. | + + + + + + + + +### GetBlobHeaderReply + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| blob_header | [BlobHeader](#node-BlobHeader) | | The header of the blob requested per GetBlobHeaderRequest. | +| proof | [MerkleProof](#node-MerkleProof) | | 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. | + + + + + + + + +### GetBlobHeaderRequest +See RetrieveChunksRequest for documentation of each parameter of GetBlobHeaderRequest. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| batch_header_hash | [bytes](#bytes) | | | +| blob_index | [uint32](#uint32) | | | +| quorum_id | [uint32](#uint32) | | | + + + + + + + + +### MerkleProof + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| hashes | [bytes](#bytes) | repeated | The proof itself. | +| index | [uint32](#uint32) | | Which index (the leaf of the Merkle tree) this proof is for. | + + + + + + + + +### NodeInfoReply +Node info reply + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| semver | [string](#string) | | | +| arch | [string](#string) | | | +| os | [string](#string) | | | +| num_cpu | [uint32](#uint32) | | | +| mem_bytes | [uint64](#uint64) | | | + + + + + + + + +### NodeInfoRequest +Node info request + + + + + + + + +### RetrieveChunksReply + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| chunks | [bytes](#bytes) | repeated | All chunks the Node is storing for the requested blob per RetrieveChunksRequest. | +| chunk_encoding_format | [ChunkEncodingFormat](#node-ChunkEncodingFormat) | | How the above chunks are encoded. | + + + + + + + + +### RetrieveChunksRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| batch_header_hash | [bytes](#bytes) | | 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. | +| blob_index | [uint32](#uint32) | | Which blob in the batch to retrieve for (note: a batch is logically an ordered list of blobs). | +| quorum_id | [uint32](#uint32) | | 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]. | + + + + + + + + +### StoreBlobsReply -### BlobAuthHeader -BlobAuthHeader contains information about the blob for the client to verify and sign. -- Once payments are enabled, the BlobAuthHeader will contain the KZG commitment to the blob, which the client -will verify and sign. Having the client verify the KZG commitment instead of calculating it avoids -the need for the client to have the KZG structured reference string (SRS), which can be large. -The signed KZG commitment prevents the disperser from sending a different blob to the DA Nodes -than the one the client sent. -- In the meantime, the BlobAuthHeader contains a simple challenge parameter is used to prevent -replay attacks in the event that a signature is leaked. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| challenge_parameter | [uint32](#uint32) | | | +| signatures | [google.protobuf.BytesValue](#google-protobuf-BytesValue) | repeated | The operator's BLS sgnature signed on the blob header hashes. The ordering of the signatures must match the ordering of the blobs sent in the request, with empty signatures in the places for discarded blobs. | - + -### BlobHeader +### StoreBlobsRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| commitment | [common.G1Commitment](#common-G1Commitment) | | KZG commitment of the blob. | -| data_length | [uint32](#uint32) | | The length of the blob in symbols (each symbol is 32 bytes). | -| blob_quorum_params | [BlobQuorumParam](#disperser-BlobQuorumParam) | repeated | The params of the quorums that this blob participates in. | +| blobs | [Blob](#node-Blob) | repeated | Blobs to store | +| reference_block_number | [uint32](#uint32) | | The reference block number whose state is used to encode the blobs | - + + +### StoreChunksReply -### BlobInfo -BlobInfo contains information needed to confirm the blob against the EigenDA contracts | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| blob_header | [BlobHeader](#disperser-BlobHeader) | | | -| blob_verification_proof | [BlobVerificationProof](#disperser-BlobVerificationProof) | | | +| signature | [bytes](#bytes) | | The operator's BLS signature signed on the batch header hash. | - + -### BlobQuorumParam +### StoreChunksRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| quorum_number | [uint32](#uint32) | | The ID of the quorum. | -| adversary_threshold_percentage | [uint32](#uint32) | | The max percentage of stake within the quorum that can be held by or delegated to adversarial operators. Currently, this and the next parameter are standardized across the quorum using values read from the EigenDA contracts. | -| confirmation_threshold_percentage | [uint32](#uint32) | | The min percentage of stake that must attest in order to consider the dispersal is successful. | -| chunk_length | [uint32](#uint32) | | The length of each chunk. | +| batch_header | [BatchHeader](#node-BatchHeader) | | Which batch this request is for. | +| blobs | [Blob](#node-Blob) | repeated | The chunks for each blob in the batch to be stored in an EigenDA Node. | + - -### BlobStatusReply + + +### ChunkEncodingFormat +This describes how the chunks returned in RetrieveChunksReply are encoded. +Used to facilitate the decoding of chunks. +| Name | Number | Description | +| ---- | ------ | ----------- | +| UNKNOWN | 0 | | +| GNARK | 1 | | +| GOB | 2 | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| status | [BlobStatus](#disperser-BlobStatus) | | The status of the blob. | -| info | [BlobInfo](#disperser-BlobInfo) | | The blob info needed for clients to confirm the blob against the EigenDA contracts. | + + + +### Dispersal - +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| StoreChunks | [StoreChunksRequest](#node-StoreChunksRequest) | [StoreChunksReply](#node-StoreChunksReply) | StoreChunks validates that the chunks match what the Node is supposed to receive ( different Nodes are responsible for different chunks, as EigenDA is horizontally sharded) and is correctly coded (e.g. each chunk must be a valid KZG multiproof) according to the EigenDA protocol. It also stores the chunks along with metadata for the protocol-defined length of custody. It will return a signature at the end to attest to the data in this request it has processed. | +| StoreBlobs | [StoreBlobsRequest](#node-StoreBlobsRequest) | [StoreBlobsReply](#node-StoreBlobsReply) | StoreBlobs is simiar to StoreChunks, but it stores the blobs using a different storage schema so that the stored blobs can later be aggregated by AttestBatch method to a bigger batch. StoreBlobs + AttestBatch will eventually replace and deprecate StoreChunks method. DEPRECATED: StoreBlobs method is not used | +| AttestBatch | [AttestBatchRequest](#node-AttestBatchRequest) | [AttestBatchReply](#node-AttestBatchReply) | AttestBatch is used to aggregate the batches stored by StoreBlobs method to a bigger batch. It will return a signature at the end to attest to the aggregated batch. DEPRECATED: AttestBatch method is not used | +| NodeInfo | [NodeInfoRequest](#node-NodeInfoRequest) | [NodeInfoReply](#node-NodeInfoReply) | Retrieve node info metadata | -### BlobStatusRequest -BlobStatusRequest is used to query the status of a blob. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| request_id | [bytes](#bytes) | | | +### Retrieval +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| RetrieveChunks | [RetrieveChunksRequest](#node-RetrieveChunksRequest) | [RetrieveChunksReply](#node-RetrieveChunksReply) | RetrieveChunks retrieves the chunks for a blob custodied at the Node. | +| GetBlobHeader | [GetBlobHeaderRequest](#node-GetBlobHeaderRequest) | [GetBlobHeaderReply](#node-GetBlobHeaderReply) | GetBlobHeader is similar to RetrieveChunks, this just returns the header of the blob. | +| NodeInfo | [NodeInfoRequest](#node-NodeInfoRequest) | [NodeInfoReply](#node-NodeInfoReply) | Retrieve node info metadata | + - + +

    Top

    -### BlobVerificationProof +## node/v2/node_v2.proto + + + + + +### GetChunksReply | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| batch_id | [uint32](#uint32) | | batch_id is an incremental ID assigned to a batch by EigenDAServiceManager | -| blob_index | [uint32](#uint32) | | The index of the blob in the batch (which is logically an ordered list of blobs). | -| batch_metadata | [BatchMetadata](#disperser-BatchMetadata) | | | -| inclusion_proof | [bytes](#bytes) | | inclusion_proof is a merkle proof for a blob header's inclusion in a batch | -| quorum_indexes | [bytes](#bytes) | | indexes of quorums in BatchHeader.quorum_numbers that match the quorums in BlobHeader.blob_quorum_params Ex. BlobHeader.blob_quorum_params = [ { quorum_number = 0, ... }, { quorum_number = 3, ... }, { quorum_number = 5, ... }, ] BatchHeader.quorum_numbers = [0, 5, 3] => 0x000503 Then, quorum_indexes = [0, 2, 1] => 0x000201 | +| chunks | [bytes](#bytes) | repeated | All chunks the Node is storing for the requested blob per RetrieveChunksRequest. | - + -### DisperseBlobReply +### GetChunksRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| result | [BlobStatus](#disperser-BlobStatus) | | The status of the blob associated with the request_id. Will always be PROCESSING. | -| request_id | [bytes](#bytes) | | The request ID generated by the disperser. Once a request is accepted (although not processed), a unique request ID will be generated. Two different DisperseBlobRequests (determined by the hash of the DisperseBlobRequest) will have different IDs, and the same DisperseBlobRequest sent repeatedly at different times will also have different IDs. The client should use this ID to query the processing status of the request (via the GetBlobStatus API). | - +| blob_key | [bytes](#bytes) | | | +| quorum_id | [uint32](#uint32) | | 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]. | - -### DisperseBlobRequest + +### NodeInfoReply +Node info reply | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| data | [bytes](#bytes) | | The data to be dispersed. The size of data must be <= 16MiB. Every 32 bytes of data is interpreted as an integer in big endian format where the lower address has more significant bits. The integer must stay in the valid range to be interpreted as a field element on the bn254 curve. The valid range is 0 <= x < 21888242871839275222246405745257275088548364400416034343698204186575808495617 If any one of the 32 bytes elements is outside the range, the whole request is deemed as invalid, and rejected. | -| custom_quorum_numbers | [uint32](#uint32) | repeated | The quorums to which the blob will be sent, in addition to the required quorums which are configured on the EigenDA smart contract. If required quorums are included here, an error will be returned. The disperser will ensure that the encoded blobs for each quorum are all processed within the same batch. | -| account_id | [string](#string) | | The account ID of the client. This should be a hex-encoded string of the ECSDA public key corresponding to the key used by the client to sign the BlobAuthHeader. | - - +| semver | [string](#string) | | | +| arch | [string](#string) | | | +| os | [string](#string) | | | +| num_cpu | [uint32](#uint32) | | | +| mem_bytes | [uint64](#uint64) | | | - -### DispersePaidBlobRequest + +### NodeInfoRequest +Node info request -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| data | [bytes](#bytes) | | The data to be dispersed. Same requirements as DisperseBlobRequest. | -| quorum_numbers | [uint32](#uint32) | repeated | The quorums to which the blob to be sent | -| payment_header | [common.PaymentHeader](#common-PaymentHeader) | | Payment header contains AccountID, BinIndex, and CumulativePayment | -| payment_signature | [bytes](#bytes) | | signature of payment_header | + - +### StoreChunksReply -### RetrieveBlobReply -RetrieveBlobReply contains the retrieved blob data | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| data | [bytes](#bytes) | | | +| signature | [bytes](#bytes) | | | - + + +### StoreChunksRequest -### RetrieveBlobRequest -RetrieveBlobRequest contains parameters to retrieve the blob. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| batch_header_hash | [bytes](#bytes) | | | -| blob_index | [uint32](#uint32) | | | +| batch | [common.v2.Batch](#common-v2-Batch) | | batch of blobs to store | @@ -1444,51 +1393,31 @@ RetrieveBlobRequest contains parameters to retrieve the blob. + - + -### BlobStatus -BlobStatus represents the status of a blob. -The status of a blob is updated as the blob is processed by the disperser. -The status of a blob can be queried by the client using the GetBlobStatus API. -Intermediate states are states that the blob can be in while being processed, and it can be updated to a differet state: -- PROCESSING -- DISPERSING -- CONFIRMED -Terminal states are states that will not be updated to a different state: -- FAILED -- FINALIZED -- INSUFFICIENT_SIGNATURES -| Name | Number | Description | -| ---- | ------ | ----------- | -| UNKNOWN | 0 | | -| PROCESSING | 1 | PROCESSING means that the blob is currently being processed by the disperser | -| CONFIRMED | 2 | CONFIRMED means that the blob has been dispersed to DA Nodes and the dispersed batch containing the blob has been confirmed onchain | -| FAILED | 3 | FAILED means that the blob has failed permanently (for reasons other than insufficient signatures, which is a separate state). This status is somewhat of a catch-all category, containg (but not necessarily exclusively as errors can be added in the future): - blob has expired - internal logic error while requesting encoding - blob retry has exceeded its limit while waiting for blob finalization after confirmation. Most likely triggered by a chain reorg: see https://github.com/Layr-Labs/eigenda/blob/master/disperser/batcher/finalizer.go#L179-L189. | -| FINALIZED | 4 | FINALIZED means that the block containing the blob's confirmation transaction has been finalized on Ethereum | -| INSUFFICIENT_SIGNATURES | 5 | INSUFFICIENT_SIGNATURES means that the confirmation threshold for the blob was not met for at least one quorum. | -| DISPERSING | 6 | The DISPERSING state is comprised of two separate phases: - Dispersing to DA nodes and collecting signature - Submitting the transaction on chain and waiting for tx receipt | + +### Dispersal +WARNING: the following RPCs are experimental and subject to change. - +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| StoreChunks | [StoreChunksRequest](#node-v2-StoreChunksRequest) | [StoreChunksReply](#node-v2-StoreChunksReply) | | +| NodeInfo | [NodeInfoRequest](#node-v2-NodeInfoRequest) | [NodeInfoReply](#node-v2-NodeInfoReply) | | - + - +### Retrieval -### Disperser -Disperser defines the public APIs for dispersing blobs. | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| -| DisperseBlob | [DisperseBlobRequest](#disperser-DisperseBlobRequest) | [DisperseBlobReply](#disperser-DisperseBlobReply) | DisperseBlob accepts a single blob to be dispersed. This executes the dispersal async, i.e. it returns once the request is accepted. The client should use GetBlobStatus() API to poll the processing status of the blob. - -If DisperseBlob returns the following error codes: INVALID_ARGUMENT (400): request is invalid for a reason specified in the error msg. RESOURCE_EXHAUSTED (429): request is rate limited for the quorum specified in the error msg. user should retry after the specified duration. INTERNAL (500): serious error, user should NOT retry. | -| DisperseBlobAuthenticated | [AuthenticatedRequest](#disperser-AuthenticatedRequest) stream | [AuthenticatedReply](#disperser-AuthenticatedReply) stream | DisperseBlobAuthenticated is similar to DisperseBlob, except that it requires the client to authenticate itself via the AuthenticationData message. The protoco is as follows: 1. The client sends a DisperseBlobAuthenticated request with the DisperseBlobRequest message 2. The Disperser sends back a BlobAuthHeader message containing information for the client to verify and sign. 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. | -| GetBlobStatus | [BlobStatusRequest](#disperser-BlobStatusRequest) | [BlobStatusReply](#disperser-BlobStatusReply) | This API is meant to be polled for the blob status. | -| RetrieveBlob | [RetrieveBlobRequest](#disperser-RetrieveBlobRequest) | [RetrieveBlobReply](#disperser-RetrieveBlobReply) | This retrieves the requested blob from the Disperser's backend. This is a more efficient way to retrieve blobs than directly retrieving from the DA Nodes (see detail about this approach in api/proto/retriever/retriever.proto). The blob should have been initially dispersed via this Disperser service for this API to work. | +| GetChunks | [GetChunksRequest](#node-v2-GetChunksRequest) | [GetChunksReply](#node-v2-GetChunksReply) | GetChunks retrieves the chunks for a blob custodied at the Node. | +| NodeInfo | [NodeInfoRequest](#node-v2-NodeInfoRequest) | [NodeInfoReply](#node-v2-NodeInfoReply) | Retrieve node info metadata | @@ -1639,6 +1568,77 @@ Relay is a service that provides access to public relay functionality. + +

    Top

    + +## retriever/retriever.proto + + + + + +### BlobReply + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| data | [bytes](#bytes) | | The blob retrieved and reconstructed from the EigenDA Nodes per BlobRequest. | + + + + + + + + +### BlobRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| batch_header_hash | [bytes](#bytes) | | 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. | +| blob_index | [uint32](#uint32) | | Which blob in the batch this is requesting for (note: a batch is logically an ordered list of blobs). | +| reference_block_number | [uint32](#uint32) | | The Ethereum block number at which the batch for this blob was constructed. | +| quorum_id | [uint32](#uint32) | | Which quorum of the blob this is requesting for (note a blob can participate in multiple quorums). | + + + + + + + + + + + + + + +### Retriever +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. + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| RetrieveBlob | [BlobRequest](#retriever-BlobRequest) | [BlobReply](#retriever-BlobReply) | This fans out request to EigenDA Nodes to retrieve the chunks and returns the reconstructed original blob in response. | + + + + + ## Scalar Value Types | .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |