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
48
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
32
Dive into Scroll ZkEVM
alexcj96
0
72
Other Decks in Research
See All in Research
DeepCrysTet: A Deep Learning Approach Using Tetrahedral Mesh for Predicting Properties of Crystalline Materials
tsurubee
0
380
First Authorに俺はなるっ!! IROS’23 CCC2023 FY
shota_nishiyama
0
180
データで診て考える合志市の渋滞と公共交通 ~めざせ 車1割削減、渋滞半減、公共交通2倍~
trafficbrain
0
470
リサーチに組織を巻き込むための「準備8割」の話
terasho
0
470
CVPR2023 EarthVision Workshopより衛星画像関連論文紹介 / Satellite Imaging Processing Papers in CVPR2023 EarthVision Workshop
nttcom
0
130
Azure Arc-enabled Serversを利用した ハイブリッド・マルチクラウド環境の管理 / Managing Hybrid Multi-cloud Environments with Azure Arc-enabled Servers
nttcom
0
220
音声処理ツールキットESPnetの現在と未来
kanbayashi1125
3
560
眠眠ガチャ:ガチャを活用した睡眠意欲向上アプリの開発 / EC71inui
yumulab
1
160
第12回全日本コンピュータビジョン勉強会:画像の自己教師あり学習における大規模データセット
naok615
0
530
プロシェアリング白書2024_PROSHARING_REPORT_2024
circulation
0
670
サウナでのプロジェクションマッピングの可能性の検討 / EC71koizumi
yumulab
0
190
センサデータを活用した 肌質改善への支援システムに関する研究
comfortdesignlab
0
170
Featured
See All Featured
The Invisible Side of Design
smashingmag
294
49k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
7
3.4k
Creatively Recalculating Your Daily Design Routine
revolveconf
211
11k
Why Our Code Smells
bkeepers
PRO
331
56k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
126
32k
For a Future-Friendly Web
brad_frost
172
9k
KATA
mclloyd
16
12k
What's new in Ruby 2.0
geeforr
337
31k
Code Reviewing Like a Champion
maltzj
515
39k
Side Projects
sachag
451
41k
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!