Background
On April 10, A16z Crypto released the zero-knowledge solution Jolt to accelerate and simplify blockchain expansion operations.
Jolt integrates SNARK (non-interactive succinct zero-knowledge proof), which allows developers to quickly create SNARK-based L2 solutions. The team also said that Jolt is up to 2 times faster than the current zkVMs.
ZK technology is one of the main lines throughout the cycle of the crypto industry, and ZK-Rollup is called by Vitalik as a long-term solution for Ethereum expansion. A16z launched Jolt from August last year to its official release this year, indicating that ZK-Rollup is still a long-slope and thick snow track.
ZK-Rollup has attracted many players, and has formed more subdivided technical categories to distinguish the differences between projects. Compatibility with EVM is the most representative classification standard.
Due to historical reasons, EVM has a large number of ZK-unfriendly designs. However, a large number of existing projects were built based on EVM in the early days, and ZK-Rollup is also seen as a future expansion plan. Therefore, most ZK-Rollup projects naturally face the trade-off of being more compatible with EVM or more compatible with ZK.
ZKM, incubated by Metis DAO, started from a more basic perspective and proposed a universal zkMIPS solution.
zkMIPS uses the lower-level MIPS instruction set to implement the conversion of program execution to ZKP. In addition to being compatible with EVM, it is compatible with other VMs, such as MoveVM and RustVM, allowing ZK-Rollup to open the door to more diverse developers.
This article will provide readers with an in-depth interpretation of Metis' efforts and progress in ZK and decentralized sequencers.
ZKM and Hybrid Rollups: The Reconciliation of OP and ZK
Metis's outstanding performance in the market is inseparable from its innovative Hybrid Rollups mechanism, which combines fraud proof and validity proof to have the advantages of both.
ZKM's zkMIPS technology provides solid compatibility support for Metis's Hybrid Rollups, allowing Metis to achieve an organic integration of ZK and EVM.
2.1 Mechanisms and Advantages of Hybrid Rollups
In Hybrid Rollups, the key roles include:
Sequencer: Responsible for receiving and processing user transactions, determining the best order of transactions, and packaging and publishing them to the consensus and data availability layer.
Proposers: Evaluate the transactions and state roots submitted by the Sequencer, and record them in the State Commitment Chain (SCC).
Verifiers: Verify the state root on the Rollup chain to ensure the correctness of transactions and prevent fraud.
In the standard L2 solution, the Sequencer collects and processes transactions and then publishes the transaction data to the Ethereum mainnet (L1). This process requires L1 to perform final data verification and confirmation to ensure security and consistency.
(Source: https://mirror.xyz/msfew.eth/WQJaOcFkpTOZLns8MBQaCS4OepRoaZ7uoctnLAnalVw)
Hybrid Rollups adopts a hybrid approach when processing and optimizing L2 transactions. The specific steps are as follows:
1. Initiation and processing of transactions:
Users initiate transactions in L2.
Sequencer receives and processes these transactions, and determines their order in the Canonical Transaction Chain (CTC).
2. State submission and verification:
3. Generation and verification of zero-knowledge proof:
Prover reads data from L1 and generates ZK proof, which is a key feature of Hybrid Rollups, allowing the system to verify the validity of transactions without revealing the specific transaction content.
Once the ZK proof is generated, if it is not submitted on time, the Verifier will initiate the fraud proof process and may punish the Sequencer.
4. Final confirmation of data and status:
Through the smart contract, once the ZK proof is verified, the transaction is finalized.
L1 and L2 are bridged by smart contracts to ensure the secure transfer of funds and status.
The design of Hybrid Rollups provides several significant advantages:
Efficiency and cost-effectiveness: By using ZK proofs, Hybrid Rollups can process more transactions while consuming less gas.
Enhanced security: Combining traditional fraud proofs and ZK proofs, it can ensure the security and correctness of transactions even in the face of potential malicious behavior.
Scalability: Using recursive proofs, Hybrid Rollups can handle large-scale transactions without sacrificing performance, supporting a wider range of blockchain applications.
Compatibility and flexibility: Support for multiple smart contracts and programming languages allows developers to easily migrate existing applications to Hybrid Rollups.
2.2 How zkMIPS achieves good ZK compatibility
The core idea of ZK is to convert the program execution process into a mathematical proof that can be easily verified, so that everyone can easily verify the correctness of the program execution without the need to repeatedly execute the program. The difficulty lies in how to convert arbitrary program logic into a relatively stable mathematical proof.
Developers usually use high-level languages to develop programs, and different high-level languages use different logic to "talk" to hardware.
Therefore, the implementation paths of existing ZK projects are usually incompatible with each other. Scroll directly writes circuits for each opcode of the EVM, achieving opcode-level equivalence, which accurately reflects the EVM, but brings a huge amount of engineering; Polygon zkEVM creates a custom VM with optimized performance, converts EVM bytecode directly into VM bytecode, and achieves opcode-level equivalence more efficiently, but the introduction of a large amount of custom code may deviate from the EVM in the long run; zkSync creates its own VM (SyncVM), defines its own algebraic intermediate representation (AIR) based on registers, and then builds a special compiler to compile Yul (an intermediate language that can be compiled into bytecodes of different EVM versions, considered to be a lower-level Solidity) into LLVM-IR, which is then compiled into instructions for the custom VM, thereby achieving Solidity-level compatibility, but it cannot directly use existing Ethereum tools, and conversion between languages may also require re-auditing the program; StarkNet abandons EVM compatibility and directly uses its own low-level language (Cairo) Run a custom smart contract VM (Cairo VM) to get the ultimate ZK efficiency.
Compared to the solutions of the above projects, ZKM has chosen a more inclusive path: zkMIPS.
MIPS, short for "Microprocessor without Interlocked Pipeline Stages", is a simple microprocessor instruction set that began in 1985.
The basic principle of MIPS is to simplify complex microprocessor instructions to the most basic form, which not only increases processing speed but also reduces the complexity of program execution.
In the zkMIPS system, this instruction set is used to implement the conversion of programs to ZK proofs.
The implementation process of zkMIPS is as follows:
Program to MIPS conversion: First, smart contracts or programs written in high-level programming languages (such as Solidity or Rust) are compiled into the MIPS instruction set. This step is to convert higher-level abstractions into specific operations that can be executed at the hardware level.
Generate ZK proofs: Subsequently, these MIPS instructions are used to generate the corresponding zero-knowledge proofs. Due to the simplified nature of MIPS, this step is more computationally efficient and can produce proofs faster without sacrificing security.
Advantages of zkMIPS
Compatibility: zkMIPS not only supports EVM-compatible Solidity, but also other mainstream development languages such as Rust and Move. This enables zkMIPS to serve a wider blockchain development ecosystem, bringing more application possibilities.
Cost-effectiveness: Due to the efficiency of the MIPS instruction set, zkMIPS can significantly reduce the computing cost when generating zero-knowledge proofs, increasing the overall sustainability of the system.
Recursive proofs: zkMIPS supports recursive proofs, which can aggregate multiple proofs into a more manageable unit, which is crucial in improving system scalability.
In fact, the advantages of MIPS have been integrated by projects such as Optimism. Optimism's Cannon mechanism converts executed programs into MIPS, making it easier and more efficient to find errors and re-execute when the execution process is challenged.
Metis has also followed this trend and integrated Cannon into its ecosystem, which further verifies the practicality and efficiency of zkMIPS technology.
Decentralized Sequencer: Decentralization and Sustainability
In addition to using Hybrid Rollups to combine the advantages of OP and ZK, Metis is also actively promoting the implementation of decentralized Sequencer to set a decentralized example for Rollup.
In the traditional Rollup model, although a single Sequencer can effectively process transactions and data, it also concentrates great power, which may lead to multiple risks:
Operational risk: If the sequencer fails or is attacked, transaction processing of the entire system will be blocked.
Censorship risk: The sequencer has the ability to selectively process or reject transactions, which may limit user access to specific decentralized finance (DeFi) protocols or services.
Manipulation risk: In transaction sorting, the sequencer may give priority to its own transactions and obtain improper benefits, namely the maximum extractable value (MEV), by increasing transaction fees.
To solve the above problems, Metis designed a decentralized Sequencer pool, which consists of multiple Sequencer nodes to jointly complete the aggregation, sorting and execution of transactions. This design ensures the fairness and transparency of the system:
Consensus mechanism: More than two-thirds of the Sequencer nodes must reach a consensus on the status of each new block before the transaction batch can be submitted to the Ethereum mainnet (L1).
Multi-party computation (MPC) signature: Before the transaction batch is submitted to L1, the authenticity of the batch is verified by the MPC signature to ensure the correctness of the data.
Advantages of decentralized sequencers:
Enhanced security: Joint decision-making by multiple nodes reduces the risk of single point failure and increases the robustness and security of the network.
Reduced possibility of censorship and manipulation: The existence of multiple sequencers makes it difficult for a single node to manipulate or censor transactions, protecting the user's trading freedom.
Stability and redundancy: The system supports smooth rotation of sequencers, minimizing the impact of failures or interruptions and improving the stability of the entire network.
In Metis's decentralized Sequencer model, each node consists of several key components:
L2 Geth (including OP-Node): responsible for transaction sorting and block assembly.
Adapter module: acts as an intermediary for interaction with other external modules (mainly PoS nodes).
Batch Proposer: responsible for building transaction batches and submitting them to L1 after obtaining approval from multiple Sequencers.
PoS node: coordinates between Ethereum, consensus, and Metis layers to ensure the safe locking of assets and reward validators.
Consensus layer: Contains a set of Tendermint PoS nodes running in parallel with the Ethereum mainnet, ensuring operational efficiency without hindering the progress of the mainnet.
(Source: https://ethresear.ch/t/pos-sequencer-pool-decentralizing-an-optimistic-rollup/16760)
Through this design, Metis's decentralized Sequencer pool not only improves the fairness and transparency of transaction processing, but also enhances the security and stability of the network by decentralizing power, which are key elements in building a trusted and sustainable blockchain ecosystem.
Summary and Outlook
Metis's advantages in technology and concepts have laid a solid foundation for further development in the future. Its Hybrid Rollups based on zkMIPS are expected to solve the compatibility problem for ZK-Rollup and bring a more diverse developer ecosystem;
The promotion of decentralized sequencers demonstrates the team's vision of pursuing decentralization. As the Metis ecosystem continues to mature, we have reason to believe that Metis will become a dark horse that continues to run in the future L2 competition, creating continuous value for users and developers.