Starting with the following unsigned transaction:
0cHNidP8BAHMCAAAAAXg6mTOjO3d9K0RiVOr87oYRYhYB/Bpomi66nXc85ebsAAAAAAD9////Avs+EQAAAAAAF6kU4lwd88Ejsg5sG0iVOiL2/c05MHKHoIYBAAAAAAAXqRSxG32ZtPml0iJQGDVxp82wjHBD+4cs7RUAAAEBIHZOFQAAAAAAF6kUP2yi0rx2ke1Lmdk5gsR+WIvukb+HAQQWABSL8jhHTVLizeYj0cS1ClE18i8jbCIGAnwLKYOB2pXhdmi+i21xj17Np67DQdv7RPiIVKqOrp++ENZSlGkAAACAAQAAgAAAAIAAAQAWABSLPsswJus4oRP6Zq1BmWcxI5hNQiICAgi7iTon5Hy59yU96uKT12AU4/bhxQy7CeEdkfg5sZLoENZSlGkAAACAAQAAgAEAAIAAAQAWABQ6Ram/bbw29IPN92ylIqYKhU1ThyICA3oH7xQc22oDM2dG6g/VZ05JLscr/hEQKUI4fTMKvUjRENZSlGkAAACAAAAAgAAAAIAA
I first call:
0walletprocesspsbt "cHNidP8BAHMCAAAAAXg6mTOjO3d9K0RiVOr87oYRYhYB/Bpomi66nXc85ebsAAAAAAD9////Avs+EQAAAAAAF6kU4lwd88Ejsg5sG0iVOiL2/c05MHKHoIYBAAAAAAAXqRSxG32ZtPml0iJQGDVxp82wjHBD+4cs7RUAAAEBIHZOFQAAAAAAF6kUP2yi0rx2ke1Lmdk5gsR+WIvukb+HAQQWABSL8jhHTVLizeYj0cS1ClE18i8jbCIGAnwLKYOB2pXhdmi+i21xj17Np67DQdv7RPiIVKqOrp++ENZSlGkAAACAAQAAgAAAAIAAAQAWABSLPsswJus4oRP6Zq1BmWcxI5hNQiICAgi7iTon5Hy59yU96uKT12AU4/bhxQy7CeEdkfg5sZLoENZSlGkAAACAAQAAgAEAAIAAAQAWABQ6Ram/bbw29IPN92ylIqYKhU1ThyICA3oH7xQc22oDM2dG6g/VZ05JLscr/hEQKUI4fTMKvUjRENZSlGkAAACAAAAAgAAAAIAA" true ALL true
Which generates:
0cHNidP8BAHMCAAAAAXg6mTOjO3d9K0RiVOr87oYRYhYB/Bpomi66nXc85ebsAAAAAAD9////Avs+EQAAAAAAF6kU4lwd88Ejsg5sG0iVOiL2/c05MHKHoIYBAAAAAAAXqRSxG32ZtPml0iJQGDVxp82wjHBD+4cs7RUAAAEBIHZOFQAAAAAAF6kUP2yi0rx2ke1Lmdk5gsR+WIvukb+HAQcXFgAUi/I4R01S4s3mI9HEtQpRNfIvI2wBCGsCRzBEAiBRE2oCVM2cMWAjt9c17fFUkhcDQmc4aQVDGHp1wnvHbwIgGrV1hMs6ZAbOQL1Dqn06rWOFV3LKzVDglS3v2BQswsABIQJ8CymDgdqV4XZovottcY9ezaeuw0Hb+0T4iFSqjq6fvgABABYAFIs+yzAm6zihE/pmrUGZZzEjmE1CIgICCLuJOifkfLn3JT3q4pPXYBTj9uHFDLsJ4R2R+DmxkugQ1lKUaQAAAIABAACAAQAAgAABABYAFDpFqb9tvDb0g833bKUipgqFTVOHIgIDegfvFBzbagMzZ0bqD9VnTkkuxyv+ERApQjh9Mwq9SNEQ1lKUaQAAAIAAAACAAAAAgAA=
Which is “complete: true” and parses fine. But then if I run walletprocesspsbt
on the result AGAIN (don’t ask why … or do, but this should be idempotent):
0walletprocesspsbt "cHNidP8BAHMCAAAAAXg6mTOjO3d9K0RiVOr87oYRYhYB/Bpomi66nXc85ebsAAAAAAD9////Avs+EQAAAAAAF6kU4lwd88Ejsg5sG0iVOiL2/c05MHKHoIYBAAAAAAAXqRSxG32ZtPml0iJQGDVxp82wjHBD+4cs7RUAAAEBIHZOFQAAAAAAF6kUP2yi0rx2ke1Lmdk5gsR+WIvukb+HAQcXFgAUi/I4R01S4s3mI9HEtQpRNfIvI2wBCGsCRzBEAiBRE2oCVM2cMWAjt9c17fFUkhcDQmc4aQVDGHp1wnvHbwIgGrV1hMs6ZAbOQL1Dqn06rWOFV3LKzVDglS3v2BQswsABIQJ8CymDgdqV4XZovottcY9ezaeuw0Hb+0T4iFSqjq6fvgABABYAFIs+yzAm6zihE/pmrUGZZzEjmE1CIgICCLuJOifkfLn3JT3q4pPXYBTj9uHFDLsJ4R2R+DmxkugQ1lKUaQAAAIABAACAAQAAgAABABYAFDpFqb9tvDb0g833bKUipgqFTVOHIgIDegfvFBzbagMzZ0bqD9VnTkkuxyv+ERApQjh9Mwq9SNEQ1lKUaQAAAIAAAACAAAAAgAA=" true ALL true
I get the following:
0cHNidP8BAHMCAAAAAXg6mTOjO3d9K0RiVOr87oYRYhYB/Bpomi66nXc85ebsAAAAAAD9////Avs+EQAAAAAAF6kU4lwd88Ejsg5sG0iVOiL2/c05MHKHoIYBAAAAAAAXqRSxG32ZtPml0iJQGDVxp82wjHBD+4cs7RUAAAEAigIAAAABLi4h8ViD8SvykywwbO+Tv4GCnfVXwX8TIvfUV85wZgkAAAAAFxYAFNiGEusp8/GHaPxQSib0noXXSyxe/f///wJ2ThUAAAAAABepFD9sotK8dpHtS5nZOYLEfliL7pG/h6CGAQAAAAAAF6kUsRt9mbT5pdIiUBg1cafNsIxwQ/uHF5gVAAEHFxYAFIvyOEdNUuLN5iPRxLUKUTXyLyNsAQhrAkcwRAIgURNqAlTNnDFgI7fXNe3xVJIXA0JnOGkFQxh6dcJ7x28CIBq1dYTLOmQGzkC9Q6p9Oq1jhVdyys1Q4JUt79gULMLAASECfAspg4HaleF2aL6LbXGPXs2nrsNB2/tE+IhUqo6un74AAQAWABSLPsswJus4oRP6Zq1BmWcxI5hNQiICAgi7iTon5Hy59yU96uKT12AU4/bhxQy7CeEdkfg5sZLoENZSlGkAAACAAQAAgAEAAIAAAQAWABQ6Ram/bbw29IPN92ylIqYKhU1ThyICA3oH7xQc22oDM2dG6g/VZ05JLscr/hEQKUI4fTMKvUjRENZSlGkAAACAAAAAgAAAAIAA
Which is still reported as “complete: true”, but when I try to decode or finalize it:
TX decode failed PSBT is not sane.: unspecified iostream_category error (code -22)
I would expect walletprocesspsbt [foo] true ALL true
to be idempotent, or at least produce output that’s parseable.
This is all testnet and I have attached the wallet.dat in case it’s useful (it only has two UTXOs and very few keys.).
I am going to continue trying to debug this, but I figured since I haven’t gotten it yet I should document it. Please let me know if someone else starts looking into it.