Use 73 bytes der-encoded signatures in weight estimation#3210
Merged
Conversation
While 73 bytes der-encoded signatures aren't standard (they're only possible with high-S signatures), miners could accept such signatures. Most of our tests use 72 bytes der-encoded signatures because we will never generate 73 bytes der-encoded signatures ourselves. But it's more safe to use a 73 bytes signature in our weight estimation because: - it's what the BOLTs recommend - it's what other implementations use (e.g. LDK) which means they may reject our interactive-tx attempts by thinking we're under-paying fees
sstone
reviewed
Nov 5, 2025
…ctions.scala Co-authored-by: Fabrice Drouin <sstone@users.noreply.github.com>
sstone
approved these changes
Nov 5, 2025
|
FYI: LDK seems to be changing it the other direction: lightningdevkit/rust-lightning#4208 |
Member
Author
Damn 😅, but it doesn't matter in our case since we allow the remote node to slightly underpay the estimated fees (to take into account cases where coin selection returns a solution that doesn't have a change output but slightly underpays), we won't reject splicing attempts because of this increased weight. We will slightly overpay the feerate compared to real signature size, but that's negligible. |
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.
While 73 bytes der-encoded signatures aren't standard (they're only possible with high-S signatures), miners could accept such signatures.
Most of our tests use 72 bytes der-encoded signatures because we will never generate 73 bytes der-encoded signatures ourselves. But it's more safe to use a 73 bytes signature in our weight estimation because: