-
Notifications
You must be signed in to change notification settings - Fork 54
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
match supernova::Proof::verify
to nova::Proof::verify
#758
match supernova::Proof::verify
to nova::Proof::verify
#758
Conversation
supernova::Proof::verify
with nova::Proof::verifysupernova::Proof::verify
to nova::Proof::verify
I approved this, pending the mechanical changes to merge based on arecibo#72 noted in the description. |
src/proof/supernova.rs
Outdated
let z0_secondary = Self::z0_secondary(); | ||
let zi_secondary = z0_secondary.clone(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should not need this clone. Here's one way to make this work:
let zi_secondary = &z0_secondary;
let (zi_primary_verified, zi_secondary_verified) = match self {
Self::Recursive(p) => p.verify(&pp.pp, circuit_index, z0_primary, &z0_secondary),
Self::Compressed(_) => unimplemented!(),
}?;
Ok(zi_primary == zi_primary_verified && *zi_secondary == zi_secondary_verified)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, we have a similar case in nova.rs
:
Line 514 in e4f634c
let zi_secondary = z0_secondary.clone(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! @mpenciak are you up for seeing if the same fix applies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately the same fix doesn't work in nova.rs
because the Self::Compressed
branch takes ownership of z0_secondary
...
(we may actually end up needing to re-add in the clone after the compressed version for supernova is added in for the same reason)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, then it's a matter of time until we need to clone it anyway
This PR addresses #695 by matching the
nova::Proof::verify
implementaton.Do not merge until PR #72 in Arecibo is merged, and the
cargo.toml
change can be reverted.