-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Univariate KZG multiproofs (in eval form) #387
Comments
@ggutoski The state-of-the-art is Appendix C.4 of https://eprint.iacr.org/2020/1536.pdf (which might be similar to the above references you had) What's the context of this feature? Do we usually need n (i.e. the number of eval points) to be large? E.g., the above paper assumes that the number of eval points is relatively small (e.g., <100), thus the computation of the zero polynomial Z_T(X) is not a bottleneck. |
Thanks @chancharles92 . Context: we need this to provide a light-client proof for an individual tx. Tx bytes are encoded into field elements, which are viewed as output points of a polynomial. If a tx is large then the number of eval points is large. I don't know what to expect on average but if we get rickrolled with a multi-megabyte tx then yes we need to support large n. |
In this application, is it the case that the set of evaluation points can be chosen by ourselves? Seems that the tx bytes are only the evaluation values. If so, we can choose the set of points as roots-of-unities, and the zero polynomial Z_T(X) can be much easier to compute. Or did I miss anything? |
You are correct that the input points can be roots-of-unity. But in general the zero polynomial Z_T(X) is only over a subset of these roots-of-unity, so there's still nontrivial work here. The best algorithm I know to compute Z_T(X) over a subset of roots-of-unity is Vitalik's proposal mentioned above. ([link] search for "Calculating Z in Note that we have an extra guarantee: we know that the subset of roots-of-unity is contiguous. ie. |
That makes sense. Thanks. I think the O(nlog^2n) algorithm is fine. Basically, we need to compute the poly (X-a1)(X-a2)...(X-an), we can recursively compute the polys (X-a1)...(X-a_{n/2}) and (X-a_{n/2+1})...(X-an), and then do a poly multiplication using FFTs. The implementation should be easy. |
@ggutoski @jbearer The bottleneck before is to compute the polynomial Assume Though the set of preprocessed polynomials Zs are quite a lot, they can be global public parameters that are independent of the data. So we can assume that they were computed before the start of the system and the prover can query those from a database or a local file system. |
@ggutoski Is it the case only if the evaluation points are roots-of-unities rather than arbitrary points? In that case, shall we just restrict the evaluation points to be roots-of-unities? |
I can't remember what I was thinking when I wrote that, and perhaps I was mistaken. I think you are correct: it's "easy" only when the points are roots of unity. In that case, I agree we should restrict eval points to roots of unity. I think when I wrote "easy MSM" I was referring only to the verifier's task of computing
I believe the answer is no. This is a one-time computation that is done in the trusted setup. Alex posted today about loading an external SRS---if that SRS already has the setup in eval form then there's nothing left to do. But I haven't investigated. |
no, Aztec's KZG ceremony is done over the coeff form, not eval form. @ggutoski |
We're currently missing the ability to make multiproofs (aka batch proofs). Specifically, given a list$(x_1,y_1),\dots,(x_k,y_k)$ of input-output pairs and a polynomial $p$ we want a single succinct proof that simultaneously proves $p(x_i)=y_i$ for all $i=1,\dots,k$ .
The algo appears in Section 3.5 of the original KZG paper and also in the "multiproofs" section of Dankrad's blog post
We need support for this in evaluation form. See #339 .
What we have:
What we need:
More detail
n polylog(n)
) then you can use this algorithm.The text was updated successfully, but these errors were encountered: