Understanding the Technology Stack and Transaction Process of Scroll in One Read
Comprehending Scroll's Technology Stack and Transaction Process in a Single ReadAuthor: Francesco, Castle Capital; Translator: LianGuaixiaozou
On October 10th, Scroll released a mysterious announcement, declaring the launch of its mainnet. Apart from farming airdrops, I wasn’t fully aware of this. So, I decided to dig deeper!
Let’s first understand Scroll. Scroll is an Ethereum scaling solution: a Layer 2 (L2) general-purpose zero-knowledge (zk) rollup. Sounds fancy, right? Let’s take a closer look.
As an L2 rollup running on Ethereum, Scroll incorporates native ETH security.
- Electric Capital Developer Ecosystem Analysis for 2023 from 164 million records
- Before exploring the applications of the TON ecosystem, how to create and use a TON wallet?
- Boom in Metaverse Education Many overseas schools join the Metaverse
In addition to security, Scroll seamlessly integrates with the rich Ethereum ecosystem:
– Tools
– dApps
– Smart contracts
– User communities
This approach effortlessly facilitates the transfer and interchangeability of these resources, ensuring unparalleled EVM compatibility. “For users and developers, Scroll is almost equivalent to Ethereum.”
Prior to the existence of Scroll, there was no general-purpose zk rollup primarily due to the complexity of generating zk proofs for Ethereum Virtual Machine (EVM) computations. In simple terms, a general rollup means having EVM-equivalent functionality.
However, successfully running an EVM environment on zk rollup has always been a challenging objective. It is attributed to the complexity of transforming EVM transactions into logical circuits that can be interpreted by zk proofs. This complexity also explains why zk rollup projects have mostly focused on specific applications, such as dYdX focusing on trading and ImmutableX focusing on NFTs.
Due to technical difficulties, a universal network capable of deploying various dApps could not be developed. This is also why zk-rollup has underperformed compared to optimistic rollup (like Immutable) in terms of TVL (Total Value Locked) and user count.
Despite these challenges, exploration of general zk rollup continues. EVM compatibility is crucial because it greatly simplifies the work required for developers to transition to a new chain.
Transitioning to a non-EVM chain means:
– Existing contracts have to be migrated and rewritten for the new rollup.
– Lack of support from existing EVM tools (libraries, wallets, markets, etc.).
– Inability to support applications from the Ethereum ecosystem.
Several rollups have taken on the task of a general zk EVM, each with varying degrees of EVM compatibility.
Comparison of the top five zkEVMs:
(1) Starknet and zkSync (language-level):
These are currently dedicated solutions being run using our own custom virtual machine (Cairo VM). They run a custom VM and have created a compiler, the “Warp Transpiler,” which compiles Solidity code into Cairo VM bytecode.
What they’re doing is creating a new VM and adding Ethereum tooling support on top of it as an additional layer. This still achieves the goal of exporting Solidity contracts to StarkNet, thereby achieving “EVM compatibility.”
While not direct EVM execution, it retains compatibility, allowing Solidity developers to write code for their rollups. It’s a nice compromise.
(2) Polygon zk-EVM (bytecode-level):
Polygon runs a custom VM but has mapped all EVM opcodes to opcodes that are effective for its VM. Polygon’s approach is to build a zkEVM with “opcode-level equivalence.”
Compared to Scroll, Polygon has an alternative runtime called zkExecutor, which runs custom “zkASM” opcodes instead of directly executing EVM opcodes. This is done to optimize EVM interpretation (as directly proving EVM would have too many restrictions).
Below is an illustration of this process:
While this configuration is more performant than Scroll, it introduces a significant amount of custom code (to create zkASM), potential requirements to modify code or tools for compatibility, and over time may diverge more from Ethereum.
(3) Scroll (bytecode-level):
It directly transforms EVM execution into verifiable circuits, with advantages in terms of tooling support and compatibility. Currently, Scroll does not support all EVM opcodes, but they plan to eventually achieve this over time.
How does Scroll’s tech stack work?
Scroll is a zk rollup and has a smart contract on ETH L1 acting as a zkEVM proof verifier to verify the security of the Scroll protocol.
How are transactions conducted on Scroll?
· Scroll has the ability to batch blocks and write block data to Ethereum.
· Once the proof of validity is generated in a new block, the proof is written into Ethereum.
Therefore, the blocks on Scroll can have three states:
· Pre-commit: proposed by the sorter and included in Scroll.
· Committed: transaction data published on Ethereum.
· Finalized: the correct execution has been confirmed by the validity proof published on Ethereum.
The transaction process is as follows:
(1) The transactions flowing from the sorter are bundled and packed into a block (1).
(2) Data and calling data are submitted to the rollup contract on L1, and the block is submitted (D1).
(3) Proof generation: pass the information to the coordinator (the “trace” of completed work), then pass it to the prover, and then generate zk proof by the prover.
(4) Proof generation can occupy multiple blocks and can be executed in parallel by different “provers”.
(5) Aggregating proof generation: proofs are generated and aggregated in batches, and then submitted to the chain for verification (Verify).
(6) Block finalization is completed.
Transactions > processed by nodes running Geth fork > execute trace > input to zkEVM circuit > generate proof > input into the collection, indicating the proof is valid > generate aggregated proof > send to L1 contract.
Why choose Scroll?
· Developer-centered: provides bytecode equivalent to EVM.
· Efficiency: creates a more secure block space for Ethereum, reducing gas fees.
· Speed: optimizes block time (3 seconds vs Ethereum’s 12 seconds).
· Consistent with Ethereum’s vision.
Since Scroll was released, it has accumulated over $1.5 million TVL.
Over 1383 users have bridged ETH on Scroll.
Over 975 ETH have been bridged to the Scroll mainnet, totaling $1.5 million.
A few thoughts:
ZK rollup is seen as a design superior to its optimistic rollup competitor, especially in terms of privacy, as it has no withdrawal delays due to the lack of fraud proofs.
As a bytecode-compatible general-purpose zk rollup, Scroll promises to provide the benefits of zk proofs on L2 without affecting the network effects and tools of the EVM.
Being fully compatible with the EVM is the holy grail of L2, and that’s Scroll’s value proposition: Ethereum on steroids. Scroll’s bytecode compatibility blends all the advantages of zk proofs into Ethereum with maximum compatibility.
It is also worth noting that Scroll is committed to decentralization. Although there will be a central sequencer in the initial stages, decentralized plans are in progress. Additionally, all zk proofs will eventually be created by a decentralized “prover” network.
We will continue to update Blocking; if you have any questions or suggestions, please contact us!
Was this article helpful?
93 out of 132 found this helpful
Related articles
- Conference Guide ETH Hong Kong Opening Countdown! Overview of Surrounding Activities Schedule (Continuously Updated)
- The Battle Against Bots: Can Social App X’s $1 Charge Make a Dent?
- Scaling Solutions in the Ethereum Ecosystem: A Developer’s Tale 🚀
- Schrodinger’s Words Dialogue is Creation, On-chain is Manifestation
- Scroll Talk #1 Scroll and ZK Take the Journey Together
- The Crypto Influencer Drama: Bitmama and the Queen of Crypto
- From team-building vacations to ruthless layoffs Exposing the insider story of Poka’s layoffs, comparable to ‘The Hunger Games