AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 30 Bitcoin

payments/migration1: wire KV→SQL migration in the main pkg

Public commit record

What the developer wrote

Authored by ziggie

85/100 · Strong
payments/migration1: wire KV→SQL migration in the main pkg

Hook the payments KV→SQL migration into the SQL migration config.
The migration is still only available when building with the build tag
"test_native_sql".

Moreover a tombstone protection similar to the invoice migration is added
to prevent re-runningi with the KV backend once migration completes.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit wires a new experimental database migration into LND that moves payment data from an older key-value store to a newer SQL-based store. It also adds a 'tombstone' marker so that, once the migration runs, the old key-value store cannot be used again. The change is only active when a special test build tag is used, so it does not affect normal production builds. There is no direct security vulnerability visible in the diff, but any database migration carries operational risks such as data loss or being unable to restart the node if something goes wrong.

Recommended action

Treat this as an infrastructure/operational change rather than a security patch. Reviewers should verify that the migration is correctly gated by the build tag, that tombstone handling cannot be bypassed, and that the migration function handles partial failures safely. Users on experimental 'test_native_sql' builds should back up their databases before upgrading and monitor startup logs for tombstone-related errors.

Security signals we found

01

New database migration path added for payments data

02

Tombstone mechanism prevents fallback to KV backend after migration

03

Migration is gated by experimental build tag 'test_native_sql'

04

Startup abort if tombstone detected while using KV backend

05

No input validation or access-control changes visible in diff

Risk score

Why this scored 30/100

Our methodology →
Potential impact 8/30
Exploitability 3/25
Stealth signal 4/15
Affected reach 5/15
Confidence 7/10
Evidence quality 3/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.