Skip to content
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

Witness generation for KZG proving #18

Merged
merged 20 commits into from
Sep 27, 2023
Merged

Witness generation for KZG proving #18

merged 20 commits into from
Sep 27, 2023

Conversation

gabrielbosio
Copy link
Collaborator

@gabrielbosio gabrielbosio commented Sep 25, 2023

NOTE: For now, witness generation is necessary because we still don't have o1js bindings to prove using KZG.

  • Uses the monorepo version of Mina to generate the circuit witness using o1js.
    • The Mina monorepo is used locally, so this PR adds a preinstall script that clones that repo and builds o1js and its bindings.
  • Adds a witness JSON file for the KZG prover. This won't be needed when we add the listener fetcher because it will run the EVM bridge to create the witness and the KZG prover will read it, all in the same command.
  • Changes the verifier circuit so it extends from the o1js Circuit. This implies removing all the Scalar operations inside the circuit and computing them outside.
  • Updates the Jest version because the version used in main fails when the bridge uses the Mina monorepo locally.
  • Removes verification step in KZG prover.
    • This will be implemented as a Solidity verifier when o1js have foreign fields.

@gabrielbosio gabrielbosio marked this pull request as ready for review September 27, 2023 20:37
Copy link
Contributor

@pablodeymo pablodeymo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gabrielbosio gabrielbosio merged commit c1b4c22 into main Sep 27, 2023
4 checks passed
@gabrielbosio gabrielbosio deleted the witness branch September 27, 2023 21:07
@gabrielbosio gabrielbosio mentioned this pull request Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants