Skip to content

Plonk: Add solidity verifier#1249

Open
georgwiese wants to merge 25 commits intoZokrates:add-bellman-plonk-backendfrom
georgwiese:plonk-add-verifier
Open

Plonk: Add solidity verifier#1249
georgwiese wants to merge 25 commits intoZokrates:add-bellman-plonk-backendfrom
georgwiese:plonk-add-verifier

Conversation

@georgwiese
Copy link

@georgwiese georgwiese commented Nov 30, 2022

The main changes are:

  • zokrates_bellman:
    • plonk.rs: serialize_vk() now pre-computes omega. This is redundant, but needed to render the solidity verifier.
  • zokrates_cli:
    • tests/integration.rs: Adjusted the test_compile_and_witness_dir test to run only for plonk. It should pass now, testing the full pipeline, including proof verification in solidity.
  • zokrates_proof_systems:
    • Added solidity_renderer.rs, which is an adjusted version from this code from matter-labs.
      • See this link for a comparison between 037ec0a (when I copied the original file from the matter-labs repo) and the current head of georgwiese:plonk-add-verifier.
    • PlonkVerifier.sol: The Plonk solidity template, copied and adjusted from this code from matter-labs.
    • scheme/plonk.rs: This file moved to the zokrates_bellman create, as mentioned above.
    • to_token.rs: Some refactorings
  • Removed some unused imports.

To test, run:

$ cargo test --package zokrates_cli -- --nocapture test_compile_and_witness_dir --ignored

@georgwiese georgwiese changed the title [WIP] Plonk add verifier [WIP] Plonk: Add solidity verifier Nov 30, 2022
@georgwiese georgwiese changed the title [WIP] Plonk: Add solidity verifier Plonk: Add solidity verifier Nov 30, 2022
@georgwiese georgwiese marked this pull request as ready for review December 1, 2022 09:17
Copy link
Member

@Schaeff Schaeff left a comment

Choose a reason for hiding this comment

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

Just a few small things! 👍
We can fix CI on the target branch I think

@georgwiese
Copy link
Author

Thanks for the review!

The integration test fails now, as it did before this PR. I'll try to fix tests in the next PR, which is about splitting the zokrates_bellman crate to support both bellman versions.

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