Conversation
… write protection
|
@claude regarding this conclusion:
How do we simulate this scenario to test it?! |
|
Claude finished @ovitrif's task in 1m 27s —— View job How to Simulate the Stale Channel Monitor Scenario
Background: What makes this happenThe bug requires three conditions to be true simultaneously:
Step-by-Step SimulationPrerequisites:
Option A — Controlled Regtest Setup (Recommended)
Option B — Already-Migrated Device (Shortcut)If you have a device that already completed migration and has had Lightning activity since:
What to Check in LogsWhen the scenario is triggered, look for these log entries:
Key Code Paths
|
|
Replaced by #502 |
Description
This PR bumps ldk-node from
c5698d0(post-rc.32) tov0.7.0-rc.33which includes migration-aware write protection inapply_channel_data_migration().The root cause: PR #462 introduced orphaned channel monitor recovery that re-fetches all RN monitors from the remote backup. The previous ldk-node version blindly wrote migration monitors to storage, overwriting existing ones — including monitors that had advanced far beyond the old RN version. This caused LDK to detect stale monitors and refuse to start, leaving users with a frozen balance.
v0.7.0-rc.33comparesupdate_idbefore writing and skips if the existing monitor is newer or equal, preventing the overwrite entirely at the Rust level.Note: recovery for already-affected users still requires a separate ldk-node change (accept stale monitors + cooperative close). See PR #495 comments for details.
Linked Issues/Tasks
Related PRs:
Screenshot / Video
N/A - dependency bump