Use PCZT-owned Zcash batch messages in UR types - #132
Merged
soralit merged 6 commits intoJul 13, 2026
Conversation
Adds `zcash-batch-sig-result` (registry tag 49207), a compact device response to a Zcash signing batch. Instead of echoing full redacted PCZTs back (as `zcash-sign-result` does), the device returns only the produced 64-byte spend-authorization signatures, correlated to each request message by id and to each spend by pool and action index. The wallet re-applies them to the PCZTs it already holds, cutting the response to roughly an eighth of the redacted-PCZT size on the wire. Like the sibling Zcash registry types this is an egress-only container: decode enforces CBOR shape (definite-length maps/arrays only), required fields, duplicate CBOR map keys, and trailing data, then preserves values for the caller to police (version support, id correlation, pool validity, action-index bounds, signature length). Tests cover the encode/decode round trip, a byte-exact golden wire vector, empty results, unknown-field skipping, indefinite-length and duplicate-key rejection at every map level, missing-required-key rejection, and a full UR-level probe_encode/probe_decode round trip, matching the test matrix of the adjacent zcash-sign-result and zcash-sign-batch types.
czarcas7ic
marked this pull request as ready for review
July 3, 2026 04:24
czarcas7ic
marked this pull request as draft
July 9, 2026 23:40
czarcas7ic
marked this pull request as ready for review
July 10, 2026 12:50
soralit
approved these changes
Jul 13, 2026
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.
Adds the
zcash-batch-sig-resultregistry type and updateszcash-sign-batchso both carry the PCZT crate’s versioned serializedBatchSignRequestorBatchSignResponseas a single data payload plus an outer request ID. The PCZT-owned encoding remains free of transport correlation fields, while the registry request ID lets applications correlate a signing request with the device response; strict outer CBOR validation and UR round-trip coverage are retained.