Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More flexible mutual close fees #261

Merged
merged 1 commit into from
Feb 7, 2022
Merged

More flexible mutual close fees #261

merged 1 commit into from
Feb 7, 2022

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented Apr 28, 2021

Add support for https://github.com/lightningnetwork/lightning-rfc#847

With legacy nodes, we will keep the existing behavior (slowly converge on a fee).
But for nodes that support closing fee_ranges, mutual close will take much less round-trips.
This has also been implemented in eclair: ACINQ/eclair#1768

Open question: should we drop support for the old negotiation and greatly simplify that code?

NB: this builds on #277 to leverage the new ChannelState version, and should be included in the same release.

val nextState = this.copy(
commitments = commitments.copy(remoteChannelData = event.message.channelData),
closingTxProposed = closingProposed1,
bestUnpublishedClosingTx = closingTx
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NB: there was a bug here: we must use signedClosingTx and not closingTx, otherwise we're forgetting our peer's signature 🤕

t-bast added a commit that referenced this pull request Jul 16, 2021
We don't send any warning message yet, but we will use it for #261 and #277.
t-bast added a commit that referenced this pull request Aug 9, 2021
We don't send any warning message yet, but we will use it for #261 and #277.
t-bast added a commit that referenced this pull request Aug 13, 2021
We don't send any warning message yet, but we will use it for #261 and #277.
@t-bast t-bast requested a review from sstone August 17, 2021 13:48
@t-bast t-bast force-pushed the closing-fee-range branch 2 times, most recently from 6734ec1 to 183aa1a Compare August 31, 2021 10:32
@t-bast t-bast force-pushed the closing-fee-range branch 4 times, most recently from 1aacad6 to d0784ac Compare September 27, 2021 12:04
Add support for https://github.com/lightningnetwork/lightning-rfc#847

With legacy nodes, we will keep the existing behavior (slowly converge on
a fee). But for nodes that support closing fee_ranges, mutual close will
take much less round-trips.
@t-bast t-bast merged commit 245598d into master Feb 7, 2022
@t-bast t-bast deleted the closing-fee-range branch February 7, 2022 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants