Skip to content

Conversation

rustyrussell
Copy link
Contributor

Fixes: #8549

The root cause of this crash is that duplicates can sneak in after a migration; the symptom was that our accounting didn't add up and bookkeeper (rightly!) got upset!

Much thanks to https://github.com/s373nZ for help chasing this down.

@rustyrussell rustyrussell added this to the v25.12 milestone Sep 29, 2025
@rustyrussell rustyrussell added the 25.09.1 Point release for 25.09 label Sep 29, 2025
@rustyrussell rustyrussell force-pushed the guilt/bkpr-crash branch 3 times, most recently from 9bd4f75 to 8f9bf48 Compare October 1, 2025 00:59
…migration.

When we migrate from accounts.db, we use the `account_nonchannel_id`
field.  But we can replay the block chain and the channel involved is
still open, we will use the `account_channel_id` field, and our duplicate
detection fails.

As a result, we can end up with duplicate entries in the database, which
make accounting incorrect.

Signed-off-by: Rusty Russell <[email protected]>
Changelog-Fixed: JSON-RPC: `listchainmoves` could contain bogus duplicate entries after 25.09 bookkeeper migration.
This is based on a real database, which values changed.

Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell rustyrussell merged commit 5b06e65 into ElementsProject:master Oct 2, 2025
69 of 76 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
25.09.1 Point release for 25.09
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bkpr: Running bkpr-listbalances crashes system and creates unusable data store
1 participant