@@ -1944,7 +1944,7 @@ the locked transaction replaces the previous funding transaction.
19441944
19451945Each node:
19461946 - If any splice transaction reaches acceptable depth:
1947- - MUST send ` splice_locked ` .
1947+ - MUST send ` splice_locked ` with the ` txid ` of that transaction .
19481948
19491949Once a node has sent and received ` splice_locked ` :
19501950 - MUST consider the locked splice transaction to be the new funding
@@ -1954,18 +1954,6 @@ Once a node has sent and received `splice_locked`:
19541954 - MUST send ` announcement_signatures ` with ` short_channel_id ` matching
19551955 the locked splice transaction.
19561956
1957- On reconnection:
1958- - MUST retransmit its last ` splice_locked ` if the ` commitment_number `
1959- is the same as before sending ` splice_locked ` .
1960-
1961- ##### Rationale
1962-
1963- If a disconnection happens, nodes cannot know whether their peer received
1964- their ` splice_locked ` message, so they retransmit it. Redundant messages
1965- are harmless and can be safely ignored. If updates to the commitment have
1966- been signed, this implicitly acknowledges that ` splice_locked ` has been
1967- received and doesn't need to be retransmitted.
1968-
19691957## Channel Close
19701958
19711959Nodes can negotiate a mutual close of the connection, which unlike a
@@ -2938,6 +2926,9 @@ messages are), they are independent of requirements here.
29382926 1 . type: 0 (` next_funding ` )
29392927 2 . data:
29402928 * [ ` sha256 ` :` next_funding_txid ` ]
2929+ 1 . type: 2 (` my_current_funding_locked ` )
2930+ 2 . data:
2931+ * [ ` sha256 ` :` my_current_funding_locked_txid ` ]
29412932
29422933` next_commitment_number ` : A commitment number is a 48-bit
29432934incrementing counter for each commitment transaction; counters
@@ -2996,6 +2987,13 @@ The sending node:
29962987 - MUST set ` next_commitment_number ` to the commitment number of the ` commitment_signed ` it sent.
29972988 - otherwise:
29982989 - MUST NOT set ` next_funding_txid ` .
2990+ - if ` option_splice ` was negotiated:
2991+ - MUST set ` my_current_funding_locked ` to the ` funding_txid ` of the most recent splice
2992+ transaction for which:
2993+ - it has already sent ` splice_locked ` or it is ready to send ` splice_locked ` after ` channel_reestablish ` .
2994+ - AND it has already received ` splice_locked ` from the remote node.
2995+ - if no splice transaction was ever made on the channel:
2996+ - MUST set ` my_current_funding_locked ` to the initial ` funding_txid ` of the channel.
29992997
30002998A node:
30012999 - if ` next_commitment_number ` is 1 in both the ` channel_reestablish ` it
@@ -3064,11 +3062,16 @@ A receiving node:
30643062 this funding transaction.
30653063
30663064A receiving node:
3067- - MUST send ` splice_locked ` for the most recent splice transaction that reached
3068- acceptable depth, unless ` splice_locked ` was already sent for this transaction
3069- and ` next_commitment_number ` is strictly greater than the ` commitment_number + 1 `
3070- that was used when ` splice_locked ` was previously sent (which indicates that
3071- the previous ` splice_locked ` was received).
3065+ - if ` my_current_funding_locked ` is set:
3066+ - MUST process ` my_current_funding_locked_txid ` as if it was receiving
3067+ ` splice_locked ` for this ` txid ` , and thus discard the previous funding
3068+ transaction and RBF attempts if it has previously sent its own
3069+ ` splice_locked ` for that ` txid ` .
3070+ - if ` my_current_funding_locked_txid ` does not match the most recent
3071+ ` splice_locked ` it has sent:
3072+ - MUST retransmit ` splice_locked ` .
3073+ - otherwise:
3074+ - MUST NOT retransmit ` splice_locked ` .
30723075
30733076A node:
30743077 - MUST NOT assume that previously-transmitted messages were lost,
@@ -3129,16 +3132,6 @@ operation, which is known to have begun after a `commitment_signed` has been
31293132received — hence, the test for a ` next_commitment_number ` greater
31303133than 1.
31313134
3132- A previous draft insisted that the funder "MUST remember ...if it has
3133- broadcast the funding transaction, otherwise it MUST NOT": this was in
3134- fact an impossible requirement. A node must either firstly commit to
3135- disk and secondly broadcast the transaction or vice versa. The new
3136- language reflects this reality: it's surely better to remember a
3137- channel which hasn't been broadcast than to forget one which has!
3138- Similarly, for the fundee's ` funding_signed ` message: it's better to
3139- remember a channel that never opens (and times out) than to let the
3140- funder open it while the fundee has forgotten it.
3141-
31423135A node, which has somehow fallen
31433136behind (e.g. has been restored from old backup), can detect that it has fallen
31443137behind. A fallen-behind node must know it cannot broadcast its current
@@ -3154,6 +3147,15 @@ interactive transaction construction, or safely abort that transaction
31543147if it was not signed by one of the peers, who has thus already removed
31553148it from its state.
31563149
3150+ ` my_current_funding_locked ` allows peers to detect that their ` splice_locked `
3151+ was lost during the disconnection and must be retransmitted. When a splice
3152+ transaction reaches acceptable depth while peers are disconnected, it also
3153+ allows locking that splice transaction immediately after ` channel_reestablish `
3154+ instead of waiting for the ` splice_locked ` message, which could otherwise
3155+ create a race condition with channel updates. For more details about this
3156+ race condition, see [ this example] ( ./bolt02/splicing-test.md#disconnection-with-concurrent-splice_locked ) .
3157+ Redundant ` splice_locked ` messages are harmless and can be safely ignored.
3158+
31573159# Authors
31583160
31593161[ FIXME: Insert Author List ]
0 commit comments