-
Notifications
You must be signed in to change notification settings - Fork 159
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 244: Clarify contruction of hashAuthDataRoot
#520
Conversation
2f7ea0c
to
5f67eda
Compare
This changes the specification of hashAuthDataRoot to state that leaves of the Merkle tree used to construct hashAuthDataRoot should have the null hash value, while empty internal nodes should be hashes of empty leaves. It also defines an all-FFs placeholder value to be used for pre-v5 transactions in this tree. Co-authored-by: Kris Nuttycom <[email protected]> Co-authored-by: Jack Grigg <[email protected]> Signed-off-by: Daira Hopwood <[email protected]>
5f67eda
to
f0c438d
Compare
As specified in zcash/zips#520 Fixes zcash#5218
Signed-off-by: Daira Hopwood <[email protected]>
4bc4eee
to
604c40a
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.
ACK 604c40a
hashAuthDataRoot
hashAuthDataRoot
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.
ACK
For transaction versions before v5, a placeholder value consisting of 32 bytes of | ||
``0xFF`` is used in place of the authorizing data commitment. This is only used in | ||
the tree committed to by ``hashAuthDataRoot``, as defined in `Block Header Changes`_. |
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 personally think this separation is necessary, as it only helps the hashAuthDataRoot
to commit to the exact number of transactions in the block, but that commitment has no value on its own, and hashMerkleRoot
already commits to the number of transactions in the block. However, I don't see any harm in doing this, and once v4 transactions are removed from consensus in a future NU, it won't matter anymore.
I checked that v4 transactions are prohibited from the wider ZIP 239 network messages, so the "only used" wording here is correct.
Update transaction auth commitments for pre-v5 transactions. As specified in zcash/zips#520 Fixes #5218
As specified in zcash/zips#520 Fixes zcash#5218
This changes the specification of
hashAuthDataRoot
to state that leaves of the Merkle tree used to constructhashAuthDataRoot
should have the null hash value, while empty internal nodes should be hashes of empty leaves.Fixes #519