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

Verify Halo2 proofs as part of V5 transaction verification #3039

Merged
merged 1 commit into from
Nov 17, 2021

Conversation

dconnolly
Copy link
Contributor

@dconnolly dconnolly commented Nov 8, 2021

Motivation

We need to verify Halo2 proofs for V5 transactions.

Solution

Now that we have an async batch Halo2 verifier service, we can call that from our transaction verifier service.

Our current test vectors do not have V5 transactions with verifiable Halo2 proofs. 👀

Resolves #2105

Review

Anyone can verify.

Our current test vectors do not have V5 transactions with verifiable Halo2 proofs, the halo2 verifier service is currently verifying that it can verify the proofs by themselves, but reviewer can decide if that is sufficient to merge this PR or if we want to block on V5 transactions w/ Halo2 proofs.

Reviewer Checklist

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

@dconnolly dconnolly added A-consensus Area: Consensus rule updates A-rust Area: Updates to Rust code NU-5 Network Upgrade: NU5 specific tasks labels Nov 8, 2021
@dconnolly dconnolly added this to the 2021 Sprint 22 milestone Nov 8, 2021
@dconnolly dconnolly requested a review from a team November 8, 2021 22:54
@dconnolly dconnolly self-assigned this Nov 8, 2021
@dconnolly dconnolly linked an issue Nov 9, 2021 that may be closed by this pull request
@mpguerra mpguerra removed this from the 2021 Sprint 22 milestone Nov 9, 2021
Copy link
Collaborator

@conradoplg conradoplg left a comment

Choose a reason for hiding this comment

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

Looks good! There's just a small suggestion.

I'll leave this unapproved to make sure #2645 is merged first.

zebra-consensus/src/transaction.rs Show resolved Hide resolved
jvff
jvff previously approved these changes Nov 10, 2021
@dconnolly dconnolly force-pushed the halo2-verifier branch 2 times, most recently from 16b2c2b to 7d8b9ca Compare November 12, 2021 01:02
Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

I'm a bit confused by the GitHub diff in this PR, it seems to include some changes that were reverted in PR #2645.

Can you rebase it after PR #2645 merges?

@dconnolly
Copy link
Contributor Author

I'm a bit confused by the GitHub diff in this PR, it seems to include some changes that were reverted in PR #2645.

Can you rebase it after PR #2645 merges?

This should be fixed now

@dconnolly dconnolly requested a review from teor2345 November 17, 2021 00:19
Base automatically changed from halo2-verifier to main November 17, 2021 03:26
teor2345
teor2345 previously approved these changes Nov 17, 2021
Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

Looks good, but squashing the previous PR caused conflicts.

I'll see if I can push a rebased PR.

Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

Looks good, and the diff is much smaller now!

@teor2345 teor2345 enabled auto-merge (squash) November 17, 2021 03:39
@teor2345 teor2345 merged commit 7218b4f into main Nov 17, 2021
@teor2345 teor2345 deleted the verify-halo2 branch November 17, 2021 05:54
mpguerra added a commit that referenced this pull request May 19, 2023
mergify bot pushed a commit that referenced this pull request May 23, 2023
* ZIPs were updated to remove ambiguity, this was tracked in #1267.

* #2105 was fixed by #3039 and #2379 was closed by #3069

* #2230 was a duplicate of #2231 which was closed by #2511

* #3235 was obsoleted by #2156 which was fixed by #3505

* #1850 was fixed by #2944, #1851 was fixed by #2961 and #2902 was fixed by #2969

* We migrated to Rust 2021 edition in Jan 2022 with #3332

* #1631 was closed as not needed

* #338 was fixed by #3040 and #1162 was fixed by #3067

* #2079 was fixed by #2445

* #4794 was fixed by #6122

* #1678 stopped being an issue

* #3151 was fixed by #3934

* #3204 was closed as not needed

* #1213 was fixed by #4586

* #1774 was closed as not needed

* #4633 was closed as not needed

* Clarify behaviour of difficulty spacing

Co-authored-by: teor <teor@riseup.net>

* Update comment to reflect implemented behaviour

Co-authored-by: teor <teor@riseup.net>

* Update comment to reflect implemented behaviour when retrying block downloads

Co-authored-by: teor <teor@riseup.net>

* Update `TODO` to remove closed issue and clarify when we might want to fix

Co-authored-by: teor <teor@riseup.net>

* Update `TODO` to remove closed issue and clarify what we might want to change in future

Co-authored-by: teor <teor@riseup.net>

* Clarify benefits of how we do block verification

Co-authored-by: teor <teor@riseup.net>

* Fix rustfmt errors

---------

Co-authored-by: teor <teor@riseup.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-consensus Area: Consensus rule updates A-rust Area: Updates to Rust code NU-5 Network Upgrade: NU5 specific tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate Transaction::V5 Halo2 proofs
5 participants