Uh oh!
There was an error while loading. Please reload this page.
channelmonitor: Persist force-close broadcast preference - #3893
channelmonitor: Persist force-close broadcast preference#3893martinsaposnic wants to merge 1 commit into
Conversation
👋 I see @joostjager was un-assigned. |
Uh oh!
There was an error while loading. Please reload this page.
Add allow_automated_broadcast flag to ChannelMonitor to prevent automatic commitment transaction broadcasting when channel was previously force-closed with should_broadcast=false. Fixes unsafe broadcast on startup when ChannelManager finds orphaned monitors that were intentionally closed without broadcasting.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #3893 +/- ##
==========================================
- Coverage 89.65% 88.77% -0.89%
==========================================
Files 164 164 Lines 134659 117502 -17157 Branches 134659 117502 -17157 ==========================================
- Hits 120731 104313 -16418 + Misses 11248 10846 -402 + Partials 2680 2343 -337 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tnull
left a comment
There was a problem hiding this comment.
This seems to conflict with the changes in #3881 which entirely removes the 'force close without broadcasting' case.
@TheBlueMatt@martinsaposnic Any thoughts how to resolve this?
martinsaposnic
commented
Jun 27, 2025
It seems Unless there’s a follow up plan to refactor that path as well, the bug addressed in this PR could still occur even after #3881 is merged. I’m still getting familiar with this part of the codebase, so let me know if I’ve misunderstood anything @tnull cc @TheBlueMatt |
#3881 doesn't attempt to "fix" the issue, but rather remove the issue by just calling the API itself a bug and deciding that we don't want have the ability to force-close a channel without broadcasting at all (only setting the skip-broadcasting flag in cases where the channel was never opened, and, indeed, not being perfect about it but its not a major issue at that point, vs today where a user took an action implying they are running with stale state and we broadcasted their state anyway!). Instead, I was hoping that we could transition the "I have stale state and want to reclaim my funds without broadcasting that state" logic to a new flow entirely (what was started in #2943) which is basically just "here's a pile of I was suggesting we go ahead and remove the existing flow because I don't actually think anyone has ever implemented it, though I admit getting a new flow in place might take some time |
ldk-reviews-bot
commented
Jun 28, 2025
🔔 1st Reminder Hey @joostjager! This PR has been waiting for your review. |
joostjager
commented
Jun 30, 2025
Unassigned myself as reviewer, as there are open design questions. |
martinsaposnic
commented
Jul 15, 2025
Closing in favor of #3881 that was merged and fixed the issue |
fixes#1563
Add allow_automated_broadcast flag to ChannelMonitor to prevent automatic commitment transaction broadcasting when channel was previously force-closed with should_broadcast=false.
Fixes unsafe broadcast on startup when ChannelManager finds orphaned monitors that were intentionally closed without broadcasting.