Add request-derived Zcash testnet support#29
Closed
czarcas7ic wants to merge 6 commits into
Closed
Conversation
The standard-receive more menu is only reachable for the Zcash card (HasMoreBtn), but its tutorial button was hardcoded to the Ethereum derivation-path tutorial - dead code until the menu became reachable. Drop the button and its handler, and shrink the menu to the single testnet switch row.
PcztNetwork::from_pczt cloned and re-serialized the entire PCZT just to read the six-field Global prefix. The only raw-sign entry point, app_zcash::sign_pczt, already holds the original bytes, so decode the network there (after the envelope parse) and pass it down through pczt::sign::sign_pczt and sign_and_redact_pczt, deleting from_pczt.
The Global prefix decoder skipped the eight-byte envelope header blindly, relying on every caller having parsed the PCZT first. Verify the magic and a known version (1 or 2, both of which serialize Global first) in the decoder itself, and pin the v1 envelope in the compatibility test since wallets on released librustzcash still send v1 while Pczt::serialize emits v2. Also reject transparent inputs whose declared derivation path is too short to name a coin type, instead of skipping the network comparison for them.
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.
Summary
Network/Testnetrow during testnet review while leaving mainnet review unchanged.Design
Signing never reads mutable UI network state. The contained PCZT Global prefix decoder is pinned by compatibility tests, which avoids requiring a librustzcash dependency release for this firmware change.