Briefly describe the principle and application status of Rollup and Plasma, the second-tier expansion plan of Ethereum (www.blockcast.cc)
As one of the most effective ways to solve the scalability problem of Ethereum, Layer 2 still needs continuous optimization and development.
Recommended reading: ” How does the Ethereum Layer 2 ecosystem stand? 》
Original title: “The market is booming again, can Layer 2 solve the Ethereum congestion problem”
Written by: imToken
Finance is the easiest scenario for blockchain to land. In the past year, many of the various decentralized financial products we have seen in the Ethereum ecosystem have the shadow of traditional financial products, such as decentralized lending, transactions, derivatives, etc. The financial pursuit of efficiency, the Bitcoin network’s transaction processing capacity of 5 transactions per second, and Ethereum’s 15 transactions, compared with the Visa network average of 2000 transactions, the peak efficiency is tens of thousands, just like products of different eras.
Blockchain’s TPS (transactions per second) has largely limited the popularization of blockchain, which also limits inclusive finance. Recently, there has been a new term called DeFi postmodern, and I think the modernity of DeFi has not yet arrived. The popular DeFi in the past six months may only be BC. Limited by TPS, the transaction processing mechanism of the higher price makes the Ethereum network expensive and congested during the DeFi boom. At the most congested time, the gas value exceeded 1000 gwei, and a single transaction cost tens of hundreds of dollars became commonplace. Such transaction costs also keep many people out of DeFi.
Facing the current problem of extremely limited scalability, the Ethereum community and developers have proposed solutions in two directions, Layer 2 and Sharding (an important upgrade of Eth2). Layer2 literally means Layer 2 network. In contrast, the current Ethereum main network is also called Layer 1 (Layer 1), which is a system based on the current Ethereum main network.
The Layer 2 solution is mainly to reduce the burden of Layer 1 and move the large amount of computing requirements of Layer 1 to Layer 2. Sharding is from a more basic perspective, increasing the number of Layer 1 to achieve the purpose of increasing the basic bandwidth. Eth2 is expected to be implemented in 4 stages. It is currently in the initiation stage of the Phase 0 deposit contract. The specific information about Eth2 is not covered in this article. We will continue to follow up on the latest progress of Eth2 in the future. This article will then introduce you to the common solutions and main progress of Layer2.
When DeFi was congested, Layer 2 was also hyped as one of the saviors to solve the congestion, and the price of related concept tokens was also rising. Behind this, how does Layer2 solve the problem of low transaction processing efficiency in Ethereum?
We know that the current Ethereum transaction processing capacity is mainly limited by the block size and block time. The block volume determines the number of transactions that a single block of the current Ethereum network can accommodate; the block generation time determines that a block can be generated every 12 seconds on average.
There are many mainstream Layer 2 solutions. This article focuses on Plasma and Rollup. Rollup can be subdivided into Optimistic Rollup and ZK Rollup. These solutions solve the problem of limited Ethereum transaction processing capabilities from different perspectives.
Plasma
Plasma is the first solution in the Ethereum community to try to solve network processing problems. It was proposed as early as 2017 and high hopes were also placed.
Before introducing Plasma, you need to understand the concept of “side chain”. Since the expansion of the Ethereum main network is not easy, developers thought of creating an independent blockchain connected to the main network, that is, a side chain, which can expand the main network by efficiently processing transactions on the side chain. The potential problem of the side chain is security. As an independent blockchain, the side chain needs to have its own miners to establish sufficient computing power to ensure security, and sufficient computing power and miners who do not commit evil will not be For blockchains other than Bitcoin and Ethereum, it is not a small threshold.
Different from the side chain, Plasma processes Layer 2 transaction data and submits it to Layer 1, and adds a fraud proof exit mechanism. In this way, Layer 1 computing power is used to ensure Layer 2 security.
In theory, Plasma can increase the TPS of Ethereum to 1-9k. As a result, Plasma has received widespread attention. But in the subsequent development, more practical problems were exposed:
- The period for users to withdraw funds is too long
- All users are required to monitor all transactions on the Plasma chain
Afterwards, the development of Plasma has stalled and progress has been slow, but recently we have also observed that some projects continue to explore and make breakthroughs based on Plasma. The progress of related projects will be introduced below.
Rollup
Rollup is currently the most watched and most likely Layer 2 solution. As mentioned above, the number of transactions that can be contained in each block of the Ethereum network is limited, while Rollup packages and compresses thousands of transactions, and then synchronizes the processed concise data to the Ethereum main network to achieve the improvement of TPS. , To solve the problem of limited network transaction processing capabilities.
The difference with Plasma is that Plasma synchronizes the result of transaction processing to Layer 1. We cannot directly upload the data of Layer 1 to understand the information of each transaction, and the transaction data synchronized to Layer 1 after Rollup compression processing contains Basic information about each transaction.
From the above description, it can also be understood that the improvement of the transaction processing capacity of the Rollup solution is linear. The more the number of packaged and compressed transactions, the larger the packaged data. In actual testing, Rollup can increase TPS by 100 times. Under the current Ethereum network (ie the first generation of Ethereum), TPS can reach up to 2k, which is the average Visa processing capacity; combined with Eth2 sharding, the theoretical TPS can reach 20k+, which is close to or exceeds the peak level of the Visa network .
According to how to ensure the correctness of compressed data, Rollup can be divided into ZK Rollup and Optimistic Rollup.
ZK Rollup
ZK Rollup uses zero-knowledge proof zk-SNARKs cryptography technology to ensure security . ZK is an abbreviation for zero knowledge.
Zero-knowledge proof: The prover can convince the verifier that a certain assertion is correct without providing any useful information to the verifier.
ZK Rollup = transaction compression + zero-knowledge proof (zk-SNARK)
The core idea of ZK Rollup is to reach a transaction consensus under the chain, and to ensure the security of the transaction status under the chain through zero-knowledge proof, at the same time compress the transaction data, and finally synchronize the data to the main chain.
Through the comparison of the following figure, you can more intuitively understand how zero-knowledge proof compresses transaction data:
The purpose of compressing transaction data is achieved by performing zero-knowledge proof processing on the signature information in each transaction. The current ZK Rollup solution can increase the current TPS of the Ethereum network by 30 times, reaching a processing capacity of about 500 transactions per second.
However, due to the long process of creating zero-knowledge proof for smart contracts, the current zero-knowledge proof algorithm is not friendly to general-purpose smart contract support. The current ZK Rollup scheme is more suitable for scenarios such as ordinary transfer transactions.
Optimistic Rollup
Since ZK Rollup cannot support smart contracts well, it takes a long time to generate zero-knowledge proofs. In June 2019, the Optimistic Rollup solution was proposed. This solution removes zero-knowledge proofs and adds a penalty mechanism to guarantee data It is safe (slightly lower than the ZK Rollup scheme) and can more conveniently support the purpose of universal smart contracts.
The Optimistic Rollup solution uses OVM (Optimistic Virtual Machine), which is a fully functional environment that is basically compatible with EVM (Ethereum Virtual Machine). Through OVM, it becomes easy to migrate DApp to Layer2, and the project side does not need to deploy various Layer2 expansion solutions, but only needs to access OVM to use various Layer2 structures.
Therefore, Optimistic Rollup is currently more suitable for DeFi applications. This solution can increase the TPS to 100 and further increase to 500 through BLS signature aggregation technology.
The adoption of each program
At present, the team based on the Plasma solution mainly includes OmiseGo (OMG). Its Plasma MVP has been launched on the mainnet, and Tether (USDT issuer) has confirmed that it will cooperate with it.
The teams based on the ZK Rollup solution include Matter Labs, Hermez, etc., taking the most widely used Matter Labs team as an example. The zkSync developed by it has been launched on the main network and is expected to launch universal Solidity-compatible code in 2021. Currently, ecological cooperation projects include Curve, Gitcoin and Balancer.
The team based on the Optimistic Rollup solution is mainly Optimism. The OVM they developed has been launched on the testnet on September 25 and has reached ecological cooperation with Uniswap, Synthetix and Coinbase Wallet.
Photo by Nick Fewings on Unsplash
What will happen in the future? As one of the most effective ways to solve the scalability problem of Ethereum, Layer2 needs to be continuously optimized and developed. I hope that when Layer 2 becomes more popular and adopted, it can help the current Ethereum network to upgrade from a narrow road to a wide lane, so that more people can use DeFi products and experience decentralized finance. In the future, when the Eth2 shard is launched, we look forward to seeing the Ethereum network grow from ground transportation to a land, sea and air transportation system.
At that time, we may truly enter the modern DeFi.
Source link: mp.weixin.qq.com
Comments
Post a Comment