Sign ZEC transparent txs as v5 (ZIP-225/244); defer v6

Sign ZEC transparent txs as v5 (ZIP-225 + ZIP-244); defer v6

THORChain vaults send transparent Zcash (t→t) only. This switches ZEC signing from the legacy v4 (Sapling, deleted zecutil Blake2b sighash) to v5 — the ZIP-225 transaction format with the ZIP-244 non-malleable txid/sighash.

Why v5 (not v6)

  • v5 is valid both before and after NU7. Per ZIP-230, wallets SHOULD (not MUST) switch to v6; v5 transactions remain consensus-valid across NU7. Only v4 and earlier are rejected at NU7. So v5 needs no NU7 version cutover, no v4 restore, no dual-signing, and no dependency on the exact NU7 activation timing / Zebra-7.x deploy.
  • v6 buys transparent vault txs nothing. v6 (ZIP-229; the earlier ZIP-230 is withdrawn) only adds shielded/ZSA, issuance, memo bundles, an explicit fee field, the ZIP-233 burn field, and Orchard quantum-recoverability — all irrelevant to transparent t→t outbounds. v6 is kept dormant in the code for a later follow-up if shielded support is ever needed.

How

  • The zcash package is parametrized for v5/v6: header word 0x80000005, versionGroupId 0x26A7270A, ZIP-225 transparent layout (empty Sapling/Orchard bundles), and the ZIP-244 digest with v5 personalizations. The transparent-input digest machinery is shared with the (dormant) v6 path.
  • The signer emits v5. The nConsensusBranchId committed in the ZIP-244 sighash stays height-keyed to the outbound's own agreed height (PaymentState over the daemon's upgrade schedule), so it tracks NU6.x → NU7 (0x77190ad9) automatically once zcashd/zebra carries the activation height — identical bytes across all signers, no hardcoded height.

Validation

  • Live-node acceptance: TestV5Zebra (opt-in, ZEC_DAEMON) builds a 2-input v5 tx and sendrawtransactions it to a real zebrad — accepted (sighash + txid + serialization all verified by the node).
  • v5 constants confirmed verbatim against librustzcash zcash_protocol/orchard.
  • Branch-flip determinism + re-sign-across-the-NU7-boundary unit tests.
  • v6 vectors/tests retained and still pass (v6 unbroken, just dormant).

⚠️ Ops: a Zebra 7.x stable release still needs to be live before NU7 so the daemon carries the NU7 branch id/height (only 7.0.0-rc.0 exists today) — but this is independent of signing, since v5 stays valid regardless.

Edited by Itzamna

Merge request reports

Loading
Loading