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
74
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
60
Dive into Scroll ZkEVM
alexcj96
0
98
Other Decks in Research
See All in Research
ニューラルネットワークの損失地形
joisino
PRO
35
16k
Global Evidence Summit (GES) 参加報告
daimoriwaki
0
150
大規模言語モデルを用いた日本語視覚言語モデルの評価方法とベースラインモデルの提案 【MIRU 2024】
kentosasaki
2
520
[ECCV2024読み会] 衛星画像からの地上画像生成
elith
1
680
研究の進め方 ランダムネスとの付き合い方について
joisino
PRO
55
19k
Weekly AI Agents News! 8月号 プロダクト/ニュースのアーカイブ
masatoto
1
190
文献紹介:A Multidimensional Framework for Evaluating Lexical Semantic Change with Social Science Applications
a1da4
1
220
テキストマイニングことはじめー基本的な考え方からメディアディスコース研究への応用まで
langstat
1
120
Weekly AI Agents News! 10月号 論文のアーカイブ
masatoto
1
260
「並列化時代の乱数生成」
abap34
3
830
秘伝:脆弱性診断をうまく活用してセキュリティを確保するには
okdt
PRO
3
740
FOSS4G 山陰 Meetup 2024@砂丘 はじめの挨拶
wata909
1
110
Featured
See All Featured
Building Your Own Lightsaber
phodgson
103
6.1k
Documentation Writing (for coders)
carmenintech
65
4.4k
Optimizing for Happiness
mojombo
376
70k
Git: the NoSQL Database
bkeepers
PRO
427
64k
The Cult of Friendly URLs
andyhume
78
6k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Fireside Chat
paigeccino
34
3k
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!