Cosmos Avail DA module
Integrate Cosmos SDK chains with Avail DA using the CADA module for scalable data availability.
What is CADA (Cosmos Avail DA module)
What is Avail DA?
Integration Guide
Note
Note: Ensure that the Avail light client URL is correctly configured for the module to function as expected. For instructions on setup Avail locally, please refer to this documentation.
How It Works
CADA (Cosmos Chain)
PreBlocker ABCI method.Request to Relayer
block range information to the relayer.Relayer
block data from the Cosmos Provider and posts it to the Avail light client.Avail light client
Validators
1. CADA
- At each block interval, the
PreBlockerABCI method sends a request to theRelayer, specifying the range of block heights that are ready to be posted to the Avail Data Availability (DA) network.
- The chain is responsible for aggregating vote extensions from all validators and verifying whether the data has been made available on Avail.
- Since verification requires communicating with the light client, an asynchronous voting mechanism is needed. Vote extensions enable this asynchronous voting mechanism for verification purposes.
2. Relayer
- Data Submission: The relayer is responsible for fetching block data from the Cosmos provider and posting it to the Avail light client via an HTTP request.
- Based on the response from the light client, the relayer submits a transaction informing the validators of the data availability status and the specific Avail block height where the data is included, so that validators can verify it.
- Data Verification: During verification, the relayer communicates with the Avail light client to confirm whether the data is truly available at the specified height.
3. Avail Light Node
- The chain communicates with the Avail light client via the relayer during the data submission and data availability verification processes.
4. Cosmos Provider
Workflow
-
At each block interval, a request is sent from the
PreBlockerABCI method to the Keeper, specifying the range of block heights that are ready to be posted to theAvailDA network. -
The range of block heights should be from
provenHeight + 1tomin(provenHeight + MaxBlocksLimitForBlob, CurrentBlockHeight). -
If the status of the previous blocks is either
SUCCESSorFAILURE, the status can be updated toPENDING.range = [fromBlock, toBlock] // (fromBlock < toBlock < CurrentBlock) status = PENDING -
The
Proposerof the block will make a request to theRelayerto post the blocks data by passing the range of blocks to be posted. -
The
Relayerfetches the blocks data from the local provider, converts the blocks data to bytes, and posts that data toAvail. -
Once the success of data availability is confirmed, the
Relayerbroadcasts theAvail heightat which the blob data is made available using theMsgUpdateBlobStatustransaction. -
The status, Avail height, and voting deadline will be updated in the state.
status = IN_VOTING availHeight = tx.availHeight votingEndBlock = currentBlock + votingInterval -
At block height
VotingEndBlock - 1, all the validators verify if the specified blocks data is truly made available at the specified Avail height. They cast their vote (YES or NO) usingvote extensions. -
At block height
VotingEndBlock, all the votes fromvote_extensionswill be collected and aggregated. If the collectivevoting power is > 66%, the status will be updatedstatus = SUCCESS // success and ready for next blocks provenHeight = Range EndHeight // End Height from the given block range - In case of failure at any stage, the whole flow will be repeated.
image: "/img/docs-link-preview.png"
How is this guide?