Apply RBF limits to remote closing transactions - #3331
Merged
Conversation
When using `option_simple_close`, we didn't apply explicit rate-limits to remote closing transactions, apart from the fact that the feerate must be higher for each attempt. There is no good reason to make a large number of RBF attempts when closing a channel cooperatively, so we apply the same rate-limits we use for funding.
We apply the BOLTs recommendation for the maximum number of closing transactions we create when using the legacy closing protocol (not `option_simple_close`). We previously restricted remote closing transactions, but we now also apply it to our local transactions.
We previously only applied the rate-limit (X attempts every Y blocks) but we didn't apply the maximum attempts limit. The risk is that we may end up with a splice that is stuck unconfirmed, but will eventually confirm, unless the peer is malicious and the feerate was very badly estimated (in which case they would have found a way to prevent the splice from confirming anyway).
sstone
approved these changes
Jul 28, 2026
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 using
option_simple_close, we didn't apply explicit rate-limits to remote closing transactions, apart from the fact that the feerate must be higher for each attempt.There is no good reason to make a large number of RBF attempts when closing a channel cooperatively, so we apply the same rate-limits we use for funding.