background introduction
background introduction
From the creation of Bitcoin to the emergence of the Crypto Kitties game on the Ethereum network. The most criticized part of mainstream public chain projects is the low TPS (Transaction per Second). The TPS of Ethereum around 15 is completely unable to provide real-time and stable support for most applications, which is in stark contrast to the current Internet industry that often requires tens of thousands of TPS. Many people even think that the public chain will be "unavailable" for a long time. However, public chain enthusiasts will not stop because of difficulties.
secondary title
Comparison of mainstream solutions
For Ethereum, in the past few years, proposals for the expansion of Ethereum have sprung up like mushrooms, forming a situation of contention among hundreds of schools of thought. Its mainstream schemes are as follows:
1. On-chain expansion:
Sharding technology: The word sharding is originally derived from the term of the database, which means that a large database is divided into many smaller and more manageable parts, so as to achieve more efficient interaction.
Blockchain sharding refers to sharding a blockchain network to increase its scalability. According to the latest Ethereum 2.0 specification, the Ethereum blockchain will be divided into 1024 shard chains, which also means that the TPS of Ethereum will increase by more than 1000 times. However, the current Sharding solution still has deficiencies in cross-shard communication, fraud detection, random allocation, and election security.
2. Off-chain expansion:
State Channel: Refers to an "off-chain" technology for executing transactions and other state updates.
However, the transactions that occur within a state channel still maintain a high level of security and immutability. If anything goes wrong, we can still revert to the stable version identified in the on-chain transaction.
Sidechain technology: A sidechain is a chain parallel to the main chain, and the verifier on the side chain submits the latest state of a chain to the smart contract on the main chain, which is a type of system that continues to advance. Sidechains usually use efficient consensus algorithms such as PoA (Proof-of-Authority) and PoS (Proof of Stake). Its advantage is that the code and data are independent of the main chain, and will not increase the burden on the main chain. The disadvantage is that its security is weak, not centralized enough, and it cannot provide censorship resistance, finality and capital ownership guarantee.
Rollup technology: As the name suggests, it is to aggregate a bunch of transaction rolls (Rollup) into one transaction, and all nodes that receive this transaction only verify the execution results, not the logic. Therefore, the Gas fee required for Rollup transactions will be much smaller than the sum of transaction Gas fees, and the TPS will also increase.
The mainstream Rollup technologies can be divided into two categories:
ZkRollup: A Layer 2 expansion solution based on zero-knowledge proof, using the validity verification method (VP). By default, all transactions are dishonest and will only be accepted if they pass the validity verification. ZkRollup performs complex calculations and generation of proofs off the chain, verifies the proofs on the chain and stores some data to ensure data availability.
Optimistic Rollup: The optimistic Rollup protocol adopts a fraud proof method, that is, it maintains an optimistic attitude towards all Rollup blocks released on the chain and assumes that they are valid, and it only provides evidence in the event of fraud.
The advantage of Optimistic Rollup is that it can seamlessly transplant the solidity contract on the native Layer1 to Layer2, thereby maximizing the research and development experience of technicians. Currently, mainstream solutions include Optimism and Arbitrum.
Plasma solution: establish sub-chains through smart contracts and Merkel trees. Each sub-chain is a customizable smart contract. The sub-chains coexist and operate independently, thereby greatly reducing the TPS pressure of the main chain.
We compare the solutions and here are the results:
The Rollup mechanism is currently generally considered to be the most promising expansion method. Among the two mainstream Rollup solutions, the core issue is how to verify the authenticity of Rollup transactions.
Optimistic Rollups and ZK Rollups use different thinking logics. The former optimistically believes in the authenticity of the transaction, while the latter pessimistically does not believe it. Therefore, generating a zero-knowledge proof comes from proving innocence.
In comparison, the advantages and disadvantages of the two are as follows:
The advantage of ZkRollup lies in its high degree of decentralization and high verification efficiency. The disadvantage is that the process of generating and packaging zero-knowledge proofs is very complicated, and it is difficult to be compatible with EVM and to implement.
The following mainly introduces the two major solutions of Optimistic Rollup, Optimism and Arbitrum.
secondary title
Optimism and Arbitrum
First, let's take a look at the process of the Optimistic Rollup scheme:
The basic process of Optimism and Arbitrum is the same as the above description. To put it bluntly: Optimism’s dispute resolution is more dependent on the Ethereum Virtual Machine (EVM) than Arbitrum. When someone submits a challenge on Optimism, the transactions in question are run through the EVM again.
In contrast, Arbitrum uses an off-chain dispute resolution process to reduce dispute bisection to a single step in a transaction. The protocol then sends this one-step assertion (rather than the entire transaction) to the EVM for final verification.
Thus, conceptually, Optimism's dispute resolution process is much simpler than Arbitrum's. But Arbitrum greatly reduces the verification pressure on the chain.
The overall architecture of Arbitrum is as follows:
Since Arbitrum is an expansion solution for Ethereum, the Arbitrum architecture naturally exists partly on Layer1 and partly on Layer2;
The Arbitrum component that exists on Layer1 is EthBridge, which is a set of Ethereum contracts;
EthBridge is responsible for arbitrating the Arbitrum Rollup agreement and maintaining the inbox and outbox of the chain;
The inbox and outbox of the chain allow users, Layer1 contracts and full nodes to send their transactions to the chain and observe the results of those transactions;
The Arbitrum virtual machine is the gateway between Layer1 and Layer2, which is also generated by EthBridge;
AVM is able to read inputs and perform calculations on those inputs to produce outputs;
ArbOS runs on the Arbitrum virtual machine and is responsible for ensuring the execution of smart contracts on the Arbitrum chain;
Arbitrum's dispute resolution process mainly relies on the off-chain recursive binary algorithm. The algorithm forces the "assertor" and "challenger" to narrow the differences by continuously dichotomizing the differences, and finally resolve the differences on Layer1. The specific solution is as follows:
Optimism, on the other hand, directly lets the EVM execute the entire transaction, so it only requires one round of interaction to complete. For this reason, Optimism Rollups are often referred to as "single rounds", while Arbitrum Rollups are "multiple rounds". The biggest difference between the two is: Arbitrum takes a long time to resolve disputes, so the confirmation time is longer. Optimism needs to execute the entire transaction, and the Gas fee is higher.
secondary title
Eigen - Layer2 Rollup Privacy Computing Solution
For private computing, the usual results are optimistic. In the field of privacy computing, a transaction is extremely complicated, and it is very difficult to execute this transaction at Layer1. Therefore, Arbitrum is a better choice in the field of privacy computing, which is why Eigen develops based on Arbitrum.
Eigen Rollup is a hybrid Rollup solution that is EVM compatible and supports optimistic execution and verifiable statements.
Verifiable statement: TEE signature and zero-knowledge proof technology are used to provide non-interactive proof of the correctness of the calculation process and the integrity of the results.
Eigen Rollup provides the following technologies based on Arbitrum:
Proof of privacy verifiability: Based on Arbitrum's interactive proof scheme, Eigen Rollup uses TEE to execute key privacy operation instructions, thereby reducing the consumption of interactive proofs and providing privacy protection for interactive proofs;
Optimistic execution: similar to CPU branch prediction (Branch Prediction), the transaction will be pre-executed, and the verifier verifies the legitimacy of the transaction; adjudicates the disputed transaction through the challenge protocol;
