header-langage
简体中文
繁體中文
English
Tiếng Việt
Scan to Download the APP
Partnered With:

The basics you should know about Rollup

Read this article in 6 Minutes
Save money by reducing the amount of data stored on the chain to just the head of a Merkle tree or a proof.
原文标题:《 CryptoYC Insight|Rollup 学习笔记 》
原文来源: Heng Youzhe, CryptoYC Labs


Layer 2 is a general term for the solution designed to help extend the application by processing transactions on the ethereum mainnet (Layer 1), while taking advantage of the powerful decentralized security model of the mainnet. At present, the transaction speed of Ethereum is slow, and the problem of poor user experience occurs when the number of users increases due to the increase of electricity costs. Layer 2 protocol was born to solve this problem.


What is Layer 2


Layer 2 is a general term for the solution designed to help extend the application by processing transactions on the ethereum mainnet (Layer 1), while taking advantage of the powerful decentralized security model of the mainnet.When the network is busy, the speed of transaction processing can be affected, which can make the user experience of some types of DApps worse. As networks become busier, electricity bills rise as transaction senders bid. This could make it very expensive to use Ethereum.


What is a Rollup


"Rollup" is used as a module packer in the programming language. A solution now used in Layer 2 protocols. In general,They bundle many transactions under the main chain and generate a statement or certificate that justifies all transactions within the package(that is, the root of the pre-transaction Merkle tree corresponds to the post-transaction root in the previous packet, and the transaction content is the same), and then only part of this content is published to the main chain, thereby increasing speed and reducing electricity and transaction costs.


The characteristics of


• Transaction execution off the main network;

• However, the transaction data or transaction proof is stored on the main network for easy verification.


species


• Zero-knowledge proof ZK-rollup;

• Optimizing optimistic-rollup


ZK-Rollup


Introduction to the


Here is only a brief introduction, the detailed part will be introduced in another article. In short,Zero-knowledge proof is convincing the other person that I have such a secret without revealing it. For example, for both A and B, A knows the secret A,B (and A + B =7),B knows the linear mapping F (X),B sends A the mapping F, A calculates F (A) and F (B) and sends B,B calculates F (A)+ F (B)= F (A + B). If f of a plus b is equal to f of 7, then b can be sure that a knows that a plus b is equal to 7. Historically, the concept of zero knowledge first emerged in 1985, Shafi Goldwasser, Silvio Micali, and Charles Rackoff "The Knowledge of Interactive proof-systems". The use of zero-knowledge proofs for Rollup first appeared in Barry's 2018 white paper.


The role of zero-knowledge proof in rollup


Here, the zero-knowledge proof is mainly used to publish and publicly record the validity of the block on the Ethereum blockchain.Transactions that are packaged on Layer2 will be posted to the main chain as a proof, giving everyone a way to verify it. The main purpose is to prevent malicious transactions on Layer2 from tampering with information.It is important to note that a zero-knowledge proof is not a privacy guarantee, nor is it an encryption system.Because no one can decrypt it except the person who owns it. Since its birth, zero-knowledge proof or ZK-rollup has experienced three stages of development: Snark, Stark, and Bulletproofs. Currently Zcash, ZK Sync(Matter Labs), Darkforest (Game) etc use Snark, and Monero uses Bulletproofs. You can see the differences between these three methods in the following figure. Specific examples will be introduced later.




The characteristics of


Compare Plasma and side chain


• Due to the dilatancy of Plasma and side chain,Rollup itself is considered an emerging solution, and ZK-Rollup is one of the most scalable and fastest to process transactions compared to Plasma and Op-Rollup. Only a small portion of its data is stored on the main chain.

• 单笔交易费降低。


Contrast the OP - a Rollup


• ⼀般说来,It verifies quickly,Prove that the generation is slow. However, since its generation relies on smart contracts, it is equivalent to dividing the work of all people to one person, and the work of the rest people is simple verification. Here I refer to SNARK alone.

• There is no need to cheat the game so that transactions are quickly verified into the block (about ten minutes).

• 零知识证明的计算困难要求数据优化以获取最⼤吞吐量。

• ZK-Rollup 需要⽣成⼀个初始串,这会使系统中⼼化⼀些。

• 量⼦计算可以破解,这⾥指 SNARK。STARK 可以抵御量⼦攻击。

• 它需要的安全性假设更⾼。


OP-Rollup


Introduction to the


Optimization Rollup appeared in July 2019, with the idea presented by John Adler at the Ethereum Foundation Research Forum. Currently, optimistic-rollup is used for Optimistic Optimism, Fuel Labs and Arbitrum with simple ideas. Here, there are two types of under-chain roles in op-rollup: Aggregator and Validator. Transactions that occur in Layer2 are packaged by the aggregator and generate a Merkle tree header, and a smart contract. After the aggregator has pledged a sum of money, the aggregator can upload the packaged transaction to the main chain. The verifier examines the package, can question it, and provides proof of fraud.


Fraud to prove: the verifier may review status and combined and compared to their local state, if found to have abnormal update, the verifier can question and change to after all blocks from the blocks (blocks from the rollup uploaded to the main chain there will be 1 to 2 weeks after questioning of the time, if this time no one questioned the completion of the block). Verifiers who raise a challenge get money pledged by the aggregator.


Op-rollup uses game theory and validation games to ensure data validation. They operate on the assumption that everyone is ethical, but blocks are backed off if a malicious party posts a transaction, hence the name Optimistic Rollups.


The characteristics of


• 交易周期:相对于 ZK-Rollup⽽⾔,OP-Rollup 需要 1-2 周时间完结区块。Trading speed is not slow, but the end of the trading state needs a longer period.

• 应⽤性:⽬前⽽⾔两种 Rollup 均⽀持 EVM。ZK-Rollup 最近也⽀持 EVM,使得 OP-Rollup 失去了原本优势的其中之⼀。

• 交易速度与交易费:现实交易速度 500 笔/每秒,相对于 ZK-Rollup 的 2000 笔/每秒存在劣势。

• 数据记录:所有交易数据均记录在主链,⽆需信任第三⽅,但也加重了交易费。

• 安全假设:OP-Rollup 假设⼤多数验证者是诚实的。


Another comparison table is shown below:





conclusion


In summary, the Rollup idea is not hard to master,The idea is to package off-chain transactions and try to put them on the main chain. Packaged transactions occur and are executed down the chain to speed up transactions. Save money by reducing the amount of data stored on the chain to just the head of a Merkle tree or a proof. In contrast, the author is more optimistic about the long-term prospects of ZK-Rollup,The biggest advantage of Op-Rollup was its usability and good user experience.Both of these advantages have faded as ZK-Rollup has adopted EVM and is now growing rapidly. The ZK-Rollup offers greater security, faster transaction speeds, and less data storage, resulting in cost savings. There is only one thing in doubt, and that isThe ZK-Rollup is computationally overrated and may still result in a cost disadvantage.Another question will be given in the next article. Of course, it may also be caused by the author's lack of understanding of the application process of SNARK in practice.


The original link


Welcome to join the official BlockBeats community:

Telegram Subscription Group: https://t.me/theblockbeats

Telegram Discussion Group: https://t.me/BlockBeats_App

Official Twitter Account: https://twitter.com/BlockBeatsAsia

举报 Correction/Report
Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit