elements icon indicating copy to clipboard operation
elements copied to clipboard

pset: PartiallySignedTransaction::GetUnsignedTx does not work correctly when issuance assets have null values

Open sanket1729 opened this issue 3 years ago • 1 comments

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

  1. two separate if else statements for issunace/re-issuance.
  2. 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.

sanket1729 avatar Aug 01 '22 09:08 sanket1729

Part of this issue is addressed in #1150. Converting this issue to a Pset issue to support blinded issuances.

sanket1729 avatar Aug 24 '22 21:08 sanket1729