Ethereum Layer2: Rollup War

CN
PANews
Follow
1 year ago

Basic Introduction

Ethereum Layer2: Rollup War

Layer2 is one of the key solutions designed to address the scalability issues of Ethereum. By building an additional network layer on top of the Ethereum main chain, it allows for processing more transactions while maintaining the security and decentralization features of the main chain.

Rollup is a Layer2 scaling solution that processes transactions off-chain and then "packs" the transaction data into the main chain. Its security is guaranteed by Layer1 and is currently the most mainstream Layer2 scaling solution. Compared to other off-chain transaction solutions such as state channels, sidechains, and Plasma, Rollup has three characteristics:

  1. Layer2 is a relatively independent platform from Layer1, and all participating users are also independent Layer2 accounts. Users can transact with other Layer2 users on the Layer2 platform, but interactions between Layer1 accounts and Layer2 accounts need to be facilitated through smart contracts deployed by the Layer2 operator on Layer1 and Layer2. The most common interaction is the transfer of tokens such as ETH.
  2. All transaction information needs to be fully recorded on the main chain, i.e., Calldata or Blob data (EIP-4844). Even if Layer2 state is lost, anyone can recover the lost state from the information stored on the main chain, addressing the data availability issue present in previous off-chain transaction solutions.
  3. Transaction execution and state changes occur on the Layer2 platform, but the state summary is published to the Layer1 chain. Therefore, the Layer1 chain can verify the data validity through some form of validation, and once validated, the state of Layer2 will be locked on the Layer1 main chain. Depending on its data validity verification method, Rollups can be further divided into Optimistic Rollups and ZK Rollups.

Ethereum Layer2: Rollup War

Rollup Development History

Ethereum Layer2: Rollup War

Sidechains were one of the earliest Layer2 solutions. As the name suggests, a sidechain is an independent blockchain pegged to the main chain (Layer1), with its own consensus model and block parameters. When faster transactions are desired, assets can be moved from the main chain to the sidechain for trading, and then transferred back to the main chain upon completion.

Plasma, proposed by Joseph Poon, one of the creators of the Lightning Network, and Ethereum founder Vitalik Buterin in 2017, is an evolved solution of sidechains.

A Plasma chain is an independent blockchain built outside of Ethereum, also known as a subchain, similar to the branches of a tree, with Ethereum as the backbone, also known as the root chain. Each subchain can deploy custom smart contracts on Ethereum for different business purposes. Another layer of subchains can be built on top of the Plasma chain, forming a hierarchical Plasma network. The working principle of Plasma is to divide large computational tasks into smaller tasks and distribute them to various subchains for processing. The results are then aggregated and submitted to the upper layer, achieving rapid and low-cost processing of a large number of complex computations.

Plasma requires the submission of the Merkle root of transactions occurring on the Plasma chain. When users attempt to withdraw their assets from the Plasma chain to the root chain, they can submit the Merkle proof of the latest transaction sending assets to Plasma. This initiates a challenge period, during which anyone can attempt to prove that the user's Merkle proof is fraudulent. If fraudulent, a fraud proof can be submitted. Since the root blockchain only tracks Merkle roots, it has to handle much less data compared to transactions occurring on the main chain, improving the scalability of the root chain.

Plasma is an unregulated Ethereum sidechain technology, meaning that even if the Plasma chain is maliciously attacked or validators collude to act maliciously, assets on the Plasma chain can still be safely returned to the root chain. This is the biggest difference between Plasma and sidechains that rely on their own security models to protect user assets. The representative implementation of Plasma is Polygon 1.0 (Matic).

However, Plasma has three fatal flaws:

  1. The Plasma chain requires an operator to publish the Merkle root commitment to the root chain, and the operator can execute "data availability attacks," i.e., refuse to publish certain transactions to the chain. In this case, the lack of transactions to construct fraud proofs prevents users from withdrawing their assets.
  2. When users attempt to withdraw assets from the Plasma chain, they must submit a withdrawal transaction request and then wait for a period, known as the challenge period. At any time during the challenge period, any user can challenge another user's withdrawal by providing proof that the withdrawal is invalid.
  3. Users must monitor and verify all transactions on the Plasma chain to detect malicious node behavior and withdraw in a timely manner. However, the cost of transaction verification is high, and this monitoring requirement adds significant expenses to participating in the Plasma chain.

Due to the drawbacks of Plasma, it encountered development bottlenecks starting in 2019. At this time, John Adler, who served as a Layer2 scalability researcher at ConsenSys, proposed the Optimistic Rollup solution, which primarily addressed Plasma's data availability issue by still using fraud proofs.

On the other hand, Vitalik Buterin introduced the zero-knowledge proof technology for proving the validity of block state changes in 2018, which laid the foundation for ZK Rollup. Zero-knowledge proof was first proposed by S. Goldwasser, S. Micali, and C. Rackoff in the early 1980s. It refers to the ability of a prover to make a verifier believe that a certain assertion is correct without providing any useful information to the verifier. In other words, the prover proves and convinces the verifier that they know or possess a certain message without leaking any information about the message being proven.

zk-SNARK (Zero-Knowledge Succinct Non-interactive Arguments of Knowledge) is a widely used general zero-knowledge proof scheme. It transforms any computation process into the form of a circuit with multiple gates, and uses a series of mathematical properties of polynomials to convert the circuit into a polynomial, thereby generating a non-interactive proof. This can be used to implement various complex business scenarios.

However, zk-SNARK cannot avoid the issue of centralized trusted setups. A trusted setup refers to a situation where multiple parties each generate a partial key to initiate the network, and then destroy that key. If the confidential information used to create the trusted setup keys is not destroyed, it could be exploited to forge transactions through false verification.

In 2019, the Aztec research team proposed the Plonk algorithm to solve the generality problem of zk-SNARK, which means that the trusted setup is independent of the application and only needs to be set up once to satisfy all applications. Moreover, the trusted setup can be arbitrarily updated, and as long as there is a trusted participant, the security of the trusted setup can be guaranteed. It can be said that the proposal of the Plonk algorithm greatly accelerated the development of ZK Rollup.

Rollup Track

Looking at the Rollup track, the competition is currently very fierce. Among the Layer2 Rollups that have been launched on the mainnet, Optimistic Rollups still occupy the majority of TVL. The main reason is that Optimistic Rollups were the first fully implemented Rollup solution. However, with the maturity of ZK Rollups technology, more and more people are starting to pay attention to and participate in the ZK Rollups ecosystem.

Optimistic Rollups

Ethereum Layer2: Rollup War

Optimistic Rollups rely on an "optimistic" assumption, which assumes that most transactions are valid and allows for challenges and rollbacks when fraudulent behavior is discovered. The Layer1 contract of Rollup does not directly verify the new state submitted by Layer2, but instead prepares a challenge period for each submitted new state. Since Rollup submits all transaction information to the main chain and makes it public, anyone can verify the state update (especially when it involves their own wallet). If the new state is incorrect, validators can generate a fraud proof against that incorrect state and submit it during the challenge period, thereby invalidating the incorrect state update.

The representative solutions for Optimistic Rollups are Arbitrum and Optimism.

Arbitrum officially launched its mainnet in September 2021 and is currently the protocol with the highest TVL in Layer2.

Currently, the Arbitrum ecosystem mainly consists of three networks, including Arbitrum One, Arbitrum Nova, and Arbitrum Orbit.

  1. Arbitrum One is the core Rollup chain of the current Arbitrum ecosystem, and all transaction data is stored on the Ethereum mainnet. Many L2 and on-chain ecosystem applications run on this mainnet.
  2. Arbitrum Nova is a new network designed based on AnyTrust technology, specifically for gaming, social applications, and high-throughput DApp use cases. The transaction data of this network is stored off-chain and managed by a data committee (DAC).
  3. Arbitrum Orbit is an open-source toolkit for building Layer 3 networks, allowing developers to deploy and create their own chains. Developers can use the Orbit toolkit to build their own Rollup and AnyTrust chains (Layer 3) and choose either Arbitrum One or Arbitrum Nova as the settlement layer to achieve scalability.

Optimism went live on the mainnet in August 2021 and currently has the second-largest TVL in Layer2, second only to Arbitrum.

Optimism has achieved EVM equivalence, allowing Solidity smart contracts on Ethereum to run on Optimism's Layer2 without the need to build additional functionality. Developers can seamlessly transition to developing applications on Optimism.

OP Stack is an open-source modular toolkit launched by Optimism, covering data availability layer, execution layer, settlement layer, governance layer, etc. Developers can use the OP Stack toolkit to assemble a customized Layer2 network according to their specific needs. Therefore, OP Stack introduces the concept of a superchain to Optimism, which refers to a group of Layer2 blockchains (also called OP chains) built on OP Stack. Currently, there are dozens of Layer networks built based on OP Stack, including Base, opBNB, Magi, Worldcoin, and other heavyweight projects.

ZK Rollups

Ethereum Layer2: Rollup War

ZK Rollups use zero-knowledge proof technology to ensure that off-chain processed transactions are valid and correct, providing higher security and efficiency. After the state change on the Layer2 platform of Rollup, a zero-knowledge proof must be provided to verify the correctness of the state change, and it is submitted to the main chain along with the state change. The contracts on the main chain will verify this proof to determine the correctness of the state update. Compared to the Optimistic Rollup solution, ZK Rollup does not require a long challenge period to finally confirm Layer2 transactions, and it also does not rely on the assumption that incorrect state updates will be discovered during the challenge period.

The representative solutions for ZK Rollups are zkSync, StarkNet, Polygon zkEVM, and Scroll.

ZK Rollups was the first zkEVM project to go live on the mainnet, based on zero-knowledge proofs, allowing transactions to be verified without revealing underlying data. One of the main features of zkSync is the use of "optimistic" transfers, allowing users to send and receive transactions without waiting for them to be confirmed on the Ethereum blockchain. This significantly reduces transaction time and allows for higher transaction throughput. In addition to using zero-knowledge proofs and optimistic transfers, zkSync also utilizes other technologies to improve scalability and security, including signature aggregation, which allows multiple signatures to be compressed into one, and multi-chain support, which helps zkSync interact with other blockchain networks.

StarkNet uses zkSTARK for its scaling solution, which is a zero-knowledge proof system that allows users to prove the correctness of computations without revealing underlying data. This increases the privacy and security of the network and enables complex computations to be performed without the need to trust third parties. StarkNet also utilizes sharding, which allows the blockchain to be divided into smaller chains, or "shards," for parallel processing. This allows for greater throughput and faster transaction times, as each "shard" can be processed independently of the others.

Polygon 2.0 introduced its ZK Rollups technology, known as Polygon zkEVM. This technology addresses the scalability issues of the Ethereum blockchain using zero-knowledge proofs, making transactions on the Ethereum network faster, cheaper, and compatible at the bytecode level rather than the language level.

Scroll is a ZK Rollups compatible with EVM, supporting the same programming languages and smart contracts as Ethereum, allowing developers to easily migrate their existing applications to the Rollup network without any modifications to their code.

Conclusion

Due to the performance issues of blockchain itself, it is difficult to meet current demands. Based on optimistic and zero-knowledge scaling solutions, it is expected to solve the performance bottleneck of blockchain, increase transaction speed, and transaction throughput without sacrificing decentralization and security. Rollups increase the throughput of the blockchain by moving computations off-chain, i.e., bundling a large number of transactions into a Rollup block and generating a validity proof for that block off-chain. The Layer1 smart contracts only need to verify that proof to directly apply the new state, achieving lower gas fees and higher on-chain security.

In the short term, Optimistic Rollups are likely to prevail in general EVM computations, while ZK Rollups may prevail in simple payments, transactions, and other specific application scenarios. The main reason is that although ZK Rollups are faster and more efficient than Optimistic Rollups, they do not provide a simple way for existing smart contracts to migrate to Layer2.

However, thanks to the development of emerging technologies such as blockchain and privacy computing in recent years, zero-knowledge proof technology has become an important technology for building trust. In the medium to long term, with the improvement of ZK-SNARK technology, ZK Rollups are expected to prevail in all scenarios and become the ultimate answer to Ethereum's scalability solution.

免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。

Bitget:注册返10%, 送$100
Ad
Share To
APP

X

Telegram

Facebook

Reddit

CopyLink