Hi, we met an issue about signatures order when testing.
Currently the function parseSignaturesFromPSBT will make signatures grouped by public keys, which will make signatures' order mismatched with PSBT's inputs.
e.g:
If we have 7 public keys [A,B,C,D,E,F,G] and 10 UTXOs [0,1,2,3,4,5,6,7,8,9] while 4 UTXOs [0,2,4,8] belong to the same public key E.
After parsing signatures from signed PSBT, the signatures will be grouped by public keys and when call validateAndSetSignature in caravan, we will flat the signatureSet and get a signature list with wrong inputs order like [0',2',4',8',1',3',5',6',7',9'] (x' means it is inputs[x]'s signature) which will cause error when verify inputs[2]'s signature with inputs[1]'s hash and public key.
What do you think?
Hi, we met an issue about signatures order when testing.
Currently the function parseSignaturesFromPSBT will make signatures grouped by public keys, which will make signatures' order mismatched with PSBT's inputs.
e.g:
If we have 7 public keys
[A,B,C,D,E,F,G]and 10 UTXOs[0,1,2,3,4,5,6,7,8,9]while 4 UTXOs[0,2,4,8]belong to the same public keyE.After parsing signatures from signed PSBT, the signatures will be grouped by public keys and when call validateAndSetSignature in caravan, we will flat the
signatureSetand get a signature list with wrong inputs order like[0',2',4',8',1',3',5',6',7',9'](x'means it isinputs[x]'s signature) which will cause error when verifyinputs[2]'s signature withinputs[1]'s hash and public key.What do you think?