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

Plonk: Add solidity verifier #1249

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

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
zokrates_bellman/src/solidity_renderer.rs Outdated Show resolved Hide resolved
zokrates_bellman/src/solidity_renderer.rs Outdated Show resolved Hide resolved
zokrates_bellman/src/solidity_renderer.rs Outdated Show resolved Hide resolved
zokrates_bellman/src/plonk_proving_scheme.rs Outdated Show resolved Hide resolved
zokrates_bellman/src/plonk_proving_scheme.rs Outdated Show resolved Hide resolved
@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

zokrates_cli/tests/integration.rs Show resolved Hide resolved
zokrates_cli/tests/integration.rs Outdated Show resolved Hide resolved
zokrates_proof_systems/src/to_token.rs Show resolved Hide resolved
@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