Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue importing multi-sig PSBT from electrum into bitcoin core & LND #6257

Closed
kornpow opened this issue Jun 22, 2020 · 1 comment
Closed
Labels
topic-transactions 📑 related to logic in transaction.py

Comments

@kornpow
Copy link

kornpow commented Jun 22, 2020

I am having an issue decoding a PSBT file generated with electrum. In my case I am using a Coldcard setup as a multisignature wallet.

lightningnetwork/lnd#4400

To replicate:

  1. Open electrum skeleton file created by coldcard
  2. Create a new transaction in electrum, save psbt to file on MicroSD.
  3. Sign as many times needed for multi-sig (Optional)
  4. Bring MicroSD back to computer

When sanity checking the psbt, is when I start seeing issues:
base64 mypsbt-signed.psbt -w 0
In addition, the unsigned psbt gives the same error, so I don't think the ColdCard is causing the issue.

bitcoin-cli decodepsbt {base64 data from above}

Results:
error code: -22 error message: TX decode failed PSBT is not sane.: iostream error

From the linked issue, the LND developer said:

I had a look at the PSBT. The binary encoding looks OK but it doesn't follow one of the rules for consistency that's why it's rejected.

The violated rule is: if WitnessUtxo is nil then WitnessScript MUST also be nil.
It looks like Electrum might have accidentally put a witness UTXO as a NonWitnessUtxo? I can't find any of the UTXOs but that could be because my JSON serializer doesn't display them properly. To me this sounds like an issue should be opened in the Electrum repo.

@SomberNight
Copy link
Member

SomberNight commented Jun 22, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-transactions 📑 related to logic in transaction.py
Projects
None yet
Development

No branches or pull requests

2 participants