You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: 02-peer-protocol.md
+19-10Lines changed: 19 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -258,7 +258,6 @@ The receiving node MAY fail the channel if:
258
258
- it considers `max_htlc_value_in_flight_msat` too small.
259
259
- it considers `channel_reserve_satoshis` too large.
260
260
- 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)).
262
261
- it considers `dust_limit_satoshis` too large.
263
262
264
263
The receiving node MUST fail the channel if:
@@ -270,6 +269,7 @@ The receiving node MUST fail the channel if:
270
269
-`funding_pubkey`, `revocation_basepoint`, `htlc_basepoint`, `payment_basepoint`, or `delayed_payment_basepoint`
271
270
are not valid secp256k1 pubkeys in compressed format.
272
271
-`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)).
273
273
- the funder's amount for the initial commitment transaction is not sufficient for full [fee payment](03-transactions.md#fee-payment).
274
274
- 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)).
275
275
-`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:
547
547
- MUST send the same value in `scriptpubkey`.
548
548
- MUST set `scriptpubkey` in one of the following forms:
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:
556
553
*`OP_1` through `OP_16` inclusive, followed by a single push of 2 to 40 bytes
557
554
(witness program versions 1 through 16)
558
555
@@ -580,9 +577,11 @@ may immediately begin closing negotiation, so we ban further updates
580
577
to the commitment transaction (in particular, `update_fee` would be
581
578
possible otherwise).
582
579
583
-
The `scriptpubkey` forms include only standard forms accepted by the
584
-
Bitcoin network, which ensures the resulting transaction will
585
-
propagate to miners.
580
+
The `scriptpubkey` forms include only standard segwit forms accepted by
581
+
the Bitcoin network, which ensures the resulting transaction will
582
+
propagate to miners. However old nodes may send non-segwit scripts, which
583
+
may be accepted for backwards-compatibility (with a caveat to force-close
584
+
if this output doesn't meet dust relay requirements).
586
585
587
586
The `option_upfront_shutdown_script` feature means that the node
588
587
wanted to pre-commit to `shutdown_scriptpubkey` in case it was
@@ -678,6 +677,10 @@ The receiving node:
678
677
- MUST propose a value "strictly between" the received `fee_satoshis`
679
678
and its previously-sent `fee_satoshis`.
680
679
680
+
The receiving node:
681
+
- 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)):
682
+
- MUST fail the channel
683
+
681
684
#### Rationale
682
685
683
686
When `fee_range` is not provided, the "strictly between" requirement ensures
@@ -694,6 +697,12 @@ to have a maximum feerate. It may want a minimum feerate, however, to ensure
694
697
that the transaction propagates. It can always use CPFP later to speed up
695
698
confirmation if necessary, so that minimum should be low.
696
699
700
+
It may happen that the closing transaction doesn't meet bitcoin's default relay
701
+
policies (e.g. when using a non-segwit shutdown script for an output below 546
702
+
satoshis, which is possible if `dust_limit_satoshis` is below 546 satoshis).
703
+
No funds are at risk when that happens, but the channel must be force-closed as
704
+
the closing transaction will likely never reach miners.
705
+
697
706
## Normal Operation
698
707
699
708
Once both nodes have exchanged `funding_locked` (and optionally [`announcement_signatures`](07-routing-gossip.md#the-announcement_signatures-message)), the channel can be used to make payments via Hashed Time Locked Contracts.
0 commit comments