Skip to content

Commit eace10d

Browse files
committed
Avoid stuck channels after fee increase
Add an additional "reserve" for funders on top of the real reserve to avoid getting in a state where the channel is unusable because of the increased commit tx cost of a new HTLC. Requirements are only added for the funder sending an HTLC. Fundee receiving HTLCs may choose to verify that funders apply this, but it may lead to an unusable UX. Fixes #728.
1 parent 458b0d3 commit eace10d

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

02-peer-protocol.md

+16-3
Original file line numberDiff line numberDiff line change
@@ -787,9 +787,17 @@ is destined, is described in [BOLT #4](04-onion-routing.md).
787787
#### Requirements
788788

789789
A sending node:
790-
- MUST NOT offer `amount_msat` it cannot pay for in the
791-
remote commitment transaction at the current `feerate_per_kw` (see "Updating
792-
Fees") while maintaining its channel reserve.
790+
- if it is _responsible_ for paying the Bitcoin fee:
791+
- MUST NOT offer `amount_msat` it cannot pay for in the remote commitment
792+
transaction at the current `feerate_per_kw` (see "Updating Fees") while
793+
maintaining its channel reserve.
794+
- MUST NOT offer `amount_msat` if the resulting balance doesn't allow it to
795+
pay the fee for a future additional HTLC at `2*feerate_per_kw` while
796+
maintaining its channel reserve.
797+
- if it is _not responsible_ for paying the Bitcoin fee:
798+
- MUST NOT offer `amount_msat` if the remote cannot pay the fee for the
799+
updated commitment transaction at the current `feerate_per_kw` while
800+
maintaining its channel reserve.
793801
- MUST offer `amount_msat` greater than 0.
794802
- MUST NOT offer `amount_msat` below the receiving node's `htlc_minimum_msat`
795803
- MUST set `cltv_expiry` less than 500000000.
@@ -856,6 +864,11 @@ seconds, and the protocol only supports an expiry in blocks.
856864
specification; larger amounts are not necessary, nor wise, during the
857865
bootstrap phase of the network.
858866

867+
The node _responsible_ for paying the Bitcoin fee has to maintain a small
868+
"additional reserve" on top of its reserve to accommodate a fee increase,
869+
otherwise the channel may end up in an unusable state
870+
(see [#728](https://github.com/lightningnetwork/lightning-rfc/issues/728)).
871+
859872
### Removing an HTLC: `update_fulfill_htlc`, `update_fail_htlc`, and `update_fail_malformed_htlc`
860873

861874
For simplicity, a node can only remove HTLCs added by the other node.

0 commit comments

Comments
 (0)