Author: Avi Zurlo Source: nil Translation: Shan Ouba, Golden Finance
Since the rise of Rollups, blockchain scaling has focused on the modular vs. monolithic debate. Initially, this dichotomy was a useful mental model for reasoning about blockchain scalability, but both camps have moved beyond it.
Today, the modular vs. monolithic contrast puts unnecessary constraints on our mental models of scalability.
So, what are the options?
In this article, we show that horizontal vs. vertical scaling has always been the foundational framework for blockchain scalability, and explain how adopting horizontal vs. vertical can lead to better scaling solutions.
Understanding Modular vs. Monolithic
First, some definitions:
Modular chains separate the core functionality of a blockchain into different layers.
Monolithic chains integrate all core functionality into one interconnected layer.
We can think of “layers” as equivalent to “machines” — while a monolithic chain has one validator node that runs all tasks, a modular chain has multiple (2-3) full nodes that run different tasks.
For example, a Rollup typically has two operating nodes: a Rollup full node for execution and an Ethereum full node for settlement + data availability (DA). Validium may utilize three operating nodes: a Rollup full node for execution, an Ethereum full node for settlement, and an alternative data availability layer full node for DA.
Modularity divides the tasks of a blockchain across at least two full nodes. By doing so, a modular blockchain can leverage the computing power of multiple machines when building each block.
This is a form of horizontal scaling.
Modularity is useful for thinking about blockchain scaling because it is a form of horizontal scalability.
On the other hand, most of the monolithic camp chooses to scale through software optimization, implementing parallel virtual machines, data pipelining, faster network protocols, and (most notably) more powerful hardware. In essence, monolithic chains try to squeeze as much computing power as possible out of a single full node.
This is a form of vertical scaling.
Critics say this approach tends toward centralization: if you rely on increasing the power of individual nodes to scale, you will inevitably run into the physical limitations of the underlying hardware and be forced to increase hardware requirements to scale further.
However, this criticism is misguided, as not all monolithic chains rely solely on vertical scaling.
For example, Near is a monolithic L1 blockchain built on a sharded network architecture. This means that Near full nodes are responsible for all tasks (i.e., execution, settlement, and data availability), but they are only responsible for a small portion of Near's global state. Thus, Near leverages the power of multiple machines by dividing the work based on state rather than tasks (just like modular chains).
We can see that both monolithic and modular chains are not limited in the scaling techniques they implement. Both can scale horizontally and/or vertically.
Furthermore, the modular vs. monolithic debate is always rooted in the horizontal vs. vertical scaling framework. From a strictly technical perspective, modular favors horizontal scaling, which is inherent to its design, while monoliths favor vertical scaling.
Now that we have successfully launched modular chains, the additional scaling benefits are no longer about being “more modular”. The focus is now on how chains can leverage horizontal or vertical scaling techniques.
Adopting a horizontal vs. vertical mental model allows us to easily reason about the tradeoffs each chain makes in the process.
Reframing the Conversation: Horizontal vs. Vertical Scaling
Vertical Scaling
Vertical scaling increases the hardware utilization or hardware requirements of each node. In blockchain, this is often done through software optimizations such as parallel virtual machines (i.e., multi-threaded processes).
A popular example here is the EVM vs. SVM.
The EVM executes transactions sequentially, while the SVM executes transactions in parallel. The SVM does this by utilizing more CPU cores, so the SVM can process more transactions per second than the EVM. Note: This type of vertical scaling is the foundation behind Eclipse L2.
In terms of tradeoffs, vertical scaling is limited by available hardware, tends to be centralized due to increased hardware requirements, and is less scalable than horizontal scaling.
Horizontal expansion
On the other hand, horizontal expansion increases the number of machines that the system can access by spreading the workload across multiple nodes. As mentioned earlier, modular chains essentially distribute tasks across multiple machines. However, chains can usually achieve a greater degree of horizontal expansion through sharding.
=nil;Here is a useful example.
Last November, the =nil; Foundation launched a provable sharding architecture called zkSharding, which is the basis of the new Ethereum L2 =nil;. The core of the =nil; design is to divide its global state into multiple shards. Each shard is operated by a decentralized committee of =nil; validators who build blocks and manage cross-shard transactions. In addition, each shard generates a validity proof, which is sent to the main shard for aggregation and then published and verified on Ethereum. =nil; leverages the power of horizontal scaling in two ways:
First, =nil; is a modular blockchain that leverages Ethereum’s strong consensus and data availability guarantees, thereby distributing tasks across multiple full nodes.
Second, =nil; is a sharded blockchain, thus distributing parts of the state across many full nodes.
Both techniques reduce the load that any single machine needs to bear and increase the overall scalability of the network.
So, what are the trade-offs of horizontal scaling? It comes down to two things: network and consensus complexity, and asynchronous communication between machines or shards.
The End Game of Ethereum Scalability
Neither horizontal nor vertical scaling is limited to modular or monolithic architectures. That’s why the horizontal vs. vertical scaling framework provides more room to explore new solutions that make modular blockchains more scalable.
For example, one option is to vertically scale one layer of the modular stack. One popular approach is to implement parallel virtual machines, thus scaling execution throughput. As mentioned above, Eclipse is implementing BlockSTM with SVM and other Rollups (e.g. Starknet) to achieve parallelization.
However, vertical scaling is always limited by a single machine, and we cannot break the laws of physics.
One solution may be to choose horizontal scaling through sharding.
Current modular designs have only just begun to touch the full potential of horizontal scaling. With sharding, we can leverage the power of any number of machines (instead of splitting 2-3 machines per task).
In other words, many machines can run the same type of tasks in parallel. This is what Ethereum and Celestia hope to achieve with Danksharding and data sharding, respectively. However, sharding is not inherently limited to the data availability layer - it can also be combined with execution (as in the case of =nil; L2).
If we combine the horizontal scaling achieved through modular stacks with the horizontal scaling provided by sharding, we will get a huge increase in available computing power.
The ultimate goal of blockchain scalability will merge horizontal and vertical scaling, resulting in a sharded blockchain with parallel virtual machines.