Repository navigation
Keep a signed splice through a user abort and follow BOLT 2's RBF feerate rules - #60
Merged
Merged
Conversation
kwsantiago
force-pushed
the
splicein-signed-inflight
branch
from
October 19, 2026 17:28
5b34087 to
6601b0f
Compare
…not a later splice command
kwsantiago
force-pushed
the
splicein-signed-inflight
branch
from
October 19, 2026 23:20
6601b0f to
1ce0599
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.
Running
splicein(or a splice script) on a channel while the peer's splice was pending turned it into an RBF announced at a quarter of the intended feerate, and when the peer refused it the plugin'sabort_channelsmade channeld abort the peer's splice, which we had already signed, and fail the channel. These changes keep a signed splice through a user abort and make RBFs of a pending splice follow BOLT 2's feerate rules.Aborting:
tx_signaturesfor; an abort during a negotiation only drops the candidate that negotiation added.abort_channelsrefuses a channel whose splice is waiting only on the peer'stx_signatures(pointing at a reconnect, orclose), aborts the other channels it was given, and returns them asrefused. The splice plugin carries on to unreserve and report its own error whenabort_channelsfails.tx_signatureswhen they arrive on a reestablish resume, so it doesn't refuse an abort it no longer needs to.confirmed_stfuarriving after itsstfu_channelscommand has gone leaves STFU, or is ignored if a splice command now has the channel, instead of failing the channel or crashing lightningd.splice_initit refuses, and lightningd frees an inflight's previouslocked_scidwhen channeld updates it.splice_signedthat was pending when it was sent, not a splice command started later on the channel, whose caller got asplice_signedreply (the splice plugin crashed on it).Feerates:
perkw, and weighs the channel input as channeld does when it checks our fee.splice_inituses it by default and refuses less, also undercheck, and refuses more than we'll pay unlessforce_feerateis set. The plugin takes the floor fromlistpeerchannels'next_feerate.tx_abort.Each change has a test that fails without it, in
tests/test_splicing.pyandbitcoin/test/run-next_funding_feerate.c; dev options--dev-splice-warn-instead-of-sigs,--dev-splice-abort-after-sigs,--dev-splice-rbf-any-feerateand--dev-delay-confirmed-stfureach the states they need.Changelog-None