June 23, 2024 · Reading Time: 7 minutes

Why validity rollups are the future of blockchain

Share this post:


Ethereum is one of the greatest inventions of the last decade, opening the door to decentralized applications ranging from blockchain gaming, decentralized finance (DeFi), NFTs, and more. For these applications to truly flourish on Ethereum, and for others to be born, the network requires solutions for greater scalability—that is, much faster and much cheaper transactions.

Why wasn’t scalability built into Ethereum?

It all boils down to the “blockchain trilemma.” This trilemma posits that out of the three properties that blockchains aim to achieve—security, decentralization, and scalability—only two can be achieved simultaneously within the Layer 1 (L1) network.

Ethereum—as well as Bitcoin and other L1s—have historically prioritized security and decentralization over scalability, leading to the emergence of Layer 2s (L2s) that aim to bring the missing scalability component to L1. Because Ethereum already houses a thriving ecosystem of L2s, we’ll focus on Ethereum here. We’ll look specifically at rollups, which have proven to be the most effective L2 method for scaling Ethereum.

The scalability challenge

To understand how rollups scale Ethereum, it’s first important to understand the nature of the scaling problem Ethereum faces. Transaction fees and wait times rise linearly with the number of people using Ethereum—that is, the more people using Ethereum at any given time, the slower and more expensive transactions become. Of course, this dynamic prevents the development and adoption of applications that require speed and low costs for a high number of users.

To put this into perspective, Ethereum mainnet processes 13 transactions per second (TPS), while Visa averages 1,700 TPS. Thirteen TPS is far from ideal for most applications.

So why not just raise the number of transactions per block on Ethereum? Well, that would make running Ethereum nodes (independent copies of the Ethereum transaction history) more expensive, meaning fewer people would be incentivized to run Ethereum nodes. That wouldn’t bode well for Ethereum’s decentralization.

Additionally, very large block sizes can destabilize consensus because they are harder to process, slower to propagate, and require more bandwidth. This can cause some nodes to fall behind, leading to consensus failures and temporary forks. To address these challenges, scaling solutions called rollups have emerged.

Understanding rollups

Rollups scale L1s by moving a majority of the heavy computation off the base layer. Instead of executing transactions one at a time on the L1, rollups execute them on a layer on top of the L1 (known as L2), where it’s cheaper. They then bundle numerous transactions together into a single, compressed summary, and submit it to L1 for verification.

This approach offers several advantages:

  • Cheaper transactions: Because transactions are executed on a cheaper layer and bundled together into a compressed summary, they split the L1 costs.
  • Faster transaction processing: Transactions executed on L2 aren’t subject to the same limitations as transactions directly executed on L1, such as block-size constraints and L1 gas fees per transaction. They can be executed faster on L2 and then sent over to be settled on L1 in bulk.
  • Enhanced functionality: Rollups can introduce additional functionalities and features that may not be feasible or efficient to implement on the L1, such as complex smart-contract logic or privacy-preserving mechanisms.

Types of rollups

Rollups can be broadly categorized into two main types: optimistic rollups and validity rollups. Both aim to achieve scalability improvements while maintaining the security and decentralization of the L1, but they differ in their approach and underlying mechanisms.

  • Optimistic rollups: Optimistic rollups operate under the assumption that all transactions submitted to L1 are valid by default. To prevent fraud, they incorporate a dispute-resolution mechanism that allows anyone to challenge the transaction in question within a certain time frame (up to a week) by submitting something known as a “fraud proof,” which proves that the state transition was incorrect.
  • Validity rollups: Validity rollups, on the other hand, require the operator to submit a cryptographic proof that attests to the validity of every transaction in the batch along with the batch itself.

While optimistic rollups rely on network participants (people) to catch and challenge fraudulent transactions, validity rollups depend on math and are therefore more secure. In addition, because validity rollups don’t require a challenge period, they offer much faster finality on L1, whereas optimistic rollups that use fraud proofs require up to a week for L1 finality.

Validity rollups

On a validity rollup, each batch of transactions is accompanied by a validity proof, which mathematically attests to the validity of each transaction in the batch. These proofs are constructed using advanced proof systems, such as SNARKs or STARKs (to be explained below). The process of creating and verifying validity proofs on a validity rollup involves several steps:

  1. Transactions are executed on L2 and grouped into a batch.
  2. For each batch, a validity proof is generated using a specific validity proof system (e.g., SNARKs or STARKs) to attest to the validity of every transaction in the batch.
  3. This validity proof, along with a state update, is submitted to L1 as a single rollup transaction.
  4. The verifier on L1 checks the validity proof to ensure the correctness of the offchain execution. This happens without needing to re-execute the transactions on L1, which is key to the scalability validity rollups provide: Execution takes place on L2, while verification takes place on L1.
  5. If the proofs are valid, the rollup transaction is accepted, and the state of the L1 is updated accordingly.

Validity rollups’ method of using validity proofs to attest to the validity of transactions brings several benefits.

  • Fast L1 finality: It provides fast finality on L1, meaning that once a transaction is included in a rollup and the proof is verified, it cannot be reversed or challenged. This is because it doesn’t need to be—the validity proof mathematically guarantees the correctness of the transaction already.
  • Better security: All transactions are validated by cryptographic proofs.
  • Less data on L1: The state update that is submitted to L1 contains only the final balance that is the result of all transactions (unlike optimistic rollups, which post all transaction data on the L1).
Optimistic Rollup Validity Rollup
Validation by Economic incentive Math
Invalid transaction treatment If detected, invalid transactions can be challenged by submitting a fraud-proof Invalid transactions cannot be included, and cannot be submitted onchain
L1 finality After dispute period is over (up to 7 days) Immediately after the proof and state update are accepted onchain
Data stored onchain Full transaction data Necessary data only (final balance)

Not zero-knowledge rollups, but validity rollups

Zero-knowledge (ZK) proofs have risen to prominence for their potential to enable privacy-preserving blockchains. They allow a prover to demonstrate to a verifier that a specific computation was executed correctly without revealing the inputs. The privacy-preserving nature of these cryptographic proofs makes them highly desirable for applications prioritizing confidentiality and data protection.

Validity rollups are often mistakenly referred to as ZK rollups, but this is not accurate. ZK is a misnomer in this context: Most validity rollups do not actually employ proofs that possess the cryptographic property known as “zero-knowledge.”  Rather,  they use “validity proofs” to establish the computational integrity of transactions, hence the term “validity rollup” is more accurate.

In the context of L2 validity rollups, the primary goal of cryptographic proofs is to enable L1 nodes to vouch for the validity of batched transactions executed off the base layer while exerting minimal computational effort. L2 validity rollups employ validity proofs to efficiently validate large batches of transactions.

By offloading computation to an offchain environment and using proofs to establish the validity of the computations performed, validity rollups significantly enhance the scalability of blockchain networks without compromising security or decentralization.

SNARKs and STARKs

STARKs, short for Scalable Transparent Argument of Knowledge, are becoming the standard proof system used in validity rollups. Introduced by StarkWare, STARKs offer several advantages over the older SNARK (Succinct Non-Interactive Argument of Knowledge) proof systems.

One of the main benefits of STARKs is that they do not require a trusted setup. In contrast, SNARKs rely on a process where participants generate a set of public parameters and must then destroy their individual secret inputs used in the process. If any participant fails to destroy their secret input, it could compromise the entire system’s security. STARKs eliminate this risk, making them more transparent and secure.

Moreover, STARKs provide better scalability compared to SNARKs. The proof sizes and verification times of STARKs are polylogarithmic in the size of the computation, meaning they grow at a slower rate than SNARKs when computational requirements rise. This scalability advantage makes STARKs more suitable for handling the rising demands of validity rollups.

Another significant advantage of STARKs is their post-quantum security. As quantum computing advances, it poses a threat to the security of various cryptographic systems. STARKs are designed to be resilient against quantum attacks, ensuring the long-term security of the proof system.

Given these benefits in terms of transparency, scalability, and post-quantum security, it is no surprise that STARKs are becoming the preferred choice for validity rollups in the industry.

Advantages and challenges

Validity rollups offer several compelling advantages that make them an attractive scaling solution for blockchain networks:

  • Faster transactions: By executing many transactions on L2 and bundling them together, validity rollups can process a much higher number of transactions per second compared to transactions executed directly on L1.
  • Cheaper transactions: By moving transaction execution to L2, where it’s cheaper, and spreading the L1 costs across batched transactions, validity rollups enable dramatically lower fees.
  • Security: In addition to relying on validity proofs to verify every single transaction, validity rollups also benefit from the security and decentralization of the main chain. By anchoring the rollup transactions to the main chain and relying on its consensus mechanism, validity rollups inherit the security guarantees of the underlying blockchain network.

However, validity rollups also face certain challenges. One of the main challenges is that building applications that leverage validity proofs requires specialized cryptographic knowledge and tools. This can create a barrier to entry for developers who are not well-versed in advanced cryptography, potentially limiting the adoption and ecosystem growth of validity rollups.

Enter Cairo

A Rust-inspired language that is purpose built for provable computing, Cairo makes it easy to build scalable dApps with the power of STARK validity proofs. Cairo lets developers write provable programs without a deep knowledge of the complex cryptographic concepts underneath. Cairo is the native smart-contract language for Starknet, a permissionless validity rollup on Ethereum.

Unlocking blockchain’s potential

Despite the challenges, it’s certain that validity rollups are the key to unlocking blockchain’s true potential. Many validity rollups are currently in the early phases of development, with efforts underway to enhance their efficiency, decentralization, and security.

One area of active research and development is the optimization of validity proof systems used in validity rollups by reducing the computational overhead and enhancing efficiency. This would allow for even higher transaction throughput and lower costs, making validity rollups more accessible and practical for a wider range of use cases. Another task is providing developers and users with intuitive and accessible tools—such as Cairo—that will lower the barriers to entry and encourage more developers to harness the power of validity proofs.

The journey toward mainstream adoption of validity rollups is just beginning, but the destination is clear: a future where blockchains can support a wide range of transformative applications across industries.