-
Notifications
You must be signed in to change notification settings - Fork 67
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
Implement PCZT support #146
Conversation
Force-pushed to fix a bug and add missing serialization methods. |
5c45f48
to
290408a
Compare
Force-pushed to change |
Force-pushed to fix some bugs. |
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.
utACK 7696219 with nonblocking public API future compatibility question.
/// | ||
/// Once we have memo bundles, we will be able to set memos independently of Outputs. | ||
/// For now, the Constructor sets both at the same time. | ||
pub(crate) enc_ciphertext: [u8; ENC_CIPHERTEXT_SIZE], |
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.
Should Output
be polymorphic in the type here just so that the type doesn't have to change with ZIP 231?
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.
I don't have the time to design that such that I can ensure it's forward compatible. And we'll need to change much of the rest of the API anyway, so this isn't much extra.
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.
For Orchard both ciphertexts are Vec<u8>
. Isn't it better to do the same here for consistency? Non-blocking.
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.
This is needed in order to permit spending of internal notes after the previous change to `Builder::add_spend`.
rng: impl RngCore, | ||
) -> Result<(crate::pczt::Bundle, SaplingMetadata), Error> { | ||
match self.zip212_enforcement { | ||
Zip212Enforcement::Off | Zip212Enforcement::GracePeriod => { |
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.
Why fail in the grace period? (Non-blocking; only matters in practice for tests.)
let rk = redjubjub::VerificationKey::from(&rsk); | ||
|
||
if self.rk == rk { | ||
self.spend_auth_sig = Some(rsk.sign(rng, &sighash)); |
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.
I went down a rabbit hole here verifying that zcash/librustzcash#179 is fixed. It is.
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.
utACK with non-blocking comments.
No description provided.