Modular and Monolithic blockchains
The blockchain world is increasingly moving towards a modular architecture in order to achieve true scalability. Even blockchains like Ethereum, which used to be fully monolithic, are shifting to a modular design to overcome the challenges that come with monolithic blockchain designs.
Before starting with modular blockchains, let's first talk about monolithic blockchains.
Monolithic blockchain fundamentals:
To understand the innovations that come from modular execution layers, we first need to understand how monolithic blockchains manage computation and verification.
Blockchains rely on a network of entities that execute transactions and aggregate them into a block, known as block producers. Without checks and balances, a malicious block producer could include invalid transactions in a block. To prevent this, blockchains rely on a network of other nodes to determine the validity of a block before adding it to their version of the chain.
How does a monolithic blockchain work?
In a monolithic chain, all tasks are handled on a single layer or a group of tightly-coupled chains operating on the same layer. The latter distinction is important to note: a network of interconnected blockchains that handle all roles, such as Polkadot’s parachains or Avalanche’s subnets, doesn’t qualify as modular architecture.
What is a monolithic blockchain architecture?
The previous section describes the workflow for a transaction on a proof-of-work chain, but how does it translate to a monolithic architecture? Here’s a list of things nodes on a monolithic chain do for every transaction:
1. Data availability
Each node holds a copy of the entire blockchain and stores every transaction. A peer can always request transaction data from fellow nodes.
2. Execution
All nodes re-execute transactions to check validity. On an account-based blockchain (usually one that supports smart contracts), nodes execute transactions to compute the new network state.
3. Consensus
The nodes agree on what transactions will be processed for new blocks and the ordering of the transactions they contain
4. Settlement
Settlement requires committing a transaction permanently to the chain’s history. Nodes proposing transactions must place an economic stake against the integrity of blocks. For Proof-of-Work blockchains, this “stake” is the energy expended on mining new blocks, while Proof-of-Stake blockchains require validators to stake tokens on the validity of blocks—these tokens can be confiscated from bad actors who attempt to write false or inaccurate transactions to the chain
A monolithic blockchain architecture requires nodes to perform all of these roles. This is different from a modular chain, which separates execution from settlement, consensus, and data availability.
What is a Modular blockchain?
The modular execution layer is responsible for processing transactions and applying individual state transitions.
Blockchains such as fuel define a modular execution layer as: a verifiable computing system designed for the modular blockchain stack. More specifically, a fraud or validity verifiable blockchain that leverages a modular blockchain for data availability.
Modular execution layers offer two core benefits over their monolithic counterparts:
Monolithic chains couple computation and verification on the same layer, leading to sub-par security and limited scalability. Modular execution layers avoid this by decoupling computation and verification, allowing for much more robust security guarantees at scale.
Monolithic chains are locked into inefficient technologies when it comes to the speed and variety of computation they can support. On the other hand, modular execution layers can be specifically designed to optimize for efficient computation.
How does a modular blockchain work?
Modular blockchains operate on the principle of modularity, which refers to the separation of a system into different components that can be combined in various ways to achieve specific objectives. Modular components can be thought of as Lego bricks that can be combined to form different structures.
Modularity is based on specialization: each component can only do a few things, but it must do them well.
What is a modular blockchain architecture?
A modular blockchain can be designed to handle one or a combination of the following tasks:
Execution: Support the execution of transactions and enable the deployment of and interaction with smart contracts.
Data availability: Guarantee the availability of transaction data.
Consensus: Agree on the contents and ordering of transactions.
Settlement: Provide a layer for finalizing transactions, settling disputes, validating proofs, and bridging between different execution layers.
What are the benefits of a modular blockchain design?
Modular blockchain designs offer the following benefits: scalability, flexibility, and the ability to launch new blockchains.
1. Scalability
The blockchain trilemma states that a blockchain can only have two of three possible qualities, but never all three at the same time: decentralization, security, and scalability. Optimizing for certain qualities (scalability) leads to trade-offs in other areas (security and decentralization), which is why scaling blockchains is difficult.
However, scaling difficulties mostly occur when a blockchain tries to handle all activities at once under a single layer. Applying modularity to blockchains (separating tasks between different layers) improves scale without introducing unwholesome trust assumptions.
For example, rollups that focus on execution provide greater scalability than regular chains. Still, they achieve a high degree of security by relying on Ethereum for consensus and data availability.
2. Launching new blockchains
Launching a new blockchain can be difficult owing to the need to build up its security properties. A proof-of-stake chain may need to establish a wide distribution of tokens to avoid centralization risks, while a proof-of-work chain may need to attract miners to prevent a few parties from controlling the network’s hash rate.
But what if developers could focus on the minimum, such as execution, and plug in another modular blockchain component to handle specific tasks, like security? By leveraging modular designs, new blockchains can launch faster without worrying about getting every part of the architecture correctly.
3. Flexibility
Modularity provides flexibility that monolithic chains simply cannot offer. Bitcoin’s focus on decentralization and security automatically rules out scalability, while high-throughput chains often trade off some measure of decentralization and security.
Purpose-built modular chains offer greater flexibility with respect to trade-offs and design implementations. For instance, a modular blockchain system may include modular chains that focus on security and data availability, while others focus on execution. Here’s how both benefit from modular design:
A security and data availability layer benefits from extra scalability since transactions are processed separately. It only needs to enforce the validity of off-chain execution and guarantee the availability of off-chain data. This is how Ethereum’s scalability benefits from using rollups.
An execution layer (which is optimized for scalability) benefits from extra security by leveraging the parent chain’s properties. This is how Layer 2s benefit from Ethereum’s decentralization.
Conclusions.
By adopting a design that allows for high security under a single honest minority assumption, the modular blockchain layer enables the development of blockchains of much higher performance than has already been arrived at with monothreaded designs.
However, in addition to the scalability advantages that come from separating computation from verification, further progress in scalability can be made by focusing more on the design of the top of the layer.
Making computation more scalable and efficient at this layer is the next step in building better blockchains.
Most of the modular execution layers currently being developed use Ethereum as the mother chain, so they use EVM as the execution environment by default. This is the design equivalent of improving the energy efficiency of an internal combustion engine: an incremental improvement on an already obsolete technology.
In reality, the modular stack opens up a much broader design space, eliminating the need for modular execution layers to rely on the inefficient EVM.
In the next post we will be talking about how Fuel is building the fastest execution layer for the modular blockchain stack.