Skip to content

feat(wasm-utxo): surface Ironwood shielded outputs in parsed-tx accounting and address encoding - #354

Open
veetragjain wants to merge 1 commit into
masterfrom
veetragjain/cshld-1378-wasm-utxo-ironwood-inspection-verification-surface
Open

feat(wasm-utxo): surface Ironwood shielded outputs in parsed-tx accounting and address encoding#354
veetragjain wants to merge 1 commit into
masterfrom
veetragjain/cshld-1378-wasm-utxo-ironwood-inspection-verification-surface

Conversation

@veetragjain

Copy link
Copy Markdown
Contributor

Zcash v6 (Ironwood) shielding transactions had several gaps where the shielded side of the transaction was silently invisible or, worse, caused a panic:

  • parseTransactionWithWalletKeys/parseOutputsWithWalletKeys never saw the shielded output (it lives in the PSBT's proprietary-map PCZT, not unsigned_tx.output), so minerFee silently absorbed the shielded amount and spendAmount undercounted the send. ParsedOutput gains an isShielded field; a shielded entry is now synthesized from the PCZT and folded into fee/spend totals.

  • unsignedTxId() panicked (wasm unreachable trap) on any v6 PSBT, since PsbtAccess::unsigned_tx_id fell through to the v4/Sapling txid path, which explicitly rejects v6 and whose Err was swallowed by an .expect(). It now computes the proper ZIP-244 v6 txid, including before a shielded output has been added.

  • The shielded output's raw Orchard/Ironwood receiver is now exposed via ParsedOutput.script (43 raw bytes, read from the PCZT's plaintext recipient field — no decryption involved).

  • toOutputScriptWithCoin gains an optional canBeShieldedOutput param: when set and the given address is a ZIP-316 unified address with an Orchard/Ironwood receiver, returns that raw receiver instead of a scriptPubKey; a malformed UA or one with no Orchard receiver throws rather than silently falling back to transparent decoding.

Adds Rust and TS test coverage for all of the above.

Ticket: CSHLD-1378

@linear-code

linear-code Bot commented Aug 7, 2026

Copy link
Copy Markdown

CSHLD-1378

@veetragjain
veetragjain force-pushed the veetragjain/cshld-1378-wasm-utxo-ironwood-inspection-verification-surface branch from 9fbe8c3 to a7ae550 Compare August 7, 2026 21:29
@veetragjain
veetragjain marked this pull request as ready for review August 7, 2026 21:39
@veetragjain
veetragjain requested review from a team as code owners August 7, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant