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

tools/lightning-downgrade: tool to downgrade (offline) v25.12 to v25.09.

Public commit record

What the developer wrote

Authored by Rusty Russell

73/100 · Adequate
tools/lightning-downgrade: tool to downgrade (offline) v25.12 to v25.09.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: tools: `lightningd-downgrade` can downgrade your database from v25.12 to v25.09 if something goes wrong.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit adds a new offline command-line tool, lightning-downgrade, that lets a user roll back a Core Lightning node's database from the upcoming v25.12 release to the previous v25.09 release. It is meant as a recovery aid if an upgrade goes wrong. The tool only works when the lightning node is stopped, checks for a running process, and reverses database migrations one by one using built-in revert SQL and functions. It also deletes an incompatible gossip store file after downgrading. There is no direct evidence in the commit that this fixes an active security bug; it is a new operational utility.

Recommended action

Treat this as a new operational tool rather than a security patch. Review the revert SQL and revertfn implementations in wallet/migrations for correctness, ensure the tool cannot be invoked by a running daemon, and consider documenting that users must back up their lightning-dir before attempting a downgrade. Run the new test_downgrade.py in CI with PREV_LIGHTNINGD set to a v25.09 binary.

Security signals we found

01

New database schema mutation utility with revert SQL/function paths

02

Refuses to run when lightningd PID file is present, mitigating live-node downgrade risk

03

Deletes gossip_store when target version is marked incompatible

04

Adds downgrade-specific functional test including payment flow after downgrade/upgrade cycle

Risk score

Why this scored 24/100

Our methodology →
Potential impact 5/30
Exploitability 3/25
Stealth signal 2/15
Affected reach 4/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.