Written by: Pan Zhixiong, Research Director of Lianwen
Ethernet is the most questioned the performance issues encountered Square after birth, after the Layer 2 solutions Plasma almost complete collapse, cutting-edge research areas turn their sights on Rollup technology.
At present, the transaction throughput (TPS) of the Ethereum chain can execute less than 30 transactions per second. Although it is close to several times that of Bitcoin, it is still far away from large-scale applications. In contrast, the peak transaction processing capacity of Visa or Alipay is at least tens of thousands of transactions per second.
One of the user scenarios frequently mentioned for cryptocurrency is ” cross-border remittance or payment “. The stable currency issued on the chain is USDT, USDC or PAX as the transaction medium. With the current performance of more than 20 transactions per second of Ethereum, it is far from satisfying the world There is still a big gap in demand.
Another popular user scenario is Decentralized Finance (DeFi). During the “Black Thursday” on March 12, the Ethereum network was barely available in the first large-scale stress test of on-chain clearing and transactions, but transaction costs Improved hundreds of times . Only after the transaction cost is lower than the traditional method, the blockchain will have more practical value.
In order to improve transaction performance, Ethereum has established a number of research directions. The second layer network (Layer 2) solution Plasma was once the most important one. However, in the past two years of development, researchers have gradually discovered that Plasma and the improved version of Plasma Cash have many problems, such as requiring users to go online regularly and data availability issues, which restricts the development of Plasma.
A year after Plasma was born, a technology called Rollup emerged. Based on this concept, many branches were born, the most mainstream are ZK Rollup and Optimistic Rollup .
Rollup technology solves the problems previously exposed by Plasma, provides the same data availability and security as Ethereum Layer 1 (that is, Ethereum itself), and can greatly improve the throughput of the network and reduce the cost of a single transaction. . For this reason, although many people call Rollup a Layer 2 technology in a broad sense, it is actually between Layer 1 and Layer 2 .
What is Rollup?
The core concept of Rollup is actually very simple. It is to pack a large amount of transaction data originally scattered in the block into a ” condensed ” transaction and publish it on the chain. In order to ensure the validity of each transaction, various Rollup schemes have designed different mechanisms to ensure that the safety of the entire process is consistent with Layer 1. ZK Rollup uses zero-knowledge proof of zk-SNARKs ‘ cryptography technology to ensure security, while Optimistic Rollup inherits Plasma’s penalty mechanism to ensure that nodes will pay a high price if they do evil.
Of course, there are different trade-offs among Rollup’s various solutions. For example, the disadvantage of ZK Rollup is that it is more difficult to support general-purpose smart contracts , and the process of “condensing” data (creating a ZK certificate) takes a long time; while Optimistic Rollup’s overall security is slightly worse. However, the specific implementation plans of each development team have optimized the above-mentioned trade-offs, and some problems have been significantly improved.
Rollup technology will help improve the competitiveness of applications on the chain , especially for high-frequency trading scenarios, which is expected to reduce transfer or transaction fees. However, due to the design of its own mechanism , the settlement speed of Rollup transactions on the chain may be slower than that of direct on-chain transactions. For this reason, specific application scenarios of Rollup can include:
- Ordinary transfer or payment
- Transfer or payment to enhance anonymity
- Decentralized exchange
- Decentralized identity system
- Decentralized social media
Less than two years after the emergence of the Rollup concept, various Rollup implementation solutions have been launched on the test network, such as Matter Labs and Fuel Labs , and the application layer products are also under development. The first to be launched on the main network is by Loopring. The decentralized exchange developed by Loopring , and other projects that have also announced the adoption of Rollup include Synthetix , Dharma , AZTEC, etc.
Next, we have a deeper understanding and study.
Did Plasma fail?
The discussion about blockchain expansion originated from the Bitcoin network. In response to the vision of Bitcoin becoming a ” global payment tool “, a solution finally discussed by the community, developers and miners is to migrate high-frequency transactions outside of Bitcoin. It is carried out in a virtual layer of “ Layer 2 ” instead of relying on Bitcoin itself (Layer 1). However, the final settlement still needs to rely on Layer 1.
This is the origin of the Bitcoin ” Lightning Network “. Plasma used to be the most eye-catching one of the Ethereum Layer 2 solutions, not only because it was a white paper jointly released by Joseph Poon and Ethereum founder Vitalik Buterin , but also many projects have been announced and will be based on Plasma technology. Research and development.
Plasma migrates high-frequency transactions to side chains outside the Ethereum network, regularly publishes the hash value of batch transactions to the Ethereum main network, and then sets up some anti-malicious attack mechanisms to ensure the security of funds. The ultimate goal is to expand the capacity of Ethereum, increase transaction throughput, and reduce transaction costs. The Plasma Group, Matic, LeapDAO, and OmiseGo teams were once the main R&D teams for Plasma technology, and some projects have also received funding from institutions such as the Ethereum Foundation and Consensys.
But after all, this is an experimental project. During the development of the project, many practical problems were exposed. The two most important challenges are:
- Data availability : Because only the overall hash value of batch transactions is published to Layer 1, instead of each transaction being published to the underlying public chain, the specific transaction data does not exist on Layer 1, and users need to store specific transactions by themselves data.
- Poor user experience : In order to avoid malicious attacks, when Plasma is designing the challenge period mechanism, users need to go online regularly, otherwise they may miss out and suffer unnecessary losses.
Although Plasma has also launched an updated version of the standard Plasma Cash, these problems still exist, which eventually led to the two R&D teams of Plasma Group and LeapDAO at the beginning of this year that they decided to abandon Plasma technology and turn to the development of another new technology: Rollup.
While Matic still insists on the development of Plasma technology, they plan to start the mainnet launch process from May 15 to the end of May, and gradually decentralize it to more than 100 nodes. Whether Matic has handled the above-mentioned problems well, it is worth more time to observe.
In any case, the development community studying the expansion technology of Ethereum has switched more energy to study Rollup.
Why does Rollup have a chance?
One year after Plasma was born, an anonymous person, Barry Whitehat , put forward the concept of “Rollup” in Github, trying to expand Ethereum with “SNARK”.
SNARK is a kind of zero-knowledge proof cryptographic technology, stands for “compact of non-interactive zero-knowledge proof” (zero-knowledge succinct non-interactive argument of knowledge).
For more information about zero-knowledge proof, please refer to:
The word Rollup itself means “curled” or “rolled up”, or it can be extended to “aggregate” or ” aggregate “. In the standard computer language SQL of the database, the “Rollup” in the syntax can help the Group by statement to display a series of search results as aggregated data. Perhaps this is the origin of the technology he named Rollup.
When Barry Whitehat proposed the concept of Rollup, it was defined as follows:
“By aggregating transactions , Rollup only needs to make one transaction on the chain to verify multiple other transactions.”
The package transaction and verification transaction method are realized through zk-SNARK technology, which can greatly reduce transaction costs, ensure security, and solve the problems encountered by Plasma before.
Some people classify Rollup as a Layer 2 technology, but Vitalik Buterin doesn’t think so.
After the concept of Rollup was proposed, Vitalik Buterin published an article introducing the technology in the Ethereum Research Forum in the same month. He explained this: “We can further increase the scale of asset transfer transactions on Ethereum without using it. The “liveness assumption” introduced in Layer 2 technology (such as state channels and Plasma) only needs to use ZK-SNARKs to verify a large number of transactions.”
Interestingly, the name “Rollup” was not taken seriously at first. In January 2019, Matter Labs launched a technology called ” Plasma Ignis “. Before that, the mainstream technology of Layer 2 was Plasma, so they took the “zero-knowledge proof version of Plasma” as their research direction. But from a technical point of view, this is actually not a kind of Plasma, more like Rollup. Later, the team completely abandoned the name Plasma Ignis and switched to ZK Rollup as the technical direction. Later, they also launched their own ZK Rollup-based technical implementation solution ZK Sync , and carried out more in-depth customization and optimization.
Matter Labs co-founder Alex Gluchowski tweeted in January 2019
Since the main shortcoming of the early ZK Rollup concept was that the process of generating SNAKR proof was long and it failed to support general-purpose smart contracts, John Adler , co-founder of Fuel Labs and long-term researcher of the Ethereum second-tier expansion program, said Another solution was proposed in June 2019, called Optimistic Rollup . This solution absorbs the advantages of ZK Rollup for data availability and Plasma’s penalty mechanism . Since the zero-knowledge proof is removed, it can more conveniently support general-purpose smart contracts.
Optimistic means “optimistic”, so in this solution, instead of using SNARK to process the data and then aggregate the data on the chain, the default is “optimistic” to believe that the node will publish the latest and accurate data to the chain, otherwise others After verification, if a problem is found, a challenge can be initiated, and the node will be punished after success.
So overall, compared with Plasma, Rollup’s technology is the most critical solution to the problem of data availability . All transaction data is on the Ethereum chain, and the security can be at the same level as the Ethereum main chain.
Since the transactions are also posted on the chain, why does Rollup have higher throughput and lower cost than ordinary transfers?
Because when constructing Rollup transactions, a large number of ordinary transfer behaviors can be compressed through certain techniques. Finally, after the zero-knowledge proof SNARK processing, although the SNARK generation process is longer and the resource consumption (Gas) is large, it is allocated to Each transaction is trivial. There are specific data for reference in Vitalik Buterin’s initial proposal, although there are various implementations and differences in the follow-up.
In his scheme, the composition of a single transaction is similar to:
Compared with the 21,000 Gas fee required by ordinary on-chain exchanges, the above single transaction reduces the volume (for example, the Ethereum address is 20 bytes, and the above only requires 3 bytes), so it only needs 892 in total. Gas .
However, because SNARK proves that the computational resources consume more, about 600k Gas , and about 50k Gas is required to run the contract, this also means that many transactions must be processed in batches to share the indirect costs of these hundreds of k.
If the upper gas limit of a single block of Ethereum is calculated at 8M, if it is a pure ETH transaction, the throughput is about:
8M / 21k / 15 seconds≈ 25 tps
And the throughput in this scheme is about:
(8M – 600k – 50k) / 892/15 seconds ≈ 550 tps
This is the main reason why Rollup can not only guarantee the availability of Layer 1 data, but also greatly reduce data requirements and reduce the cost of a single transaction.
In addition to the Rollup solution research and development team mentioned above, many application layer projects have also seen the advantages of Rollup and announced that they will study or integrate Rollup technology. Judging from the currently publicly available projects, there are more projects that choose Optimistic Rollup , including decentralized exchanges, DeFi protocols, anonymous services, etc., probably because the project party considers the advantages of Optimistic Rollup to support general smart contracts , and It will not take a lot of time to generate the SNARK certificate like ZK Rollup. After all, before there is an optimization solution, it may affect the application experience.
There are not many projects that have announced the adoption of the ZK Rollup solution, but Loopring ’s decentralized exchange is the one with the fastest development progress in the current Rollup project. It was launched on the Ethereum main network as early as the end of February and began public testing. Although they also encountered non-fatal vulnerabilities in the front-end page, their experience will provide reference and guidance for many other projects that will adopt ZK Rollup.
How much on-chain transaction costs can be reduced? Loopring provided important actual data. In the scheme they adopted, when 4096 transactions are processed in batches, only 375 Gas is required for a single transaction. That is, under the normal gas fee, the cost per transaction is 0.09 RMB (note the unit). In other words, the cost of 1 million transactions is approximately 900 RMB .
But LeapDAO , the team that once developed Plasma technology, believes that Rollup technology is not a panacea. After they conducted specific data analysis, they provided a lot of data worthy of reference. According to their estimates, Rollup can increase the throughput of the Ethereum network slightly more than 10 times , because it still sacrifices a lot of costs compared to Plasma.
In addition to the two most popular Rollup derivative versions, there are also some Ethereum layer 2 expansion solutions that also use the name Rollup. The two more common ones are BLS-Rollup proposed by SKALE Labs and Arbitrum Rollup by Offchain Labs.
However, John Adler, the creator of Optimistic Rollup, believes that BLS-Rollup is not Rollup in the usual sense, but more like a batch processing technology. Arbitrum Rollup did not mention Rollup when it released the paper in 2018 and the white paper in 2019. They called it Arbitrum Rollup when they launched the testnet earlier this year.
ZK Rollup progress
The most important companies in ZK Rollup technology research and development are Matter Labs and iden3 , both of which have launched testnets . However, the positioning of their products is slightly different. Matter Labs is more like a general-purpose solution, while iden3 is a dedicated solution.
Matter Labs launched a complete set of general-purpose solutions called ZK Sync . This solution takes into account some of the shortcomings of ZK Rollup, and proposes corresponding mechanism optimizations. For example, as mentioned earlier, it takes a long time to generate SNARK proofs and it is difficult to support general smart contracts. Matter Lab co-founder and CEO Alex Gluchowski said, “After the Istanbul upgrade, ZK Sync will be in a very advantageous position to easily reach thousands of transactions per second.”
In order to achieve the demand for general smart contracts, Matter Labs also launched the zero-knowledge proof smart programming language and framework Zinc , and launched the first version v0.1 Alpha in February this year. Matter Labs represents, Zinc is a zero-knowledge proof line used to create a secure and intelligent programming language and execution environment based on their operational procedures, Zinc follow Rust principle, and based on a simplified Rust grammar, proficient in Rust, the development of C ++, Solidity and other languages People can get started quickly in one day.
The original intention of iden3 to study ZK Rollup was for their original project considerations. The name iden3 can be imagined as identity 3.0. Feel it, is it similar to “Web3”? Therefore, the iden3 team focuses on providing an open source identity management system for the digital world, using zero-knowledge proof zk-SNARK to improve privacy features , and Rollup can increase the transaction throughput of the identity authentication system and the application layer in the on-chain interaction.
From the application level, Loopring and AZTEC respectively solve the needs of user chain transactions and privacy. Loopring’s decentralized exchange is currently the one with the fastest development progress in the current Rollup project. It was launched on the Ethereum mainnet as early as the end of February and began public testing.
AZTEC is a privacy technology solution that launched the Ethereum mainnet in February this year, but they are still considering the adoption of Rollup technology to significantly reduce the cost of private transactions in the Ethereum network. They originally adopted zero-knowledge proof ZK in their privacy technology, and their expansion plan chose ZK Rollup, so they named the new plan ZK ZK Rollup, or ZK² Rollup . The first ZK is to use the ” succinctness ” in SNARK technology to improve the scalability of the network and merge multiple transactions into one to reduce transaction costs. The second ZK is to use SNARK as a privacy technology to merge Every previous ordinary transaction is upgraded to a private transaction.
Optimistic Rollup progress
The most important companies in Optimistic Rollup technology are Fuel Labs , Optimism (formerly Plasma Group) and NutBerry . They develop general-purpose Optimistic Rollup solutions. Compared to ZK Rollup, it is easier to support general smart contracts because it removes complex cryptographic techniques such as complex zero-knowledge proofs.
Although Optimistic Rollup increases the advantages of data availability over Plasma, it also directly absorbs the results of Plasma. In addition to using the same game and penalty mechanism , the Optimism team said that these two solutions can share a lot of infrastructure and code. In addition, they believe that for a mature Layer 2 ecosystem , Rollup, Plasma, and state channels should be able to work together within the same client (smart wallet).
In fact, at the end of 2019 before Plasma Group publicly abandoned Plasma technology, a new company Optimism was formed to focus on the implementation of Optimistic Rollup. The company has now raised 350 from the crypto venture fund Paradigm and IDEO CoLab Ventures, which is a subsidiary of the design company IDEO. Ten thousand USD seed round financing. The newly raised funds are mainly used to implement the Optimistic Rollup solution and build applications based on the solution. Although this is a commercial company, the research team said it hopes to continue to contribute to open source projects and share its research results with the public.
In order to support Ethereum’s smart contracts, Optimism has released an Alpha version of the virtual machine Optimistic Virtual Machine (OVM). OVM is a copy embedded in the Ethereum Virtual Machine (EVM), allowing developers to use the same developer toolset and smart contract language as EVM when using Optimistic Rollup.
In the beginning, Optimistic Rollup was called “Minimal Viable Merged Consensus” (Minimal Viable Merged Consensus). After John Adler proposed this concept in June last year, Fuel Labs was established to implement their expansion plan.
Fuel Labs will develop a trustless Ethereum side chain Fuel , specifically designed for payments on the Ethereum chain. Before the upgrade in Istanbul, it is conservatively estimated that the transaction cost of Ethereum ERC-20 tokens can be reduced to one-fifth of the original. One .
In January of this year, Fuel Labs launched the public testnet of the Ethereum side chain Fuel based on Optimistic Rollup, and the code has also been open source. It is worth noting that their testnet contract already supports all ERC-20 tokens, after all, ERC-20 is a smart contract. Later in March, they announced the launch of a new Ethereum underlying language, Yul+ , as an experimental upgrade to Yul, adding various QoL functions to Yul (a low-level intermediate language of the Ethereum virtual machine). Yul is a low-level intermediate language written by Solidity developers that aims to further optimize compilation goals . It is simple and has practical low-level syntax, allowing developers to be closer to the original Ethereum Virtual Machine (EVM) than Solidity, and has optimized gas fees. Use efficiency potential.
NutBerry is less influential than the above two, but their goal is to develop a Layer 2 solution based on Optimistic Rollup and support stateful smart contracts. The project was first published on the Ethereum Research Forum, which described that the project will be divided into four milestones: support for ERC-20 standard, support for ERC-721 standard, support for stateless smart contracts, and support for stateful smart contracts (that is, Smart contracts that can store data). NutBerry released its second testnet in February this year, which already supports ERC-712 (Ethereum typed structured data hashing and signing).
Optimistic Rollup has relatively more application layer products, which may be because it is easier to support smart contracts, so it is more convenient for these DeFi , DEX, or privacy services that require smart contract processing logic.
These applications will be gradually launched in the next one or two quarters, and it will not take long to experience them.
Other Rollup
Although several other Rollup solutions are not the same as the above projects, they are all named after Rollup, so this article will also organize and collect related:
- BLS-Rollup , you can refer to
- Arbitrum Rollup , you can refer to
- There is also an account-based
future
For the development of the application ecology on the Ethereum chain, expansion is a continuous and important topic. After all, there are at least 2-3 years before the final form of Ethereum 2.0. Prior to this, various application ecosystems on the chain such as DApp, DeFi, and games could not be scaled up. Computing resources will become an important bottleneck. Any strong DApp may quickly fill up the computing resources on the chain. Take March 12th as an example, the collateral auction liquidation process initiated by the Maker Protocol due to the plummeting price of Ethereum caused huge losses due to the overall network congestion .
Once the most important expansion solution, Plasma, encountered some problems in the implementation process, the developer community shifted more energy to Rollup, because it solved the ” data availability ” problem found by its predecessors in the development process. Although there are some trade-offs, it is still tens of hundreds of times more efficient than Ethereum Layer 1. The two most important branches, ZK Rollup and Optimistic Rollup, were derived, and they chose different challenges to ensure security: whether to study difficult zero-knowledge proof cryptography techniques, or to find a safe and user-experienced game mechanism .
However, those hundreds of times improvement are still theoretical values at present, perhaps the optimal situation in the laboratory environment, there is still a lot of research and development work and supporting optimization before this. Only after these solutions are implemented, integrated by applications and adopted on a large scale, can we know the real performance or whether there are other weaknesses and problems.
After all, practice can lead to true knowledge. Rollup is not the first expansion plan, and it will not be the last. Although we all know where the goal is, the path to realization is still tortuous.
Comments
Post a Comment