-
Notifications
You must be signed in to change notification settings - Fork 255
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
ZIP 225 & ZIP 244 #375
ZIP 225 & ZIP 244 #375
Conversation
A note to reviewers: This PR is best viewed hiding whitespace changes. |
39770cf
to
aa060fa
Compare
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.
Found a possible personalization field mismatch
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.
Flushing comments from partial review.
h.finalize() | ||
} | ||
|
||
pub fn to_txid( |
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.
Could to_txid()
be a method on TransactionData
?
zcash_primitives/src/transaction/components/transparent/builder.rs
Outdated
Show resolved
Hide resolved
3450de4
to
239b125
Compare
Co-authored-by: str4d <jack@electriccoin.co>
ecc9b68
to
8a9eda7
Compare
Co-authored-by: str4d <jack@electriccoin.co>
54dce0e
to
1d7c6ea
Compare
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 1d7c6ea9f9a60a564a7ead4cab9b9e6b55aef241
@@ -0,0 +1,182 @@ | |||
use std::io::Write; |
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 have not checked this file either.
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.
Partial review. I commented which files I have not checked.
Co-authored-by: str4d <jack@electriccoin.co>
Co-authored-by: str4d <jack@electriccoin.co>
unauthed_tx, | ||
let transparent_bundle = unauthed_tx.transparent_bundle.clone().map(|b| { | ||
b.apply_signatures( | ||
#[cfg(feature = "transparent-inputs")] |
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 this be a separate method for the case with transparent inputs, rather than a method with feature-conditional arguments?
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.
That's going to happen in a subsequent PR, when the Orchard builder is integrated.
if actions_without_auth.is_empty() { | ||
Ok(None) | ||
} else { | ||
let flags = orchard_serialization::read_flags(&mut reader)?; |
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.
The implementation of read_flags
enforces that unused bits are zero. This is as intended but was ambiguous in the spec. The spec has been clarified in version 2021.2.4.
) -> TransactionData<Authorized> { | ||
TransactionData { | ||
version, | ||
consensus_branch_id, | ||
lock_time, | ||
expiry_height: expiry_height.into(), | ||
transparent_bundle, | ||
sprout_bundle: None, |
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 know we don't support creating v4 transactions with a Sprout bundle, but we do support reading them, so it should probably be prop-tested. Please file a ticket. (Does not block this PR.)
const ZCASH_SAPLING_SIGS_HASH_PERSONALIZATION: &[u8; 16] = b"ZTxAuthSapliHash"; | ||
const ZCASH_ORCHARD_SIGS_HASH_PERSONALIZATION: &[u8; 16] = b"ZTxAuthOrchaHash"; | ||
#[cfg(feature = "zfuture")] | ||
const ZCASH_TZE_WITNESSES_HASH_PERSONALIZATION: &[u8; 16] = b"ZTxAuthTZE__Hash"; |
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 checked all of the non-TZE personalizations against the current version of ZIP 244.
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 minor comments.
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
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.
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.
Post-hoc ACK eb3d01a
No description provided.