-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
PSBT Funding flow retry, instructions for converting binary PSBT to base64, and accept PSBT from file, #4400
Comments
This is the contents of my unsigned psbt. I cannot get it to be recognized with bitcoin-cli decodepsbt. |
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 To me this sounds like an issue should be opened in the Electrum repo. |
@guggero Thanks for piecing that together. I will make an issue at Electrum, I am running pretty close to master of Electrum. Items 1 & 3 are still valid though. Can you confirm that |
Yes, you are right, items 1 and 3 are still valid. About item 1: The code for the command line PSBT interaction is already pretty complex. Adding a loop to catch encoding errors and letting the user try again would have made it overkill for the initial PR. But I'll keep that in mind for a future PR. About item 3: Yes, the command |
Thanks @SomberNight |
@SomberNight thanks a lot for the links in spesmilo/electrum#6257 (comment)! I knew I should have read into the details of the PSBT vulnerability sooner, I just never got around to do so. Going to create a fix in |
Background
In the PSBT funding flow, if you input the base64 data wrong, it cancels the channel open. This requires you to go back to your hardware devices and resign the PSBT again.
I have a PSBT created in Electrum and signed with coldcards, I can only load it back into electrum, I do not know how to convert it to base64.
It would also be great to be able to input the PSBT as a file, but that is a little challenging since the PSBT address is only created after the command has run.
Your environment
lnd
"version": "0.10.99-beta commit=clock/v1.0.0-85-gacc698a6995b35976950282b29c9685c993a0364",
"commit_hash": "acc698a6995b35976950282b29c9685c993a0364",
uname -a
on *Nix)Ubuntu
btcd
,bitcoind
, or other backendbitcoind
Steps to reproduce
Tell us how to reproduce this issue. Please provide stacktraces and links to code in question.
Generate base64 from electrum psbt file:
base64 testpsbt-signed.psbt -w 0
Expected behaviour
Channel funding flow complete
Actual behaviour
[lncli] verifying PSBT by lnd failed: rpc error: code = Unknown desc = error parsing psbt: Invalid PSBT serialization format
The text was updated successfully, but these errors were encountered: