Skip to content

chancloser: account for aux close outputs in initial coop close fee baseline#10969

Open
darioAnongba wants to merge 1 commit into
lightningnetwork:masterfrom
darioAnongba:fix/chancloser-include-aux-outputs
Open

chancloser: account for aux close outputs in initial coop close fee baseline#10969
darioAnongba wants to merge 1 commit into
lightningnetwork:masterfrom
darioAnongba:fix/chancloser-include-aux-outputs

Conversation

@darioAnongba

Copy link
Copy Markdown
Contributor

Reopens #10615, which was auto-closed by GitHub when my fork was deleted. Same commit, same diff.

Problem

Custom channel coop closes can fail with: unable to process close msg: insufficient fee.

Root cause

For taproot/custom channels, ChanCloser computed the initial coop close fee (idealFeeSat) from only local+remote outputs, but the final close tx can include auxiliary extra outputs.

That mismatch can underprice the first accepted close offer (notably in taproot fast-close), causing mempool rejection and peer disconnect.

Fix

Extend coop close fee weight calculation to include optional extra outputs.

@github-actions github-actions Bot added the severity-critical Requires expert review - security/consensus critical label Jul 14, 2026
@github-actions

Copy link
Copy Markdown

🔴 PR Severity: CRITICAL

gh pr view | 3 files | 206 lines changed

🔴 Critical (1 file)
  • lnwallet/chancloser/chancloser.go - lnwallet/* package; implements the cooperative channel-closing state machine (fee negotiation, closing-signature exchange), which directly affects channel funds settlement.
🟢 Low (2 files)
  • lnwallet/chancloser/chancloser_test.go - test-only change, excluded from severity-bump counting but reviewed alongside the production code.
  • docs/release-notes/release-notes-0.21.0.md - release notes update.

Analysis

The core production change is in lnwallet/chancloser/chancloser.go, which sits under lnwallet/* — explicitly listed as a CRITICAL package because it governs channel funding/closing and commitment-related logic. Since chancloser is responsible for negotiating and finalizing on-chain closing transactions, correctness here has direct financial-safety implications, warranting expert review regardless of the modest diff size (86 additions / 11 deletions in the file, well under the >20 files / >500 lines bump thresholds — no severity bump was needed since CRITICAL is already the ceiling).

No override labels were present, so this classification is based purely on file-path rules.


To override, add a severity-override-{critical,high,medium,low} label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

severity-critical Requires expert review - security/consensus critical

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chancloser: account for aux close outputs in initial coop close fee baseline

1 participant