Modular blockchain paradigm

In physics, coupling is the phenomenon whereby two forms of motion affect each other through interaction. Decoupling, on the other hand, is the mathematical separation of two forms of motion to deal with the problem.

In the field of programming, the idea of modularity is very similar: a software design technique called modular programming, emphasizes separating the functionality of a program into independent, interchangeable modules, such that each contains everything necessary to execute only one aspect of the desired functionality.

Blockchains are also computer programs. Fundamentally, when applying the idea of modularity to a public blockchain, we can break it down into three core components:

  1. Execution — This is the computation required to update the chain, which involves getting the current state, adding a bunch of new transactions and transitioning to the new state.

  2. Consensus or Settlement or Security — This provides security and agreement for transactions and their ordering.

  3. Data Availability (DA) — This is to ensure that the transaction data behind the block header is published and available so that anyone can easily calculate the state and check the state transitions.

Instead of bringing all these three components together in one monolithic chain as current major blockchains do, we can split them into specialized chains or layers, each playing the role of one module, to more efficiently implement the functionality of a blockchain. This is the paradigm of modular blockchain.

The benefits of modular blockchains

As stated earlier, modular blockchains are the result of separating the core components of a single blockchain and running them on separate layers. So, what are the advantages of modular blockchains versus those non-modular ones? The following are the benefits listed.

Scalability

Layers that specialize in a pair of core features will allow for much greater scalability without the limitation of making tradeoffs that come with a monolithic blockchain. For instance, a modular data availability layer with DA sampling can scale linearly with the number of users.

Interoperability

Blockchains can employ a modular shared security layer to enable trust-minimized bridging between blockchains in the same cluster. This improves both the security and the level at which several blockchains can communicate with each other.

Bootstrapping

New blockchains can be created with minimal cost and time. Things like Rollup Software Development Kits will not only aid this but deliver a way to bootstrap without needing a consensus mechanism, validators, or token distribution mechanisms.

Experimentation

Blockchains can easily be created and used to test new innovative technologies that bring further scalability and optimizations to the entire stack of chains. Doing this allows new chains to focus directly on the elements they want to innovate on, which can then be spread to the rest of the chains.

The DA layer in rollups

Rollups, which is Ethereum’s layer 2 solution aiming to scale effectively, is fundamentally a modular approach as well. The rollup takes the execution layer out of Ethereum layer 1 and forms an execution-exclusive second layer focusing on processing transactions as fast as possible. On the other hand, Ethereum layer 1 is still in charge of the challenging work of both security and data availability.

So, there are two questions here. First, why is data availability so important? Second, can we use the idea of modularity again to decouple DA out from layer 1? Please let me take time to explain.

For the first question, I need to discuss the situation separately. In the case of Optimistic Rollup, when the sequencer does evil and settles an incorrect account balance state, anyone can retrieve the original transaction data from layer 1 and reconstruct the correct account state to execute a challenge. So, the role of DA is like an archive bureau which provides original evidence in the event of a challenge, ensuring that the challenge is correct and valid.

As for Zero Knowledge (ZK) Rollup, the sequencer cannot do evil due to the cryptographic proof of zero knowledge. But in extreme cases that the sequencer goes down or is unavailable for any reason, users need to escape the layer 2 chain and get their money back to layer 1, when DA is essential to ensure that anyone can reconstruct the final status based on the data. Therefore, the role of DA is like a safety door to guarantee a smooth escape for users in the event of an extreme situation.

For the second question, the short answer is yes. Although DA is so vital that best place to store it is Ethereum layer 1, the most secure chain is also the most expensive one — the gas cost of settlement transactions and data storage is way much higher than that on any other chain. That is why both Matter Labs and Starkware provide users with a cheap version of ZK Rollup, namely ZK-Porter and Validium, compromising on not storing DA on layer 1.

As a result, a specialized and modular DA layer is beginning to enter the picture.

Projects of specialized DA layer

Celestia

Formerly named LazyLedger, Celestia is a modular consensus and data network, built to enable anyone to easily deploy their own blockchain with minimal overhead. By decoupling the consensus and DA layers with application execution, Celestia modularizes the blockchain technology stack and unlocks new possibilities for decentralized application builders.

Under Celestia-enabled modular architecture, developers can effortlessly define their own virtual execution environments. Each application gets its own sovereign execution space and can be updated without main chain hard forks.

Celestia’s main highlight lies in addressing one of the fundamental constraints of blockchain scaling — the “data availability problem”. This problem asks: how can nodes be sure that when a new block is produced, all of the data in that block was actually published to the network? The dilemma is that if a sequencer or block producer does not release all of the data in a block, no one could detect if there is a malicious transaction hidden within that block.

How does Celestia resolve this? It uses erasure codes to create data availability proofs that guarantee, with high probability, that all that data was posted on-chain.

Specifically, Celestia uses a 2-dimensional reed-solomon encoding scheme to encode block data when the sequencer creates a new block. This scheme ensures that only a small sample of data is enough to verify with statistical certainty that the entire block has been published. Only light clients are needed to perform an operation called Data Availability Sampling (DAS) — randomly downloading a small piece of data from the block to detect if the sequencer is misbehaving and withholding data. This method is very effective in the view of probability statistics. In fact, by the seventh time a light client tries to randomly check a chunk of data, the chance of it failing to detect that the sequencer is misbehaving would become less than 1%. And once it is discovered that any one small piece of data is incorrectly encoded, the network is notified via a fraud proof. This makes sure that the throughput is not bottlenecked by state execution like traditional blockchains, allowing Celestia’s throughput to scale with the number of users involved.

Initially focusing on the EVM and Cosmos SDK, Celestia does not exclude integration into the ecosystems of Ethereum and Cosmos. Celestia has released a plan called Celestium, which allows any Ethereum L2 chain to use Celestia for data availability and Ethereum for settlement and dispute resolution. Celestiums will provide high throughput data availability for Ethereum L2s, with a higher level of security than other off-chain data availability techniques.

Moreover, Celestia is partnering with Evmos to build a settlement layer for EVM rollups called Cevmos. The settlement chain will be implemented as a Celestia rollup using Optimint, and leverages Celestia as the DA layer to provide a fully EVM-equivalent stack optimized solely for rollups, resulting in lower fees and better scale in rollups.

Polygon Avail

Avail, one of the scaling solutions in Polygon’s toolkit, is a general-purpose, scalable data availability-focused blockchain targeted for standalone chains, side-chains, and off-chain scaling solutions.

Avail provides a robust data availability layer by using an extremely secure mathematical primitive — data availability checks using erasure codes with a key innovation — they use Kate polynomial commitments to create a 2D data availability scheme that avoids fraud proofs, does not require honest majority assumptions, and has no reliance on honest full node peer to gain confidence that the data is available.

Avail’s approach to solve the data availability problem is similar to Celestia’s DAS but differs only on small points. Avail uses KZG polynomial commitments instead of fraud proofs to avoid sequencers’ misbehaving. KZG commitments, also known as Kate commitments, was introduced by Aniket Kate, Gregory M. Zaverucha, and Ian Goldberg in 2010, providing a way to commit to polynomials in a succinct manner.

In simple terms, the entire data in a block is arranged as a two-dimensional matrix. The data redundancy is brought in by erasure coding each column of the matrix to double the size of the original one. Kate commitments are used to commit to each of the rows and the commitment is included in the block header. The scheme makes it easy to catch a data hiding attempt as any light client with access to only block headers can query random cells of the matrix and get short proofs that can be checked against the block headers. The data redundancy forces the sequencer to hide a large part of the block even if it wants to hide just a single transaction, making it susceptible to getting caught on random sampling. Thus, the need for fraud proofs is avoided as the binding nature of the Kate commitments makes it very computationally infeasible for sequencers to construct wrong commitments and not get caught.

Summary

Specialized data availability layer, as a prototype of modular blockchains, aims to facilitate a complete change in how we approach design of blockchain systems, enabling modular blockchain paradigm where various execution environments can utilize this specialized layer for data ordering and availability. Although a small concern may arise that rollups using specialized DA layer might not be as secure as those with Ethereum mainnet, it is an essential tradeoff since modular blockchains can bring a more flexible, scalable, customizable and interoperable network. In the long run, specialized DA layer will become the cornerstone of modular blockchain paradigm, leading the way towards the endgame of blockchain scaling.

Disclaimer: This research is for information purposes only. It does not constitute investment advice or a recommendation to buy or sell any investment and should not be used in the evaluation of the merits of making any investment decision.

🐩 @chestersigned

📅 18 April 2022

Link:

https://medium.com/blockchain-capital-blog/wtf-is-data-availability-80c2c95ded0f

https://polynya.medium.com/the-lay-of-the-modular-blockchain-land-d937f7df4884

https://rileygmi.substack.com/p/celestia?s=r&utm_campaign=post&utm_medium=web

https://coinyuppie.com/focus-on-the-data-availability-layer-to-understand-the-new-public-chain-celestia/

https://polygon.technology/blog/introducing-avail-by-polygon-a-robust-general-purpose-scalable-data-availability-layer-98bc9814c048

https://polygon.technology/solutions/polygon-avail/