Background Introduction
On April 10th, A16z Crypto released Jolt, a zero-knowledge solution, to accelerate and simplify blockchain scaling operations.
Jolt integrates SNARK (Non-Interactive Zero-Knowledge Proof), which allows developers to quickly create SNARK-based L2 solutions. The team also claims that Jolt is twice as fast as current zkVMs.
ZK technology is one of the main themes in the encryption industry, and ZK-Rollup is considered a long-term solution for Ethereum scalability by Vitalik. A16z’s release of Jolt from August last year to the official launch this year indicates that ZK-Rollup is still a challenging task.
ZK-Rollup has attracted many players, and different technical categories have been created to distinguish the differences between projects. Compatibility with EVM is the most representative classification criterion.
Due to historical reasons, EVM has many ZK-unfriendly designs. However, many existing projects were built based on EVM in the early stages, and ZK-Rollup is still considered a future scaling solution. Therefore, most ZK-Rollup projects naturally face the trade-off between being more compatible with EVM or more compatible with ZK.
Incubated by Metis DAO, ZKM takes a more fundamental approach and proposes the universal zkMIPS solution.
By using a more fundamental MIPS instruction set, zkMIPS converts the program execution process into ZKP, which is compatible not only with EVM but also with other VMs such as MoveVM and RustVM, allowing ZK-Rollup to be open to a more diverse range of developers.
This article will provide readers with an in-depth understanding of Metis’ efforts and progress in ZK and decentralized Sequencer.
ZKM and Hybrid Rollups: Harmonizing OP and ZK
Metis has achieved remarkable performance in the market, thanks to its innovative Hybrid Rollups mechanism, which combines fraud proofs and validity proofs to enjoy the benefits of both.
ZKM’s zkMIPS technology provides solid compatibility support for Metis’ Hybrid Rollups, enabling the organic integration of ZK and EVM.
2.1 Mechanism and Advantages of Hybrid Rollups
In Hybrid Rollups, key roles include:
Sequencer: Responsible for receiving and processing user transactions, determining the optimal order of transactions, and packaging and releasing 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 roots on the Rollup chain to ensure transaction correctness and prevent fraud.
In a standard L2 solution, the Sequencer collects and processes transactions and then publishes the transaction data to the Ethereum mainnet (L1). This process requires final data validation and confirmation by L1 to ensure security and consistency.
(Source: https://mirror.xyz/msfew.eth/WQJaOcFkpTOZLns8MBQaCS4OepRoaZ7uoctnLAnalVw)
Hybrid Rollups take a mixed approach to handling and optimizing L2 transactions, with the following steps:
1. Transaction initiation and processing:
Users initiate transactions on L2.
The Sequencer receives and processes these transactions, determining their order in the Canonical Transaction Chain (CTC).
2. State submission and validation:
Proposers evaluate the transactions and submit the state roots to the SCC.
Verifiers review the state roots in the SCC to ensure their accuracy.
3. Generation and validation of zero-knowledge proofs:
Provers read data from L1 and generate ZK proofs. This is a key feature of Hybrid Rollups, allowing the system to verify transaction validity without revealing specific transaction content.
Once the ZK proofs are generated, if not submitted on time, Verifiers initiate fraud proof processes, which may result in penalties for the Sequencer.
4. Final confirmation of data and state:
Through smart contracts, once the ZK proofs are verified, the transactions are finalized.
A smart contract bridge between L1 and L2 ensures the secure transfer of funds and states.
The design of Hybrid Rollups offers several significant advantages:
Efficiency and cost-effectiveness: By using ZK proofs, Hybrid Rollups can process more transactions while consuming less gas.
Enhanced security: By combining traditional fraud proofs and ZK proofs, transactions are secured and verified even in the presence of potential malicious behavior.
Scalability: By utilizing recursive proofs, Hybrid Rollups can handle large-scale transactions without sacrificing performance, supporting a wider range of blockchain applications.
Compatibility and flexibility: Supporting multiple smart contracts and programming languages, developers can easily migrate existing applications to Hybrid Rollups.
2.2 How zkMIPS Achieves Good ZK Compatibility
The core idea of ZK is to transform the program execution process into mathematically verifiable proofs, allowing anyone to easily verify the correctness of program execution without the need to repeat the execution. The challenge lies in how to transform arbitrary program logic into relatively stable mathematical proofs.
Developers typically use high-level languages for program development, and different high-level languages “communicate” with logic and hardware differently.
Therefore, the implementation paths of existing ZK projects are often incompatible with each other. Scroll directly writes circuits for each opcode of EVM, achieving opcode-level equivalence that accurately reflects EVM but requires significant engineering effort.
Polygon zkEVM creates a custom VM optimized for performance, directly converting EVM bytecode into VM bytecode, achieving opcode-level equivalence more efficiently. However, the introduction of a large amount of custom code may deviate from EVM in the long run.
zkSync creates its own VM (SyncVM) and defines its algebraic intermediate representation (AIR) based on registers. It then builds a dedicated compiler to compile Yul (an intermediate language that can be compiled into bytecode for different EVM versions and is considered a lower-level Solidity) into LLVM-IR and further compiles it into instructions for the custom VM, achieving Solidity-level compatibility. However, it cannot directly use existing Ethereum tools, and language conversion may require program re-auditing.
StarkNet abandons EVM compatibility and directly uses its low-level language (Cairo) to run a custom smart contract VM (Cairo VM) for maximum ZK efficiency.
Compared to the solutions of the above projects, ZKM chooses a more inclusive path: zkMIPS.
MIPS, short for “Microprocessor without Interlocked Pipeline Stages,” is a design-simplified microprocessor instruction set that originated in 1985.
The basic principle of MIPS is to simplify complex microprocessor instructions to their most basic form, which improves processing speed and reduces program execution complexity.
In the zkMIPS system, this instruction set is used to convert programs into 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 MIPS instruction set. This step converts higher-level abstractions into specific operations that can be executed at the hardware level.
Generation of ZK proofs: The MIPS instructions are then used to generate corresponding zero-knowledge proofs. Due to the simplified nature of MIPS, this step is computationally more efficient, allowing faster generation of proofs without sacrificing security.
Advantages of zkMIPS:
Compatibility: zkMIPS supports not only EVM-compatible Solidity but also other mainstream development languages such as Rust and Move. This enables zkMIPS to serve a wider blockchain development ecosystem, creating more possibilities for applications.
Cost-effectiveness: Due to the efficiency of the MIPS instruction set, zkMIPS significantly reduces computational costs 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, crucial for improving system scalability.
In fact, the advantages of MIPS have already been integrated into projects like Optimism. Optimism’s Cannon mechanism converts executed programs into MIPS, making it easier and more efficient to search for errors and re-execute when the execution process is challenged.
Metis has also followed this trend and integrated Cannon into its ecosystem, further validating 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 actively promoting the implementation of decentralized Sequencers to establish a decentralized benchmark for Rollups.
In traditional Rollup models, although a single Sequencer can effectively process transactions and data, it also concentrates significant power, which may lead to various risks:
Operational risk: If the Sequencer fails or is attacked, transaction processing for the entire system will be disrupted.
Censorship risk: The Sequencer has the ability to selectively process or reject transactions, which may restrict user access to specific decentralized financial (DeFi) protocols or services.
Manipulation risk: In transaction ordering, the Sequencer may prioritize its own transactions and gain undue benefits by increasing transaction fees, known as Maximum Extractable Value (MEV).
To address these issues, Metis has designed a decentralized Sequencer pool consisting of multiple Sequencer nodes that collaborate to aggregate, order, and execute transactions. This design ensures the fairness and transparency of the system:
Consensus mechanism: More than two-thirds of Sequencer nodes must reach consensus on the state of each new block before submitting transaction batches to the Ethereum mainnet (L1).
Multi-Party Computation (MPC) signatures: Before the transaction batches are submitted to L1, MPC signatures are used to verify the authenticity of the batches, ensuring data accuracy.
Advantages of Decentralized Sequencer:
Enhanced security: By making decisions collectively among multiple nodes, the risk of a single point of failure is reduced, increasing the robustness and security of the network.
Reduced potential for censorship and manipulation: The presence of multiple Sequencers makes it difficult for a single node to manipulate or censor transactions, protecting the freedom of user transactions.
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’ decentralized Sequencer model, each node consists of several key components:
L2 Geth (including OP-Node): Responsible for transaction ordering and block assembly.
Adapter module: Acts as an intermediary for interacting with other external modules, primarily PoS nodes.
Batch proposer: Responsible for building transaction batches and submitting them to L1 after obtaining consensus from multiple Sequencers.
PoS nodes: Coordinate between Ethereum, consensus, and Metis layers to ensure the secure locking of assets and reward validators.
Consensus layer: Consists of a set of Tendermint PoS nodes running in parallel with the Ethereum mainnet, ensuring operational efficiency without impeding the progress of the mainnet.
(Source: https://ethresear.ch/t/pos-sequencer-pool-decentralizing-an-optimistic-rollup/16760)
With this design, Metis’ decentralized Sequencer pool not only enhances the fairness and transparency of transaction processing but also enhances the security and stability of the network through power decentralization. These are key elements in building a trusted and sustainable blockchain ecosystem.
Conclusion and Outlook
Metis’ technological and conceptual advantages lay a solid foundation for future development. Its zkMIPS-based Hybrid Rollups are expected to address compatibility issues in ZK-Rollup, bringing a more diverse developer ecosystem.
The advancement of decentralized Sequencers demonstrates the team’s vision for decentralization. As Metis’ ecosystem continues to mature, we have reason to believe that Metis will be a sustained dark horse in the future competition of L2, creating continuous value for users and developers.