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

Validate JoinSplit proofs #3128

Merged
merged 8 commits into from
Dec 10, 2021
Merged

Validate JoinSplit proofs #3128

merged 8 commits into from
Dec 10, 2021

Conversation

conradoplg
Copy link
Collaborator

@conradoplg conradoplg commented Dec 1, 2021

Motivation

We need to validate JoinSplit Groth16 proofs from post-Sapling Sprout transactions. (Pre-Sapling use BCTV14 proofs, but since we checkpoint on Canopy, we don't need to validate them.)

Specifications

JoinSplit descriptions are described in https://zips.z.cash/protocol/protocol.pdf#joinsplitdesc

The primary input encoding is not documented yet; see https://github.com/zcash/librustzcash/blob/0ec7f97c976d55e1a194a37b27f247e8887fca1d/zcash_proofs/src/sprout.rs#L152-L166 for the reference implementation.

Designs

Solution

Closes #322

Review

@dconnolly and/or @upbqdn can review this.

Reviewer Checklist

  • Code implements Specs and Designs
  • Tests for Expected Behaviour
  • Tests for Errors

Follow Up Work

Actually using this to validate proofs will be done in #1835

Adding support for batch verification is #3127

@conradoplg conradoplg force-pushed the validate-joinsplit-proofs branch from ea222fc to 747fea9 Compare December 1, 2021 18:26
Copy link
Contributor

@dconnolly dconnolly left a comment

Choose a reason for hiding this comment

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

Looking good! Some suggestions and proposals

@conradoplg conradoplg mentioned this pull request Dec 9, 2021
3 tasks
@dconnolly dconnolly self-requested a review December 10, 2021 06:50
@dconnolly
Copy link
Contributor

Some rustdoc improvements and a merge conflict to resolve but functionally ✅

@conradoplg conradoplg force-pushed the validate-joinsplit-proofs branch from d9c668b to 63ecd44 Compare December 10, 2021 14:41
@conradoplg
Copy link
Collaborator Author

Some rustdoc improvements and a merge conflict to resolve but functionally white_check_mark

👍 Conflicts solved

@dconnolly dconnolly enabled auto-merge (squash) December 10, 2021 15:59
@dconnolly dconnolly merged commit ee073c0 into main Dec 10, 2021
@dconnolly dconnolly deleted the validate-joinsplit-proofs branch December 10, 2021 16:33
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.

Validate JoinSplit proofs
3 participants