Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Unofficial Scroll ZK EVM Code Review
Search
Cheng JIANG
September 15, 2023
Research
0
72
Unofficial Scroll ZK EVM Code Review
Cheng JIANG
September 15, 2023
Tweet
Share
More Decks by Cheng JIANG
See All by Cheng JIANG
XCM_V2概览与去中心化的Liquid_Staking方案.pdf
alexcj96
0
59
Dive into Scroll ZkEVM
alexcj96
0
97
Other Decks in Research
See All in Research
MetricSifter:クラウドアプリケーションにおける故障箇所特定の効率化のための多変量時系列データの特徴量削減 / FIT 2024
yuukit
2
110
12
0325
0
110
Kaggle役立ちアイテム紹介(入門編)
k951286
13
4.5k
20240918 交通くまもとーく 未来の鉄道網編(太田恒平)
trafficbrain
0
160
Weekly AI Agents News! 8月号 論文のアーカイブ
masatoto
1
160
機械学習による言語パフォーマンスの評価
langstat
6
680
TransformerによるBEV Perception
hf149
1
380
20240918 交通くまもとーく 未来の鉄道網編(こねくま)
trafficbrain
0
170
Weekly AI Agents News!
masatoto
24
22k
第60回名古屋CV・PRMU勉強会:CVPR2024論文紹介(Vision Transformer)
waka_90b
1
200
RSJ2024「基盤モデルの実ロボット応用」チュートリアルA(河原塚)
haraduka
2
620
Y.Morita_20240726_JBUG_Fukuoka#18
ymorita613
0
270
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Faster Mobile Websites
deanohume
304
30k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
We Have a Design System, Now What?
morganepeng
50
7.2k
For a Future-Friendly Web
brad_frost
175
9.4k
The Language of Interfaces
destraynor
154
24k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
32
1.8k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Why You Should Never Use an ORM
jnunemaker
PRO
53
9k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Transcript
Unofficial Scroll ZK EVM Code Review https://linktr.ee/alexcj96
Summary - Why ZK EVM works? - Architecture - Tech
stack comparaison - Arithmetization - Trace generation - Gate configuration - Circuit tools - Some opcode gadgets - Public input circuit - Synthesize - Combining with halo2 - Observation
Why ZK EVM works? ❖ EVM is a State Machine
❖ Public-key cryptography ➢ Verify txs all represent users' intention ❖ Blockchain consensus ➢ Verifier ➢ Previous state root ❖ MPT ➢ Verify initial state ➢ Verify new root ❖ ZK ➢ Succinctness ➢ Lookup Arguments ❖ Ethereum as a DA Layer
Architecture
Tech stack comparaison
Arithmetization
Trace generation - flow (scroll has simplified this)
Trace generation - types (simplified)
Gate configuration - flow
Gate configuration - gadgets Add cb constraints etc
Gate configuration - lookup
Circuit tools - cell manager
Circuit tools - constraint builder
Circuit tools - constraint builder
Circuit tools - utils
Some opcode gadgets - AddSub
Some opcode gadgets - ReturnRevert (simplified)
Public input circuit
Public input circuit
Synthesize
Combining with halo2
Combining with halo2
Observation - Scroll doesn’t support self destruct EVM opcode -
Scroll’s MPT tree uses poseidon circuit - Scroll uses chain_id and block_number to calculate block_hash!!! - Scroll still uses SuperCircuit which is very zk-unfriendly - Don’t read PSE’s code, it’s not production ready!!! - …
Thanks!