Uh oh!
There was an error while loading. Please reload this page.
[Splicing] Preserve funding_transaction for the later lifecycle of the channel, simple solution - #3380
Conversation
TheBlueMatt
commented
Oct 23, 2024
We shouldn't keep broadcasting forever, but I think we can trivially solve that by just checking if the funding tx has confirmed before broadcasting? |
jkczyz
commented
Oct 23, 2024
Is that what is checked immediately below where the funding tx was previously taken? rust-lightning/lightning/src/ln/channel.rs Lines 5492 to 5496 in ee23649 Or are there other places we'd need to worry about? |
TheBlueMatt
commented
Oct 23, 2024
Not quite, that will keep broadcasting forever if the channel is 0conf or keep broadcasting after the funding is confirmed at |
optout21
commented
Oct 23, 2024
Indeed, once the funding transaction is confirmed, it makes no sense to rebroadcast, |
TheBlueMatt
commented
Oct 23, 2024
I think with just that change I'd be happy with this PR :) |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File ( |
optout21
commented
Oct 23, 2024
Changed the test for preventing re-broadcast to look whether the funding transaction is confirmed or not (instead of looking at ChannelReady state). |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
optout21
commented
Oct 28, 2024
Addressed @jkczyz 's comments; not yet squashed |
3561196 to
5577a88Compareoptout21
commented
Oct 28, 2024
Squashed with no changes |
Fixes#3300
In splicing, the funding transaction (not just the ID) is needed during splice negotiation.
Funding transaction is kept in field
ChannelContext.funding_transaction.However, the way it is currently used is that it is cleared when the tx is broadcast, and this fact is used in some logic.
This change:
ChannelContext.funding_transactionwhen tx is broadcast, but it's preserved (it's never reset)close_on_unfunded_channel)Note that in some cases the funding transaction may get broadcasted more than once, which is a change in behavior.
Alternative is to preserve behavior, with some extra field, #3317 .