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

Merge pull request #11575 from Roasbeef/rbf-coop-close-lifecycle

Public commit record

What the developer wrote

Authored by Olaoluwa Osuntokun

73/100 · Adequate
Merge pull request #11575 from Roasbeef/rbf-coop-close-lifecycle

peer+chancloser: buffer RBF close bumps in FSM and tear down on CloseFin
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes bugs in LND's new RBF-style cooperative channel close feature. Previously, fee-bump requests could be dropped or block the peer's main goroutine while waiting for an in-progress offer. The patch buffers those requests inside the state machine, lets callers cancel only their own buffered bump, and ensures that once a close is confirmed the channel and switch link are torn down for both locally and remotely initiated closes. It also cleans up how the peer recovers from state-machine errors and retries.

Recommended action

Treat this as a bug-fix patch for the RBF cooperative close subsystem. Reviewers should verify that buffered `LocalCloseReq` events cannot be replayed after `CloseFin`, that `CancelPendingOffer` sequence numbers cannot collide or be forged by a remote peer, and that `WipeChannel` is safe to call from the lifecycle sentinel goroutine. Operators running nodes that use RBF cooperative close should plan to upgrade once this reaches a release.

Security signals we found

01

Denial-of-service / liveness fix: fee-bump requests no longer block the peer's `channelManager` goroutine while waiting for an in-flight offer.

02

State consistency fix: buffered fee-bump requests are now part of the FSM state instead of being dropped during shutdown or flush.

03

Resource-leak fix: confirmed RBF closes now tear down the active channel state and switch link for both local and remote-initiated closes.

04

Race/identity fix: RPC callers are bound to a specific live closer via `isSameLiveRbfCloser`, preventing stale observers from acting on replaced or stopped state machines.

05

Error-handling fix: FSM errors now answer waiting callers and retire the stopped closer before re-initializing, avoiding leaked registrations and duplicate endpoints.

Risk score

Why this scored 45/100

Our methodology →
Potential impact 12/30
Exploitability 5/25
Stealth signal 6/15
Affected reach 10/15
Confidence 8/10
Evidence quality 4/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.