Understanding the Technology Stack and Transaction Process of Scroll in One Read

Comprehending Scroll's Technology Stack and Transaction Process in a Single Read

Author: 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.

3BwaX61RXgYWgOajov0oviaGFFCMbgk1jpWKIn7J.png

 

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:

LSM86T62BM2YWEonkmazzYQgUB81TyIlC7h4V56b.png

 (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.

f0mw065oU22uQaoAHUgGeTVnIuusPnGXMr4NmvGg.png

 

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).

dBbRwBMW3X9X60RcwaEGFU8IMej4H3NDmzNcyA0Z.png

Below is an illustration of this process:

ImageWhile 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.

qTtHQfu0A2TL4Es1o7GUr4SLTmX84fXexBThP2qS.png

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.

epGWjBUK3UM7PGzW3TTnIyS4d6U3HZJbQvUsFlLU.png

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.

puMNkVFi6Mo0fvYN2CHi2b2rRLTtF0EqJCoIngKl.png

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).

MGHpIZI5tIrmUyZ1wFO8IBBlPkjPyGlTqJ0xcorf.png

(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”.

MGHpIZI5tIrmUyZ1wFO8IBBlPkjPyGlTqJ0xcorf.png

(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.

MGHpIZI5tIrmUyZ1wFO8IBBlPkjPyGlTqJ0xcorf.png

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.

06C4j68uFveOkp0nMwVLSpTuyfAXMdopOz20qFnZ.png

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.

vCuWn8SHO3ImoVojqdZZFz2pGcwxd48sHxKgodq3.png

Over 1383 users have bridged ETH on Scroll.

CNorvLElukNCBx1rRFpChYL2NCMY930sRNSRhu6F.png

Over 975 ETH have been bridged to the Scroll mainnet, totaling $1.5 million.

dAgVuhJqXcFf5kWAWhE7dpO8TwJUU01FWGaOYDqo.png

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!

Share:

Was this article helpful?

93 out of 132 found this helpful

Discover more

Blockchain

XRP Price Predictions: Will It Surpass Its All-Time High?

Experts are optimistic about the potential rise in value for XRP, with numerous analysts forecasting that it could su...

Market

Grayscale CEO Strikes Optimistic Chords, Anticipating Bitcoin ETF Approval Following Encouraging Discussions with SEC

Get ready, Fashionistas! Grayscale CEO Michael Sonnenshein has exciting news to share as we all anxiously anticipate ...

Market

UBS Joins the Crypto Party: Following HSBC’s Lead

UBS Group, the Swiss investment bank, will now allow exclusive high-earners in Hong Kong to invest in crypto-connecte...

Market

Spot BTC ETFs: Bullish Momentum Amidst BTC’s Pullback

The popularity and success of Spot BTC ETFs is evident in its continuous increase of net inflows, even in light of BT...

Market

Huobi Token (HT) soars to new heights as trading volume skyrockets!

Great news for cryptocurrency enthusiasts! The popular exchange HTX's native token, Huobi Token (HT), recently hit a ...

Blockchain

🏎️ Enhancing the Excitement: Wingalaxy Revs Up the Racing Game on the Cronos Blockchain 🏁

Wingalaxy has recently announced the launch of their first race-to-win game on the Cronos blockchain, specifically de...