Closed motorina0 closed 2 years ago
Thank you! I'll look into this issue over the weekend.
I was not able to reproduce it. I updated the examples to have 2-input transactions, and everything worked just fine. Also the transaction you provided is a raw bitcoin transaction, not PSBT, so I am wondering how did you get it. Can you provide full code or an example of PSBT that is signed incorrectly?
Thanks for looking into it. Code sample can be found here - parseBase64Psbt and here - sign.
sign
operation is executedThe code is running on this device
The provided tx is the extracted one. Here is a new one:
Input PSBT:
cHNidP8BAP2TAQIAAAAImH4A2UkdSzGcS2XZ5/o8e4BjRE6R6EoN+FG946p9l3kEAAAAAP////+YfgDZSR1LMZxLZdnn+jx7gGNETpHoSg34Ub3jqn2XeQEAAAAA/////+4bfuLw5O3WiO7oXF6UhA0aJ9d0Zh9048ezZvy0kj0EAAAAAAD/////mH4A2UkdSzGcS2XZ5/o8e4BjRE6R6EoN+FG946p9l3kAAAAAAP////8N7rBDRLoqz9fhtmJgQ5PKfocj3H75lYbIPFLrEAI5JgAAAAAA/////5h+ANlJHUsxnEtl2ef6PHuAY0ROkehKDfhRveOqfZd5AgAAAAD/////mH4A2UkdSzGcS2XZ5/o8e4BjRE6R6EoN+FG946p9l3kDAAAAAP/////eUmrMbsyJK1Kj94blkF0M6ZIJ3ia7yk2VMSH04+60WQEAAAAA/////wIw5gIAAAAAABYAFI5DLQiEzTvl+OnX+wgRu8+Dwvma8xcAAAAAAAAZdqkUjraGOza6RPwb5fjZ+/Zer235R4eIrAAAAAAAAQD9aQECAAAAAAEBwgUTjBgqD+K7uY6Vu9kbXNwc8PcwrEOdwWp5bibEfb8AAAAAAP////8GECcAAAAAAAAZdqkUBDfzIKZbV/9ELfPKxC4W0QFsnr2IrBEnAAAAAAAAGXapFGI3k3/gwslJYY6b4ChhgB6CtOFciKwSJwAAAAAAABl2qRT3uOK3jI6x7QwG3ob4iLliMlYKvoisEycAAAAAAAAZdqkU5LAONpFYT+kcu1YjEb76YyL4LcaIrBQnAAAAAAAAGXapFFUaxxJS57rwgECCrB+jArs1qHHdiKzhIAIAAAAAAB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vrRzBEAiA2rFc6iHZSr7p+FHlKZ/9i0RVa4cto0+KwBvPLm+UaSwIgWzoewUDKI4xWmxBe+7COG90kKxoOebQcjSXj4iPf8RQBIgIC8JbDKln26XJvZTeIClQHoepWck2qhs8mAbYfMvhgK2BIMEUCIQD3m4XQDroalVEY48E4WVq1HWyDHKmMwwXC5jBfaF6WagIgaJTw8AA5E+DNnzBddvNkm0bDum7bQbkb7AxsKP28LdIBIgICxG46E5AezKW6YdXuo/Ww5kiTglT+O8+OoJyzgzxlgLBIMEUCIQDE9IzECYDcjVH+3L6arGmEmrUyCZIpFv03HAHi+KS7hwIgL/JF2znnIQlrDR1dLbj7RH0iwzud8wHDhicx+/UFhXIBIgICjG9/Ve/UBAgXhnRbI+9rZ8QqmfmxY6rkWzhBZLhMQQRHMEQCIF/KxBHh+IgHev8V/eaIuywHST0G+lAYYBFXCcCido00AiBYJqomNyxHcGe9fw05yVK5tuJR0S/FC7iLhSdVUXsJHwEiAgPjtQ4OPb0IFKZgmQ5Wm7m2tcJ3fW+m1SEmgv2tbAUMXEgwRQIhALzWSgAdm/MNkIAgfP8HiWVJemSDVveIwoQIaE6wvJBPAiB9z+57JRLAet589eryD0DpL+yGSWRrvkCoQffvrgUDZwEAAAA=
Sorry for using you for rubber duck debugging
I was building the PSBT incorrectly (the bip32DerivationPath
) and this lib was matching inputs multiple times while signing.
It looks good now, thanks!
Actually, thanks to this issue I found another bug - if you sign the transaction twice the signatures are also added twice even though they are the same. It makes PSBT invalid. Gonna fix it soon.
Steps
Problem
Further comments
Example of such a transaction (built with uBitcoin):
sign()
inuBitcoin/src/PSBT.cpp