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

lnwallet: absolute fee floor sanity check #4211

Merged
merged 2 commits into from
Apr 21, 2020

Conversation

cfromknecht
Copy link
Contributor

Fixes #4208

This enforces the actualized fee rate of the commitment transaction,
rather than the fee floor used for estimation. The new value of 250
sat/kw corresponds to 1 sat/byte, rather than 253 which is only rounded
up during estimation to account for the fact that BOLT 3 rounds down to
the nearest satoshi and that the vbyte fee estimation is lossy.

This check was added as part of #3821 to catch any bugs in the new
anchor commitment format. The bug is not present in any official
release of lnd, but does affect master, 0.10.0-beta.rc1, and
0.10.0-beta.rc2.

For affected users, restarting with this commit should return the channel to
normal operation unless any pending htlcs have already timed out and
caused the channel to go to chain.

Copy link
Collaborator

@Crypt-iQ Crypt-iQ left a comment

Choose a reason for hiding this comment

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

Travis failing with unable to send fee update, see below comment.

@cfromknecht cfromknecht requested a review from Crypt-iQ April 21, 2020 17:55
@Roasbeef Roasbeef added this to the 0.10.0 milestone Apr 21, 2020
Copy link
Collaborator

@Crypt-iQ Crypt-iQ left a comment

Choose a reason for hiding this comment

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

LGTM once travis green 🤙

This enforces the _actualized_ fee rate of the  commitment transaction,
rather than the fee floor used for estimation. The new value of 250
sat/kw corresponds to 1 sat/byte, rather than 253 which is only rounded
up during estimation to account for the fact that BOLT 3 rounds down to
the nearest satoshi and that the vbyte fee estimation is lossy.

Previously we would incorrectly fail to sign the next commitment even
though the fee was technically high enough. Restarting with this commit
should solve the issue as long as the channel hasn't already gone to
chain.
Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

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

LGTM 💸

@Roasbeef Roasbeef merged commit 528dadd into lightningnetwork:master Apr 21, 2020
@cfromknecht cfromknecht deleted the absolute-fee-floor branch April 22, 2020 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stuck htlc after payment
3 participants