Protocol Documentation

Table of Contents

Top

disperser/v2/disperser_v2.proto

Attestation

FieldTypeLabelDescription
non_signer_pubkeysbytesrepeatedSerialized bytes of non signer public keys (G1 points)
apk_g2bytesSerialized bytes of G2 point that represents aggregate public key of all signers
quorum_apksbytesrepeatedSerialized bytes of aggregate public keys (G1 points) from all nodes for each quorum The order of the quorum_apks should match the order of the quorum_numbers
sigmabytesSerialized bytes of aggregate signature
quorum_numbersuint32repeatedRelevant quorum numbers for the attestation
quorum_signed_percentagesbytesThe attestation rate for each quorum. Each quorum's signing percentage is represented by an 8 bit unsigned integer. The integer is the fraction of the quorum that has signed, with 100 representing 100% of the quorum signing, and 0 representing 0% of the quorum signing. The first byte in the byte array corresponds to the first quorum in the quorum_numbers array, the second byte corresponds to the second quorum, and so on.

BlobCommitmentReply

The result of a BlobCommitmentRequest().

FieldTypeLabelDescription
blob_commitmentcommon.BlobCommitmentThe commitment of the blob.

BlobCommitmentRequest

The input for a BlobCommitmentRequest(). This can be used to construct a BlobHeader.commitment.

FieldTypeLabelDescription
blobbytesThe blob data to compute the commitment for.

BlobInclusionInfo

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

FieldTypeLabelDescription
blob_certificatecommon.v2.BlobCertificate
blob_indexuint32blob_index is the index of the blob in the batch
inclusion_proofbytesinclusion_proof is the inclusion proof of the blob in the batch

BlobStatusReply

BlobStatusReply is the reply to a BlobStatusRequest.

FieldTypeLabelDescription
statusBlobStatusThe status of the blob.
signed_batchSignedBatchThe signed batch. Only set if the blob status is GATHERING_SIGNATURES or COMPLETE. signed_batch and blob_inclusion_info are only set if the blob status is GATHERING_SIGNATURES or COMPLETE. When blob is in GATHERING_SIGNATURES status, the attestation object in signed_batch contains attestation information at the point in time. As it gathers more signatures, attestation object will be updated according to the latest attestation status. The client can use this intermediate attestation to verify a blob if it has gathered enough signatures. Otherwise, it should should poll the GetBlobStatus API until the desired level of attestation has been gathered or status is COMPLETE. When blob is in COMPLETE status, the attestation object in signed_batch contains the final attestation information. If the final attestation does not meet the client's requirement, the client should try a new dispersal.
blob_inclusion_infoBlobInclusionInfoBlobInclusionInfo is the information needed to verify the inclusion of a blob in a batch. Only set if the blob status is GATHERING_SIGNATURES or COMPLETE.

BlobStatusRequest

BlobStatusRequest is used to query the status of a blob.

FieldTypeLabelDescription
blob_keybytesThe unique identifier for the blob.

DisperseBlobReply

A reply to a DisperseBlob request.

FieldTypeLabelDescription
resultBlobStatusThe status of the blob associated with the blob key.
blob_keybytesThe unique 32 byte identifier for the blob.

The blob_key is the keccak hash of the rlp serialization of the BlobHeader, as computed here: https://github.com/Layr-Labs/eigenda/blob/0f14d1c90b86d29c30ff7e92cbadf2762c47f402/core/v2/serialization.go#L30 The blob_key must thus be unique for every request, even if the same blob is being dispersed. Meaning the blob_header must be different for each request.

Note that attempting to disperse a blob with the same blob key as a previously dispersed blob may cause the disperser to reject the blob (DisperseBlob() RPC will return an error). |

DisperseBlobRequest

A request to disperse a blob.

FieldTypeLabelDescription
blobbytesThe blob to be dispersed.

The size of this byte array may be any size as long as it does not exceed the maximum length of 16MiB. While the data being dispersed is only required to be greater than 0 bytes, the blob size charged against the payment method will be rounded up to the nearest multiple of minNumSymbols defined by the payment vault contract (https://github.com/Layr-Labs/eigenda/blob/1430d56258b4e814b388e497320fd76354bfb478/contracts/src/payments/PaymentVaultStorage.sol#L9).

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_header | common.v2.BlobHeader | | The header contains metadata about the blob.

This header can be thought of as an "eigenDA tx", in that it plays a purpose similar to an eth_tx to disperse a 4844 blob. Note that a call to DisperseBlob requires the blob and the blobHeader, which is similar to how dispersing a blob to ethereum requires sending a tx whose data contains the hash of the kzg commit of the blob, which is dispersed separately. | | signature | bytes | | signature over keccak hash of the blob_header that can be verified by blob_header.payment_header.account_id |

GetPaymentStateReply

GetPaymentStateReply contains the payment state of an account.

FieldTypeLabelDescription
payment_global_paramsPaymentGlobalParamsglobal payment vault parameters
period_recordsPeriodRecordrepeatedoff-chain account reservation usage records
reservationReservationon-chain account reservation setting
cumulative_paymentbytesoff-chain on-demand payment usage
onchain_cumulative_paymentbyteson-chain on-demand payment deposited

GetPaymentStateRequest

GetPaymentStateRequest contains parameters to query the payment state of an account.

FieldTypeLabelDescription
account_idstringThe ID of the account being queried. This account ID is an eth wallet address of the user.
signaturebytesSignature over the account ID

PaymentGlobalParams

Global constant parameters defined by the payment vault.

FieldTypeLabelDescription
global_symbols_per_seconduint64Global ratelimit for on-demand dispersals
min_num_symbolsuint64Minimum number of symbols accounted for all dispersals
price_per_symboluint64Price charged per symbol for on-demand dispersals
reservation_windowuint64Reservation window for all reservations
on_demand_quorum_numbersuint32repeatedquorums allowed to make on-demand dispersals

PeriodRecord

PeriodRecord is the usage record of an account in a bin. The API should return the active bin record and the subsequent two records that contains potential overflows.

FieldTypeLabelDescription
indexuint32Period index of the reservation
usageuint64symbol usage recorded

Reservation

Reservation parameters of an account, used to determine the rate limit for the account.

FieldTypeLabelDescription
symbols_per_seconduint64rate limit for the account
start_timestampuint32start timestamp of the reservation
end_timestampuint32end timestamp of the reservation
quorum_numbersuint32repeatedquorums allowed to make reserved dispersals
quorum_splitsuint32repeatedquorum splits describes how the payment is split among the quorums

SignedBatch

SignedBatch is a batch of blobs with a signature.

FieldTypeLabelDescription
headercommon.v2.BatchHeaderheader contains metadata about the batch
attestationAttestationattestation 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 different state:

  • QUEUED
  • ENCODED
  • GATHERING_SIGNATURES Terminal states are states that will not be updated to a different state:
  • UNKNOWN
  • COMPLETE
  • FAILED
NameNumberDescription
UNKNOWN0UNKNOWN means that the status of the blob is unknown. This is a catch all and should not be encountered absent a bug.

This status is functionally equivalent to FAILED, but is used to indicate that the failure is due to an unanticipated bug. | | QUEUED | 1 | QUEUED means that the blob has been queued by the disperser for processing. The DisperseBlob API is asynchronous, meaning that after request validation, but before any processing, the blob is stored in a queue of some sort, and a response immediately returned to the client. | | ENCODED | 2 | ENCODED means that the blob has been Reed-Solomon encoded into chunks and is ready to be dispersed to DA Nodes. | | GATHERING_SIGNATURES | 3 | GATHERING_SIGNATURES means that the blob chunks are currently actively being transmitted to validators, and in doing so requesting that the validators sign to acknowledge receipt of the blob. Requests that timeout or receive errors are resubmitted to DA nodes for some period of time set by the disperser, after which the BlobStatus becomes COMPLETE. | | COMPLETE | 4 | COMPLETE means the blob has been dispersed to DA nodes, and the GATHERING_SIGNATURES period of time has completed. This status does not guarantee any signer percentage, so a client should check that the signature has met its required threshold, and resubmit a new blob dispersal request if not. | | FAILED | 5 | FAILED means that the blob has failed permanently. Note that this is a terminal state, and in order to retry the blob, the client must submit the blob again (blob key is required to be unique). |

Disperser

Disperser defines the public APIs for dispersing blobs.

Method NameRequest TypeResponse TypeDescription
DisperseBlobDisperseBlobRequestDisperseBlobReplyDisperseBlob 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.
GetBlobStatusBlobStatusRequestBlobStatusReplyGetBlobStatus is meant to be polled for the blob status.
GetBlobCommitmentBlobCommitmentRequestBlobCommitmentReplyGetBlobCommitment is a utility method that calculates commitment for a blob payload.
GetPaymentStateGetPaymentStateRequestGetPaymentStateReplyGetPaymentState is a utility method to get the payment state of a given account.

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)