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
Weekly AI Agents News! 7月号 プロダクト/ニュースのアーカイブ
masatoto
0
150
RCEへの近道
kawakatz
1
800
「確率的なオウム」にできること、またそれがなぜできるのかについて
eumesy
PRO
7
3k
TransformerによるBEV Perception
hf149
1
380
Weekly AI Agents News! 9月号 論文のアーカイブ
masatoto
1
100
工学としてのSRE再訪 / Revisiting SRE as Engineering
yuukit
19
11k
機械学習でヒトの行動を変える
hiromu1996
1
200
3次元点群の分類における評価指標について
kentaitakura
0
320
Generative Predictive Model for Autonomous Driving 第61回 コンピュータビジョン勉強会@関東 (後編)
kentosasaki
0
200
Weekly AI Agents News! 8月号 プロダクト/ニュースのアーカイブ
masatoto
1
170
大規模言語モデルのバイアス
yukinobaba
PRO
4
670
Weekly AI Agents News! 10月号 論文のアーカイブ
masatoto
1
140
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
88
5.7k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
107
49k
Automating Front-end Workflow
addyosmani
1365
200k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
27
1.9k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
GraphQLの誤解/rethinking-graphql
sonatard
66
9.9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
Gamification - CAS2011
davidbonilla
80
5k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
790
4 Signs Your Business is Dying
shpigford
180
21k
Why Our Code Smells
bkeepers
PRO
334
57k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
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!