mirror of
https://github.com/lightning/bolts.git
synced 2025-03-13 11:35:41 +01:00
BOLT 2: specify nSequence explicitly.
We don't care, as long as it's RBF-able. This will be nicer for Taproot when mutual closes are otherwise indistinguishable from normal spends. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
e8eced6795
commit
9981a0a9f2
2 changed files with 6 additions and 2 deletions
|
@ -1747,6 +1747,7 @@ This process will be repeated every time a `shutdown` message is received, which
|
|||
2. data:
|
||||
* [`channel_id`:`channel_id`]
|
||||
* [`u64`:`fee_satoshis`]
|
||||
* [`u32`:`sequence`]
|
||||
* [`closing_tlvs`:`tlvs`]
|
||||
|
||||
1. `tlv_stream`: `closing_tlvs`
|
||||
|
@ -1779,6 +1780,7 @@ Both nodes:
|
|||
The sender of `closing_complete` (aka. "the closer"):
|
||||
- MUST set `fee_satoshis` to a fee less than or equal to its outstanding balance, rounded down to whole satoshis.
|
||||
- MUST set `fee_satoshis` so that at least one output is not dust.
|
||||
- MUST set `sequence` to a value other than 0xFFFFFFFF.
|
||||
- MUST use the last send and received `shutdown` `scriptpubkey` to generate the closing transaction specified in [BOLT #3](03-transactions.md#closing-transaction).
|
||||
- If it sets `signature` fields, MUST set them as valid signature using its `funding_pubkey` of:
|
||||
- `closer_no_closee`: closing transaction with only the local ("closer") output.
|
||||
|
@ -1800,6 +1802,8 @@ The sender of `closing_complete` (aka. "the closer"):
|
|||
The receiver of `closing_complete` (aka. "the closee"):
|
||||
- If `fee_satoshis` is greater than the closer's outstanding balance:
|
||||
- MUST either send a `warning` and close the connection, or send an `error` and fail the channel.
|
||||
- If `sequence` is equal to 0xFFFFFFFF:
|
||||
- MUST either send a `warning` and close the connection, or send an `error` and fail the channel.
|
||||
- Select a signature for validation:
|
||||
- if the local output amount is dust:
|
||||
- MUST use `closer_no_closee`.
|
||||
|
|
|
@ -396,7 +396,7 @@ than twice `dust_limit_satoshis`.
|
|||
|
||||
This variant is used for `closing_complete` and `closing_sig` messages (i.e. where `option_simple_close` is negotiated).
|
||||
|
||||
In this case, the node sending `closing_complete` ("the closer") pays the fees, and the sequence is set to 0xFFFFFFFD to allow RBF. The outputs are ordered as detailed in [Transaction Output Ordering](#transaction-output-ordering).
|
||||
In this case, the node sending `closing_complete` ("the closer") pays the fees, and the sequence specified to allow RBF. The outputs are ordered as detailed in [Transaction Output Ordering](#transaction-output-ordering).
|
||||
|
||||
The side with lesser funds can opt to omit their own output.
|
||||
|
||||
|
@ -404,7 +404,7 @@ The side with lesser funds can opt to omit their own output.
|
|||
* locktime: 0
|
||||
* txin count: 1
|
||||
* `txin[0]` outpoint: `txid` and `output_index` from `funding_created` message
|
||||
* `txin[0]` sequence: 0xFFFFFFFD
|
||||
* `txin[0]` sequence: `sequence` from `closing_complete` message
|
||||
* `txin[0]` script bytes: 0
|
||||
* `txin[0]` witness: `0 <signature_for_pubkey1> <signature_for_pubkey2>`
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue