Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.
Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.
This commit only updates documentation. It adds new version entries to the manual page for the lightning-downgrade tool and mentions the tool in the upgrade guide. No code, database logic, or security behavior is changed.
This is a packaging/build fix, not a security vulnerability. The `lightning-downgrade` utility was being compiled but accidentally left out of the list of programs installed by `make install`. As a result, official release archives contain…
This commit fixes a database upgrade bug in Core Lightning. Wallets created with version v26.06.10 were missing two new tables (our_outputs and our_txs) because they skipped the migrations that create them. When users later upgraded, a fol…
Database migration failure could prevent node startup after upgradeFixes missing table creation before data backfillAdds regression test for upgrade path from v26.06.10
This commit is a routine version bump from v26.06.10 to v26.12rc1 for Core Lightning. It only updates version strings in packaging files, a changelog, and a lockfile. There are no code changes that introduce, fix, or modify any security-se…
This commit fixes a database bug in Core Lightning where failure details for a payment attempt were being overwritten by later retry attempts that shared the same payment identifier fragment. The fix makes the failure record match on an ad…
Data integrity bug causing incorrect error reporting across payment retry groupsNo memory safety, authentication, authorization, or cryptographic issues presentNo external input is trusted or validated differently
This commit fixes a bug in Core Lightning's Rust plugin library where a plugin could crash with a panic if it tried to log a message after the internal log-writing task had already stopped, such as during shutdown. The fix makes the plugin…
panic on send failure replaced with stderr fallbacklog message no longer silently dropped on writer task exitunit test added for dropped-receiver scenario
This commit only adds documentation to the manual page for an existing command-line tool (hsmtool). It explains how to recover funds from old Lightning payment commitments (HTLCs) after losing channel state. There are no code changes, no n…
This commit only changes a test file to make a flaky test more reliable. It does not modify any production code, so it has no security impact on real users.
This commit only updates documentation to explain that the `listtransactions` command reports a block height and transaction index of 0 when a transaction is not currently in a block (for example, because it hasn't been mined yet or was re…
This is a small bug fix in a Python helper library used by Core Lightning. The Millisatoshi.to_approx_str() method previously crashed with a math error when converting a zero amount to a human-readable string. The patch makes zero return "…
No security-relevant signals presentFix is a routine correctness/robustness improvement
This commit is a trivial formatting cleanup (removing an extra blank line and adding one) in a test file. It does not change any code behavior, fix any bug, or alter any security-relevant logic.
This update fixes a crash in two wallet commands, addpsbtoutput and addpsbtinput. These commands let users add extra transaction outputs or inputs to a PSBT (a Bitcoin transaction planning file). If a user supplied a PSBT whose version 2 '…
Daemon crash (assertion failure) on crafted/strict PSBT inputMissing validation of PSBT v2 modifiable flags before mutationUser-controlled input directly passed to libwally without precondition check
This commit only adds a new test case that demonstrates two Core Lightning commands, addpsbtoutput and addpsbtinput, crash with an internal assertion when given a v2 PSBT that does not allow adding inputs or outputs. The test is marked as …
Daemon abort due to failed assertion in PSBT helper functionsRPC commands addpsbtoutput and addpsbtinput lack validation of PSBT modifiability flags before calling libwallyPotential denial-of-service vector: any caller able to submit a crafted v2 PSBT can crash lightningd
This commit fixes a minor bug in Core Lightning's Python client library where calling a pretty-printing method on a zero-amount payment would crash with a ValueError. It is a routine correctness fix, not a security vulnerability. There is …
This commit adds missing safety checks in Core Lightning when a peer sends signatures for opening or splicing a dual-funded Lightning channel. Before the patch, the software accepted peer-provided transaction witnesses without verifying th…
Missing input validation on peer-provided witness dataBOLT-2 compliance fix for tx_signaturesRejection of empty witness stacks
This fix prevents a user-issued 'abort channels' command from incorrectly failing a Lightning channel when a splice transaction has already been signed. Previously, the code would pass the latest in-flight splice to a routine that aborts i…
Denial-of-service/availability impact: user-initiated abort could inadvertently fail a funded channelProtocol compliance fix: avoids sending tx_abort after tx_signatures, which BOLT 2 forbidsState-handling bug in splice negotiation lifecycle
This update fixes a bug where a specific type of Lightning channel close could crash the node. It only happens when both parties cooperatively close a dual-funded channel that has not yet been confirmed and has gone through a funding bump …
NULL pointer dereference leading to daemon crash (denial of service)Crash occurs in cooperative-close path for unconfirmed dual-funded/RBF channelsFix uses canonical channel funding key instead of splice-only field
This commit fixes a security bug in Core Lightning's gRPC plugin (cln-grpc). Previously, a malformed request from a gRPC client could crash the plugin: bad public keys, hashes, secrets, channel IDs, or enum values triggered Rust 'unwrap()'…
Denial-of-service via malformed gRPC request causing tonic worker task panicDenial-of-service via std::process::exit(1) in ProofField conversion on missing oneofSilent integer truncation of u16/u8 fields via 'as' casts
This commit removes the protobuf package from the Nix build environment because it is no longer needed. A previous change made the cln-grpc component use its own bundled protoc compiler instead of relying on the system one. The Python bind…
This commit adds a new automated check to the project's build process that compares gRPC protocol definitions against the last release to catch accidental breaking changes early. It does not change any runtime code, fix a bug, or introduce…
Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.
Lower-prioritypytest: a confirmed splice output spent before splice_locked must be adoptedby Níckolas Goline · 1a46973e · Sep 18, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Níckolas Goline
pytest: a confirmed splice output spent before splice_locked must be adopted
splice_locked needs both sides. A peer that never sends it and closes on the confirmed splice output leaves us in CHANNELD_AWAITING_SPLICE with channel->funding still the outpoint the splice spent, and the candidate watch hands onchaind that stale funding. Expected to fail until the next commit.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit 3a91f44362d0d40ba1574835c9d61d98314920d0)
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
l1 isn't part of the l2-l3 funding, so join_nodes([l2, l3]) can leave it a block behind. The final CLTV only just meets l3's cltv-final, so l3 then rejects with "Expiry cltv too soon" and l1 reports the opaque "Malformed error reply". Sync all nodes before reading the blockheight.
wallet: fixed timestamps for invented bookkeeper deposits
migrate_setup_coinmoves() stamped wallet deposits with wall-clock time via coinmvt_current_time(), so a slow migration could place the deposit after the channel journal entry in bkpr-listaccountevents, flaking test_migration_no_bkpr.
Use base_timestamp + 1, like the channel moves, so the order is stable.
Changelog-None
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100
This is a tiny internal fix to make a bookkeeping migration produce stable event ordering. It changes the timestamp used when creating historical 'deposit' records during a one-time database migration, so the records sort consistently with channel records instead of using the real-time clock. There is no security issue here.
tests: wait for peer disconnect in test_blindedpath_noaddr
l2.rpc.disconnect() returns before l3 notices the socket close, so l3 could still see l2 as connected and add a route hint, flaking the check that a disconnected peer is not used as a blinded path entry.
Changelog-None
83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
bitcoin: free the de-hexed block when parsing fails
linear_tx hangs off ctx, so the failure paths free b and leave it behind.
65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Lower-prioritylightningd: refuse a dual-funded candidate that reuses a funding outpointby Níckolas Goline · 28ee9ea1 · Sep 16, 2026 · 2 filesMessage 73 · AdequateTriage 0Details
Commit message · Níckolas Goline
lightningd: refuse a dual-funded candidate that reuses a funding outpoint
The single-funded path refuses a second channel that names a funding outpoint we already have (opening_control.c); the dual-funded path had no equivalent check when the negotiated transaction reached lightningd. Our funding pubkey is derived per channel, so an honest interactive-tx negotiation cannot produce a duplicate outpoint; refuse one anyway so a duplicate can never reach the wallet, where the v1 report showed it strands the second channel's balance.
Changelog-None
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit 105f6163ffcfc576f5e6c1950e1c395462c44db0)
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI review queuedlightningd: watch a dual-funded channel's funding outputs before lock-inby Níckolas Goline · eedd50b3 · Sep 16, 2026 · 5 filesMessage 73 · AdequateHigh 79Details
Commit message · Níckolas Goline
lightningd: watch a dual-funded channel's funding outputs before lock-in
A dual-funded channel armed its funding-output spend watch only at lock-in. Until then we watched whether the funding tx had confirmed and how deep it was, neither of which fires when the output is spent. With funding-confirms at 3 the opener can confirm the funding and close on it in the next block: we never see the spend, lock in anyway, keep routing over a channel with no funding output, and never notice the cheat once the peer's commitment is revoked. The single-funded path has always watched from channel creation.
Arm channel_watch_inflight_outs() as soon as a candidate is recorded, before our commitment_signed goes out, since that is the moment the peer can broadcast it; the restart path already re-arms for every channel with inflights. When a spend arrives while we are still awaiting lock-in, the spent candidate is by definition the one that got mined: adopt it as the channel's funding, as opening_depth_cb would have, before onchaind is started, so onchaind is not handed the latest attempt's commitment for an outpoint that may never exist. The candidate watch that fired becomes the channel's funding_spend_watch, so drop_to_chain() does not add a second watch on the same outpoint while the block scanner is still iterating it. At lock-in, drop the candidate watches again: the outpoint is the channel's own from then on, and a surviving candidate watch would fire funding_spent() twice on every later close.
Changelog-Fixed: dual-funding: a channel whose funding output is spent before lock-in is now handed to onchaind instead of being locked in and used.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit e44cf3401eccb9e6306aaa5ede8f9d52ead44b57)
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · High 79/100
This fix closes a serious bug in Core Lightning's dual-funded channel opening. Before the patch, the node only started watching for a spend of the new channel's funding output after the channel had 'locked in.' A malicious or careless peer could confirm the funding transaction and immediately spend the funding output in a close transaction before lock-in. The node would miss the spend, still lock in the channel, continue routing payments over a channel whose funding no longer existed, and fail to detect a later cheating attempt. The patch arms the spend watch as soon as the funding candidate is recorded, and correctly hands the channel to onchaind if a spend is seen before lock-in.
openchannel_update is idempotent: once the commitments are secured a repeat call returns the existing inflight, so two racing openchannel_update calls can both legitimately succeed and the "only up to one should succeed" assertion no longer holds.
Keep the original intent (catching commands that fight over the shared command pointer and hang) by relying on result(TIMEOUT) raising TimeoutError, and assert at most one inflight instead of counting successes: that catches a genuine double commitment, while comparing the returned PSBTs does not work as inflight->funding_psbt is mutated in place (wally_psbt_combine/psbt_finalize) once tx-signatures arrive.
This commit only changes a test file. It loosens an overly strict test assertion that was causing a flaky test failure. The test previously assumed only one of several racing openchannel_update calls could succeed, but the command is actually idempotent, so multiple calls can legitimately return the same existing commitment. The fix keeps the safety check by verifying the node ends up with at most one actual commitment 'inflight' rather than counting successful RPC responses. There is no change to production code and no security fix.
Lower-priorityaskrene: don't type-pun the node id when hashing node biasesby Níckolas Goline · 8bb20c54 · Sep 16, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Níckolas Goline
askrene: don't type-pun the node id when hashing node biases
hash_nodeid() read the 33-byte node id through a size_t pointer. That is undefined behaviour, and at -O3 the compiler is entitled to hoist that load above the `bias->node = *node` copy in set_node_bias(), since a u8 array and a size_t cannot alias. The entry then went into the table under the hash of uninitialised memory and later lookups missed it, so every load of a persistent layer created a second node_biases entry for the same node. With load_node_bias() now setting the two directions in two calls, the second call trips the NODUPS assertion in node_bias_hash_add() and askrene, an important plugin, takes lightningd down with it.
Hash the whole key with siphash, as hash_str() below already does.
Changelog-Fixed: askrene: node biases on a persistent layer were duplicated on every restart, and could abort the plugin when loading a layer.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit b2cb54d1e405151e2564d2f7d9964e1b96104f1a)
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
✓ Subject identifies a change✓ Uses a recognizable type or scope! No meaningful explanatory body
Why it was queued
documentation-only discount
Lower-prioritylightningd: keep a late RBF attempt off a promoted dual-funding channelby Níckolas Goline · c955159e · Sep 15, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Níckolas Goline
lightningd: keep a late RBF attempt off a promoted dual-funding channel
rbf_got_offer and openchannel_bump refuse to start an RBF once we have promoted a mined candidate, but an attempt that was already past them when the block arrived still runs to completion, and the peer decides when: dualopend reads only the peer fd until commitment_signed has been exchanged. Such an attempt was recorded exactly like a pre-promotion one, moving channel->funding, our_msat and the reserve to a tx that was never mined while the scid still named the mined one, and the later commitment write pointed last_tx at the wrong funding. Lock-in then cleared the inflight holding the real commitment.
Once channel->scid is set, record the attempt on its own inflight only, skip the reserve update, and only let a commitment through to the channel when its inflight is the funding we are promoted to. A reorg that un-promotes the mined candidate leaves every inflight in place, so a late attempt that gets mined afterwards is promoted from its inflight like any other.
Changelog-None
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
l2 detects the data loss and sends l1 an "Awaiting unilateral close" error (after the channeld's 1 second delay), which l1 must receive to drop to chain. But l1's channeld normally sends a warning and exits first; if l2's error arrives before l1's connectd has torn that subd down it is routed to the dying channeld and lost, so l1 never sees it and we time out waiting for:
l1.daemon.wait_for_log("They sent ERROR.*Awaiting unilateral close")
Reconnect if we don't see it: channel->error is resent when the peer reconnects, so l1 gets the error and drops to chain. We may already be disconnected, in which case disconnect() fails with "Peer not connected": that's fine, connect() is what matters.
This restores the workaround the test had before 6fdaec313 replaced it with the channeld sleep.
Changelog-None
78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-prioritytests: derive the crafted invoice HRP from the running networkby Amperstrand · 5346800b · Sep 15, 2026 · 1 fileMessage 83 · StrongTriage 0Details
Commit message · Amperstrand
tests: derive the crafted invoice HRP from the running network
The createinvoice expiry test hardcoded the lnbcrt prefix, but liquid-regtest invoices carry the ert HRP (chainparams), so the crafted string died at the bech32 parse there ('invalid bech32 string') before the bound check -- the liquid CI arm has been failing on it. Take the HRP from a real invoice on the running network instead; both arms pass locally now.
Changelog-None: test-only Signed-off-by: Amperstrand <amperstrand@localhost> (cherry picked from commit ebeaf7778551b2fc7867a99a91192e44b239553b)
83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-prioritylightningd: keep peer connected when rejecting a dead channel's reestablishby daywalker90 · 69d37254 · Sep 15, 2026 · 2 filesMessage 83 · StrongTriage 0Details
Commit message · daywalker90
lightningd: keep peer connected when rejecting a dead channel's reestablish
handle_peer_spoke() sent an error for a closed or unknown channel and then unconditionally disconnected the peer. A node recovering from a static channel backup reestablishes every channel it recovered, including ones which have closed since the backup was taken. We correctly reject the dead one, but hanging up there discards the reestablishes for its still-live siblings, so we never reply to them and they stay enabled forever.
Only disconnect if the peer has no other channel which still wants peer comms.
This is what made "Update examples in doc schemas" intermittently time out: l3 reestablished its already-closed 120x1x0 before its live 132x1x0, so l3 hung up on l4 and never processed 132x1x0:
tests/autogenerate-rpc-examples.py:1618: in generate_list_examples wait_for(lambda: [c['active'] for c in l3.rpc.listchannels(c34_2)['channels'] if c['source'] == l3.info['id']] == [False]) ValueError: Timeout while waiting for <lambda>
Changelog-Fixed: lightningd: a node recovering from a static channel backup no longer hangs up on the peer when one of the recovered channels has already closed, so the peer can still close the channels which are still open.
83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-prioritytests: skip the feerate poison test unless the db is sqlite3by Níckolas Goline · b9b61761 · Sep 15, 2026 · 1 fileMessage 75 · AdequateTriage 0Details
Commit message · Níckolas Goline
tests: skip the feerate poison test unless the db is sqlite3
It writes the database directly.
Changelog-None
(cherry picked from commit a9ead6340a8cc1bb84248d3cb8a7a247b0477602)
75/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
AI review queuedlightningd: refuse channels whose channel_id is already in useby cdecker · 7c6926c1 · Sep 15, 2026 · 7 filesMessage 73 · AdequateHigh 72Details
Commit message · cdecker
lightningd: refuse channels whose channel_id is already in use
A v1 channel_id is derived from the funding outpoint, which the peer chooses and which we can't check until it confirms. We only refused an outpoint already used by a live channel with the same peer, so a second channel could end up sharing a forgotten channel's channel_id. When it is closed too we abort in closed_channel_map_add() with "Assertion `!closed_channel_map_getmatch_(...)' failed", and since the channel is in the db, onchaind or a restart then crashes us again every time.
Refuse to commit a channel whose channel_id is used by any live or closed channel, in the fundee, funder and dual-funding paths, and allow duplicates in the closed channel map so nodes which already have such channels in their db can close and load them.
Changelog-Fixed: lightningd: a peer reusing a funding outpoint can no longer crash the node with a duplicate channel_id. (cherry picked from commit 84bfdf4fe1f8176cf361d474a12df20cfa704778)
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · High 72/100
This update fixes a crash bug in Core Lightning. A malicious or careless peer could open a new Lightning channel using the same funding transaction details as an old, forgotten channel. Because the channel ID is derived from those details, the new channel would share the same ID. When either channel later closed, the program hit an internal 'this should never happen' assertion and crashed, then kept crashing on restart because the duplicate ID was stored in the database. The fix refuses to commit any new channel whose ID is already used by a live or closed channel, and allows the database to hold duplicates for already-affected nodes so they can close and restart safely.
sendpay: idempotent success on replay of completed self-payments
According to the documentation of sendpay:
Calls to sendpay with the same payment_hash, amount_msat, and destination as a previous successful payment (even if a different route or partid) will return immediately with success.
A self payment is a special case, but the destination being always ourselves should follow the same rule.
Changelog-Fixed: sendpay: immediate success when replaying a completed self payment.
Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI review queuedpytest: channels reusing a funding outpoint must not crash usby cdecker · 8e94554b · Sep 15, 2026 · 1 fileMessage 65 · AdequateModerate 50Details
Commit message · cdecker
pytest: channels reusing a funding outpoint must not crash us
(cherry picked from commit bc01ae602ced2a5c46312900e6cea02c617ecd69)
65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
second-pass: broader security terminology
AI analysis · Moderate 50/100
This commit adds a test showing that Core Lightning can crash if a node's database ends up with two channels sharing the same internal channel ID—one already closed and another later closed with the same ID. The test is currently marked as expected to fail, meaning the underlying crash bug has not been fixed yet. It appears to be a denial-of-service issue: a malformed or manipulated local database state causes lightningd to crash on channel close and then again on every restart.
hsmd: don't report forced channel secrets as memleaks
--dev-force-channel-secrets and its shaseed are allocated off NULL at init and kept forever, like --dev-force-privkey and --dev-force-bip32-seed, but only the latter two were excluded from dev-memleak, so any test using the option failed teardown with memleak reports.
(cherry picked from commit c4b2b418fb9f852048f554fd428fc4e4e872252d)
83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
secret or key material
AI analysis · Informational 18/100
This is a tiny developer-only fix for a memory-leak false alarm. When running tests with a special developer flag that forces fixed channel secrets, those secrets were wrongly reported as leaked memory during test teardown. The patch tells the memory-leak checker to ignore them, matching two similar developer-only flags already excluded. It does not change normal node behavior or affect production wallets.
Security candidateclosingd: fail the negotiation when lightningd rejects the peer's closing feeby Ken Sedgwick · a764f9c1 · Sep 14, 2026 · 4 filesMessage 73 · AdequateModerate 68Details
Commit message · Ken Sedgwick
closingd: fail the negotiation when lightningd rejects the peer's closing fee
lightningd's reply to closingd_received_signature carried only a txid. closingd used it for the billboard and went on to agree to the offer, so when lightningd had rejected the fee the close still completed and drop_to_chain broadcast last_tx, which was still the commitment, while the close command reported a mutual close.
Add the verdict to the reply. On a rejection lightningd logs it at UNUSUAL, and closingd sends the peer a warning and exits instead of agreeing, the same way it handles a fee range with no overlap. The channel stays in CLOSINGD_SIGEXCHANGE: negotiation restarts on reconnect with lightningd's current bounds, and the close command's timeout decides when to close unilaterally.
Changelog-Fixed: lightningd: a closing fee lightningd rejects fails the negotiation instead of broadcasting the commitment as a mutual close. (cherry picked from commit a944bebef3a95602b660444828882fc583241401)
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundary
AI analysis · Moderate 68/100
This fix repairs a bug in Core Lightning's channel-closing handshake. Previously, when the node rejected a peer's proposed closing fee, the rejection was not communicated back to the sub-process that negotiates with the peer. That sub-process would still treat the close as agreed and could broadcast the old commitment transaction while the user interface reported a successful mutual close. The patch adds an explicit 'acceptable' flag to the internal reply so the negotiation is aborted and the peer is warned instead of proceeding with a mismatched transaction.
Lower-prioritytests: reproduce closingd completing a close on a fee lightningd rejectedby Ken Sedgwick · a8a10324 · Sep 14, 2026 · 5 filesMessage 83 · StrongTriage 0Details
Commit message · Ken Sedgwick
tests: reproduce closingd completing a close on a fee lightningd rejected
When lightningd rejects a closing fee, closingd never learns it: the reply only carries a txid, which closingd uses for its billboard. It agrees to the offer, reports the close complete, and lightningd broadcasts last_tx, still the commitment, as if it were the mutual close.
The previous commits removed the known reasons for a rejection, so add --dev-reject-closing-fee, which makes lightningd reject every closing fee the peer offers. test_closing_rejected_fee_fails_negotiation runs it on the non-opener: the opener's close must end in a unilateral close at its timeout, and the rejecting node must never agree to a fee or broadcast anything. Marked xfail until the following commit.
Changelog-None.
(cherry picked from commit 24d4335e49a0a92e124be28bcd87e5d5bc9676a0)
83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-prioritylightningd: honour the close feerange minimum when accepting a closing feeby Ken Sedgwick · dec58370 · Sep 14, 2026 · 2 filesMessage 73 · AdequateTriage 0Details
Commit message · Ken Sedgwick
lightningd: honour the close feerange minimum when accepting a closing fee
peer_start_closingd hands closingd the minimum of the feerange given to `close` as its floor, so closingd negotiates down to it. The acceptance check in closing_fee_is_acceptable kept using the floor derived from the fee estimates, so with estimates above the range the agreed fee was rejected as too low, the commitment stayed as last_tx, and the close broadcast it while reporting a mutual close.
Use the range minimum as the floor there too, as calc_max_close_feerate already does for the maximum. Both ends of the check now match the bounds closingd negotiated within.
Changelog-Fixed: lightningd: `close` with a feerange below the fee estimates no longer falls back to broadcasting the commitment. (cherry picked from commit 118bf9c7bcde61b183d8b8acd3b8038de0ebae67)
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritytests: reproduce a close with a feerange below the estimate floor falling back to the commitmentby Ken Sedgwick · 633dece8 · Sep 14, 2026 · 1 fileMessage 83 · StrongTriage 0Details
Commit message · Ken Sedgwick
tests: reproduce a close with a feerange below the estimate floor falling back to the commitment
closingd negotiates within the feerange given to `close`, and lightningd hands it the range minimum as its floor. lightningd's own acceptance check does not use that minimum: it checks the agreed fee against the floor derived from its fee estimates. When the estimates sit above the range, the agreed fee is rejected as too low, the commitment stays as last_tx, and the close broadcasts it while reporting a mutual close.
test_closing_feerange_below_estimates opens at the floor, raises the opener's estimates, closes with a feerange pinned at the floor, and checks that the transaction returned by close is a two-output closing transaction at the agreed fee. Marked xfail until the following commit.
Changelog-None.
(cherry picked from commit 9c0b9c2cc42250455edf835d3eea3d14f4281528)
83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-prioritylightningd: bound the negotiated closing fee, not the transaction's feeby Ken Sedgwick · b39e4252 · Sep 14, 2026 · 2 filesMessage 93 · StrongTriage 0Details
Commit message · Ken Sedgwick
lightningd: bound the negotiated closing fee, not the transaction's fee
closing_fee_is_acceptable checked the fee the closing transaction pays against the maximum derived from the unilateral feerate. That fee is larger than the fee_satoshis both sides agreed on whenever the outputs' msat remainders were rounded away or an output was trimmed as dust. With every estimate at the floor, closingd's minimum and maximum are the same value, so any rounding put the transaction one satoshi over the maximum and lightningd rejected it. The rejection left the commitment as last_tx and the close broadcast it while reporting a mutual close.
Derive the negotiated fee from the transaction: our rounded-down balance minus the output paying our shutdown script. closingd subtracts fee_satoshis from the opener's output, and the maximum only applies when we are the opener, so that difference is exactly the fee we agreed to pay. Bound that instead. The minimum is still checked against the fee the transaction actually pays, which is what relay depends on. If our output was trimmed the whole fee is ours and is bounded as before.
Changelog-Fixed: lightningd: a mutual close at the fee ceiling no longer falls back to broadcasting the commitment because of satoshi rounding. Fixes: #9495 (cherry picked from commit be5b62556391097b42723b8d77336517d5c4c917)
93/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference