Marketplace has launched, further enabling blockchain developers! Learn more

Introduction to Ethereum Rollups

September 09, 2022

Overview

Ethereum, the most popular blockchain, has seen scaling issues for quite a long time now. With high gas fees due to congestion being the primary pain point. With the increasing cost to use the network, a plethora of scaling solutions have emerged. Today in this guide, we will go over some Ethereum scaling solutions and deep dive into rollups.

Ethereum Scaling solutions

The main goal of all the Ethereum scaling solutions is to increase transaction speed and throughput without compromising the decentralized nature of the blockchain.

There are two main directions in which these scaling solutions are being explored:
  • On-chain Scaling.
  • Off-chain Scaling.

On-chain Scaling
On-chain or Layer 1 scaling solutions refer to increasing the capacity of the core blockchain layer, usually by increasing the numbers of transactions that can be fit in a block. In Ethereum’s case, on-chain scaling would mean changing the Ethereum Mainnet protocol. Increasing the amount of data/transactions that can fit into an Ethereum block would also increase the hardware requirements to run a node, raising some critics around this scaling solution. It can limit the number of nodes and may affect decentralization. But, with Ethereum 2 comes a concept of Sharding; sharding is the process of splitting the Ethereum infrastructure/database. This will reduce the node load by dividing the work; it is a much broader concept.

Off-chain Scaling
Off-chain scaling solutions are meant to indirectly scale the primary layer one blockchain by adding more layers to process the transactions without using the actual core blockchain. Off-chain scaling uses the main layer of blockchain as a trust and arbitration layer. Off-chain scaling is often referred to as Layer 2 scaling as it adds another layer on top of the main Ethereum layer. 
Layer 2 scaling is seen as an immediate resolution for Ethereum scalability as it maintains decentralization, which is the most valuable thing for the Ethereum community. Layer 2 solutions further require additional hardware or complex software to be built, so it takes longer for networks to feel its effects. Layer 2 solutions derive their security from Ethereum and can be custom built/run by an individual, organization, or community based on the use cases. 

Following are types of solutions: 

  • Sidechains: Sidechains are EVM compatible blockchains connected to Ethereum via bridges. They have their own consensus protocol and block parameters.

  • Rollups: Rollups perform transaction execution outside the main Ethereum blockchain and send the transaction data back to the main Ethereum network.

  • State channels: State channels use multisig channels to settle transactions off the main chain between parties and send the state to the main blockchain. These are very secure but have particular use cases.

  • Plasma: Plasma is a framework where there are side chains anchored to the main Ethereum blockchain, and they are connected to the Etheruem blockchain via a root contract; this contract records the current state and states the rules for the child chains.

Rollups

On one hand, we have layer 2 solutions such as channels that are fully secure by Ethereum security but work well for only a specific set of applications; sidechains, on the other hand, are usually EVM compatible and can scale general purpose applications, but the main drawback is that they do not rely on Ethereum for security but instead have their own consensus model.

Rollups try to bring the best of both of these worlds by creating a general-purpose solution while still having the security of Ethereum. Rollups settle the transactions outside of the main Ethereum network but post the transaction data back to the Ethereum network and still derive its security from the Ethereum protocol. Each rollup has its specific contracts deployed on the main Ethereum network. Rollups executes the transaction off the chain mainly on a rollup specific chain and then batch the transaction data, compresses it, and sends it to the main Etheruem chain; this reduces the load on the main Ethereum network of actually processing those transactions.

This helps in reducing the fees and blockchain adoption by increasing participation. Rollups also enable redeployment of all the existing Ethereum smart contracts to a rollup with little or no change. 

Types of Rollups

Rollups look like an up-and-coming solution to the Ethereum scalability problem, but how can we make sure that the transaction data posted on Ethereum by rollups is valid? Different rollup types handle this differently. There are two types of rollups based on this; Optimistic Rollups and ZK-rollups.

Optimistic rollups:
Optimistic rollups, as the name suggests at first, assume that the transaction data submitted to the Ethereum network is correct and valid. Whenever there is an invalid transaction, there is a dispute resolution. A party submits a batch of transaction data to Ethereum, and whenever someone detects a fraudulent transaction, they can offer fraud proof against that transaction. Here both the parties, the one submitting the transaction data batch and the one submitting the fraud proof, have their ETH staked. This means that any misconduct from either party would result in loss of their ETH. Whenever a fraud proof is submitted, the suspicious transaction is executed again, this time on the main Ethereum network. To make sure the transaction is replayed with the exact state when it was originally performed on the rollup chain, a manager contract is created that replaces certain function calls with a state from the rollup. 
Examples: Optimism, Arbitrum.

ZK-rollups:
ZK-rollups or Zero-Knowledge rollups, unlike Optimistic rollups, don’t have any dispute resolution mechanism. It uses a clever piece of cryptography Zero-Knowledge proofs. In this model, every batch of transactions submitted to Ethereum includes a cryptographic proof called a SNARK ( Succinct Non-Interactive Argument of Knowledge ) verified by a contract that is deployed on the Ethereum main network. This contract maintains the state of all transfers on the rollups chain, and this state can be updated only with validity proof. This means that only the validity proof needs to be stored on the main Ethereum network instead of bulky transaction data, thus making zk-rollups quicker and cheaper comparatively.
Examples: Loopring, STARKWARE, zkSync

Conclusion

If you made it here now, you know a little bit more about Ethereum scaling solutions and a lot more about rollups.

Subscribe to our newsletter for more articles and guides on Ethereum. If you have any feedback, feel free to reach out to us via Twitter. You can always chat with us on our Discord community server, featuring some of the coolest developers you’ll ever meet :)

Related articles 11

Ethereum Full Node vs Archive Node
Published: Apr 8, 2021
Updated: Sep 20, 2022

Ethereum runs on a network of computers (also known as nodes) that verify transactions based on a consensus protocol and ledger, which make up the blockchain. In this guide, you will learn...

Continue reading
How to setup a Chainlink node
Published: Jul 6, 2020
Updated: Sep 21, 2022

Smart-contracts are the heart and soul of all the development happening on the Ethereum blockchain, and as more and more people develop on Ethereum, smart contracts are becoming more...

Continue reading
How to run a Hyperledger Besu node
Published: May 18, 2021
Updated: Sep 9, 2022

As the Ethereum network continues to grow, the need for an enterprise-ready Ethereum client arises. Hyperledger Besu is an enterprise-friendly Ethereum client that can implement both public...

Continue reading
How to Run a Binance Smart Chain Node
Published: Jul 2, 2021
Updated: Oct 11, 2022

Binance Smart Chain, BSC for short, is a blockchain that seeks to provide both an alternative and extension to the Ethereum Blockchain. It has done this through several clever implementations...

Continue reading
How to install and run a Geth node
Published: Apr 5, 2020
Updated: Sep 12, 2022

Ethereum nodes are computers participating in Ethereum blockchain network. These nodes are actual computers running software that verifies, stores, and sometimes creates blocks. The actual...

Continue reading
How to run Nethermind node
Published: May 18, 2021
Updated: Nov 18, 2022

To run an Ethereum node without any problems, it is essential to choose a good node client. Nethermind is one of the oldest and most trusted Ethereum node clients. In this guide, let’s see how...

Continue reading
How to Install and Run a Stacks Node
Published: Aug 26, 2022
Updated: Sep 9, 2022

Stacks 2.0 is an open-source layer-1 blockchain that allows developers to build smart contracts and decentralized blockchain applications. This guide will demonstrate how to install the Stacks...

Continue reading
How to Use Laika with QuickNode
Published: Apr 22, 2022
Updated: Sep 9, 2022

Developers spend most of their time writing code, testing, and fixing bugs. A lot of the time spent with these tasks can be simplified by using a tool like Laika. Laika is a Web3 development...

Continue reading