Polygon Avail- Ethereum’s Modular Data Availability Solution
Introduction: Monolithic & Modular Blockchain
Introduction: Monolithic & Modular Blockchain
In a bid to unify the 3 layers of a blockchain- the settlement, consensus, execution, and data availability layer in a single block to perform transactions, this led to a term called ‘blockchain bloat.’ Blockchain bloat occurs when more and more information is added to a blockchain, this makes the chain slow and costly as time goes on. A node is built with the task of processing and storing data in a chain, the volume of data stored increases over time, this impacts the speed and fees of a blockchain e.g Ethereum. Running a node on chains like this becomes very hard because the node will need to download the whole blockchain first which can take weeks. This whole chaotic scenario occurs in a monolithic blockchain.
A monolithic blockchain is one in which a node handles the consensus, data availability, and execution activities in the chain. The node performs all these activities all in the same chain through tightly-coupled chains operating in the same layer. Note that interconnected blockchains like Avalanche’s subnets and Polkdot’s parachains are not modular blockchains. Solana, ETH 1.0, and Bitcoin are built on monolithic architecture.
Monolithic blockchains suffer from expensive blockspaces and it’s hard to participate in the chain without a powerful node, as explained in the first paragraph. This reduces the chain’s security and decentralization.
However, there’s a way to solve this issue: modularity. A modular blockchain distributes the functions of a blockchain into 3 layers: Data Availability, Settlement, and Execution. These layers work together to improve scalability whilst preserving the chain’s security and decentralization. This is the approach Polygon Avail takes on Eth and other stand-alone chains that would want to build on it.
Eth2.0, Polygon Avail, and Celestia use modular architecture.
1. Data Availability Layer (Avail)
As the name implies, the availability of data is paramount in this layer. Block producers must publish data for each block, and this data must be available upon request for network peers to store. Unlike the normal data availability layer in any chain, Polygon Avail doesn’t store data. It records block transactions and provides consensus (agreement on which data is true & accurate). Hence, allowing many execution layers to be built on it.
2. Execution Layer (Rollups)
This is where the smart contracts are run, applications (dapps) are built on this layer and users interact with these dapps via rollups. Transactions related to these dapps are processed here, it’s simply the computational layer of the chain. Rollups process data and post data attestation to the settlement layer where consensus is reached.
3. Settlement Layer (ETH)
This layer provides anchor and security to the whole chain. This layer provides ‘finality’, it ensures that transaction funds are safu.
Polygon Avail Tech
We can’t go further in this article without laying out the types and functions of nodes, as nodes play an important role in a blockchain and a modular architecture. There are 3 types of nodes in Eth-like chains:
1. Validator Node:
This node is responsible for storing data, processing transactions, and appending new blocks to the blockchain. In detail, a validator node sends a block across a chain by collecting transactions from the mempool (database of unconfirmed/pending transactions) and executes it to produce a block.
Note, a block contains a small header that contains metadata and digest which relates to the transactions in a block.
2. Full Node:
This node copy and verify transactions on the chain and also helps to maintain the genesis state of the chain. The block sent from the validator node is received by the full node, this block is verified to check its legitimacy, and transactions in the block are re-executed by this node.
3. Light Client:
It’s like a parasite, it’s connected to the full node to render its task and function. They do not interact with the blockchain, rather they use the full node as intermediaries. The request for the latest block headers and transaction detail from the full node. Light clients can verify the authenticity of a transaction thanks to block metadata.
This light client architecture has its limitations- since, the light client can’t download the whole blockchain it can be tricked into accepting blocks whose underlying data isn’t available, and a block producer can input malicious data in the block and not reveal it to the network. This is a risk caused by using a light client node. It can get worse because this is a data availability problem and fraud proofs can’t salvage this problem.
How Does Polygon Avail Solve this Problem?
Avail solves this issue by ensuring the availability of data instead of verifying it. It also ensures transaction ordering. In detail, a consensus block becomes valid only if the data behind the block is available, this helps to prevent block producers from releasing block headers without releasing the data behind them.
It reduces the issue of block to data verification due to the help of the Data Availability Check. Data Availability Check uses erasure codes (data is protected using data redundant design). The Data Availability Check allows the light client to sample random portions of blocks in a chain, this makes the light client able to sample the whole chain, making it able to function under the same security as the full node.
KZG commitment-based scheme
Avail relies on KZG (Kate Zaverucha Goldberg) commitment-based scheme for security in each node and the chain. The KZG commitment scheme has 3 features:
1. Data redundancy (erasure coding)
Data in a block is arranged into a 2D matrix, using erasure coding one column of the matrix doubles the original one. In security, data redundancy forces malicious users to hide a large portion of their transaction if it was to hide a single transaction making it easy to suspect during sampling.
2. Fraud Proof free
Due to the setup of KZG commitment, fraud proofs can’t thrive in Avail. Therefore, the fraud proof system isn’t used in Polygon Avail but in Celestia.
3. Kate Commitments
KZG commitment commits the row in the matrix and the block header- this makes it easy for malicious data to be caught by a light client.
How can Rollups & Different Blockchains use Avail?
Avail supports all chains from EVM to WASM even new environments can be built on Avail without having to bootstrap a consensus layer. With Avail chains you have full control of their consensus layer; you can fork, upgrade or change at will. The more users use avail, the more it can keep and hold data, and the more secure it is. Light clients inherit the same security as a full node.
As for Rollups; it can help them boost their performance by using a validium rollup solution, this helps reduce the amount of data stored in ETH, making transactions fast and secure. Validium is a scaling solution just like zk-rollup, but the only difference is that data is stored off-chain while in zk-rollup data is stored main chain (ETH). But, this comes at a price; DACs can steal user funds. Most ETH projects using validium use DACs (Data Availability Committee), they have 5–20 members attesting to the availability of the data.
However, Avail plans to have a network of permissionless nodes; strengthing the chain’s security.
When is Avail Launching?
Polygon Avail launched its testnet on the 30th of August, 2022. As for mainnet launch, there’s no official date yet.
Why you Should Build on Avail?
Modular Blockchains are the future.
More Scalable, Secure & Decentralized
Can work with different chain environments
Light client is as secure as Full Node and Scales fast too
Its Polygon!
If you enjoyed this write-up and would like to reach out to me. This is my twitter handle — twitter.com/0xSalazar
Please remember to do your research. None of this is financial advice.