Blockchains need to guarantee data availability (DA), especially in the case of rollup and layer 2 (L2) chains. The blockchain data availability problem goes like this: participants of blockchain networks can get locked out from interpreting the state or further updating it when block producers advance the state of the system but withhold underlying transaction data.
The spectrum of data availability solutions for Ethereum L2s has grown rapidly, ranging from solutions leveraging off-chain and on-chain DA layers. Making sense of it can be complex, which is why we’re here. In this post, we will look at specifically off-chain data availability for the Ethereum L2 ecosystem.
All DA solutions for Ethereum L2s face a tradeoff dilemma. They must make a tradeoff between cost and security. Cost, in this case, is referencing how much off-chain DA solutions can scale without bloating expenses in gas. Security refers to the strength (i.e. threat model) of each DA solution’s data availability guarantee.
We’ll cover the landscape of off-chain data availability by going in order of left to right in the image above. Note that this analysis has been done with several assumptions in mind:
- In the case of DACs, we’re considering signatures = transactions. In the case of Celestiums, attestations = transactions.
- We’re only referencing pure validiums in this post. There can be validiums that leverage DACs but they will not be expressed in the analysis below.
- Only Ethereum gas costs are considered and the cost of including data on the off-chain data layers are not included. In the case of Celestiums, there will be a blockspace fee market on Celestia, however the maximum data throughput would be much greater, and therefore for the sake of this analysis it is assumed that Celestia on-chain data fees are trivial compared to Ethereum.
- Fixed costs aren’t factored into this analysis, specifically:
- State write costs - costs associated with updating the state in rollup smart contracts (~20,000 gas).
- Compute cost - costs associated with header submission, hashing, loops, etc. (~10,000 gas).
- Base transaction cost - cost on Ethereum for submitting a tx (21,000 gas).
- We’re not factoring in costs to update the validator set in the Celestiums case. Since large changes in voting power only happen very occasionally, this is a good approximation.
Pure validiums are the lowest corner of the DA graph above. A validium uses zero knowledge proofs for transaction validity and stores transaction data off-chain with a central data provider. Validiums are the cheapest on a per transaction basis in this spectrum.
Accessing the latest state in a validium requires that off-chain data be available. This is fine, except in the cases where the data provider misbehaves or goes offline. As a result, there is no DA guarantee and security is low.
Current validium designs utilize a committee (see next section) rather than a single provider due to these security concerns.
Data Availability Committees (DACs)
Data availability committees (DACs) can be thought of as validiums with multiple nodes.
Nodes or members of DACs are trusted parties that keep copies of data off-chain and port them back into the public in the case that rollup operators act maliciously. These nodes make an on-chain attestation that the data of the L2 is available by posting signatures on-chain.
Costs to operate DACs are moderately low. Setting up a node in a DAC is relatively cheap and DAC committees are usually made up of 7-10 members.
Assuming a typical DAC has 10 members and verifying one signature costs 3,000 gas, the cost of verifying a DA attestation is roughly 30,000 gas. No transaction data is actively posted on-chain outside of a DA attestation so cost is relatively low and fixed, regardless of the volume of transactions (assuming a fixed number of nodes in the DAC).
From a security perspective, some tradeoffs are made. A small permissioned committee that may not be credibly neutral requires end users to trust this fixed group of actors to store transaction data. If a threshold of committee members were to act maliciously, they could freeze (if a zk rollup) or steal (if an optimistic rollup) all funds on the chain and kill the chain’s liveness entirely, which is a considerable risk.
A Celestium is an L2 chain that leverages Celestia for data availability, but uses Ethereum for settlement and dispute resolution. A Celestium can be thought of as a permissionless DAC with extra economic guarantees on data availability because the committee can be slashed if they misbehave. This is possible because light nodes on the Celestia network can detect unavailable blocks with data availability sampling, and thus similarly to a full node, can automatically halt if the validator set becomes malicious.
Furthermore, Celestia is more credibly neutral as a DA layer than a DAC, because it exists as an independent chain in its own right as a general-purpose DA layer, rather than a DA layer for a specific Ethereum L2.
Celestiums cost roughly 100,000 gas per DA attestation for an arbitrary number of transactions. Roughly 30 signatures are needed per attestation at 3,000 gas per signature = 90,000 gas (signatures from >⅔ of the validator set's voting power). This estimate is based on Tendermint-based chains. Currently ⅔ of the voting power on the Cosmos Hub is delegated to 22 validators.
Traditional Ethereum rollups are the final group in the diagram. Rollups leverage on-chain data availability, making them very secure. The cost, however, is also high, given that transaction data is posted to Ethereum.
Most rollups on Ethereum run into the issue of high calldata costs, which dominate other costs. While there are plans to drastically reduce the cost of calldata, whether this happens or not will take time and significant community effort from core devs and rollup teams.
At this point in time, calldata costs roughly 16 gas per byte to post to Ethereum, which is the main bottleneck to Ethereum rollup scalability.