Skip to content

Commit 3e7771e

Browse files
committed
Drop non-segwit support in shutdown
This allows dust limit to go as low as 354 sats without creating relay issues with default node policies. We add a requirement that dust limit cannot be lower than 354 sats. This ensures implementers don't have to figure this subtlety on their own.
1 parent 0e39482 commit 3e7771e

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

02-peer-protocol.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ The receiving node MAY fail the channel if:
258258
- it considers `max_htlc_value_in_flight_msat` too small.
259259
- it considers `channel_reserve_satoshis` too large.
260260
- it considers `max_accepted_htlcs` too small.
261-
- it considers `dust_limit_satoshis` too small and plans to rely on the sending node publishing its commitment transaction in the event of a data loss (see [message-retransmission](02-peer-protocol.md#message-retransmission)).
262261
- it considers `dust_limit_satoshis` too large.
263262

264263
The receiving node MUST fail the channel if:
@@ -270,6 +269,7 @@ The receiving node MUST fail the channel if:
270269
- `funding_pubkey`, `revocation_basepoint`, `htlc_basepoint`, `payment_basepoint`, or `delayed_payment_basepoint`
271270
are not valid secp256k1 pubkeys in compressed format.
272271
- `dust_limit_satoshis` is greater than `channel_reserve_satoshis`.
272+
- `dust_limit_satoshis` is smaller than `354 satoshis` (see [BOLT 3](03-transactions.md#dust-limits)).
273273
- the funder's amount for the initial commitment transaction is not sufficient for full [fee payment](03-transactions.md#fee-payment).
274274
- both `to_local` and `to_remote` amounts for the initial commitment transaction are less than or equal to `channel_reserve_satoshis` (see [BOLT 3](03-transactions.md#commitment-transaction-outputs)).
275275
- `funding_satoshis` is greater than or equal to 2^24 and the receiver does not support `option_support_large_channel`.
@@ -547,12 +547,9 @@ A sending node:
547547
- MUST send the same value in `scriptpubkey`.
548548
- MUST set `scriptpubkey` in one of the following forms:
549549

550-
1. `OP_DUP` `OP_HASH160` `20` 20-bytes `OP_EQUALVERIFY` `OP_CHECKSIG`
551-
(pay to pubkey hash), OR
552-
2. `OP_HASH160` `20` 20-bytes `OP_EQUAL` (pay to script hash), OR
553-
3. `OP_0` `20` 20-bytes (version 0 pay to witness pubkey hash), OR
554-
4. `OP_0` `32` 32-bytes (version 0 pay to witness script hash), OR
555-
5. if (and only if) `option_shutdown_anysegwit` is negotiated:
550+
1. `OP_0` `20` 20-bytes (version 0 pay to witness pubkey hash), OR
551+
2. `OP_0` `32` 32-bytes (version 0 pay to witness script hash), OR
552+
3. if (and only if) `option_shutdown_anysegwit` is negotiated:
556553
* `OP_1` through `OP_16` inclusive, followed by a single push of 2 to 40 bytes
557554
(witness program versions 1 through 16)
558555

@@ -580,8 +577,8 @@ may immediately begin closing negotiation, so we ban further updates
580577
to the commitment transaction (in particular, `update_fee` would be
581578
possible otherwise).
582579

583-
The `scriptpubkey` forms include only standard forms accepted by the
584-
Bitcoin network, which ensures the resulting transaction will
580+
The `scriptpubkey` forms include only standard segwit forms accepted by
581+
the Bitcoin network, which ensures the resulting transaction will
585582
propagate to miners.
586583

587584
The `option_upfront_shutdown_script` feature means that the node
@@ -678,6 +675,10 @@ The receiving node:
678675
- MUST propose a value "strictly between" the received `fee_satoshis`
679676
and its previously-sent `fee_satoshis`.
680677

678+
The receiving node:
679+
- if one of the outputs in the closing transaction is below the dust limit for its `scriptpubkey` (see [BOLT 3](03-transactions.md#dust-limits)):
680+
- MUST fail the channel
681+
681682
#### Rationale
682683

683684
When `fee_range` is not provided, the "strictly between" requirement ensures

0 commit comments

Comments
 (0)