elements
elements copied to clipboard
pset: PartiallySignedTransaction::GetUnsignedTx does not work correctly when issuance assets have null values
According to the consensus validation rules, we must supple Null values for issunace/reissuance instead of explicit zero. However, the current code for tries does something else: https://github.com/ElementsProject/elements/blob/c80e926d6e29d5a9524182767967884091665405/src/psbt.cpp#L126-L132
Fix would be to have
- two separate if else statements for issunace/re-issuance.
- force_unblinded is always used. There is no way to do explicit issuances in the current pset workflow.
This calculation causes walletprocesspsbt to create signatures that do not validate because the sighash is calculated incorrectly.
Part of this issue is addressed in #1150. Converting this issue to a Pset issue to support blinded issuances.