-
Notifications
You must be signed in to change notification settings - Fork 421
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
refactor: plonk.Setup takes kzg srs in canonical and lagrange form #953
Conversation
Couldn't we use an option to pass the kzg SRS in Lagrange form to the Setup ? When using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. A few comments though but they are not blocking.
internal/generator/backend/template/zkpschemes/plonk/plonk.setup.go.tmpl
Show resolved
Hide resolved
Imo on thing we could consider in the future is to have a lazy SRS. We can store it on disk and only when we actually we read it to memory (using mmap). Or more better, because the key is very structured we can have method a la |
@ThomasPiellard yes good idea but it changes the PlonK prover code too a bit so will do it in another PR |
This PR changes the signature of
plonk.Setup(...)
and adds an additional parameter; thekzg.SRS
in Lagrange form.In production, this can be computed using
gnark-crypto
ToLagrangeG1
helper from a canonical SRS.For test purposes when we know the
tau
used for generating the canonical srs, we can take a quicker path (seetest/unsafekzg
package which offers a convenient api to generate and cache in memory / on disk srs for test purposes).