lnd icon indicating copy to clipboard operation
lnd copied to clipboard

lnwire+chancloser: add new fee range TLV to co-op msg & use during negotiation

Open Roasbeef opened this issue 4 years ago • 2 comments

In this commit, we add a new FeeRange TLV to the ClosingSigned message that allows either side to attempt to cut the fee negotiation process short by sending their min+max fee. In the ideal case, the funder sends over their fee range, which is accepted by the responder. However, it's possible for things to break down which results in either the close attempting being abandoned, or they fall back to the legacy less defined negotiation process.

We then begin to use the new fee rate information as a hint to allow us to short circuit the co-op close negotiation process by simply echo'ing back the initiator's fee rate if it's within our desired range, or accepting the responder's fee rate for the initiator.

This is just an initial draft, as we still need to hone into exactly what fee range we want to advertise as the initiator.

Implements a variant of https://github.com/lightningnetwork/lightning-rfc/pull/847

Fixes https://github.com/lightningnetwork/lnd/issues/4413

Roasbeef avatar Aug 20 '21 04:08 Roasbeef

The second commit is incomplete as it needs to gate that behavior to retain the prior tests, then add new ones that exercise the new behavior.

Roasbeef avatar Aug 20 '21 05:08 Roasbeef

@crypt-iq: review reminder

lightninglabs-deploy avatar Oct 17 '22 15:10 lightninglabs-deploy

replaced by #7062

Crypt-iQ avatar Oct 19 '22 20:10 Crypt-iQ