Do you know what Rollup is the most popular solution for blockchain?

Recently, Ethernet Square founder Vitalik Buterin in an article entitled “Dawn hybrid Layer 2 protocol,” the article on Rollup program much appreciated, that it opens the door for scalability, intelligent contracts.

So what is Rollup? What mainstream programs does it include? What are the advantages and disadvantages of each of these solutions? What are their prospects for future development?

The emergence of Rollup

In recent years, Ethereum’s Layer-2 expansion technology has developed rapidly.

The so-called second layer is to store part of the funds in the smart contract of the main chain. Under the premise of ensuring sufficient security, some transactions are placed outside the main chain, as if there is an extra layer of network under the chain.

Do you know what Rollup is the most popular solution for blockchain?

The outstanding performance in the second-tier scheme is the state channel and the Plasma side chain. Although these two programs were born very early, their development is relatively slow. The reason behind it is ultimately the availability of data.

When the second-tier expansion technology was struggling, a new solution called Rollup was proposed.

But unlike the state channel and Plasma, it can “package” the transaction, and publish the “packaged” transaction data together with a SNARK zero-knowledge proof to the chain.

The correctness of packaging can be witnessed by zero-knowledge proof, and it is impossible for the operator responsible for “packing” to issue malicious or invalid transactions. This is the second-tier expansion plan that Vitalik Buterin later called ZK Rollup.

ZK Rollup is not a panacea, the biggest problem it encounters is versatility. Unless the transaction to be proven is very simple, the cost of creating a SNARK certificate will be very high.

Therefore, a compromise solution called Optimistic Rollup was proposed.

Optimistic Rollup also puts all transaction data on the chain, but instead of using SNARK as a witness, it uses the “encrypted economics validity game” to achieve validity verification.

Do you know what Rollup is the most popular solution for blockchain?

As a technology to improve the throughput of the blockchain, Rollup can effectively improve the network throughput while avoiding a large number of changes to the protocol layer. The deployment of Rollup does not require a hard fork upgrade to the network.

At present, many projects on Ethereum (such as Celer, ANON, etc.) have adopted the Rollup protocol to improve the throughput and user experience of Dapp.

Do you know what Rollup is the most popular solution for blockchain?

How does Rollup work?

There is a smart contract on the chain, which maintains the state root: the Merkle root of the rollup state (meaning, the account balance in the “balance”, the contract code, etc.).

Do you know what Rollup is the most popular solution for blockchain?

Anyone can publish batches, transaction collections, previous state roots and new state roots (Merkle roots after processing transactions) in a highly compressed form.

The contract checks whether the previous state root in the batch matches its current state root; if so, it switches the state root to the new state root.

Do you know what Rollup is the most popular solution for blockchain?

In order to support deposits and withdrawals, we have added the function of transactions that make the input or output “outside” the rollup state.

If the batch has external input, the transaction that submitted the batch also needs to transfer these assets to the rollup contract.

If a batch has external output, the smart contract will initiate these withdrawals when the batch is processed.

That’s it! Except for one main detail: how do you know that the state in the batch is correct?

If someone can submit a batch with any post-state root cause without any consequences, then they can transfer all tokens in the rollup to themselves.

This problem is critical because there are two very different solution series, and these two solution series lead to two rollup methods.

Optimistic Rollup与ZK Rollup

The two types of Rollup are Optimistic Rollup and ZK Rollup.

Optimistic Rollup

Optimistic rollup, using proof of fraud-the rollup contract will track its entire state root history and the hash value of each batch.

If someone finds that the status of a certain batch is incorrect, a proof of the need chain is issued to prove that the calculation of the batch is incorrect. The contract will verify the certificate and restore the batch and all subsequent batches.

ZK rollup

ZK rollup, proof of validity-each batch contains an encrypted certificate called ZK-SNARK (for example, using the PLONK protocol), which proves that the post-state root is the correct result of executing the batch.

No matter how large the amount of calculation is, the proof can be verified very quickly on the chain.

Do you know what Rollup is the most popular solution for blockchain?

In general, I personally think that in the short term, optimism may win for general-purpose EVM calculations; while for simple payments, transactions, and other application-specific use cases, ZK may win.

With the improvement of ZK-SNARK technology, ZK will win in all use cases in the medium and long term.

Rollup work details

In Optimistic Rollup, first we need to set up a trusted node, this node is responsible for collecting all transaction information, verifying and then packaging.

The packaged information collection will be sent to the blockchain network with the signature of the node.

Do you know what Rollup is the most popular solution for blockchain?

When a trusted node is successfully set up, the node will become a Rollup node. This node needs to download the entire block data and update the block status in real time like a full node.

We still use the previous company as an example. Assuming that there are currently 2,000 transactions awaiting execution, the company’s employees will send 2,000 transactions to the Rollup node.

After that, the Rollup node needs to verify the transaction based on the existing state and block data, and save the following data sets (transaction content, pre-transaction state, post-transaction state).

After the Rollup node completes the verification and execution of all transactions and generates a data set, the node needs to sign the data set, that is, the Sig Rollup node (transaction content, pre-transaction state, and post-transaction state).

Finally, the signature and data set are integrated into a transaction. This transaction is called an Assertion and is sent to the blockchain network to wait for verification by other nodes.

It should be noted that other nodes in the network will not verify the data set sent by the Rollup node, but only verify its signature. After verification, the blockchain network state will be updated according to the data set.

Do you know what Rollup is the most popular solution for blockchain?

Just like its name “Optimistic Rollup”, in fact, all Rollup protocols transfer transaction verification from on-chain to off-chain, so they are based on an “optimistic” assumption-assuming that Rollup nodes will not do evil in most cases.

But optimistic assumptions alone are not enough. Nodes will always have problems for various reasons.

In order to avoid malicious behavior of these nodes and increase the cost of doing evil, there are the following mechanisms in Optimistic Rollup:

On the one hand, Rollup nodes need to pledge a certain amount of Tokens to the network. These Tokens have a certain unlock time and will be fined when the Rollup node performs malicious behavior.

On the other hand, the assertion submitted by the Rollup node will not be immediately recognized by the network, so there is a certain window period (usually 1 week).

If other nodes believe that the assertion submitted by the Rollup node has malicious behavior, the node can pledge a certain deposit and challenge the assertion.

And the block generation/verification node in the blockchain will re-verify and execute all the content (including the data set) in the assertion, and compare the gap of the transaction status.

If there is indeed malicious behavior, then the deposit of the Rollup node will be fined, and the node that initiates the challenge will receive a certain reward. If there is no malicious behavior, the deposit of the challenged node will be fined.

In addition, if no other nodes challenge the assertion at the end of the window period, the state information in the assertion will be updated to the blockchain state by the coefficient.

Do you know what Rollup is the most popular solution for blockchain?

Optimistic Rollup can aggregate multiple transaction information into a single piece of information by a trusted third party, because the status changes in the transaction are verified by off-chain nodes instead of on-chain nodes.

Therefore, the verification difficulty of the nodes on the blockchain is reduced (only the signature submitted by the Rollup node needs to be verified, and the state information submitted by the node needs to be updated).

Although the data set does not seem to be smaller than the superposition of a single transaction, the data set does not need to be paid high fees because it will not be verified by the nodes on the chain .

Relying on this Layer 2 processing scheme, the effective throughput of the blockchain can be easily improved.

How does ZK rollup work?

A simple Ethereum transaction (sending ETH ) requires about 110 bytes. However, ETH transmission on Rollup only takes about 12 bytes.

An important compression technique unique to ZK is that if a part of a transaction is only used for verification and has nothing to do with computing state updates, it can be left off-chain.

This will not be done entirely in an optimistic state, because if you need to check the data in the fraud proof later, you still need to include the data on the chain.

In ZK, SNARK proves that the correctness of the batch has proved that any data provides the information required for verification.

Do you know what Rollup is the most popular solution for blockchain?

Another important example is privacy protection. In an optimistic state, about 500 bytes used for privacy in each transaction need to be reserved. In ZK, there is no ZK-SNARK covering the entire batch.

These compression techniques are the key to Rollup’s scalability. Without them, Rollup may only increase the scalability of the base chain by about 10 times, and when using compression techniques, the scaling factor can almost exceed 100 times for all applications.

Alchemy analysis

The basic concepts of Rollup are now well understood, but we can be sure that they are fundamentally feasible and safe, and multiple Rollups have been deployed to the mainnet.

However, there are still many areas of Rollup design that have not yet been well explored. Taking full advantage of the scalability of Ethereum and fully integrating most of the Ethereum ecosystem into Rollup will face many challenges.

Rollup is a powerful new 2-tier scaling paradigm that is expected to become the cornerstone of Ethereum scaling in the short- and medium-term future (and possibly the long-term).

 

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/do-you-know-what-rollup-is-the-most-popular-solution-for-blockchain/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Like (0)
Donate Buy me a coffee Buy me a coffee
Previous 2021-09-27 08:40
Next 2021-09-27 08:41

Related articles