fix(wasm-utxo): commit spent scriptPubKey, not redeem script, in v6 transparent sighash - #357
Merged
veetragjain merged 1 commit intoAug 13, 2026
Conversation
Ranjna-G
reviewed
Aug 12, 2026
| } | ||
|
|
||
| /// Regression test for the bug where `compute_v6_transparent_sighash` hashed the redeem | ||
| /// script (scriptCode) into the ZIP-244 §S.2g.iii per-input field instead of the spent |
Contributor
There was a problem hiding this comment.
can you explain a bit on scriptPubKey and redeem script?
Contributor
Author
There was a problem hiding this comment.
scriptPubKey is something that utxo is locked to, when spending it you need to reveal the redeem script that hashes to the scriptPubKey that the utxo is locked to.
Ranjna-G
reviewed
Aug 12, 2026
Base automatically changed from
veetragjain/cshld-1433-surface-ironwood-v6-shielding-details-in-psbt
to
master
August 12, 2026 15:21
veetragjain
force-pushed
the
veetragjain/cshld-1448-correct-zip-244-transparent-sighash-script-digest
branch
from
August 12, 2026 15:21
6ce2c01 to
179df0e
Compare
…ransparent sighash Ticket: CSHLD-1448
veetragjain
force-pushed
the
veetragjain/cshld-1448-correct-zip-244-transparent-sighash-script-digest
branch
from
August 12, 2026 15:36
179df0e to
10c92c2
Compare
veetragjain
marked this pull request as ready for review
August 12, 2026 19:36
Ranjna-G
approved these changes
Aug 13, 2026
davidkaplanbitgo
approved these changes
Aug 13, 2026
veetragjain
disabled the stack merge
August 13, 2026 14:47
veetragjain
deleted the
veetragjain/cshld-1448-correct-zip-244-transparent-sighash-script-digest
branch
August 13, 2026 14:47
veetragjain
added a commit
that referenced
this pull request
Aug 13, 2026
…-244-transparent-sighash-script-digest fix(wasm-utxo): commit spent scriptPubKey, not redeem script, in v6 transparent sighash
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.
Compute_v6_transparent_sighash hashed the caller-supplied redeem/witness script into the ZIP-244 S.2g.iii per-input digest field. Cross-checking against the vendored zcash_primitives/zcash_transparent reference crates, that field is actually the spent output's scriptPubKey, not the redeem/witness script ("scriptCode").
The two are identical for P2PKH inputs, which is all the existing golden fixture exercised - so the bug was invisible until a real 2-of-3 P2SH multisig shielding transaction (BitGo's actual wallet shape) was signed and submitted to a live Zcash testnet node, where it was rejected with ScriptInvalid.
Ticket: CSHLD-1448