Add Zcash signing batch/result UR types - #131
Merged
Merged
Conversation
czarcas7ic
marked this pull request as ready for review
June 20, 2026 05:44
czarcas7ic
force-pushed
the
adam/zcash-batch-registry
branch
from
June 20, 2026 05:45
630b7cd to
21e39c5
Compare
czarcas7ic
marked this pull request as draft
June 20, 2026 05:45
czarcas7ic
marked this pull request as ready for review
June 20, 2026 05:46
Preparatory commit ahead of the batch/result signing types. Extracts shared cbor_helpers (reject_duplicate_key, require_key), converts zcash-accounts and zcash-unified-full-viewing-key off the impl_cbor_bytes! macro to explicit TryFrom/TryInto, and hardens the decoders to reject duplicate map keys, missing required fields, unexpected nested registry tags, and trailing data. Adds URType variants and registry roundtrip tests for the existing types; the zcash-accounts encoder keeps its two-field shape with device_version decode-only. No new wire types.
czarcas7ic
force-pushed
the
adam/zcash-batch-registry
branch
from
June 21, 2026 01:10
21e39c5 to
dd6bdeb
Compare
soralit
approved these changes
Jun 24, 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
zcash-sign-batchandzcash-sign-resultregistry models, CBOR encode/decode support, type/tag wiring, and parser/encoder roundtrip coverage for Zcash batch signing payloads.This layer validates registry shape only. It rejects malformed CBOR, duplicate map keys, missing required fields, and trailing data, while leaving version, network, kind/status, digest, uniqueness, and request/result correlation policy to firmware callers.
Existing
zcash-accountsexport compatibility is preserved. The decoder accepts optional device version metadata and FFI includes it when present, but the encoder continues emitting the prior two-field account map.Validation:
cargo +nightly-2025-07-01 test -p ur-registry zcash_sign --locked -- --nocapturecargo +nightly-2025-07-01 test -p ur-parse-lib --locked zcash -- --nocapturecargo +nightly-2025-07-01 test -p ur-registry-ffi zcash_accounts --locked -- --nocapture