header-langage
简体中文
繁體中文
English
Tiếng Việt
한국어
日本語
ภาษาไทย
Türkçe
Scan to Download the APP

Brief introduction of Scroll zkEVM Solution: How to realize the vision of decentralization?

2023-04-06 15:41
Read this article in 16 Minutes
What mechanism does Scroll implement to inherit the security of Ethereum main network under the premise of decentralization?
原文标题:《 简述 Scroll zkEVM 方案:如何实现去中心化的愿景? 》
Source: Young, Scroll Researcher; Babywhale, Foresight News


At the end of February, Ethereum's Layer 2 network Scroll, based on ZK Rollup, officially launched its Alpha test network open to all users, and said it would improve zkEVM performance in the coming months. Just a week after the launch, Scroll announced that it had raised $50 million at a $1.8 billion valuation from Polychain Capital, Sequoia China and others.


In June 2022, I was writing"Read Scroll in Three Minutes: ZK Rollup"The design framework of Scroll is briefly introduced. Scroll aims to build an "EVM equivalent" zkEVM expansion network to enable seamless migration of applications on Ethereum.


In July, Scroll launched the Pre-Alpha network, which requires application qualification. By the time Alpha launched, the Pre-Alpha network had processed over 15.4 million transactions, confirmed over 1.8 million blocks in total, and submitted 641,000 lot validity certificates. More than 100,000 users participated. Since the opening of Alpha test network, there are about 2,145,099 wallet addresses, about 10,102,684 user transactions have been processed, 886,701 blocks have been generated, and the average block time is about 3 seconds.


In this paper, the author will introduce how Scroll inherits the security of Ethereum main network under the premise of decentralization.


Structure of Scroll


Scroll architecture mainly consists of three parts: node network, proof network and Rollup contract.


Scroll Node network


Scroll node network consists of three parts: Sequencer, Coordinator and Relayer.


Sequencer


Sequencer provides json-RPC (JSON is a lightweight data-exchange format that represents numbers, strings, sequences, and collections of name/value pairs. JSON-RPC is a stateless, lightweight Remote Program Call Protocol (RPC) interface that accepts L2 transactions. Every few seconds, it retrieves a batch of transactions from the L2 mempool and executes them to generate a new L2 block and a new state root. Scroll's sequester implementation forks the widely-used Ethereum node Go Ethereum (Geth) to achieve better compatibility and time-tested security.


Coordinator


Once a new block is generated, the Coordinator is notified and receives an Execution trace of that block from the sequencer. The coordinator then assigns the Execution trace to generate a proof to a randomly selected prover from a decentralized proof network.


Relayer


Relayers are used to observe cross-chain Bridges and Rollup contracts deployed on Ethereum and Scroll. It has two main responsibilities. One is to monitor the Rollup contract and track the status of the L2 block, including its data availability and proof of validity. The second is monitoring the deposit and withdrawal activity of cross-chain bridge contracts deployed on Ethereum and Scroll, and passing messages from one party to the other.


Roller Network


Rollers act as the prover in the network and are responsible for generating validity proofs for ZK Rollup. Roller can take advantage of hardware devices like Gpus, FPGas, and ASics to reduce validation time and costs.


The figure below shows how Roller generates proof of validity for each block, with the following steps:


1. Roller first converts the execution Trace it receives from the coordinator to a circuit witness.

2. Generate a certificate for each zkEVM circuit.

3. Use proof aggregation to combine proofs from multiple zkEVM circuits into a single block proof Rollup and cross-chain contract.



It is worth mentioning that members of the Scroll team stated that Scroll planned to launch the proof network test network before the main network went live. Proving the decentralisation of the network, on the one hand, found temporary use for the GPU miners that had nowhere to put after the Ethereum merger. On the other hand, the incentive of the future main network to the prover may stimulate the development of special chips for zero-knowledge proof, which will eventually be widely adopted by a large number of ZK projects, forming another physical industry chain after Pow ASIC mining machine.


Rollup and cross-chain bridge contracts


Scroll connects to Ethereum through Rollup and cross-chain bridge contracts. This ensures data availability for L2 transactions and allows users to transfer assets and information between L1 and L2.

 

Rollup contract


The Rollup contract receives L2 state roots and blocks from the sequencer. It stores the state root in Ethereum state, with the L2 block data as Ethereum calldata. This provides data availability for Scroll blocks and takes advantage of Ethereum's security to ensure that indexers, including Scroll Repeaters, can recreate L2 blocks. Once proof of the validity of block L2 is verified by the Rollup contract, the corresponding block is considered to have been completed on Scroll.


Cross-chain bridge contract


The cross-link bridge contracts deployed on Ethereum and Scroll allow users to pass arbitrary information between L1 and L2. On top of this messaging protocol, we also built a trust-free cross-chain protocol that allows users to bridge ERC-20 assets in both directions. To send a message or money to Scroll from Ethereum, the user calls the sendMessage transaction on the cross-chain bridge contract. The repeater will index the transaction on L1 and send it to the given sequencer to include it in the L2 block. The process of sending messages from Scroll to Ethereum in L2 is similar to the process described above.


How does Scroll implement ZK Rollup?



The L2 block in Scroll is generated and submitted to Ethereum and is finally completed in the following sequence:


1. The role of the sequencer is to generate blocks. For block i, the sequencer generates Trace: T and sends it to the coordinator. The sequester also submits the transaction data D into the Ethereum contract as CallData, guaranteeing the availability of the data and the resulting state root and commitment to the Rollup contract's transaction data as state.

2. The coordinator will randomly select a prover to generate a validity proof for each Block trace. To speed up the proof generation process, proofs of different blocks can be generated by different provers in parallel.

3. After generating block proof P for block i, the prover sends it back to the coordinator. Every K blocks, the coordinator assigns an aggregation task to another prover, aggregating k block proofs into an aggregation proof A.

4. Finally, the coordinator submits aggregate Proof A to the Rollup contract, and the L2 Block from i+1 to i+k is finally determined by verifying the commitment to the state root and transaction data submitted to the Rollup contract.


The figure above illustrates how the Scroll block will be finally completed on L1 after a multi-step process. Each L2 block will go through the following three stages until it is finalized:


Pre-commit. Precommit indicates that the block has been raised by the sequencer and sent to the prover. Although pre-committed blocks are not yet a canonical part of the Scroll L2 chain, since they are not yet published on Ethereum, users who trust the sequester can choose the actions they expect to take against them.


Submit. The submission indicates that the transaction data for the block has been published on Ethereum's Rollup contract. This ensures the data availability of the block, but does not prove that it is executed in an efficient manner.


The end. The terminal state indicates that the transaction in the block has been executed correctly and has passed the proof of validity on Ethereum. The final completed block is considered the canonical part of the Scroll L2 chain.  


The difference between Scroll and other ZK Rollup schemes

 

Overall, the biggest difference between Scroll and the live mainnet Polygon zkEVM, StarkNet, and zkSync Era is that Scroll is closer to the native Ethereum implementation, making it more user-friendly for EVM developers.


Scroll vs Polygon zkEVM


There are some technical differences in their implementation. One is that Scroll direct fork is widely used Ethereum node implementation Geth generated Layer2 block, close to the native Ethereum implementation. Scroll designs different subcircuits to prove that Geth performs each opcode in the trace, and it's easier to verify that the circuit has exactly the same behavior as native Ethereum. Polygon zkEVM, on the other hand, overwrites each EVM opcode in new assembly language, then generates proofs for its underlying state machine.


Another difference is that Scroll uses SNARK for both zkEVM circuits and polymerization circuits. Polygon zkEVM is proof of using STARK as their zkEVM circuit and SNARK as the polymerization circuit to aggregate STARK.


Scroll vs StarkNet

 

In contrast to StarkNet, Scroll aims for EVM equivalence and wants a native zkEVM solution to achieve bytecode level compatibility and be more friendly to Ethereum developers; StarkNet is a ZK-friendly solution that is not developer-friendly. Therefore, setting up a developer and project ecosystem for StarkNet has some learning costs and challenges.


Scroll vs zkSync


zkSync is EVM-compatible at the language level compared to Scroll's EVM bytecode level, so for smart contract developers, additional trust is required to deploy compilers with BlackBlox, as well as more time to conduct security audits.


Scroll's dream of decentralization

 

Zhang Ye, a member of the Scroll team, published a paper calledThe Idea Behind Scroll". This article describes in detail the vision of Scroll: In addition to the Scroll project itself, the team hopes to contribute to Ethereum's zkEVM research.


Scroll made the decision to work with the community from the very beginning and has continued to do so, including community-driven development of zkEVM, public education on zero-knowledge proof, and maintaining the Python version of the zkEVM specification.


In addition to the above aspects of community-based operation, Scroll also emphasizes more aspects of decentralization, including sequencer, prover and so on. In general, Scroll hopes to become a protocol similar to Ethereum, which has a core development team but is still open at the underlying technology and infrastructure level, and ultimately promotes the flourishing development of zkEVM ecology and the compatibility of main network with zkEVM, as well as the ultimate goal of Ethereum Layer 1 itself.


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

举报 Correction/Report
This platform has fully integrated the Farcaster protocol. If you have a Farcaster account, you canLogin to comment
Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit