ZIP 244, ZIP 246: Disambiguate scope of BLAKE2b-256 over per-input data.#1291
Draft
nuttycom wants to merge 1 commit into
Draft
ZIP 244, ZIP 246: Disambiguate scope of BLAKE2b-256 over per-input data.#1291nuttycom wants to merge 1 commit into
nuttycom wants to merge 1 commit into
Conversation
In `transparent_auth_digest` (ZIP 246), `sapling_auth_digest` and `transparent_scripts_digest` (ZIP 244), the existing wording "BLAKE2b-256 hash of <X> for each <Y>" was ambiguous: it could be read as either a single hash over the concatenation of all <X> values, or as the concatenation of per-<Y> hashes. The intended reading (consistent with the existing empty-case definition `BLAKE2b-256(..., [])` which yields a single 32-byte output) is a single hash over the concatenation. Reword each site to make the concatenation explicit and to specify transaction-order iteration. Closes zcash#1082. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1082.
In `transparent_auth_digest` (ZIP 246), `sapling_auth_digest` and
`transparent_scripts_digest` (ZIP 244), the existing wording
"BLAKE2b-256 hash of for each " was ambiguous: it could be read
as either a single hash over the concatenation of all values, or as
the concatenation of per- hashes. The intended reading (consistent
with the existing empty-case definition `BLAKE2b-256(..., [])` which
yields a single 32-byte output) is a single hash over the concatenation.
Each site is rephrased to make the concatenation explicit and to
specify transaction-order iteration.
The "For each X, the following elements are included in the hash"
pattern (T.3a.ii, T.3b.i/ii/iii, T.4a/b/c, T.5a, etc.) was left
untouched: that wording references a previously-named single hash and
is materially less ambiguous; broader cleanup of that pattern is a
separate concern.
Filed with Claude Code assistance.