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

ZIP 244: Clarify contruction of hashAuthDataRoot #520

Merged
merged 2 commits into from
Jun 16, 2021

Conversation

nuttycom
Copy link
Contributor

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.

Fixes #519

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]>
@daira daira force-pushed the zip244-clarify_auth_tree branch from 5f67eda to f0c438d Compare June 15, 2021 14:14
nuttycom added a commit to nuttycom/zcash that referenced this pull request Jun 15, 2021
Copy link
Contributor Author

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

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

ACK 604c40a

@daira daira requested a review from str4d June 15, 2021 15:15
@daira daira added this to the Core Sprint 2021-22 milestone Jun 15, 2021
@daira daira changed the title Clarify contruction of hashAuthDataRoot ZIP 244: Clarify contruction of hashAuthDataRoot Jun 15, 2021
Copy link
Collaborator

@str4d str4d left a comment

Choose a reason for hiding this comment

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

ACK

Comment on lines +603 to +605
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`_.
Copy link
Collaborator

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.

zkbot added a commit to zcash/zcash that referenced this pull request Jun 16, 2021
Update transaction auth commitments for pre-v5 transactions.

As specified in zcash/zips#520

Fixes #5218
@daira daira merged commit 4fbf8e5 into zcash:master Jun 16, 2021
Mr-Bossman pushed a commit to Mr-Bossman/VerusCoin that referenced this pull request Aug 26, 2021
@nuttycom nuttycom deleted the zip244-clarify_auth_tree branch May 3, 2022 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ZIP 244: Clarify some construction details about the hashAuthDataRoot Merkle tree
3 participants