TRA:STARK深度解析-ODAILY

Step1.Buildtrace

标红部分为Publicinfo

Step2.ProverforTrace

协议参数选取:

1.AIR实例化

2.验证AIR和Trace的一致性

2.1校验基础参数

2.2校验assertion有效(boundarycs)

2.3校验Trace满足transitioncs

Transcript

3.Commitfortrace

域参数选取:

3.1Interpolate->LDE->evaluateoverLDE-domain

3.2Commitment

Tracescript

4.EvaluateCS

4.1获取线性组合系数

系数个数和约束的个数一致

在本例中,transitioncs2个;boundarycs3个

4.2为t-cs和b-cs构建evaluator

4.2.1t-cs

4.2.2b-cs

4.3Evaluatet/s-csoverce_domain

4.3.1定义evaluatortable

5CommitmenttoEvaluateCS

5.1建立constraintscompositionpolynomial

5.2commitmenttocompositionpoly

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),(b*x^2+d)分别对应两个column

6.建立DEEPcomposition多项式

Thegeneralformal:f(x)=q(x)*t(x)

Needcheckatrandomz

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

2.f(x),q(x),t(x)indeedequalrespectivelyf(z),q(z),t(z)

3.calculateDeep_composition=(q(x)-q(z))/(x-z)

4.CheckLDTforq_q(x)

6.1selectzwhichoutofdomain(ood)

drawanout-of-domainpointz.DependingonthetypeofE,thepointisdrawneitherfromthebasefieldorfromanextensionfielddefinedbyE.

Thepurposeofsamplingfromtheextensionfieldhere(insteadofthebasefield)istoincreasesecurity.

6.2evaluatetraceandconstraintpolynomialsattheOODpointz

6.2.1trace_polyatz&z*g

6.2.2compositionpolyatz

6.3建立Deepcompositonpolynomial

6.3.1产生随机数

6.3.2calquotientpoly

6.4evaluateDeepoverLDE

7.计算Deep的FRILayernum

8.确定query位置

从lde_domain中选取多个query的位置。

9.构建proof对象

9.1生成FRIproof

9.2querytracepolyatabovepositions

和上述类似

9.3queryconstraintpolyatabovepositions

和上述类似

9.4构建STARKPROOF

Step3.Verifyforproof

从transcript中读取pub-info,用来获取相关的数据,以执行验证过程。

1.Oodconsistencycheck

验证章节5.2描述的数学关系的一致性。

2.实例化FRI-verifier对象

3.计算Deeppolyonquerypositions

计算方式和章节6.4相同

4.执行FRIVERIFY过程

关于我们

Sin7y成立于2021年,由顶尖的区块链开发者组成。我们既是项目孵化器也是区块链技术研究团队,探索EVM、Layer2、跨链、隐私计算、自主支付解决方案等最重要和最前沿的技术。

微信公众号:Sin7Y

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

郑重声明: 本文版权归原作者所有, 转载文章仅为传播更多信息之目的, 如作者信息标记有误, 请第一时间联系我们修改或删除, 多谢。

链链资讯

[0:0ms0-7:650ms