Skip to content

Commit

Permalink
Merge pull request #4224 from guggero/psbt-warning
Browse files Browse the repository at this point in the history
lncli+docs: add safety warning about not publishing PSBT manually
  • Loading branch information
Roasbeef authored Apr 29, 2020
2 parents 0cf63ae + fb17e9b commit 948fe8c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cmd/lncli/cmd_open_channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ If you are using a wallet that can fund a PSBT directly (currently not possible
with bitcoind), you can use this PSBT that contains the same address and amount:
%s
!!! WARNING !!!
DO NOT PUBLISH the finished transaction by yourself or with another tool.
lnd MUST publish it in the proper funding flow order OR THE FUNDS CAN BE LOST!
Paste the funded PSBT here to continue the funding flow.
Base64 encoded PSBT: `

Expand Down
19 changes: 18 additions & 1 deletion docs/psbt.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ about the pending channel. If the remote node is an `lnd` node, we know it's
after 10 minutes. **So as long as the whole process takes less than 10 minutes,
everything should work fine.**

### Safety warning

**DO NOT PUBLISH** the finished transaction by yourself or with another tool.
lnd MUST publish it in the proper funding flow order **OR THE FUNDS CAN BE
LOST**!

This is very important to remember when using wallets like `Wasabi` for
instance, where the "publish" button is very easy to hit by accident.

### 1. Use the new `--psbt` flag in `lncli openchannel`

The new `--psbt` flag in the `openchannel` command starts an interactive dialog
Expand Down Expand Up @@ -201,7 +210,15 @@ $ bitcoin-cli walletprocesspsbt cHNidP8BAH0CAAAAAbxLLf9+AYfqfF69QAQuETnL6cas7GDi
```
Interpreting the output, we now have a complete, final, and signed transaction
inside the PSBT. Let's give it to `lncli` to continue:
inside the PSBT.
**!!! WARNING !!!**
**DO NOT PUBLISH** the finished transaction by yourself or with another tool.
lnd MUST publish it in the proper funding flow order **OR THE FUNDS CAN BE
LOST**!
Let's give it to `lncli` to continue:
```bash
...
Expand Down

0 comments on commit 948fe8c

Please sign in to comment.