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

Split zokrates_bellman crate in PlonK branch #1255

Open
wants to merge 44 commits into
base: add-bellman-plonk-backend
Choose a base branch
from

Conversation

georgwiese
Copy link

@georgwiese georgwiese commented Dec 21, 2022

Depends on #1249

To make the Groth16 MPC trusted setup work, we need to depend on two versions of bellman_ce. I implemented this by splitting the zokrates_bellman crate.

Also, I went through the failing tests and fixed as many as possible.

This is an overview of the changes:

  • zokrates_bellman: Now depends on the matter-labs version of bellman again, commented in code in the Groth16 scheme, removed PlonK
  • zokrates_bellman_plonk: A new crate that depends on our fork of bellman
    • lib.rs: Is essentially a copy of zokrates_bellman/src/lib.rs, except that it depends on a different bellman crate and uses the BellmanPlonkFieldExtensions instead of BellmanFieldExtensions
    • plonk.rs: Implementation of the PlonK scheme
  • zokrates_cli: Now depends also on the zokrates_bellman_plonk crate, commented in the MPC implementation of the Groth16 trusted setup, added PlonK to integration tests
  • zokrates_field:
    • Now depends on both bellman crates and defines the BellmanPlonkFieldExtensions trait in addition to BellmanFieldExtensions
    • Adjusted the bellman_extensions! macro and implemented BellmanPlonkFieldExtensions for all curves that previously implemented the BellmanFieldExtensions
  • zokrates_proof_systems: Fixed a bug where solidity verifiers were rendered incorrectly, triggered by a previous refactoring of the Fq2 and GAffine data types.
  • Fixed a few clippy errors

The diff between zokrates_bellman/src/lib.rs and zokrates_bellman_plonk/src/lib.rs is quite small. It could be implemented using a macro (although I'm not sure in which crate it should be defined), let me know if I should do that :)

@georgwiese georgwiese changed the title [WIP] Split bellman crate in PlonK branch Split zokrates_bellman crate in PlonK branch Dec 28, 2022
@georgwiese georgwiese marked this pull request as ready for review December 28, 2022 16:03
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.

None yet

1 participant