One sort of L2 solution is zero-knowledge rollups, which are aimed to provide improved transaction speeds and cheap costs. The other top solution is optimistic rollups parallel to the main Ethereum chain on layer 2. This feature can improve the scalability of the network by not requiring any computation. Instead, after a transaction, it will propose a new state to Mainnet.
The main issue with Ethereum is how developers and users will choose the most advanced technology for their app. Convenience usually wins unless the technology is better. This article will discuss how optimistic and zero-knowledge rollups transform and improve network performance. Let's dive in:
A rollup is an Ethereum-based scaling solution that allows users to perform transactions outside the network's Layer 1. It will enable the key to maintain its security while scaling the network.
Because just a portion of the data from rollup transactions must fit within Ethereum blocks, moving transaction execution off-chain enables a more significant number of transactions to be executed. Rollup transactions are processed on an entirely distinct chain capable of running a rollup-specific version of the EVM.
In most cases, a rollup deploys smart contracts on layer 1 of its network to handle various tasks, such as processing deposits and withdrawals. Multiple types of rollups use different types of proof. The optimistic rollups utilize fraud proofs. On the other hand, ZK rollups employ validity or zero-knowledge proofs to verify the credibility of transactions.
In optimistic roll-ups, data is assumed to be correct before posting to Layer 1, hence "optimistic." As long as the published information is valid, no action is necessary. Rollups with optimistic assumptions benefit from not having any extra work to do.
However, if an invalid transaction has been submitted, the system should be able to identify it and take appropriate actions. An optimistic rollup uses a dispute resolution mechanism to prevent fraudulent transactions from resolving disputes. It eliminates the incentive for bad actors to submit false claims.
The party that can submit transactions to layer 1 in Optimistic rollup should provide a bond in Ether. If a transaction gets rejected, another network participant can submit a fraud-proof, and then the system enters the Dispute Resolution mode. The transaction is then executed again and again until it gets resolved. If the transaction is rejected, the responsible party will be penalized with their Ether bond.
To prevent bad actors from sending fraudulent transactions to the network, parties that wish to submit fraud-proof must also provide a bond in ETH. Due to the nature of the transactions executed on a rollup, it has to implement a system to identify the transaction's actual state.
This process can be pretty complex, as it involves creating a contract that automatically updates the state of the rollup whenever a transaction is executed. Getting into the Dispute Resolution mode should be an exceptional experience, as it involves the right incentives.
Unlike other dispute resolution mechanisms, ZK rollups do not have a dispute resolution mechanism. Instead, they use a cryptography mechanism called Zero-Knowledge Proof (ZKP).
Instead of exchanging core information such as passwords, the two parties can resolve their disputes through puzzle pieces. The prover must provide the information required to complete the puzzle pieces.
Imagine that you're playing a video game where the player has to unlock a locked door. You don't have to reveal the secret code to prove that you know how to unlock the door. All that matters is that you won the game.
Instead of revealing the secret code, the prover must demonstrate control over the information. It ensures that no unauthorized person can access the critical data. The ZKP is incredibly secure because it only requires a simple verification to confirm that the puzzle has been completed.
The ZK and optimistic rollups can quickly scale the Ethereum network up to around 15 to 45 transactions per second. The upcoming release of Ethereum 2.0 and the Sharding method will create a fantastic synergy between rollups and blockchains. Combining the ZK and Sharding methods will allow Ethereum to reach transaction speeds of up to 100k transactions per second.
Due to the complexity of the ZK roll-up technology, it's hard to create an EVM-compatible version without rewriting the entire application logic. ZkSync has been working on developing an EVM-compatible understanding of its roll-up. The first version of this project, zkSync 2.0, was released in June 2021. The zkEVM virtual machine can perform smart contracts in a way that's compliant with the Zero-Knowledge Proof algorithm.
Unlike ZK rollups, which have a lot of issues with EVM compatibility, optimistic rollups can quickly create an EVM-compatible version without any changes.
When it comes to computation, ZK rollups need more computing power than Optimistic rollups. Because of this, machines that compute Zero-Knowledge Proof must be high-spec, making it difficult for average users to run.
Adding Layer 2 to Ethereum will help make the platform more robust and complement the more significant scalability issue work. Some prominent outsiders share the same view as many in the blockchain industry.
In their announcement of their $25-million investment in Optimism, Andreessen noted that there is little debate about the need for scaling Ethereum. However, it is often seen as a competition between the platform's various services.
One of the lessons that internet history has taught us is that developers immediately create applications that demand more supply when a new computing platform is given to developers. It is believed the same will be valid for Ethereum; the answer to scaling is "all of the above".
Although rollups are not as robust as the other layer two solutions, they are still considered the best. They are a natural fit for the PoS and sharding features of the Ethereum 2.0 project. It is no coincidence that Vitalik Buterin, Ethereum's creator, is quite fond of them.