The data availability (DA) layer is the durability and verifiability backbone of Vela. Every batch of state transitions is serialized and published to the DA layer, making it possible for any third party to independently verify the exchange’s operation.Documentation Index
Fetch the complete documentation index at: https://docs.vela.monolithsystematic.com/llms.txt
Use this file to discover all available pages before exploring further.
Role of the DA Layer
The DA layer serves two purposes:- Durability: Batch data is preserved outside the engine process. If the engine restarts, it can reconstruct state from the DA layer.
- Verifiability: Any observer can download batches from the DA layer and run the zkvm prover to verify that each state transition is correct. This is the foundation of the fraud proof system.
DataAvailabilityClient Trait
The DA layer is abstracted behind a trait, allowing different backends to be swapped in:DaBatch Structure
Each published batch contains the full information needed to verify and recover state:DaReceipt
After publishing, the DA client returns a receipt:content_hash is a commitment to the batch contents. If a batch is tampered with after publication, the hash will not match, and the DA layer (or any independent verifier) can detect the modification.
LocalDaClient
In the current beta deployment, theLocalDaClient writes batch files to the local filesystem:
da_batch_{seq}.bin and written to a configurable directory. They are binary-encoded using bincode for compact serialization.
The
LocalDaClient is appropriate for development and the current beta. For mainnet, a production DA layer (Celestia or EigenDA) provides cryptographic availability guarantees — the DA operator cannot selectively withhold data.Production DA Layer (Roadmap)
The M7 roadmap targets integration with a production DA layer. The two primary candidates are:- Celestia
- EigenDA
Celestia is a modular DA layer that uses erasure coding and data availability sampling (DAS) to provide strong availability guarantees with light client verification.Integration approach:
- Implement
DataAvailabilityClientfor the Celestia HTTP API - Submit
DaBatchserialized data as a Celestia blob - Store the Celestia commitment (block height + blob index) in the
DaReceipt - Fraud proof submission on-chain references the Celestia commitment
Batch Continuity
The DA layer enforces batch continuity through thepre_root / post_root chain. Each batch’s pre_root must equal the previous batch’s post_root: