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
55
Dive into Scroll ZkEVM
alexcj96
0
95
Other Decks in Research
See All in Research
論文紹介/Expectations over Unspoken Alternatives Predict Pragmatic Inferences
chemical_tree
1
230
Kaggle役立ちアイテム紹介(入門編)
k951286
13
4k
WikipediaやYouTubeにおける論文参照 / joss2024
corgies
1
240
LLMとの共同執筆は文章の多様性を減らすか?
kuri8ive
4
800
アジャイルコミュニティが、宗教ポイと云われるのは何故なのか?
fujiihideo
0
350
snlp2024_multiheadMoE
takase
0
330
Minimum Bayes-Risk Decoding における性能変動の理解に向けて(2024年6月5日 第59回 NLPコロキウム)
atsumoto
0
310
Weekly AI Agents News! 6月号 プロダクト/ニュースのアーカイブ
masatoto
0
110
20240725異文化融合研究セミナーiSeminar
tadook
0
120
LINEチャットボット「全力肯定彼氏くん(LuC4)」の 1年を振り返る
o_ob
0
1.4k
SSII2024 [PD] SSII、次の30年への期待
ssii
PRO
2
1.4k
大規模言語モデルのバイアス
yukinobaba
PRO
4
460
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
48
10k
The Mythical Team-Month
searls
218
43k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Atom: Resistance is Futile
akmur
261
25k
Clear Off the Table
cherdarchuk
91
320k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
89
16k
Faster Mobile Websites
deanohume
304
30k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
8.9k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
29
2.6k
A better future with KSS
kneath
235
17k
Automating Front-end Workflow
addyosmani
1365
200k
The Illustrated Children's Guide to Kubernetes
chrisshort
47
48k
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!