Modular Blockchains
What Is a Monolithic Blockchain?
A monolithic blockchain is a form of blockchain architecture that aims to do everything itself - the opposite of a modular blockchain. Execution, consensus and data availability are all performed by the same chain with none of the layers being outsourced to other service providers. All of the nodes of a chain have to execute and verify the state of the chain along with its history. There is no specialization in any part of the stack. Monolithic chains try to optimize each component of the trilemma, only to realize that optimizing one part results in weakening another. For example, ethereum has optimized for security and decentralization resulting in high fees when the chain is congested. Solana has optimized for fast transactions which is why the costs to run a node are very high. Having fewer nodes translates to poorer decentralization properties, which is part of the trade-off solana has made. Moving forward, as different projects are able to specialize in different components of the trilemma instead of competing in all three, we can alleviate the trilemma entirely.
Monolithic blockchains are the most common approach to building blockchain architecture as basically every blockchain today can be characterized as monolithic. Blockchains like ethereum are monolithic in current form. A network of blockchains like avalanche that adopt modular components (subnets) is also considered monolithic. The main problem all monolithic blockchains run into is known as the blockchain trilemma. The trilemma is composed of three parts, namely: execution, consensus (security) and data availability. Monolithic chains of today can choose to perform two out of three of these options well, which leads to harsh inefficiencies. Again, for example, ethereum chose to focus less on scalability and more on providing a highly secure and decentralized platform. Other blockchains such as BNB chain have made different trade-offs in regards to the trilemma, disregarding decentralization for security and scalability. Monolithic chains cannot have their cake and eat it too, although they try.
What Is a Modular Blockchain?
A modular blockchain is a blockchain that outsources (modularizes) at least 1 of the 3 core tasks every blockchain must provide; execution, consensus (security), and data availability. Throughout the history of the blockchain industry every blockchain has had to perform these core tasks in-house, meaning they did it all themselves. Any full nodes operating on these blockchains have to execute and verify the entire state and history of the network, leaving behind all kinds of bottlenecks and scalability issues. Instead of trying to have a blockchain try to excel at all three tasks, like all monolithic blockchains try today, we want to modularize each component and allow for specialization of each task. When a blockchain specializes in a core component (e.g. execution) it is able to become better at that component than before it specialized, and therefore can perform that task in a better/faster way than it previously could. Specialization is how we scale anything, including blockchains, and as specialization occurs at different layers of the stack, we can achieve true scalability.
The Blockchain Trilemma; Diving Deeper
Execution
The execution layer is what users are interacting with when using blockchains. Execution is the calculation required for blockchains to update their current state. To change from Block N to Block N+1 (current state to new state) take the existing state (N) and add any new transactions to get to the new state (N+1). A rollup is an execution layer, focused specifically on processing transactions and outsourcing security and data availability to other blockchains. Other execution layers include validiums and volitions. Validiums are similar to ZK-rollups, with the difference being in the treatment of data. Rollups publish their data on-chain vs validiums who publish data off-chain. Volitions are what you get when you combine ZK-rollups and validiums together, where you (the user) have the choice of posting your relevant transaction data on-chain or off-chain. To tie it all together; rollups specialize in a specific execution environment, relying on an L1 for security and data availability. Validiums are similar to rollups as both derive their security from an L1, although any data generated is published off-chain not on-chain. Volitions merge ZK-rollups and validiums together, providing an execution environment with L1 level security, while also giving the user the option for their data to be posted on or off-chain.
Current Projects
Optimism
Arbitrum
Metis Andromeda
Fuel Labs
Boba Network
zkSync
StarkWare
Polygon Zero
Cosmos SDK
Loopring
Aztec
Scroll
Consensus (Security)
Consensus provides security and defines the canonical truth about data stored on blockchains. Blockchains are distributed databases that record data and allow users to transact cryptocurrency amongst each other. Consensus mechanisms are a standardized format that nodes on a specific blockchain utilize to keep track of who owns what and when. Consensus mechanisms are the crucial link to coordinating such a decentralized system. The consensus layer is simply responsible for taking in arbitrary data (messages) and ordering those messages. Proof of work (PoW) and proof of stake (PoS) are the most common consensus mechanisms, with the two biggest protocols (bitcoin and ethereum) both utilizing proof of work. Ethereum has long planned to switch to proof of stake, set to occur later this year.
Current Projects
Ethereum
Celestia
Evmos
Cosmos
Aptos
Sui
Data Availability
Having data available is a necessary part of running a blockchain, and also a key part to the security of a blockchain. Users of a blockchain want to be able to verify for themselves that the data is available and complete. The data availability (DA) layer provides a verifiable way to publish previously ordered messages to the network. Transaction data must be published and available to anyone. This allows for anyone to calculate the state of the blockchain and the different state transitions (new blocks). Basically, any data that is guaranteed by the L1 or DA layer should be available to anyone. The purpose of a blockchain is to be an immutable ledger of record, so when you add data to a blockchain, you add it to the chain forever, therefore also adding it to all of the full nodes (computers) running the chain at the time. All the data that makes up a block should be available to everyone at any time.
Current Projects
Ethereum
Celestia
Polygon Avail
zkPorter
StarkEx
Eiganlayr/Datalayr
Benefits Of a Modular Blockchain
Scalability (magnitudes more)
More developer experimentation on different layers
Different communities can choose to be sovereign via sovereign rollups
Benefits Of a Monolithic Blockchain
Composability
Ethereum
Ethereum has pivoted from its previous road map of execution shards to a rollup-centric future. Ethereum will be offloading execution to rollups, who will in turn use ethereum as a settlement and data availability layer. This is achieved via data sharding (aka danksharding), which is going to play a vital role in ethereum’s rollup-centric future. By taking a modular approach to scalability problems ethereum aims to alleviate the inefficiencies brought forward by the blockchain trilemma and provide a better ecosystem for all.
Rollups on Ethereum
Rollups are a much more efficient way to process transactions when compared to processing transactions on an L1 (e.g. ethereum). Rollups are focused solely on execution, outsourcing security and data availability responsibilities to other layers of the blockchain stack. Rollups create execution environments that are independent of the data availability/settlement layer. This allows them to process transactions off-chain and batch them together, ultimately sending the batches of transactions to whatever L1 the rollup has a cryptographic agreement with. When rollups are created they enter a cryptographic agreement with the L1 securing them to follow a set of rules, basically promising to show transactions as mathematical proofs. This is how rollups can derive their security from their respected L1. Benefits of one layer (security) are tied together with the benefits of another layer (execution), ultimately providing a secure, scalable system that doesn’t compromise on any one aspect to promote another. Again, with security and data availability being handled by an L1 and execution handled by rollups, one can achieve true scalability without compromising any aspect of the stack.
Validiums
An execution layer that posts data off-chain is known as a validium. Validiums are a scaling solution similar to ZK-rollups, with the difference being in the treatment of data. Both enforce transaction integrity by using validity proofs, although ZK-rollups publish any data generated on-chain whereas validiums publish any data generated off-chain. Therein lies the difference between validiums and rollups: a rollup must settle on the same settlement and data availability layer to be considered a rollup, where a validium posts its data elsewhere.
Volitions
Volitions combine ZK-rollups and validiums, providing an execution environment that can publish data either on-chain or off-chain, ultimately placing the choice in the users hands. Users retain the freedom to post transaction data on-chain via a ZK-rollup or off-chain via a validium. This means that the user of the volition gets to choose an alternate DA layer of their choice.
EIP-4488
Layer 2 rollups batch users transactions together and posts them to mainnet ethereum via “calldata”, which is defined by OpenZeppelin as: a read-only byte-addressable space where the data parameter of a transaction or call is held. Calldata is expensive and is the main expense for rollups on ethereum. Reducing calldata costs for rollups is the most important factor when trying to reduce costs for users of rollups. Proposed by Vitalik Buterin & Ansgar Dietrichs, EIP-4488 is an ethereum improvement proposal aiming to drive down these costs for rollup solutions on ethereum.
Calldata gas costs have been reduced from 16 to 3 gas per byte
1 MB per block and 300 bytes for each transaction (maximum 1.4 MB) to mitigate security risks
EIP-4488 does two things to reduce gas fees as shown above. The first change decreases the calldata costs to about 20% of what they were prior, with the second change imposing limits on the transaction calldata that can be added to a block. These changes should directly impact the cost that rollup operators pay when interacting with mainnet etheruem, therefore reducing the costs for users when they are interacting with rollups on ethereum. As pointed out by Vitalik himself, “the long term solution to the long term inadequacy of rollups by themselves has always been data sharding.” However, datasharding (aka danksharding) is going to take much longer to rollout. In the meantime, aiming to cut costs for rollups is still desirable.
EIP-4844 (Proto-danksharding)
While danksharding is extremely important for ethereum, we still have to be patient as a full implementation of danksharding will take much longer to roll out. With EIP-4488 serving as a potential band-aid solution while we wait, proto-danksharding (EIP-4844) can serve as an improved next step in between EIP-4488 and a full danksharding implementation. PDS is the sharding scheme ethereum aims to implement via EIP-4844. The name danksharding comes from dank which is an abbreviation of core contributor Dankrad Feist. EIP-4844 introduces a new type of transaction called binary large objects (aka blobs), which will be used by rollups going forward for data storage instead of using calldata. Blobs are cheaper than a similar amount of calldata which is what makes their use over calldata attractive. To alleviate storage requirements, after a month the blobs are pruned from nodes. Rollups only need the data to be available for a certain period of time and therefore once 1 month of time has gone by, unnecessary data can be pruned as anyone who had an interest and/or need for the data had an opportunity to execute on it. One of the great features of EIP-4844 is that it implements the necessary steps along the way to the end goal of full danksharding. This is a big improvement compared to EIP-4488, which does not implement any of the important steps along the way to danksharding. These include:
Data blob transaction format
KZG commitments to the blobs
All execution layer logic required for danksharding
Layer separation between beaconblock verification and DAS blobs
Most of beaconblock logic required for danksharding
All of the execution/consensus cross verification logic required for DAS
To summarize, EIP-4488 is attempting to solve current problems affecting ethereum today, and while EIP-4844 is doing that as well, it is also providing solutions that align with the future of the data sharding road map. This is why EIP-4844 is so important - it introduces several of the changes that full danksharding intends to implement, but does it along the way. Although EIP-4488 can reduce costs for rollups today, it would be rendered obsolete once full sharding is implemented as unlike DS & PDS, EIP-4488 has no plans of implementing blob style transactions. Important to note that these two EIPs are not in competition with each other and instead aim to complement each other in terms of the timing of their independent road maps and lining them up nicely with ethereum’s data sharding roadmap.
Celestia
Celestia is a bare bones L1 blockchain similar to bitcoin, but with even less complexity. Celestia is building a consensus and data availability layer for execution environments (rollups, validiums, volitions) and other blockchains to plug into. The job of a rollup is to provide a specialized execution environment, and therefore rollups need to outsource other core tasks (consensus, data availability) to other layers of the blockchain stack. Celestia is looking to fill that need, providing a cheap alternative data availability layer for rollups to publish transaction data. Publishing this data (known as calldata on ethereum) to an L1 (e.g. ethereum) is a major expense for rollups and the main reason why rollups today are not as cheap as they could be. By outsourcing tasks like execution to unique execution environments, celestia is able to specialize in data availability. Put differently, celestia’s transactions are executed by applications built on top of it and not celestia itself, which is highly scalable. With each layer focusing on one specific task, we can provide a highly scalable blockchain environment and usher in the modular era to the blockchain industry.
Data Availability Sampling
Data availability sampling is a cryptographic technique allowing light nodes to basically have full node security properties without the need to download entire blocks. This is possible via erasure coding. From google: “erasure coding is a method of data protection in which data is broken into fragments, expanded and encoded with redundant data pieces and stored across a set of different locations or storage media.” What's important is that if you possess the redundant data, you are able to reconstruct the original data if it's unavailable. It doesn’t even matter which bits of data are lost, as long as the minimum threshold of data is met, the original can be reconstructed. A relatable example of erasure coding are CDs. How is a scratched CD able to recover the original data? The short answer is erasure coding.
Celestia uses 2D Reed-Solomon erasure codes with a 1/4 code rate (code rate is simply the ratio of original data:padded data). A 1/2 code rate doubles the size of our total data structure. 1/3 triples it, and so on. This means that after padding, a 1mb block will turn into a 4mb block. Put another way, 25% of the block is the original data, and 75% of the block is the padded data. This property ensures that a malicious actor would need to acquire more than 75% of the block's data to do something harmful. During the sampling process, light clients will randomly select samples of data from a block and request it from a validator instead of downloading the entire block. If all of the samples are available to the light clients then that means the entire block is available, with proof to back it up. Essentially by sampling random data from a block over and over again, you can determine in a probabilistic manner that the block is indeed complete and available. If the validator cannot provide the data that was requested, then we know the data is being withheld.
Data availability sampling plays a crucial role in how celestia is able to provide a cheap DA layer, as DAS allows celestia to scale its block size without increasing hardware costs for nodes. This means that any node in the network is able to verify that data has been published without fully downloading all of the data. Monolithic blockchains take the opposite approach, as they require you to fully download data to verify that it is available, and is one of the reasons why monolithic blockchains are not very scalable. Celestia solves this issue by introducing data availability sampling, allowing any node in the world to verify that the data is available without having to fully download it. As the total size of light nodes increases, so can the size of the blocks. Basically, as the size of the blocks get larger, so does the level of decentralization. Data availability sampling allows for increased scale without increasing the hardware costs for full nodes, effectively achieving the modular thesis. This is how true scalability is achieved in blockchains, as no components of the stack are sacrificed to benefit the other components.
Rollups on Celestia
Sovereign Rollups
Settlement Rollups
Celestiums
Sovereign Rollups
A sovereign rollup is a rollup that operates independently from any settlement layer. Sovereign rollups do not require a smart contract chain as each transaction is settled between the rollup nodes themselves, with that transaction data being published to a data availability layer. Execution is handled by the rollup, settlement is handled by the rollup, and data is handled and made available by a DA layer. Securing the rollup is a native p2p network consisting of full & light nodes who can download blocks. On celestia, sovereign rollups will post their data directly to celestia. Because sovereign rollups handle their own settlement they are effectively their own layer 1 chain.
Settlement Rollups
A settlement rollup is essentially a standard rollup that is optimized for the settlement of other rollups on top of it. For example, you could have an L2 that is set up to only handle settlement and not to host any applications (which is a settlement rollup) with L3s built on top of it handling execution.
Celestiums
Celestiums aim to take the best of both worlds from celestia and from ethereum and combine them. Celestia can provide a highly scalable DA environment, ethereum can serve as the settlement layer, and execution environments (rollups) can provide execution.
Traditionally, execution environments would use ethereum for both settlement and data availability. This is where celestiums differentiate. Execution environments will use celestia for data availability and ethereum for settlement. This means that rollups will publish block data onto celestia, guaranteeing the data. Any node can then utilize data availability sampling to verify that the data has been published without downloading all of the data. Finally, celestiums will use ethereum for settlement, posting and fraud/validity proofs to ethereum, which can then handle deposits and withdrawals.
Celestiums allow for specialization in each of the three core blockchain tasks, as each layer is focused solely on their respective tasks. Execution environments can provide execution in a specialized manner. Ethereum can specialize in settlement, providing a robust layer for rollups to publish fraud proofs and validity proofs. Finally, celestia can be a specialized data availability layer, ensuring data is cheap and available. Combining these we get a celestium, a modular approach to scaling blockchains.
Concluding Thoughts
Modular blockchains separate the core task a blockchain must perform into separate layers and introduces specialization. While monolithic chains have benefits and network effects currently, modularity will allow for more execution scale than was ever thought possible with the current monolithic chains. Even the most hesitant monolithic chains will adopt modular components at some point. Modular blockchains are going to usher in a new era inside the crypto industry, shifting away from monolithic architectures for good. The modular approach is simply superior in too many aspects to not win market share and dominate going forward. Ethereum and celestia have the modular future right in their sights and I am excited to see how it plays out for them.