Ethereum gained humongous levels of traction in response to the need for using blockchain beyond the domain of cryptocurrencies. It emerged as the biggest platform for developing and managing smart contracts and related applications. Over the course of time, Ethereum has grown by a huge margin with almost 3000 dApps, over 4000 smart contracts and more than 90,000 daily transactions. 

Why do you need a description of optimistic rollups explained in detail? The attention on optimistic rollups in discussions revolving around Ethereum blockchain-primarily relates to the problem of scalability. The following discussion serves as an introductory guide on optimistic rollups and their working alongside their benefits. You can find out how optimistic rollups are an essential component in the future of Ethereum.

Build your identity as a certified blockchain expert with 101 Blockchains’ Blockchain Certifications designed to provide enhanced career prospects.

Why Do You Need Optimistic Rollup?

The first highlight in a guide to optimistic rollups would emphasize the definition of optimistic rollups. Before you find out answers to ‘what are optimistic rollups,’ it is important to go through the reasons behind coming up with solutions like optimistic rollups. Ethereum is undoubtedly the popular choice for decentralized application and smart contract development. 

However, the constantly increasing volume of activity on Ethereum has also resulted in a significant cost in form of scalability. What exactly is the problem here? You would encounter the problem of limits on block times and block sizes. Even if the restrictions may appear necessary for ensuring security and decentralization, the limits reduce the capabilities of Ethereum for scalability. 

Ethereum experienced high network congestion in event of a continuous influx of transaction requests. Users have to experience reduced transaction speed alongside higher transaction fees. These problems can create setbacks in the ability of Ethereum network to accept more transactions and users. Without scalability, it is impossible to imagine the future of Ethereum blockchain. Therefore, scaling solutions like sidechains and layer 2 rollups become the need of the hour for resolving such problems. 

Excited to learn the basic and advanced concepts of ethereum technology? Enroll Now in The Complete Ethereum Technology Course

What is an Optimistic Rollup?

The understanding of optimistic rollups projects becomes easier with the detailed impression of their definition. Scalability for Ethereum must also take security into account while reviewing the ability to scale network latency and throughput. Interestingly, Ethereum scalability must also prevent the concerns of introducing trust-based environments. 

An optimistic rollup is basically a layer 2 or L2 scaling protocol tailored for extending the throughput associated with the base layer of Ethereum. The working of optimistic rollups involves reducing the computation load on the main Ethereum blockchain. How does it achieve the same? Optimistic rollups, like another layer 2 protocols, facilitate off-chain transaction processing, thereby enabling notable improvement in processing efficiency. 

The overview of an optimistic rollup example would show exactly how they are different from other scaling solutions like sidechains. Optimistic rollups depend on the mainnet for security through displaying transaction results on plasma chains or the mainnet. The plasma chains can ensure verification of Ethereum transactions by leveraging fraud proofs, albeit while storing transaction data in another location.     

Get familiar with the terms related to ethereum with Ethereum Flashcards

What Goes Inside an Optimistic Rollup?

Optimistic rollups are capable of achieving 10 to 100 times better results in terms of scalability. Is it all that you need to learn about optimistic rollups? You must understand the approach underlying an optimistic rollup for scaling Ethereum. The basic mechanisms within an optimistic rollup rely on transferring state storage and computation from the mainnet. In other words, the working of optimistic rollups explained comprehensively would emphasize only moving transactions outside Ethereum. Once the transactions are complete, the rollups would register the transaction data on the main network in the form of ‘calldata.’

Optimistic rollups involve bundling multiple off-chain transactions in huge batches before you submit them to Ethereum. With such a method, optimistic rollups can facilitate spreading of fixed costs throughout multiple transactions, thereby reducing end-user fees. Furthermore, optimistic rollups also include compression techniques, which help in reducing the amount of data it posts on Ethereum blockchain. 

The details of optimistic rollups projects would also draw attention to the ‘optimistic’ element. How do you assume them to be optimistic? Optimistic rollup projects assume the validity of off-chain transactions by default without publishing validity proofs for on-chain transaction batches. On the contrary, optimistic rollups follow a fraud-proving mechanism for identifying transactions with discrepancies. 

Any user could challenge the outcomes of an optimistic rollup execution with fraud-proof. However, users must challenge the rollup batch within a specific time window after submitting it on Ethereum. In event of a successful fraud-proof, the rollup protocol can execute the transaction once again and update the rollup state. However, users would receive a penalty for including an incorrect transaction in the block for failure to fraud-proof. 

Want to learn the basic and advanced concepts of Ethereum? Enroll in our Ethereum Development Fundamentals Course right away!

Working of Optimistic Rollups

The mechanisms defining the functionality of optimistic rollups serve only a brief impression of their capabilities. On the contrary, you must look for a comprehensive explanation for its working. Here is an in-depth overview of “how do optimistic rollups work” with investigation of different stages in their functioning. 

  • Executing and Aggregating Transactions

Operators take on the responsibility of process optimistic rollup transactions. Users must submit the transactions to operators, also referred to as aggregators or validators. The validators work on aggregating transactions alongside compressing the underlying data and publishing the concerned block on Ethereum

It is also important to note that any user can take on the responsibilities of a validator. However, optimistic rollup validators must also offer a bond before creating blocks, just like a proof-of-stake system. Validators would have to incur penalties on the bond for publishing an invalid block or building on an outdated, invalid block. 

Other validators in an optimistic rollup example must ensure execution of the transactions by leveraging individual copies of the state of the rollup. In the event of a difference in the final state of a validator from the proposed state by an operator, validators can challenge the result and calculate fraud-proof. 

It is also important to note that certain optimistic rollups can avoid the permissionless validator system. Such rollups would rely on a single ‘sequencer’ for executing the chain, who would carry out all the responsibilities of validators. However, sequencers have better control over transaction ordering and priority access to rollup chain. On top of it, the sequencer also has sole authority over submitting transactions to on-chain contracts.

Start learning Ethereum with World’s first Ethereum Skill Path with quality resources tailored by industry experts Now!

  • Sending the Rollup Blocks to Ethereum

Operators would aggregate different off-chain transactions into a single bundle and send them to Ethereum. In this process of working of optimistic rollups, you would have to deal with compression of transaction-related data. You must also notify the necessity of publishing transaction data on Ethereum in the form of ‘calldata.’ 

The ‘calldata’ is the non-persistent and non-modifiable highlight of a smart contract, which works primarily like memory. You must notice that calldata could persist on the chain in the history logs of the blockchain, although you could not find it in the Ethereum state. This is how you know that optimistic rollups can reduce cost of on-chain data storage. 

You must also notice that the ‘calldata’ keyword in Solidity helps in passing arguments to smart contract functions at the time of execution. It works on identifying the function called in a transaction alongside arranging inputs in an arbitrary sequence. The answer to ‘how do optimistic rollups work’ also draws attention to the other implications of ‘calldata.’ It is a critically useful element for sending compressed transaction data to on-chain contracts.    

  • State Commitments

The next highlight in understanding ‘what are optimistic rollups’ would emphasize state commitments. First of all, take note of the fact that the state of an optimistic rollup would always be organized in the form of a Merkle tree. The Merkle tree can also be referred to as the ‘state tree,’ which harbors all the information about the rollup state. The root of the state tree points at the latest state of the rollup and goes through hashing and storage in the rollup contract. All state transitions on the chain can generate new rollup states committed by an operator through computation of a new state root.            

Operators must submit the old and new state roots at the time of posting batches. Rollup operators should also ensure commitment of a Merkle root for the transaction batch, thereby enabling proof of including transaction on layer 1 batch. State commitments are an essential highlight in optimistic rollups projects as they can prove correctness of optimistic rollup state changes. 

Want to learn blockchain technology in detail? Enroll Now in Certified Enterprise Blockchain Professional (CEBP) Course

  • Fraud Proof

The most significant aspect in the working of optimistic rollups would emphasize fraud-proof. Optimistic rollups can help any individual in publishing blocks without entering any proof of validity. However, users could challenge any state transition within a specific time window with optimistic rollups. Upon challenging the rollup blocks, the protocol would start the fraud-proof calculation. You can find different variations in the number of interactions required for completing fraud-proof computations. 

In the case of single-round interactive proving schemes, they can replay the disputed transactions on layer 1 network to detect invalid blocks. The understanding of the working of optimistic rollups explained in detail would also emphasize the emulation of executing a disputed transaction on layer 1 again by leveraging a verifier contract. If the challenger turns out to be correct, the operator would have to incur a penalty in their bond.

However, it is important to note that re-executing transactions on layer 1 would demand some crucial requirements. Rollups must publish more data on-chain alongside the state commitments for each and every transaction and incur gas costs for replaying transactions. Therefore, multi-round interactive proving mechanisms can ensure improved efficiency. 

  • Multi-round Interactive Proving

The multi-round interactive proving element is another significant aspect in understanding optimistic rollup example and their functionalities. Multi-round interactive proving basically relies on back-and-forth interaction between challenger and asserter or the operator. The interactions come under the supervision of a layer 1 verifier contract, which decides the veracity of operator claims. 

Following the challenge to a rollup block, the operator must divide the concerned assertion into two equivalent portions. All the rollup blocks would contain similar computation steps. Subsequently, the challenger would select the rollup block, and a bisection protocol would initiate and continue the dividing process until both parties work on dispute over a rollup block. In such cases, the layer 1 contract comes into play for resolving the dispute by identifying the fraudulent party. 

Fraud proving is a dominant highlight in an understanding of ‘how do optimistic rollups work’ as they ensure trustless finality. Optimistic rollups can easily guarantee that transactions are valid and could be confirmed eventually. Fraud proofs can ultimately prove the validity of rollup blocks. As a result, optimistic rollups have better chances of penalizing malicious nodes which challenge honest operators. 

Benefits and Setbacks of Optimistic Rollups

The profound highlight in any discussion on optimistic rollups would draw attention to the advantages and setbacks. Optimistic rollups can provide plausible benefits in scalability improvements without compromising with trustless and secure environments. Storage of transaction data on layer 1 offers better decentralization, security and censorship resistance. Furthermore, compatibility of optimistic rollups with Solidity and EVM enables portability of Ethereum-based smart contracts to rollups. 

However, optimistic rollups also experience some setbacks, such as delays in transaction finality and possible misuse of power by sequencers. In addition, the lack of honest nodes can increase chances of fraud through invalid state commitments and blocks. On top of it, rollups should commit transaction data on-chain, which can lead to an increase in costs. 

Excited to learn about the key elements of Solidity? Check the presentation Now on Introduction To Solidity

Bottom Line

The final overview regarding ‘what are optimistic rollups’ suggests that they are an inevitable requirement for the future of Ethereum. Almost every other decentralized application plans on using Ethereum, and the network can support only a specific load of transactions at a given time. Therefore, scalability solutions like optimistic rollups can resolve the issues for scaling the capacity of Ethereum network. 

Optimistic rollups can help in empowering developers with exclusive ways to facilitate decentralized app development without the burden of cost and speed. As you step forward in the world of decentralized applications and smart contracts, the benefits of optimistic rollups will become more significant. Keep exploring to learn more about smart contract development and Ethereum in detail.

Join our annual/monthly membership program and get unlimited access to 35+ professional courses and 60+ on-demand webinars.

*Disclaimer: The article should not be taken as, and is not intended to provide any investment advice. Claims made in this article do not constitute investment advice and should not be taken as such. 101 Blockchains shall not be responsible for any loss sustained by any person who relies on this article. Do your own research!