Skip to content

Backport 4649 to 0.3#4650

Merged
tnull merged 1 commit into
lightningdevkit:0.3from
benthecarman:backport-4649
Jun 1, 2026
Merged

Backport 4649 to 0.3#4650
tnull merged 1 commit into
lightningdevkit:0.3from
benthecarman:backport-4649

Conversation

@benthecarman
Copy link
Copy Markdown
Contributor

See #4649

@ldk-reviews-bot
Copy link
Copy Markdown

ldk-reviews-bot commented May 31, 2026

👋 Thanks for assigning @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@benthecarman benthecarman requested a review from tnull May 31, 2026 13:09
@ldk-claude-review-bot
Copy link
Copy Markdown
Collaborator

ldk-claude-review-bot commented May 31, 2026

No issues found.

The change correctly extends v1 data detection to scan one directory level deeper, catching v1 layouts where files exist at depth 2 (e.g., data_dir/primary_ns/key). The logic is sound: v2 only stores files at depth 3 (data_dir/<ns>/<sub_ns>/<key>), so any file at depth 1 or 2 reliably indicates v1 data. The known limitation (v1 data with both non-empty namespaces is indistinguishable from v2 at depth 3) is properly documented in the test comments. Tests cover all relevant v1 layout shapes and confirm no false positives for valid v2 data.

Copy link
Copy Markdown
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a Backport of $UPSTREAM_COMMIT_ID as the last line of the commit and note any conflicts (which there aren't).

FilesystemStoreV2 already rejected v1 data when a key file was found
at the store root, but it did not inspect namespace directories. This
missed v1 layouts such as primary/key, where v2 expects primary to
contain secondary namespace directories.

For example, an ldk-node store can contain a BDK descriptor below a
namespace directory. The previous check would accept that directory as
v2 data because the root contained only directories, leaving the
incompatible descriptor file undetected.

Backport of 668b35b
@tnull tnull merged commit 84605cf into lightningdevkit:0.3 Jun 1, 2026
37 of 39 checks passed
@benthecarman benthecarman deleted the backport-4649 branch June 1, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants