forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closingd: fix case where we we can pass under min-relay-fee for mutua…
…l close. In spec commit 498f104fd399488c77f449d05cb21c0b604636a2 (August 2021), Bastien Teinturier removed the requirement that the mutual close fee be less than or equal the final commitment tx. We adopted that change in v0.10.2, but we made sure to never offer a fee under the final commitment tx's fee, so we didn't break older nodes. However, the closing tx can actually be larger than the final commitment tx! The final commit tx has a 22-byte P2WKH output and a 34-byte P2WSH output; the closing can have two 34-byte outputs, making it 4*8 = 32 Sipa heavier. Previously this would only happen if both sides asked for P2WSH outputs, but now it happens with P2TR, which we now do. The result is that we create a tx which is below the finally commitment tx fee, and may be below minrelayfee (as it was in regtest). So it's time to remove that backwards-compatibility hack. Changelog-Fixed: Protocol: We may propose mutual close transaction which has a slightly higher fee than the final commitment tx (depending on the outputs, e.g. two taproot outputs). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Fixes: ElementsProject#6545
- Loading branch information
1 parent
c78b126
commit c7d6dd3
Showing
4 changed files
with
39 additions
and
72 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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