perf(transaction): cache empty ZIP-244 bundle hashes#385
Open
ValarDragon wants to merge 1 commit into
Open
Conversation
|
Note Complete: Audit complete. V12 did not find any issues that need review. Open the full results here. Analyzed two files, diff |
ValarDragon
marked this pull request as ready for review
July 2, 2026 01:39
ValarDragon
force-pushed
the
perf/zip244-empty-hash-constants
branch
from
July 2, 2026 01:42
c8741a8 to
cdf75e2
Compare
ValarDragon
force-pushed
the
perf/zip244-empty-hash-constants
branch
from
July 2, 2026 22:29
cdf75e2 to
6d40399
Compare
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.
Motivation
ZIP-244 txid and authorizing-data digests use bare BLAKE2b personalization hashes when a bundle is absent. The native Zebra implementation recomputed those empty hashes on each v5/v6 transaction even though the values are fixed by the personalization strings.
Solution
Benchmarks
Command:
Exact
origin/ironwood-mainbaseline with the benchmark added:auth_digest/orchard_onlytxid_and_auth_digest/orchard_onlyBoth runs used 1000 Criterion samples.
Validation
cargo fmt --allcargo test -p zebra-chain zip244cargo bench -p zebra-chain --bench transaction --no-runcargo bench -p zebra-chain --bench transaction auth_digest/orchard_onlyAI Disclosure
Used Codex to implement the constants, benchmark, tests, and PR description.