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 backend_barretenberg into prover and verifier classes #3450

Closed
Tracked by #3403
signorecello opened this issue Nov 7, 2023 · 2 comments · Fixed by #4769
Closed
Tracked by #3403

Split backend_barretenberg into prover and verifier classes #3450

signorecello opened this issue Nov 7, 2023 · 2 comments · Fixed by #4769
Assignees
Labels
enhancement New feature or request js Noir's JavaScript packages
Milestone

Comments

@signorecello
Copy link
Contributor

Problem

Once upon a time, in PR #3322 , there was this comment:

// The "real" workflow will involve a prover and a verifier on different systems.
 //
 // We cannot do this in our tests because they will panic with:
 // `unreachable`
 //
 // This happens when we we create a proof with one barretenberg instance and
 // try to verify it with another.
 //
 // If this bug is fixed, we can remove this test and split barretenberg into
 // a prover and verifier class to more accurately reflect what happens in production.

Since that PR fixed the bug, seems like we can tackle this now, just as @TomAFrench suggested

Happy Case

backend_barretenberg has two classes, one for proving and one for verification

Alternatives Considered

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

@signorecello signorecello added the enhancement New feature or request label Nov 7, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Nov 7, 2023
@TomAFrench
Copy link
Member

@kevaundray Is this something that we want to pursue? Seems like we're going to end up paying the fixed costs associated with bb.js twice for not much benefit.

@kevaundray kevaundray added this to the 1.0 milestone Jan 15, 2024
@Savio-Sou
Copy link
Collaborator

Good to first have AztecProtocol/aztec-packages#4188 tackled, if anyone is tackling this.

@Savio-Sou Savio-Sou added the js Noir's JavaScript packages label Feb 22, 2024
github-merge-queue bot pushed a commit that referenced this issue Apr 12, 2024
…4769)

# Description

## Problem\*

Resolves #3450

## Summary\*

- In order to prove + verify, we have proving and verification keys
+ The proving key is derived from the circuit representation and the
verification key is derived from the proving key
+ The proving key is generally quite big, so we always generate it from
the circuit, which is easier than lugging it around
  + The verification key is much smaller and can be compressed
- Ideally, a user verifying a proof should be able to simply send the
verification key and proof to BB

## Additional Context



## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.

---------

Co-authored-by: TomAFrench <[email protected]>
Co-authored-by: Tom French <[email protected]>
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request js Noir's JavaScript packages
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants