Skip to content

Commit 0750f9e

Browse files
committed
fixup! splicing: use the generic negotiation mechanism to splice in/out of a channel.
Make the requirements for sending `splice` clearer (sender *can* send too-low feerate if it's a reply), and fix issue where both could propose a splice and we'd begin negotiating while changes were still in-flight. Now we always send `splice` reply, but actual negotiation waits until changes have settled, the same way shutdown works
1 parent 6b3dc26 commit 0750f9e

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

02-peer-protocol.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,19 +1212,20 @@ The sender:
12121212
- MUST NOT send `splice` before sending and receiving `funding_locked`.
12131213
- MUST NOT send another splice message while a splice is being negotiated.
12141214
- MUST NOT send a splice message after sending uncommitted changes.
1215-
- If a splice is in progress:
1216-
- MUST NOT send a splice message with `funding_feerate_perkw` which is less than 1.25 the previous `funding_feerate_perkw` (rounded down).
1215+
- If one or more splices is in progress:
1216+
- MUST NOT initiate a splice with `funding_feerate_perkw` which is less than 1.25 the previous `funding_feerate_perkw` (rounded down).
1217+
- MAY reply to a proposed splice with a lower `funding_feerate_perkw`
12171218
- MUST NOT send other channel updates until splice negotiation has completed.
12181219

12191220
The receiver:
1220-
- SHOULD fail the splice if there is an ongoing splice, and the `funding_feerate_perkw` is not at least 1.25 the previous `funding_feerate_perkw` (rounded down).
1221+
- SHOULD fail the splice if:
1222+
- there one or more splices is in progress, AND
1223+
- it has not initiated a `splice` itself, AND
1224+
- the `funding_feerate_perkw` is not at least 1.25 the previous `funding_feerate_perkw` (rounded down).
12211225
- MUST respond with a `splice` message of its own if it has not already.
1222-
- MUST NOT reply with `splice` until all commitment updates are resolved by bother peers.
1223-
- MAY set `funding_feerate_perkw` below the received value.
1226+
- MAY set `funding_feerate_perkw` in the reply below the received value.
12241227
- MUST use the higher of the two `funding_feerate_perkw` as the feerate for
12251228
the splice.
1226-
- MUST NOT send other channel updates until splice negotiation has completed.
1227-
12281229

12291230
#### Rationale
12301231

@@ -1243,7 +1244,8 @@ reply with `revoke_and_ack` before it can finally reply with `splice`.
12431244

12441245
The splice negotiation is very similar to the `init_rbf` negotiation:
12451246
both sides alternate sending `tx_add_input` and `tx_add_output` until
1246-
they both send consecutive `tx_complete`.
1247+
they both send consecutive `tx_complete`. It doesn't begin until both
1248+
commitment transactions are in the same state.
12471249

12481250
### Requirements
12491251

@@ -1255,6 +1257,7 @@ The initiator is defined as the side which offered the higher
12551257
SEC1-encoded node_id.
12561258

12571259
The initiator:
1260+
- MUST NOT send any transaction construction messages until all commitment updates are resolved by both peers.
12581261
- MUST `tx_add_input` an input which spends the current funding transaction output.
12591262
- MUST `tx_add_output` a zero-value output which pays to the two funding keys using the higher of the two `generation` fields.
12601263
- MUST pay for the common fields.

0 commit comments

Comments
 (0)