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
78
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
65
Dive into Scroll ZkEVM
alexcj96
0
98
Other Decks in Research
See All in Research
移動ビッグデータに基づく地理情報の埋め込みベクトル化
tam1110
0
160
2024/10/30 産総研AIセミナー発表資料
keisuke198619
1
380
marukotenant01/tenant-20240826
marketing2024
0
520
ソフトウェア研究における脅威モデリング
laysakura
0
950
Neural Fieldの紹介
nnchiba
1
410
打率7割を実現する、プロダクトディスカバリーの7つの極意(pmconf2024)
geshi0820
0
130
熊本から日本の都市交通政策を立て直す~「車1割削減、渋滞半減、公共交通2倍」の実現へ~@公共交通マーケティング研究会リスタートセミナー
trafficbrain
0
180
Embers of Autoregression: Understanding Large Language Models Through the Problem They are Trained to Solve
eumesy
PRO
7
1.2k
大規模言語モデルのバイアス
yukinobaba
PRO
4
760
医療支援AI開発における臨床と情報学の連携を円滑に進めるために
moda0
0
120
20240918 交通くまもとーく 未来の鉄道網編(こねくま)
trafficbrain
0
340
VisFocus: Prompt-Guided Vision Encoders for OCR-Free Dense Document Understanding
sansan_randd
1
350
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
98
Designing for Performance
lara
604
68k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Documentation Writing (for coders)
carmenintech
66
4.5k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
A Tale of Four Properties
chriscoyier
157
23k
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!