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 2, 2021
1 parent 946bbeb commit 65f14c9
Show file tree
Hide file tree
Showing 6 changed files with 1,089 additions and 4 deletions.
31 changes: 31 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,31 @@ delayedsig
hopDataSize
I'th
segwit
SegWit
sizeof
varint
tlv
rbf
RBF
accepter
accepter's
subtype
subsubtype
redeemScript
UTXO
utxo
utxos
scriptPubkey
scriptPubKey
scriptPubKeys
RBFs
ack'd
scriptlen
btc
sats
prevoutnum
prevtxid
ints
htlc
htlcs
ChaCha
Expand Down Expand Up @@ -386,3 +412,8 @@ csv
CHECKSIGVERIFY
IFDUP
sats
workflow
PUSHDATA
perkw
prev
vout
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
Loading

0 comments on commit 65f14c9

Please sign in to comment.