風險提示:防範以"虛擬貨幣""區塊鏈"名義進行非法集資的風險。——銀保監會等五部門
資訊
發現
搜索
登錄
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt
BTC
ETH
HTX
SOL
BNB
查看行情
STARK深度解析
Sin7y
特邀专栏作者
2022-09-18 03:59
本文約1767字,閱讀全文需要約3分鐘
本文將主要從代碼層面剖析STARK算法的實現過程,幫助大家對STARK算法有更深入的理解。

Step1. Build trace (fib2-example)

標紅部分為Public info

Step2. Prover for Trace

協議參數選取:

二級標題

二級標題

二級標題

2.驗證AIR和Trace的一致性(Debug模式)

2.3 校驗Trace滿足transition cs(Debug module)

Transcript

3.Commit for trace

二級標題

3.1 Interpolate -> LDE -> evaluate over LDE-domain

3.2 Commitment

Tracescript

4.Evaluate CS

二級標題

二級標題

4.1 獲取線性組合係數

係數個數和約束的個數一致

4.2.1 t-cs

4.2.2 b-cs

4.3 Evaluate t/s-cs over ce_domain

二級標題

5 Commitment to Evaluate CS

二級標題

5.2 commitment to composition poly

Example:

Compose_poly = a * x^3 + b * x^2 + c * x + d = (a * x^2 + c) * x^ + (b * x^2 + d)

(a * x^2 + c),二級標題

二級標題

The general formal: f(x) = q(x)* t(x)

Need check at random z

1. f(z) = q(z) * t(z)

2. f(x),q(x),t(x) indeed equal respectively f(z), q(z), t(z)

3. calculate Deep_composition = (q(x) - q(z)) / (x - z)

4. Check LDT for q_q(x)

6.1 select z which out of domain(ood)

draw an out-of-domain point z. Depending on the type of E, the point is drawn either from the base field or from an extension field defined by E.

The purpose of sampling from the extension field here (instead of the base field) is to increase security.

6.2 evaluate trace and constraint polynomials at the OOD point z

6.2.1 trace_poly at z & z * g

6.2.2 composition poly at z

二級標題

6.3.1 產生隨機數

6.3.2 cal quotient poly

6.4 evaluate Deep over LDE

二級標題

二級標題

二級標題

二級標題

9.構建proof對象

9.2 query trace poly at above positions

9.1 生成FRI proof

9.3 query constraint poly at above positions

9.1 生成FRI proof

9.4 構建STARK PROOF

Step3. Verify for proof

從transcript中讀取pub-info,用來獲取相關的數據,以執行驗證過程。

1. Ood consistency check

驗證章節5.2描述的數學關係的一致性。

二級標題

二級標題

Sin7y成立於2021年,由頂尖的區塊鏈開發者組成。我們既是項目孵化器也是區塊鏈技術研究團隊,探索EVM、Layer2、跨鏈、隱私計算、自主支付解決方案等最重要和最前沿的技術。

Sin7y成立於2021年,由頂尖的區塊鏈開發者組成。我們既是項目孵化器也是區塊鏈技術研究團隊,探索EVM、Layer2、跨鏈、隱私計算、自主支付解決方案等最重要和最前沿的技術。

關於我們

Sin7y成立於2021年,由頂尖的區塊鏈開發者組成。我們既是項目孵化器也是區塊鏈技術研究團隊,探索EVM、Layer2、跨鏈、隱私計算、自主支付解決方案等最重要和最前沿的技術。

微信公眾號:Sin7Y

GitHub | Twitter | Telegram | Medium| Mirror | HackMD | HackerNoon

基礎知識
AI總結
返回頂部
本文將主要從代碼層面剖析STARK算法的實現過程,幫助大家對STARK算法有更深入的理解。
作者文庫
Sin7y
下載Odaily星球日報app
讓一部分人先讀懂 Web3.0
IOS
Android