A long Layer2 introduction/science/discussion/notes
Source: Crypto
This paper is quite long, consisting of seven parts:
1. Understand Zkrollup and Optimistic rollup in a popular way
2. Plasma's brief history
3. Data availability
4. Factions op
5. Smart water bottle
6, Immutable X
7, the conclusion
A side chain is a chain. A layer 2 protocol does not have a chain. Side chains are chains, so you have nodes, you have consensus mechanisms, you have blocks, you have blocks. The Layer 2 protocol is not a chain, so there are no nodes, no consensus mechanism, and no concept of blocks.
Layer2 has no concept of blocks, no nodes, and no consensus mechanism, so blocks are not visible on Layer2 block browsers. Now go to look at the browser of Arbitrum, there is a Bk, Block, look carefully at each Block is actually each transaction, please see the screenshot. The Layer 2 operator is only responsible for sorting transactions and processing them. The key to blockchain is sorting transactions.

For example, the famous sandwich attack is actually a sort attack. You initiate a transaction, pay $50 Gas fee, someone finds the unprocessed transaction (in Mempool), then spend $100 Gas fee, do two transactions, one is to buy the same coins you want, the second is to sell the coins you bought back to you. Buy first at a low price, buy later at a high price. So the other party sandwiched your transaction with two transactions, first buying the coins you wanted and then selling them to you at a higher price.
You end up feeling more expensive, and the slippery point of the transaction is the other side's profit. This is equivalent to just-in-time Liquidity provided by Uniswap V3.
Now that you understand the importance of sorting transactions, the differences between the two Layer 2 (ZK and OP) schemes are easy to understand.
In case you are not familiar with ZK and OP, let me repeat the difference between the two:
-zk is zero knowledge proof, prove that it's ok, and then pass the data to the main chain. Look first and do later.
-OP is optimistic acceptance. It first processes the data and transmits it to the main chain, and then waits for someone to challenge it. If no one proves it is wrong within a week, it is right. Check when you're done.
Let's put it in a more informal way.
Since sorting is so important, that is responsible for sorting said: I now give you two ways, one is you listen to me, a lot of transactions to me TO sort, I finished processing the results of the processing of key data to the main chain. If you have any questions or thoughts about the data, I'll give you a week to find evidence, and anyway, the raw transaction data is available, and you can check it, and you can report me if you have any questions, or you can report me if you think I made a mistake. If you succeed, the main chain will solve your problem. That way, as long as I don't have a problem, I can handle it quickly. Sorting is so easy.
The second way is I do a good job, I record a proof for every sorted transaction, and then I get a proof for every transaction that passes to the main chain. So that any transaction anyone at any time can guarantee that I am doing a good job. But the downside is, every time I have to get a proof, it's exhausting. So it's going to be slow, and the more complicated the processing logic, the slower I'm going to do it, so you have to understand that.
After reading the above you should have a general understanding of the two layer 2 protocol schemes. If not, it is ok. More details will be covered later. Before that, let's talk about Plasma's much-discussed path to capacity expansion.
A little bit about Plasma's history. In fact, ethereum was blocked at the height of its popularity in 2017, when there was already a lot of discussion about expansion plans. Plasma is the first one to get a lot of attention. For proposing that man is V god, and Joesph Poon from Lightning.

The first version of Plasma was called Plasma MVP (Minimal Viable Plasma). This version is definitely not going to work. The first version was basically a bunch of transactions arranged according to certain rules and processed together (many of the subsequent improvements have been to the data storage structure of these batch after batch transactions).
So what's wrong with the MVP? Remember the guy who was in charge of sorting transactions? That person is the operator in the layer 2 protocol, and the layer 2 protocol needs to take into account the bad behavior of the operator. So ZK is the operator leaving a certificate for each stroke, op is the operator having a period of time to be challenged. Here's the problem with MVPS:
- Challenge period still exists, one week;
- If operator malfeasant is considered, you need to verify all transactions (note, all, not a line along merkle tree) before launching a challenge;
Later, V made a new version, Plasma Cash. The data structure of the transaction set is changed, and the assets are represented by non-homogeneous tokens. So that actually solves the problem of checking all of everybody's transactions. However, new problems have emerged. Users need to prove their ownership when they withdraw cash, and users need to be online regularly during the challenge period. Plasma also requires users to store all their data. The end result is failure.
Did you find it? Zk encrypts the result and the proof of the result and sends a small part of the data to the main network to prove that the result is ok. Op is also to upload the results and original records to the main network, if there is a challenge can have evidence to check.
At the end of the day, layer 2 protocols and even capacity expansion schemes are all about data availability. The best way to understand the availability of data is from the point of view of the main network, whether or not the nodes of the main network can access the data, and unconditionally believe that the transaction data processed by the layer 2 protocol cannot be stored in a centralized server or somewhere.
The Ethereum main network puts all the data on the chain, so anyone can look it up, so it's safe. But this is slow and inefficient. The solution to the side chain is more thorough, directly make a new side chain, the data on the side chain, has nothing to do with the main chain, so the security of the main chain is independent of the side chain. This is why many people generally feel that a layer 2 protocol is the best expansion solution. Because layer 2 protocols can take advantage of the security of the backbone.
In terms of data availability, both layer 2 protocols reduce the amount of data, one by giving less data (than the main chain) to justify the transaction; One is don't give me the data but trust me, or challenge me and I'll ask you to trust me. The data is available at the time of the challenge, and the verification process is relatively simple compared to historical schemes.
Now go back to this tweet from V again:

SNARKs and STARKs are both directions of zero knowledge proof, you can check their specific meanings if you are interested. The optimistic rollup of the Fraud proofs -- the proofs that the deals are faulty and the proofs that there are Fraud -- is the challenge.
The following two lines describe the availability of data: on-chain indicates that the data of the layer 2 transaction set is available to the main network, while off-chain indicates that the data of the layer 2 transaction set is unknown to the main network and unavailable.
The validium in the picture has not been mentioned before, but it is explained here. Validium builds on zKrollup and removes some of the data that goes to the main chain to make it smaller, faster to process, and free to execute (more on this below, since ImutableX uses this).
Therefore, following this diagram, which is familiar to us today, is also the two types of expansion plans mentioned at the beginning of the article, ZK and OP.
Op may be more familiar with people, mainly because of the two on-line Arbitrum and Optimistic, and there are many projects (especially the local dog project). In fact, zK has many projects, such as DyDX, IMMUTABLE X, gitCoin donation payment method, etc.
There are factions to everything, and so is blockchain. Be open, what fry money fry is not up and down, it is the worldly wisdom.
Just as there are zK and OP factions in the layer 2 protocol, there are factions within zK and OP.
Op said above, is arbitrum and optimistic, two have been online. It is obvious that The development of Arbitrum is better, up to now, ARB has dealt with more than three million transactions. Optimistic, on the other hand, has handled just over 200,000 transactions. But! Optimistic's browsers do a little better, it has to be said.

It tells you very directly that it's a trade lot, not a block. The transactions of layer 1 and layer 2 on the right are recorded in the main chain in accordance with the rules of the main chain, so there is the identification of Bk block on the right. Compared with Arbitrum does a lot of heart.
Comparison of partial information of Arbitrum and Optimistic:

From the current situation, the two comparison, Arbitrum is indeed leading many.
Recently Optimistic ran a retroactive rewards program, giving rewards to projects in the ecosystem. A total of 60 projects received $1 million in awards. If you look at these projects, they are basically very, very technical projects, not app type projects that will issue money. V God also wrote a review two days ago, commenting on the excellent performance of Optimistic traceability and rewards. The overall quality of the project is higher than that of Gitcoin 11. These types of infrastructure are particularly critical to ethereum's ecosystem.
Taking a closer look at Opitmistic, the chain network upgrade was completed just a week ago, and the spike in unique addresses has only occurred in the last few days. Until now, Optimistic can be described as having no application at all. Arbirtum has not been down for maintenance since its launch in September, and the main trend is to work with more projects to get more applications deployed on tier 2.
It has to be said that the early emergence of the local dog project in Arbitrum has played a great role in attracting users and funds.
One more sentence, Binance has just supported the top-up and withdrawal of Arbitrum ETH. In this way, after the mention of ETH from Arbitrum should not wait seven days. Until then there was another way to swap a discount for liquidity, and there were agreements to do so. If you want to raise an ETH, you don't want to wait seven days. 0.98 ETH can be directly lifted immediately. Or just borrow 0.98 ETH directly from the main network. Wait for 7 days, your ETH is withdrawn and then return it.
Since the error is a probabilistic event, this works as long as the user's discount makes up for the error rate times the total withdrawal.
There are two main factions of zkRollups, namely zkSync solution developed by Matter Labs and StarkEx solution developed by Starkwave. There are two generations of zkSync, zkSync1 and zkSync2 respectively. Stark is StarkEx and Stark Net.
These distinctions are explained very clearly by CTO Immutable:
For networks that you can play with right now, StarkEx is live with four applications, DyDx and DiversiFi for trading, and ImmutableX and Sorare for NFTs. zkSync is live for payments with primitive NFT functionality featured with
ZKNFT.StarkEx is online and has dYdX, Diversion Fi; Also ImmutableX and Sorare do NFT. While zkSync is mature in terms of payment, zkNFT is a solution to the NFT problem.
If you don't understand, look at the chart below

Information about the two Zrollups development teams:

So far, StarkWave is clearly the better of the two. The current projects using StarkEx technology solutions have also been mentioned before, well-known blockbuster dyDX, Immutablex, Deversifi, Sorare. According to StarkWave's website, more than $1 billion in total lock-ups have been made using its own solutions, with more than 51 million transactions and more than $215 billion in cumulative transactions.
Bankless published an article "The Best Comparison on zkRollups Today" two days ago, which introduced this part in detail. There have been many translations in Chinese, so you can look for them if you are interested.
In particular, IMX, a big tier 2 protocol that sends out coins without doing anything.
IMX uses the same scheme as DyDX, zkrollups, which is fine. The key point is that the game chain, props, equipment and characters must be NFT. Although Rollups is much cheaper than the main network, if it is a large-scale game, it will also be super expensive, and will still be unable to use more. To solve this problem, IMX is more radical and directly uses the validium scheme mentioned above.
Validium differs from normal Zkrollups in that it completely abandons data availability, a simple analogy to understand.
Let's start with the example where the operator has to do is mark the students' papers.
Zkrollups' method is that the operator takes a picture of the results with a photo of the test paper after each grade and uploads it together to the main web site. So you can see the test scores directly. If you have a problem with your test score, it's ok to look at the photo of your test paper and see where you made mistakes.
Validium, on the other hand, uploads results directly, without photos. You throw away some of the data. For the main network, is unable to find where the examination paper, if there is an opinion, there is no way to appeal, because there is no examination paper do not know where is wrong. So again, this is throwing away Data Availability, Data Availability.
But this can make the whole correcting process (transaction processing) faster.
To reassure users, IMX set up a committee that regularly posted photos of the test to another location, the IPFS.
But it doesn't matter if it goes anywhere. Only the data inside the blockchain on the main network is the real blockchain. Safe anywhere else, it's not a crypto native.
Of course, IMX knows this too, so users can choose between normal ZKrollups or Validium when making future transactions directly. According to the official line: "We give choice to the user."
We're allowing users to choose between two Validium and zK-rollups where there is no significant difference, via a system known as "Volition", And we're starting by offering maximum scalability via Validium to allow applications to scale NFTs to the billions, All while remaining on Ethereum. Let's go!
Be honest, though understand the compromise. But what do users know? Handing it over to users is not necessarily a good choice.
本篇其实没有什么结论,更多的就是一个科普/介绍/讨论/笔记。因为涉及到二层协议,这是一个比较大赛道,技术设计架构方面也都比较复杂,我也不是技术出身所以必然有很多地方理解不到位。目的就是能够让一部分人大概能知道自己如果买了这些或者在这些协议活动,干的是个什么事情。 加之最近中文内容有些不太平,中文非广告的内容可能越来越少,就整理了一个出来。
The author twitter: https://twitter.com/0xwayne_z
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