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

graceful: new command to instruct CLN to start shutting down.

Public commit record

What the developer wrote

Authored by Rusty Russell

81/100 · Strong
graceful: new command to instruct CLN to start shutting down.

Based on "lightningd: add "snub-idle-channels" dynamic config variable" by
Matt Whitlock <c-lightning@mattwhitlock.name>.

Fixes: https://github.com/ElementsProject/lightning/issues/4842
Changelog-Added: JSON-RPC: `graceful` command to prepare CLN for shutdown.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit adds a new JSON-RPC command called 'graceful' that lets a Core Lightning node operator tell their node to prepare for shutdown. When invoked, the node stops accepting new HTLCs (payment forwarding commitments), declines to reestablish idle channels, disconnects peers that have no active HTLCs, and waits for any remaining in-flight HTLCs to resolve before returning. It is an operational/administrative feature, not a vulnerability fix. The commit does not change authentication or authorization rules; it only adds a new state (LD_STATE_GRACE) and the logic to enter and exit it safely.

Recommended action

No security action required. Operators may review the new graceful command documentation and consider using it for planned maintenance shutdowns. Reviewers may want to verify that the warning sent during channel_reestablish is well-formed and that the timer-based graceful_disconnect does not race with channel cleanup.

Security signals we found

01

New administrative RPC added (graceful)

02

New daemon state LD_STATE_GRACE introduced

03

Idle channel reestablishment is declined with a warning message during graceful shutdown

04

Idle peers are force-disconnected when no HTLCs remain

05

HTLC expiry information is reported to RPC clients via notifications

06

No authentication, authorization, or cryptographic changes observed

Risk score

Why this scored 22/100

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