Pointproofs: Aggregating Proofs for Multiple Vector Commitments 學習筆記1

1. 背景知識

Alogrand團隊Gorbunov等人2020年論文《Pointproofs: Aggregating Proofs for Multiple Vector Commitments》,配套的代碼實現參見:https://github.com/algorand/pointproofs

在該論文中,實現了:

  • Pointproofs —— a new vector commitment scheme that supports non-interactive aggregation of proofs across multiple commitments。允許任何第三方 aggregate a collection of proofs with respect to different, independently computed commitments into a single proof represented by an elliptic curve point of 48-bytes。
  • 將Pointproofs用於blockchain smart contract。相比於之前的vector commitment方案,Pointproofs可將傳輸一個區塊交易所需的帶寬開銷降低至少60%。
  • 以單線程運行時,generate a proof for 8 values with respect to one commitment的時間爲0.08s,aggregate 4000 such proofs across multiple commitments into one proof的時間爲0.25s,verify the aggregated proof的時間爲23s(0.7ms per value proven)。

Vector commitment可用於減少存儲空間:instead of storing a vector of values, one can store only the commitment and receive the values together with their proofs as needed。

Vector commitment可讓application 在storage of all value和 bandwidth taken up by revealed values and proofs 之間進行取捨平衡。
爲了在減少存儲空間的同時儘可能減少帶寬,需要 reduce the proof size。但是,由於需要滿足cryptographically hard to forge的要求,單個proof的size cannot be reduced too far。改進的方式可爲:

  • 在單個proof中支持reveal multiple values。最短的單個proof size實現可參見Russell W. F. Lai 和 Giulio Malavolta 在Crypto 2019上發表的論文《Subvector Commitments with Application to Succinct Arguments》中5.2節構建的subvector commitment from Cube Diffie-Hellman Assumption:a proof takes up only 48 bytes (for typical parameter values at conjectured 128-bit security) regardless of how many elements of the vector are being revealed。(參見博客 Subvector Commitments with Application to Succinct Arguments學習筆記
  • 在分佈式應用中,存在大量來源不同的commitments/values/proofs,它們相互 not aware of each other’s data。此時存在以下兩個問題:
    1)不存在可produce a single proof for all the values的單一實體;
    2)proofs需要於多個不同的commitments關聯。
    Pointproofs可有效解決以上問題:a user can independently commit to her variables and provide short proofs for any subset of them; any third party can non-interactively aggregate multiple proofs with respect to different commitments into a single short proof。

Boneh等人2019年論文《Batching techniques for accumulators with applications to IOPs and stateless blockchains》可實現dynamic aggregation for proofs in a single (the same) commitment —— aggregate proofs for elements of a vector into a single proof for a subvector。(參見博客 密碼學累加器cryptographic accumulator
而在本論文中,Gorbunov等人實現了跨多個commitments的aggregate proofs。
具體的各方案對比爲:

在本論文中,Gorbunov等人的主要貢獻爲:

  • 實現了proofs for individual elements of a single vector commitment can be aggregated by any third party into a single proof for the subvector;

  • 實現了proofs for subvectors of multiple commitments can be aggregated by any third party into a single proof for the multiple subvectors。

  • 在實現aggregation的同時,也提供了hiding屬性。

  • 在Libert和Yung 2010年論文《Concise mercurial vector commitments and independent zero-knowledge sets with short proofs》構建的vector commitment基礎上,增加了same-commitment aggregation和cross-commitment aggregation,從而實現了Pointproofs。
    1)與此類似,Pointproofs的public parameter size is linear in the size of the committed vector(可將long vector切分爲多個短的vectors,多個短的vectors的proofs可以aggregate,但是commitments不能aggregate,從而縮短了public parameter size,但是增加了total size of the commitments);
    2)與此類似,Pointproofs也基於qq-type assumption。In order to prove security of aggregation, we have to work in the algebraic group model and the random oracle model. We can reduce these assumptions by lowering efficiency and/or security requirements.

  • Pointproofs生成的proof爲single point on a pairing-friendly curve (48 bytes at 128-bit security),無論是single value for a single commitment,subvector of values for a single commitment,還是set of subvectors for multiple commitments。

  • Pointproofs中實現了支持aggregation的hiding屬性,僅需增加an additional exponentiation,commitment size和proof size均無需增加。而Dario Catalano 和 Dario Fiore 2013年論文《Vector Commitments and their Applications》中提到的給Vector commitment加hiding屬性的方法爲:add an inner layer of hiding commitments to individual values —— first commit to each message separately using a standard commitment scheme, then apply the VC to the obtained sequence of commitments。但是該方式無法automatically extend to aggregatable vector commitments,因爲proofs for the inner layer are not automatically aggregatable。

  • Pointproofs可用於reduce storage requirements for blockchains。主要針對smart contract智能合約場景。假設一個智能合約有多個變量,所有變量當前值(m1,,mN)(m_1,\cdots, m_N) are committed to a single vector commitment CC,每個智能合約有一個commitment。
    爲了與智能合約交互,one provides a 480byte proof $ \hat{\pi}$ of the current values of the variables needed for the transaction,transaction成功執行後可能會更新這些變量值。當存在多個智能合約時,cross-commitment aggregation允許compress multiple proofs π^1,,π^l\hat{\pi}_1,\cdots,\hat{\pi}_l into a single 48-byte proof π\pi。從而可從根本上消除the bandwidth overhead due to proofs in a proposed block。
    將Pointproofs用於智能合約存儲時,針對10810^8千萬級accounts,可將validators’ storage requirements降爲4.5GB,assuming one open value per transaction 的情況下,僅需增加31KB per block overhead for 1000 transactions。

  • Pointproofs 代碼實現https://github.com/algorand/pointproofs 中的實際性能表現爲:針對a commitment for 1000 variables of a smart contract at 128-bit security level,生成任意subvector proof的時間爲54~123ms;a block proposer對所有proofs進行cross-commitment aggregate的時間約爲0.07ms per proof;存儲了commitments 的 validator verify the aggregated proofs in a block的時間約爲 0.7~1.9ms per value verified;爲表示變量值的更新(通過交易執行),需要update commitments的時間約爲0.2~0.3ms per variable updated。

cross-commitment aggregation of proofs可用於很多場景,如:

vector commitment的相關工作:

1.1 一些定義

  • Notation:
    在這裏插入圖片描述

  • The Algebraic Group Model(AGM) :即adversary輸出的group element值應基於其收到的group element進行有效的group operation計算得出的,而不是隨意創造的。
    Suppose adversary is given group elements X1,,XNG1X_1,\cdots,X_N\in\mathbb{G}_1. Then, for every group element ZG1Z\in\mathbb{G}_1 that the adversary outputs, it must also ouput z1,,zNZpz_1,\cdots,z_N\in\mathbb{Z}_p such that Z=i=1NXiziZ=\prod_{i=1}^{N}X_i^{z_i}.

  • security assumption:在bilinear pairing group中求解ll-wBDHE(weak bilinear Diffie-Hellman exponent problem)很難,即對任意的αZp\alpha\leftarrow \mathbb{Z}_p已知g1α,g1(α2),,g1(αl),g1(αl+2),,g1(α3l),g2α,g2(α2),,g2(αl)g_1^{\alpha},g_1^{(\alpha^2)},\cdots,g_1^{(\alpha^l)},g_1^{(\alpha^{l+2})},\cdots,g_1^{(\alpha^{3l})},g_2^{\alpha},g_2^{(\alpha^2)},\cdots,g_2^{(\alpha^l)}
    求解g1(αl+1)g_1^{(\alpha^{l+1})}很難。
    對於BLS12-381 pairing-friendly curve with l=32l=32,當前best attack has complexity 21122^{112}

  • The Random Oracle Model(ROM):本文的security proofs are in the random oracle model。在本文model a cryptographic hash function as a truly random function, accessible to all parties only via oracle queries。本文使用了兩個random oracles HHHH',both with output space Zp\mathbb{Z}_p

2. vector commitment

採用與Libert和Yung 2010年論文《Concise mercurial vector commitments and independent zero-knowledge sets with short proofs》類似的思路,基於非對稱bilinear pairing group,相應的實現細節爲:

  • Setup: Let (G1,G2,GT)(\mathbb{G}_1,\mathbb{G}_2,\mathbb{G}_T) be a group of prime order pp,along with pairing e:G1×G2GTe:\mathbb{G}_1\times\mathbb{G}_2\rightarrow \mathbb{G}_T and generators g1,g2,gT=e(g1,g2)g_1,g_2,g_T=e(g_1,g_2) for G1,G2,GT\mathbb{G}_1,\mathbb{G}_2,\mathbb{G}_T respectively. Let αZp\alpha\in \mathbb{Z}_p be a secret value (known to no one after the initial generation of public parameters). The pulic parameters are given by 2N12N-1 values in G1\mathbb{G}_1, NN values in G2\mathbb{G}_2, and one value in GT\mathbb{G}_T(該值易於計算獲得,如gTαN+1=e(g1α,g2αN)=e(g1,g2)αN+1g_T^{\alpha^{N+1}}=e(g_1^{\alpha},g_2^{\alpha^{N}})=e(g_1,g_2)^{\alpha^{N+1}}):【注意g1αN+1g_1^{\alpha^{N+1}}不應包含在public parameters中,否則Prover可僞造證明。】
    g1α,,g1αN,g1αN+2,,g1α2N;g2α,,g2αN;gTαN+1g_1^{\alpha},\cdots,g_1^{\alpha^{N}},g_1^{\alpha^{N+2}},\cdots,g_1^{\alpha^{2N}};g_2^{\alpha},\cdots,g_2^{\alpha^N};g_T^{\alpha^{N+1}}

  • Commit:對vector m=(m1,,mN)ZpN\vec{m}=(m_1,\cdots,m_N)\in\mathbb{Z}_p^N
    C=g1i=1NmiαiC=g_1^{\sum_{i=1}^{N}m_i\alpha^i}

  • Prove:reveal mim_i
    πi=g1jimjαN+1i+j=(C/g1miαi)αN+1i\pi_i=g_1^{\sum_{j\neq i}m_j\alpha^{N+1-i+j}}=(C/g_1^{m_i\alpha^i})^{\alpha^{N+1-i}}

  • Verify:
    e(C,g2αN+1i)=e(πi,g2)gTmiαN+1e(C,g_2^{\alpha^{N+1-i}})=e(\pi_i,g_2)\cdot g_T^{m_i\alpha^{N+1}}

2.1 支持aggregation的vector commitment思路集錦

爲了實現reveal multiple values mi:iSm_i:i\in S (其中S[N]S\subseteq [N]) for a single commitment CC via a very short proof πS\pi_S

  • 思路一:
    直接計算πS=iSπi\pi_S=\prod_{i\in S}\pi_i,然後驗證e(C,iSg2αN+1i)=e(πS,g2)gTαN+1iSmie(C,\prod_{i\in S}g_2^{\alpha^{N+1-i}})=e(\pi_S,g_2)\cdot g_T^{\alpha^{N+1}\sum_{i\in S}m_i}
    該方式不安全,若open S=1,2S={1,2},可commit to (m1,m2)=(1,3)(m_1,m_2)=(1,3)而open爲(m1,m2)=(2,2)(m_1,m_2)=(2,2),違反了binding屬性(只bound to iSmi\sum_{i\in S}m_i,而不是{mi:iS}\{m_i:i\in S\}中的每一個值。)。
    同時,還需要防止inconsistnent reveals for possibly two different sets,如分別open (m1,m2)(m_1,m_2)(1,3)(1,3)(m2,m3)(m_2,m_3)(2,1)(2,1)的情況是不允許的。

  • 思路二:實現same-commitment aggregation
    在verification方程式中引入“隨機”scalars tit_i
    e(C,iSg2αN+1iti)=e(πS,g2)gTαN+1iSmitie(C,\prod_{i\in S}g_2^{\alpha^{N+1-i}t_i})=e(\pi_S,g_2)\cdot g_T^{\alpha^{N+1}\sum_{i\in S}m_it_i}
    aggregated proof πS=iSπiti\pi_S=\prod_{i\in S}\pi_i^{t_i}
    scalars tit_i的值可通過applying a hash function HH on some carefully chosen inputs depending on C,S,{mi:iS}C,S,\{m_i:i\in S\}。類似的思路在Boneh等人2018年論文《Compact multi-signatures for smaller blockchains》的aggregating signatures中有提及。
    怎樣選擇tit_i來保證binding屬性呢?若tiZpt_i\leftarrow \mathbb{Z}_p爲indeed random,則可保證Pr[iSmiti=iSmiti]=1/pPr[\sum_{i\in S}m_it_i=\sum_{i\in S}m_i't_i']=1/p,即對同一位置open爲兩個不同值的概率可忽略。
    可將hash function HH 看成是a random oracle。同時,還需要restrict the adversary to the so-called algebraic group model,以便可express adversarially generated commitments CC in terms of public parameters。

  • 思路三:實現cross-commitment aggregation
    對多個不同的vector進行commit,第jj個vector 可表示爲 mj=(mj,1,,mj,N)\vec{m}_j=(m_{j,1},\cdots,m_{j,N}),對應的commitment爲 CjC_j,對set SjS_j的open proof爲π^j\hat{\pi}_j,則滿足:
    e(Cj,iSjg2αN+1itj,i)=e(π^j,g2)gTαN+1iSjmj,itj,ie(C_j,\prod_{i\in S_j}g_2^{\alpha^{N+1-i}t_{j,i}})=e(\hat{\pi}_j,g_2)\cdot g_T^{\alpha^{N+1}\sum_{i\in S_j}m_{j,i}t_{j,i}}
    若直接將多個vector對應的verification equation都一起相乘,則有:
    je(Cj,iSjg2αN+1itj,i)=e(jπ^j,g2)gTαN+1jiSjmj,itj,i\prod_{j}e(C_j,\prod_{i\in S_j}g_2^{\alpha^{N+1-i}t_{j,i}})=e(\prod_{j}\hat{\pi}_j,g_2)\cdot g_T^{\alpha^{N+1}\sum_{j}\sum_{i\in S_j}m_{j,i}t_{j,i}}
    與思路一類似,上述方式是不安全的,需要再引入額外的random scalars tjt_j',相應的aggregated proof爲π=jπj^tj\pi=\prod_{j}\hat{\pi_j}^{t_j'},對應的verification equation調整爲:
    je(Cj,iSjg2αN+1itj,i)tj=e(π,g2)gTαN+1jiSjmj,itj,itj\prod_{j}e(C_j,\prod_{i\in S_j}g_2^{\alpha^{N+1-i}t_{j,i}})^{t_j'}=e(\pi,g_2)\cdot g_T^{\alpha^{N+1}\sum_{j}\sum_{i\in S_j}m_{j,i}t_{j,i}t_j'}

2.2 Same-commitment aggregation

首先考慮的是aggregation of proofs for a single commitment。
基本的算法包括Setup, Commit, UpdateCommit, Aggregate, Verify

  • ppSetup(1λ,1N)pp\leftarrow Setup(1^{\lambda},1^N):輸出public parameters,支持的vector 長度爲NN
  • CCommit(m;r)C\leftarrow Commit(\vec{m};r):輸入爲vector mMN\vec{m}\in M^N和randomness rr,輸出爲commitment CC
  • CUpdateCommit(C,S,m[S],m[S])C'\leftarrow UpdateCommit(C,S,\vec{m}[S],\vec{m}'[S]):輸入爲commitment CC,待更新的位置集SS,將待更新位置集內數據由m[S]\vec{m}[S]更新爲m[S]\vec{m}'[S]後,對應新的commitment CC'
  • πiProve(i,m,r)\pi_i\leftarrow Prove(i,\vec{m},r):open位置ii對應的proof,輸入爲待open位置i[N]i\in [N](m,r)(\vec{m},r),輸出爲proof πi\pi_i。【應該還有一個輸出mim_i,對應open位置ii的具體值】
  • π^Aggregate(C,S,m[S],{πi:iS})\hat{\pi}\leftarrow Aggregate(C,S,\vec{m}[S],\{\pi_i:i\in S\}):輸入爲commitment CC,open位置集S[N]S\subseteq [N],每個位置對應的proof {π:iS}\{\pi:i\in S\},輸出爲aggregated proof π^\hat{\pi}
  • bVerify(C,S,m[S],π^)b\leftarrow Verify(C,S,\vec{m}[S],\hat{\pi}):輸入爲commitment CC ,open位置集S[N]S\subseteq [N],open信息m[S]\vec{m}[S],aggregated proof π^\hat{\pi},輸出爲bb,0表示拒絕,1表示接受。

本論文中,爲了具有通用性,定義的Verify算法總是針對的aggregated proof,哪怕僅僅open了1個位置。同時,上述定義是調用多次Prove算法生成單個位置的proof然後調用一次Aggregated算法生成aggregated proof,可能存在其它算法可直接生成aggregated proof從而提升performance,但是並不影響定義。上述定義中,若commitment updated了,需調用Prove重新生成新的proof,可能存在效率更高的updateproof算法直接update existing proof。(如博客 Vector Commitments and their Applications學習筆記 中提到的ProofUpdate算法)

整個流程應關注如下屬性:

  • Correctness of opening。即保證正確的proof aggregated後可100%驗證通過。
    在這裏插入圖片描述
  • Correctness of updates。即保證對老的commitment進行update操作的輸出值應與直接多新的vector進行commit的輸出值一致。【有個typo?】
    在這裏插入圖片描述
  • Binding。即對同一commitment,若open不同的位置集合,應保證集合之間的交集應具有一致性,防止inconsistnent reveals for possibly two different sets。【具體見論文4.3節證明——Proof of binding for same-commitment aggregation。】
    在這裏插入圖片描述

具體的實現可爲:
在這裏插入圖片描述
在這裏插入圖片描述

上述具體實現中,可從如下維度優化:

  • Setup可通過多方安全計算或private communication等方式來高效安全實現。
  • 假設nz(m)nz(\vec{m})表示the number of non-zero entries in the vector m\vec{m},則Commit運算需要nz(m)nz(\vec{m})G1\mathbb{G}_1 exponentiation計算,ProveCommit運算少1次。同時,可通過Pippenger等算法,計算products of exponentiations的效率要高於分別計算exponentiations。
  • 實際計算same-commitment aggregated proof π^\hat{\pi}時,若SS is known inadvance,則可不用單獨先多次調用Prove生成πi\pi_iAggregate,可將兩個算法合併直接生成aggregated proof,效率更高:
    在這裏插入圖片描述
  • Verify時,G1\mathbb{G}_1域內的運算效率>G2\mathbb{G}_2>GT\mathbb{G}_T,計算r=(iSmiti)1 mod pr=(\sum_{i\in S}m_it_i)^{-1}\ mod\ p,將GT\mathbb{G}_T域內的運算轉移到G1\mathbb{G}_1域內,Verify的公式變更爲:
    在這裏插入圖片描述
    而a product of two pairings can be computed considerably faster than two separate pairings (because the time-consuming final exponentiation needs to be performed only once)。
    同時,當S=1|S|=1,即只open 1個位置時,可設置ti=1t_i=1,這樣可將G2\mathbb{G}_2域內的運算轉移到G1\mathbb{G}_1域內,即上述公式第一項可爲e(Cr,g2αN+1i)e(C^r,g_2^{\alpha^{N+1-i}})
  • S=1|S|=1,即只open 1個位置時,可設置ti=1t_i=1,相當於不需要執行Aggregate運算,直接設置π^=πi\hat{\pi}=\pi_i

具體各算法環節的運算複雜度爲:
在這裏插入圖片描述

2.3 Cross-commitment aggregation

考慮的是aggregation of proofs across ll commitments。
在Same-commitment aggregation的基礎上,增加了兩組算法AggregateAcrossVerifyAcross

  • πAggregateAcross({Cj,Sj,mj[Sj],πj^}j[l])\pi\leftarrow AggregateAcross(\{C_j,S_j,\vec{m}_j[S_j],\hat{\pi_j}\}_{j\in [l]}):輸入爲 ll({Cj,Sj,mj[Sj]}j[l])(\{C_j,S_j,\vec{m}_j[S_j] \}_{j\in [l]})和相應的same-commitment-aggregated proofs {πj^}j[l]\{\hat{\pi_j}\}_{j\in [l]}(通過上面的Aggregate算法獲得),輸出爲跨commitment的aggregated proof π\pi
  • bVerifyAcross({Cj,Sj,mj[Sj]}j[l],π)b\leftarrow VerifyAcross(\{C_j,S_j,\vec{m}_j[S_j] \}_{j\in [l]},\pi):輸入爲ll({Cj,Sj,mj[Sj]}j[l])(\{C_j,S_j,\vec{m}_j[S_j] \}_{j\in [l]})和cross-commitment-aggregated proof π\pi,用於驗證CjC_j is a commitment to a message vector consistent with mj[Sj]\vec{m}_j[S_j] for all j[l]j\in [l]

與Same-commitment aggregation類似,也需要滿足Correctness of opening屬性。

Cross-commitment aggregation的binding屬性以實際場景舉例:【具體見論文4.4節證明——Proof of binding for cross-commitment aggregation。】
存在兩組commitments,第一組(第一次)有l0l^0個不同的commitments,如包含了vectors x,z\vec{x},\vec{z};第二組(第二次)有l1l^1個不同的commitments,如包含了vectors y,x.z\vec{y},\vec{x}.\vec{z}
所謂的Cross-commitment aggregation的binding屬性是指,若第一次cross-commitment-aggregated proof π0\pi^0 和 第二次的π1\pi^1VerifyAcross 驗證成功,以x\vec{x}爲例,第一次對應的commitment爲Cj00C_{j^0}^0,open位置集合爲Sj00S_{j^0}^0;第二次對用的爲Cj11Sj11C_{j^1}^1,S_{j^1}^1,binding屬性要求兩次open的交集應具有一致性。
若an opening is inconsistent with a same-commitment opening,則將其和其它commitment openings 聚合在一起的cross-commitment aggregated proof應驗證失敗。
?即cross-commitment aggregation的binding屬性要求要強於same-commitment aggregation 中的binding屬性。若cross-commitment中的任一commitment的binding屬性有問題,則相應的cross-commitment aggregation proof應驗證失敗。

特殊地,當l0=l1=1l^0=l^1=1時,其實就是same-commitment。
在這裏插入圖片描述
具體的實現可爲:
在這裏插入圖片描述
藉助2.2節中的優化思路,可做如下調整:
在這裏插入圖片描述

2.4 hiding屬性的實現

本文考慮的是simulation-based statistical security——存在efficient randomized simulator (Setup,Commit,Prove)(Setup*,Commit*,Prove*),其中:

  • SetupSetup*:輸出pppp和trapdoor tdtd
  • Commit(;r)Commit*(;r);除了隨機值rr外無其它輸入,輸出爲a random fake commitment CC。【fake commitment】
  • ProveProve*:基於trapdoor tdtd,fake CC, index ii, value mim_i來生成a fake proof π\pi。【fake proof】

其核心思想爲以上算法生成的fake proofs應statistically indistinguishable from real ones, even given the commitments, and even if the committed messages are chosen adversarially。
fake commitment和fake proof中除了要open的信息外,應leak no information about other messages。

舉例爲:

  • 真實的stateful oracle Oreal(pp)O-real(pp):計算Commit(mj;rj)Commit(\vec{m}_j;r_j)Prove(i,mj,rj)Prove(i,\vec{m}_j,r_j)
  • 仿真的stateful oracle Osim(pp,td)O-sim(pp,td):計算Commit(;rj)Commit*(;r_j)Prove(td,rj,i,(mj)i)Prove*(td,r_j,i,(\vec{m}_j)_i)。【爲實現hiding屬性,很關鍵的一點是CommitCommit*不獲取mj\vec{m}_j的任何信息,而ProveProve*中僅獲取要open的信息(mj)i(\vec{m}_j)_i,除待open位置之外其它的信息均不獲取。】

Hiding屬性要求基於真實的stateful oracle Oreal(pp)O-real(pp)和仿真的stateful oracle Osim(pp,td)O-sim(pp,td)的輸出分佈的差異性應可忽略。
在這裏插入圖片描述

當進行update操作時,由於CUpdateCommit(C,S,m[S],m[S])C'\leftarrow UpdateCommit(C,S,\vec{m}[S],\vec{m}'[S])是確定性的,若使用相同的randomness,通過CCCC'之間的關係會reveal m\vec{m}m\vec{m}'之間的關係。可以在UpdateCommit之後再增加rerandomization處理來hide this relationship。本文方案支持rerandomization操作。【commitment can be rerandomized via multiplication by (g1αN)r(g_1^{\alpha^N})^{r'}.】

實際hiding屬性的實現採用與Benoît Libert和Moti Yung 2010年論文《Concise Mercurial Vector Commitments and Independent Zero-Knowledge Sets with Short Proofs》中類似的方式——在Commit時引入隨機值gγg^{\gamma}
加入hiding元素後,具體的算法調整如下:
在這裏插入圖片描述

3. Pointproofs在區塊鏈中的應用

Blockchain:is an append-only public ledger that consists of blocks, with every block containing some number of transactions.
區塊鏈中最根本的問題是對新區塊達成共識,共識的過程包括:

  • proposer:propose a block。
  • validators:verify the transactions included in the proposed block are valid。【validators的產生可由POS選舉或POW中的self-selected方式產生。】

傳統的方式validator需要維護整個state賬本,存在存儲壓力問題。
在[ST99, Mil12, Whi15, Tod16,But17, Dra17, RMCI17, CPZ18, BBF19]等很多論文中,都提議validator store commitments to vectors of relevant values instead of the values themselves。基於此提議實現的可稱爲stateless client或者stateless blockchain。相應的,transactions中需要包含:

  • the values on which they depend;
  • the proofs of correctness of these values with respect to the commitments stored by the validators (which the validators would update for successful transactions)。

該模式需要在storage,bandwidth和computation之間做取捨平衡。理想的情況應該是具有small commitments and proof sizes and add little computation and bandwidth overheads to the validators。

簡單的transaction,類似於比特幣賬號之間的轉賬;
複雜的transaction,是基於智能合約的。

現有各方案在解決storage方面的表現對比:【若validator直接存儲明文,當需存儲10810^8個account的狀態信息時,需要的存儲空間將近3TB;Pointproofs中若引入central entity,對整個系統維護一個commitment,而不是爲每個account維護一個commitment,但是沒有意義,當10810^8個account時,僅需4.5GB已經足夠小了,沒必要再引入中心化的機制。】
在這裏插入圖片描述

當由1000個256-bit message時,各vector commitment方案的參數:
在這裏插入圖片描述
將Pointproofs用於smart-contract-based的transaction:
在這裏插入圖片描述

詳細的實現流程爲:
在這裏插入圖片描述

現有各方案性能對比:
在這裏插入圖片描述

Pointproofs ProveAggregateVerifyAggregateAcross等基礎算法的性能表現爲:
在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章