Skip to content

Commit

Permalink
interactive-tx: Add dual-funding flow, using the interactive tx protocol
Browse files Browse the repository at this point in the history
This commit adds the interactive transaction construction protcol, as
well as the first practical example of using it, v2 of channel
establishment.

Note that for v2 we also update the channel_id, which now uses the hash
of the revocation_basepoints. We move away from using the funding
transaction id, as the introduction of RBF* makes it such that a single
channel may have many funding transaction id's over the course of
its lifetime.

*Later, also splicing
  • Loading branch information
niftynei committed Mar 3, 2021
1 parent 80c1ae1 commit f53ca23
Show file tree
Hide file tree
Showing 6 changed files with 1,074 additions and 4 deletions.
21 changes: 21 additions & 0 deletions .aspell.en.pws
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ nhops
retransmitted
dev
tradeoff
kiloweight
mixHeader
uint
hopsData
Expand Down Expand Up @@ -115,6 +116,17 @@ delayedsig
hopDataSize
I'th
segwit
RBF
accepter
accepter's
subtype
redeemScript
scriptSig
utxo
scriptPubKey
scriptPubKeys
scriptlen
sats
htlc
htlcs
ChaCha
Expand Down Expand Up @@ -386,3 +398,12 @@ csv
CHECKSIGVERIFY
IFDUP
sats
workflow
PUSHDATA
prev
vout
rbf
standardness
perkw
prevtx
ints
4 changes: 2 additions & 2 deletions 01-messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,11 @@ The 2-byte `len` field indicates the number of bytes in the immediately followin

The channel is referred to by `channel_id`, unless `channel_id` is 0 (i.e. all bytes are 0), in which case it refers to all channels.

The funding node:
The funding node using channel establishment `open_channel`:
- for all error messages sent before (and including) the `funding_created` message:
- MUST use `temporary_channel_id` in lieu of `channel_id`.

The fundee node:
The fundee node using channel establishment v1 (`accept_channel`):
- for all error messages sent before (and not including) the `funding_signed` message:
- MUST use `temporary_channel_id` in lieu of `channel_id`.

Expand Down

0 comments on commit f53ca23

Please sign in to comment.