1
0
Fork 0
mirror of https://github.com/lightning/bolts.git synced 2025-03-13 19:37:31 +01:00

Require non-dust output for closer.

You have to give them something which will propagate.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2023-08-01 05:36:21 +09:30 committed by t-bast
parent eef9312965
commit cea5b9a1f0
No known key found for this signature in database
GPG key ID: 34F377B0100ED6BB

View file

@ -1761,6 +1761,7 @@ Both nodes:
The sender of `closing_complete` (aka. "the closer"): 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` to a fee less than or equal to its outstanding balance, rounded down to whole satoshis.
- MUST set `has_closee_output` to 0 if it would be dust (< 540 satoshis for P2SH, < 330 satoshis for P2WSH and P2TR)
- SHOULD set `has_closer_output` to 0 if it considers its own remaining balance to be uneconomic. - SHOULD set `has_closer_output` to 0 if it considers its own remaining balance to be uneconomic.
- Otherwise MUST set `has_closer_output` to 1. - Otherwise MUST set `has_closer_output` to 1.
- If it sets `has_closer_output` to 1: - If it sets `has_closer_output` to 1:
@ -1771,6 +1772,8 @@ The sender of `closing_complete` (aka. "the closer"):
- MUST set `signature_without_closee_output` to a valid signature of a transaction with only the null output as described in [BOLT 3](03-transactions.md#closing-transaction). - MUST set `signature_without_closee_output` to a valid signature of a transaction with only the null output as described in [BOLT 3](03-transactions.md#closing-transaction).
The receiver of `closing_complete` (aka. "the closee"): The receiver of `closing_complete` (aka. "the closee"):
- If `has_closee_output` is 1 and the closer's output would be dust (< 540 satoshis for P2SH, < 330 satoshis for P2WSH and P2TR):
- MUST either send a `warning` and close the connection, or send an `error` and fail the channel.
- if either `signature_with_closee_output` or `signature_without_closee_output` is not valid for the closing transactions specified in [BOLT #3](03-transactions.md#closing-transaction) OR non-compliant with LOW-S-standard rule<sup>[LOWS](https://github.com/bitcoin/bitcoin/pull/6769)</sup>: - if either `signature_with_closee_output` or `signature_without_closee_output` is not valid for the closing transactions specified in [BOLT #3](03-transactions.md#closing-transaction) OR non-compliant with LOW-S-standard rule<sup>[LOWS](https://github.com/bitcoin/bitcoin/pull/6769)</sup>:
- MUST either send a `warning` and close the connection, or send an `error` and fail the channel. - MUST either send a `warning` and close the connection, or send an `error` and fail the channel.
- Otherwise: - Otherwise: