Skip to content

Commit 219adca

Browse files
committed
Add context for option_anchors_zero_fee_htlc_tx
1 parent 5fb0b5c commit 219adca

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

02-peer-protocol.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,9 @@ dust exposure. The exact value used is a matter of node policy.
841841

842842
For channels that don't use `option_anchors_zero_fee_htlc_tx`, an increase of
843843
the `feerate_per_kw` may trim multiple htlcs from commitment transactions,
844-
which could create a large increase in dust exposure.
844+
which could create a large increase in dust exposure. If `option_anchors_zero_fee_htlc_tx`
845+
has been negotiated, the HTLC feerate is implied to be 0, the checks should
846+
still be applied as a node can be exposed due to the sum of the trimmed HTLCs.
845847

846848
### Adding an HTLC: `update_add_htlc`
847849

@@ -1165,13 +1167,14 @@ The node _not responsible_ for paying the Bitcoin fee:
11651167
- MUST NOT send `update_fee`.
11661168

11671169
A sending node:
1168-
- if the `update_fee` increases `feerate_per_kw`:
1169-
- if the dust balance of the remote transaction at the updated `feerate_per_kw` is greater than `max_dust_htlc_exposure_msat`:
1170-
- MAY NOT send `update_fee`
1171-
- MAY fail the channel
1172-
- if the dust balance of the local transaction at the updated `feerate_per_kw` is greater than `max_dust_htlc_exposure_msat`:
1173-
- MAY NOT send `update_fee`
1174-
- MAY fail the channel
1170+
- if `option_anchors_zero_fee_htlc_tx` was not negotiated:
1171+
- if the `update_fee` increases `feerate_per_kw`:
1172+
- if the dust balance of the remote transaction at the updated `feerate_per_kw` is greater than `max_dust_htlc_exposure_msat`:
1173+
- MAY NOT send `update_fee`
1174+
- MAY fail the channel
1175+
- if the dust balance of the local transaction at the updated `feerate_per_kw` is greater than `max_dust_htlc_exposure_msat`:
1176+
- MAY NOT send `update_fee`
1177+
- MAY fail the channel
11751178

11761179
A receiving node:
11771180
- if the `update_fee` is too low for timely processing, OR is unreasonably large:
@@ -1182,11 +1185,12 @@ A receiving node:
11821185
current commitment transaction:
11831186
- SHOULD fail the channel,
11841187
- but MAY delay this check until the `update_fee` is committed.
1185-
- if the `update_fee` increases `feerate_per_kw`:
1186-
- if the dust balance of the remote transaction at the updated `feerate_per_kw` is greater then `max_dust_htlc_exposure_msat`:
1187-
- MAY fail the channel
1188-
- if the dust balance of the local transaction at the updated `feerate_per_kw` is greater than `max_dust_htlc_exposure_msat`:
1189-
- MAY fail the channel
1188+
- if `option_anchors_zero_fee_htlc_tx` was not negotiated:
1189+
- if the `update_fee` increases `feerate_per_kw`:
1190+
- if the dust balance of the remote transaction at the updated `feerate_per_kw` is greater then `max_dust_htlc_exposure_msat`:
1191+
- MAY fail the channel
1192+
- if the dust balance of the local transaction at the updated `feerate_per_kw` is greater than `max_dust_htlc_exposure_msat`:
1193+
- MAY fail the channel
11901194

11911195
#### Rationale
11921196

0 commit comments

Comments
 (0)