Repository navigation
Conversation
|
I've assigned @tnull as a reviewer! |
ajaysehwal
reviewed
Nov 17, 2026
ajaysehwal
left a comment
Contributor
There was a problem hiding this comment.
@elnafateh This looks like a local draft of the PR description that got committed by accident. Could you drop it from the commit?
ajaysehwal
reviewed
Nov 17, 2026
tnull
reviewed
Nov 17, 2026
tnull
left a comment
Collaborator
There was a problem hiding this comment.
Not quite sure this is worth fixing honestly, as the splicing API does assume the caller is trusted (they can otherwise mess with us in various other ways). That said, fine to switch to saturating arithmetic, but let's not add more than the 1-2 line diff.
elnafateh
force-pushed
the
fix/splice-feerate-overflow
branch
from
November 17, 2026 11:25
a77e5ba to
b839bad
Compare
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.
Problem
The splice fee ceiling uses unchecked multiplication. Extreme caller-supplied fee rates can overflow it, causing debug builds to panic and release builds to calculate an invalid ceiling.
Fix
Calculate the 1.5× ceiling using saturating arithmetic. Normal rates keep the same ceiling; unrepresentable results clamp to FeeRate::MAX. Add boundary coverage for rates above the multiplication limit and FeeRate::MAX.