Reduce our stated max closing-transaction fee to be the true value#1072
Merged
TheBlueMatt merged 1 commit intoSep 13, 2021
Merged
Conversation
When communicating the maximum fee we're willing to accept on a cooperative closing transaction to our peer, we currently tell them we'll accept `u64::max_value()` if they're the ones who have to pay it. Spec-wise this is fine - they aren't allowed to try to claim our balance, and we don't care how much of their own funds they want to spend on transaction fees. However, the Eclair folks prefer to check all values on the wire do not exceed 21 million BTC, which seems like generally good practice to avoid overflows and such issues. Thus, our close messages are rejected by Eclair. Here we simply relax our stated maximum to be the real value - our counterparty's current balance in satoshis. Fixes lightningdevkit#1071
d06da07 to
b348d9c
Compare
Codecov Report
@@ Coverage Diff @@
## main #1072 +/- ##
==========================================
+ Coverage 90.87% 91.40% +0.53%
==========================================
Files 65 65
Lines 33229 35185 +1956
==========================================
+ Hits 30196 32162 +1966
+ Misses 3033 3023 -10
Continue to review full report at Codecov.
|
ariard
reviewed
Sep 10, 2021
valentinewallace
approved these changes
Sep 11, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When communicating the maximum fee we're willing to accept on a
cooperative closing transaction to our peer, we currently tell them
we'll accept
u64::max_value()if they're the ones who have to payit. Spec-wise this is fine - they aren't allowed to try to claim
our balance, and we don't care how much of their own funds they
want to spend on transaction fees.
However, the Eclair folks prefer to check all values on the wire
do not exceed 21 million BTC, which seems like generally good
practice to avoid overflows and such issues. Thus, our close
messages are rejected by Eclair.
Here we simply relax our stated maximum to be the real value - our
counterparty's current balance in satoshis.
Fixes #1071