Repository navigation
lightningd: convert the PSBTs dual-open commands and hooks take to version 2 - #53
Merged
Merged
Conversation
kwsantiago
force-pushed
the
dualopen-psbt-v2
branch
from
October 19, 2026 00:33
e8ca267 to
32466e3
Compare
kwsantiago
force-pushed
the
dualopen-psbt-v2
branch
from
October 19, 2026 13:05
32466e3 to
3d63259
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.
openchannel_update,openchannel_signedandopenchannel_bumptook their PSBT as given, and so did the results of the dual-funding hooks (openchannel2,openchannel2_changed,openchannel2_sign,rbf_channel). Code after that assumes version 2: a version 0 PSBT, whichbitcoindand many wallets produce, aborted lightningd on an assertion inpsbt_txidorpsbt_contribs_changed.They now convert it to version 2, as
openchannel_initand the splice commands already do. A command fails if the PSBT can't be converted; a hook result that can't be is fatal, as an unparseable one already is.Tests:
test_v2_open_psbt_version_0: the opener passes version 0 PSBTs toopenchannel_init,openchannel_updateandopenchannel_signed, and the accepter (a test plugin,df_accept_psbt_v0.py) returns version 0 PSBTs fromopenchannel2andopenchannel2_sign.test_v2_rbf_psbt_version_0:openchannel_bump,openchannel_updateandopenchannel_signedwith version 0 PSBTs.Without the change both abort lightningd (
FATAL SIGNAL 6, inpsbt_txid).Changelog-None