The era of single-layer blockchains will come to an end, detailing scalability and modular blockchain technology stacks
Author: Plaintext Capital
Original Title: 《Scalability \& The Modular Blockchain Stack》
Compiled by: Web3er Liu, Chain Catcher
Scalability, the ability to increase the number of transactions, is crucial for all blockchains. Scalability is key because to bring the entire world into Web3 and unlock the full potential of this technology, it is necessary to find solutions to handle the ever-increasing transactions per second (TPS), thus providing faster and cheaper transactions.
Although many new public chains boast high TPS, their level of innovation is limited, and the costs are significant. We are still far from running traditional financial systems on the blockchain. For example, Solana, which has been optimized to the maximum extent on a Layer 1 architecture, can achieve about 2500 TPS (as can be checked on Solana Beach). Impressively, this is several orders of magnitude lower than the 65,000 transactions per second that Visa claims to handle.
I entered the cryptocurrency industry in 2017, and since then, most of the research has focused on performance scalability. I worked on Ethereum 2.0 and hoped that the launch of "sharding" would eventually meet all scalability needs, but I made no progress in seeking to improve the composability loss caused by cross-shard communication, and later my focus shifted to Rollups.
Given the concerning scalability issues, developers are moving from Ethereum to new smart contract platforms, but as user demand for these new platforms increases, the block space becomes saturated, and the user experience declines again (for example, the soaring gas fees on Avalanche).
So far, the development methods to increase TPS have mainly focused on the following points:
- Faster consensus algorithms (allowing nodes to reach consensus on transaction instructions more quickly)
- Optimized execution environments (making transactions run faster)
- Faster propagation of blocks within the network
These three points cover almost 99% of the unique innovations touted by most new public chains.
Thanks to some teams that have made excellent contributions in researching and practicing the above methods, the adoption of these innovative approaches, combined with the rewriting of codebases, has created many high-performance network nodes (not simply forks or builds based on Ethereum's source code), which have indeed increased TPS by almost an order of magnitude. However, to continue expanding user bases on these platforms, they must increase hardware requirements in exchange for linear growth. What if there were a better architecture that could solve scalability issues without compromising decentralization?
Scalability
Today's blockchain platforms can be considered monolithic. Each blockchain node participates in running all parts that constitute the blockchain: Execution, Consensus, and Data Availability.
Execution is the computation of transactions contained in a block. In short, this process reads the number of tokens a user has on the Ethereum network, subtracts the number of tokens they send out, and saves the result on-chain.
The role of Consensus is to process these transactions and order and validate confirmations. Without a consensus algorithm, a group of nodes cannot agree on the order of transaction instructions, thus reaching the same state.
Finally, Data Availability is the process of ensuring that blocks are fully published to the network. For light clients (low-resource blockchain nodes) to work, the network must ensure that complete blocks are published so that when an invalid block appears, honest nodes can create a fraud proof. Data availability is crucial for scaling blockchains because it allows the network to increase capacity without requiring all nodes to linearly increase available resources.
Today, scaling a blockchain means scaling all three parts simultaneously.
Since the agricultural revolution, humanity has relied on specialization to improve efficiency and productivity, and software is no exception. In fact, today's internet protocol stack is composed of various layers, each serving a single purpose. Overall, they form the foundation of the internet we love today.
These modular layers also allow for greater flexibility and experimental attempts. For example, in the transport layer of the internet protocol suite, we use it to send packets of data from one computer to another in every online connection. There are many different protocols, with TCP, UDP, and SCTP being some examples, from which developers can choose to best meet the needs of their applications.
Applying a similar paradigm to blockchain can provide similar scalability advantages.
Enter Modular Blockchain Design
The execution layer is the user-facing layer (called Rollup), where transactions are executed.
The settlement layer (optional) provides finality for the aggregated results of all Rollups above it, allowing them to bridge in a trustless manner.
The consensus layer & data availability layer order and validate transaction instructions and ensure that all data has been published and is accessible.
Not every node needs to execute and validate every transaction for all other nodes to prove they know the blockchain data is valid. As long as we have a foundational layer that can store all execution data, we can guarantee (through zero-knowledge proofs or game-theoretic mechanisms) that transactions are valid and that everyone in the network knows it. Therefore, these transactions can now be executed by just one node.
If this node behaves maliciously, it will be removed, and another node will take over its execution, allowing the network to continue operating.
What does this mean? It means we have now shifted our focus from scaling multiple nodes simultaneously to scaling a single node. This is a simpler engineering feat. As demonstrated by the performance of today's large Web2 platforms, we already know how to scale this category of execution.
So, the scalability of the execution layer is no longer a concern, but there is one caveat: the execution layer must store all data to the consensus layer. Otherwise, light nodes (low-resource nodes) will have no way of detecting potential fraud in the execution layer. This is because light nodes themselves do not execute or validate any transactions.
Therefore, we need a cheap way for any node that synchronizes with the execution layer to prove whether the block-producing node operator is acting fraudulently. Fortunately, there are several ways to achieve this.
Sovereign Rollups
The Rollups we know must settle on a smart contract platform (public chain), and smart contract chains typically handle data availability and settlement work. Rollups need to execute fraud or validity proofs on smart contract platforms for security and are constrained by the capacity and execution performance of that chain. Since current smart contract platforms handle settlement work, their scalability is limited.
However, the process of Sovereign Rollups does not require the involvement of a smart contract platform. Instead, each of its transactions is published on the data availability layer, but settled on the Rollup layer. Importantly, the data availability layer (DA) is not responsible for executing transactions and settlements, which can enhance its scalability. The process of executing transactions occurs on the Rollup layer, data is available on the DA layer, and settlement ultimately occurs again on the Rollup layer. Rollups are monitored by full nodes on the Rollup layer that oversee the DA layer and maintain security by reporting invalid blocks through fraud proofs.
Once a fraud proof is generated by any honest full node, it propagates throughout the entire Rollup layer network, and any light node/full node that receives the fraud proof will immediately abandon the invalid block and clear the invalid block producer, which helps keep block producers honest.
If light nodes do not receive the fraud proof within a specified timeframe, they can determine that the block is valid.
Since Rollups do not involve including transactions in a potentially congested or interference-prone settlement layer, Sovereign Rollups can provide a better latency finality state.
Settlement Layer with Centralized Radiation Model (Optional)
In the centralized radiation model (see Matthew Di Ferrante's excellent post), a constrained settlement layer sits above the data availability layer. There can be a total of three layers: a typical Rollup (execution layer), a settlement layer (Sovereign Rollups), and a data availability layer (DA layer). The settlement layer operates like a blockchain, with its own block producers and transaction execution functions, but its execution capabilities are limited to certain types of transactions, making it easier to optimize.
Specifically, the settlement layer only cares about storing block data from the execution layer, executing fraud proofs for optimistic rollups, or storing state differences and validity proofs for zk-rollups, as well as switching between these Rollups.
Users can obtain sufficient guarantees of transaction execution validity simply by synchronizing with the settlement layer. Settlement layer nodes occupy less space due to their special nature, as they do not bear the heavy task of computation in the execution layer.
The cool thing about the centralized radiation model is that many Rollup/execution layers can bridge in a trustless manner. Since the settlement layer provides security for all transactions running at the top layer, in the event of a reorganization, all Rollup execution layers will also reorganize, eliminating the inherent security risks of bridging. As Vitalik recently stated, the shared security of this model is superior to the fragmented security of a multi-chain world. In fact, Eth2.0 will serve as this hub, providing settlement and data availability.
However, this model can also be implemented on any specialized DA layer, such as Celestia or Polygon Avail. Specifically, the collaboration between Celestia (data availability) and Evmos (settlement/hub) is an interesting example of the hub model.
Comparison of the Two
These two models have different trade-offs and compromises. In the centralized radiation model, the execution layer is constrained by the underlying settlement layer but benefits from trustless interoperability with other Rollup execution layers. For example, both Arbitrum and Optimism use Ethereum as their settlement and data availability layer, functioning like a hub. In the event of an Ethereum reorganization, regardless of the amount of funds bridged between them, since both Rollup execution layers also reorganize with Ethereum, there is no risk of either execution layer losing funds.
In the case of Sovereign Rollups, building the execution layer directly on top of the data availability DA layer shifts the fraud handling off-chain, providing greater flexibility in latency, upgradability, and other aspects. However, we do not gain interoperability between execution layers.
Scaling the Data Availability Layer
The amount of data that needs to be published by the execution layer grows linearly with the number of executed transactions. Therefore, we need a scalable data layer.
It turns out that scaling a dedicated data layer is much easier than scaling a monolithic blockchain.
By combining erasure coding (a technique that allows us to play CDs even when they are severely scratched) and data availability sampling of block data (requiring N random small parts), each node can probabilistically guarantee that all block data is available and published to the network. (See Mustafa Al-Bassam's post for an in-depth discussion of data availability issues and solutions.)
At the same time, these nodes can come together to piece together the complete data by combining the data samples that each light node independently possesses.
The cleverness of this sampling lies in the fact that the required sample size grows logarithmically with the DA layer's block size (i.e., it scales very well), and as users add more nodes to the network, the network's data capacity also increases.
The main insight it brings is that we can significantly scale "secure" data availability, much like file-sharing networks such as BitTorrent.
Conclusion
After years of research and uncertainty, the scalability issue of blockchains has finally been theoretically resolved. I cannot praise how significant this is enough. I might lose sleep over it.
This means that the era of monolithic blockchains handling all consensus, data, and transaction execution work is coming to an end.
The next generation of protocols will be more specialized, catering to the different layers of what we now refer to as blockchains, and providing great flexibility for experimental innovations.
We are about to witness a carnival: Ethereum-based Rollup projects or their derived forks will be deployed on settlement layers using Celestia, Eth2.0, or any other specialized DA layer. Settlement layers, DA layers, and execution layers will all be optimized in different ways.
I expect that many of today's smart contract platforms will become various layers of this new stack, and many new projects will rise in the future. There may be significant opportunities for teams with specialized expertise in certain areas (such as virtual machines, consensus algorithms, and networks).
Towards a bright and scalable future.