LL
← All projectsLightning Labs

LND

Go implementation of a complete Lightning Network node.

BitcoinLightning NetworkNormal
Repository coverage

1689 commits in the local evidence base

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.

187security candidates237second-pass queue1374AI analyses
164commits · 30 days
270commits · 60 days
640commits · 180 days
1424commits · 365 days
Backfill bands
Aug 5 → Feb 6405 seen5 candidatesComplete
Feb 6 → Jun 6665 seen28 candidatesComplete
Jun 6 → Jul 689 seen4 candidatesComplete
Jul 6 → Aug 569 seen0 candidatesComplete
Commit communication

Does the history explain itself?

Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.

68/100 average clarity
388Strong · 80–100
838Adequate · 60–79
432Thin · 40–59
31Opaque · 0–39
1security candidate with opaque commit messaging
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
Olaoluwa Osuntokun29860237474
ziggie49922422265
Elle Mouton26832268167
Yong60926172
ziggieXXX50617170
George Tsagkarelis37335167
LNBiG111173
Jared Tobin909171
yyforyongyu1211574070
bitromortac731154071
Erick Cestari26726070
Suheb746074
Analysis record

Published AI watches

Last scanned 13 minutes ago

Moderate 66 AI analysisMessage 96 · Strong
LL Lightning LabsLND BitcoinLightning Network

channeldb: persist local updates the peer acked before our first revoke (#11268)

This commit fixes a bug in LND's channel database where a specific type of fee update could be lost if a node restarted at a very precise moment during a Lightning channel's setup. If triggered, the node would reject a valid signature from…

Force-closure of a Lightning channel due to state desynchronization after restartLoss of locally initiated fee updates before first local revocationRegression test reproduces restart scenario leading to signature rejection
9f5e2c7bby Olaoluwa Osuntokun+78−133 files
Vendor flagged security relevance
Low 45 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

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

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 ins…

Denial-of-service / liveness fix: fee-bump requests no longer block the peer's `channelManager` goroutine while waiting for an in-flight offer.State consistency fix: buffered fee-bump requests are now part of the FSM state instead of being dropped during shutdown or flush.Resource-leak fix: confirmed RBF closes now tear down the active channel state and switch link for both local and remote-initiated closes.
5597f6f7by Olaoluwa Osuntokun+1538−4248 files
Vendor flagged security relevance
Low 43 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11588 from ziggie1984/lnwallet/fix-reorg-wallet-sync-flake

This change fixes a wallet synchronization check in LND. Previously, the wallet only compared block heights to decide if it was fully caught up with the Bitcoin chain. During a chain reorganization (a temporary fork where one block is repl…

State synchronization check previously used height only, which is insufficient across reorgsFix adds block hash comparison to prevent false-positive sync statusCould cause LND to proceed while wallet state reflects an invalidated or not-yet-updated chain tip
8cdbf85cby Yong+224−1354 files
Vendor flagged security relevance
Moderate 51 AI analysisMessage 68 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #10708 from jtobin/alias-perms

This commit fixes a missing permission check on a new Lightning routing RPC called XFindBaseLocalChanAlias. Without the entry, any valid macaroon could call that RPC, bypassing the normal access-control list. The patch adds the required pe…

Missing macaroon authorization entry for an RPC endpointPotential privilege escalation: any valid macaroon could invoke an unprotected RPCRegression test added to enforce macPermissions coverage
98dc2b44by Olaoluwa Osuntokun+35−02 files
No security note in commit
Moderate 68 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11555 from yyforyongyu/invoice-settlement-public

This large LND patch changes when an ordinary invoice is considered 'paid'. Previously, releasing the preimage (the secret that lets the payer claim the funds) immediately marked the invoice as settled. Now the invoice enters a new interme…

New intermediate invoice/HTLC state prevents premature settlement reportingOn-chain HTLC outcomes persisted without opt-in to support restart recoveryForwarding package marker persisted before preimage release to avoid replay rejection on restart
895118acby Olaoluwa Osuntokun+4536−32048 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 80 · Strong
LL Lightning LabsLND BitcoinLightning Network

docs: describe invoice collection finality

This commit only adds documentation to the release notes. It describes a previously merged code change (PR 11555) about how LND handles invoice finality, but the commit itself contains no code, bug fixes, or behavior changes. There is noth…

9649d9f6by yyforyongyu+87−01 file
No security note in commit
Moderate 64 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11551 from ziggie1984/public-pr149-sanitized

This change fixes a bug in LND's invoice handling for multi-part payments (MPP and AMP). When a payment is split into several pieces (HTLCs), each piece is accepted individually. Previously, an old accepted piece could become too close to …

Fixes missing revalidation of accepted HTLC CLTV expiries at MPP/AMP set completionPrevents settlement of shards whose on-chain claim window has become unsafe while heldAdds new fail resolution ResultHtlcSetExpiryTooSoon and cancels the entire affected set
4b7447bcby Yong+281−347 files
Vendor flagged security relevance
Low 35 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11396 from yyforyongyu/task-lease-policy

This commit changes how LND's wallet locks (leases) unspent coins through its RPC interface. It removes a recently added 'release after N confirmations' option and replaces it with an explicit 'no expiry' flag. Old clients that still send …

Breaking API change that reserves removed protobuf fields to prevent accidental reintroductionExplicit rejection of legacy `release_after_spend_confs` parameters from old clients instead of silent fallbackValidation prevents conflicting no-expiry + duration lease settings before wallet state is touched
03e28a96by Yong+663−4029 files
Vendor flagged security relevance
Low 40 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11175 from ViktorT-11/2026-08-gossip-version-agnostic-store

This commit refactors how the Lightning Network Daemon (LND) stores and queries channel graph data so that the same channel or node can exist under both old (v1) and new (v2) gossip protocols without the database returning stale, missing, …

Cross-version data consistency: prevents a v2 channel shell from shadowing a usable v1 channel, which could affect routing decisions and RPC output.Cache consistency: ensures the in-memory pathfinding cache and the SQL-backed RPC reads agree on which channel version and policies are active.Bug fix: zombie edge info now carries the correct channel ID instead of 0, which could have caused incorrect channel identification during resurrection.
8c251687by Yong+3752−28726 files
No security note in commit
Moderate 61 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11440 from Roasbeef/fix-longstanding-correctness-bugs

This is a large bug-fix patch for LND (a Bitcoin Lightning Network node) that tightens correctness rules across many subsystems. It prevents several ways a node could mis-handle channel data, accept bad network gossip, commit corrupted dat…

Database transaction commit now aborts on read errors (etcd) - prevents silent data corruption / inconsistent stateGossip zombie marking removed for invalid funding script - prevents denial-of-service / channel graph poisoningWire message length bounding added to watchtower protocol - prevents memory exhaustion / malformed message parsing
0123a548by Olaoluwa Osuntokun+1424−11938 files
Vendor flagged security relevance
Moderate 59 AI analysisMessage 80 · Strong
LL Lightning LabsLND BitcoinLightning Network

invoices: require complete payment collection

This commit changes how LND handles multi-part Lightning payments when one part fails after the preimage was already released. Previously, the invoice could be marked as fully paid even if one shard was later reclaimed by the payer on-chai…

Changes invoice settlement semantics for released-but-failed HTLCsAdds new persisted HTLC state `HtlcStateFailed`Prevents invoice from reaching `ContractSettled` when any released shard fails
699ea930by Olaoluwa Osuntokun+492−4910 files
No security note in commit
Moderate 60 AI analysisMessage 78 · Adequate
LL Lightning LabsLND BitcoinLightning Network

lnwallet: reject a zero CSV delay

This change tightens the rules for opening Lightning payment channels by refusing a setting called the CSV delay when it is set to zero. The CSV delay is the waiting period a user must endure before reclaiming their own funds from a channe…

Rejects a zero CSV delay that would eliminate the breach-remedy windowCentralizes the check in VerifyConstraints so all channel types and directions are coveredAdds explicit error type and unit test for the new constraint
266eba7bby Olaoluwa Osuntokun+81−03 files
Vendor flagged security relevance
Moderate 58 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

lnwallet+chanstate: keep persisted HTLC data readable

This commit fixes two bugs in how Lightning Network channel data is saved to disk. First, it stops extra 'aux' signatures meant only for advanced taproot channels from being saved on ordinary channels, where they don't belong. Second, it p…

Persisted state could become unreadable due to writer/reader size mismatchAuxiliary signatures for taproot overlay channels were persisted on plain channel HTLCsFix adds explicit serialization bound to prevent unreadable channel records
43c74723by Olaoluwa Osuntokun+101−25 files
No security note in commit
Low 39 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11374 from bitromortac/20261016-c7e5-dispatch

This commit adds the first end-to-end BOLT 12 'Offers' flow to LND: a new dev-only RPC and CLI command to create offers, plus a dispatcher that listens for incoming onion-message invoice requests and replies with signed BOLT 12 invoices. I…

New network-facing dispatcher answers invoice requests from any peer; rate and concurrency limits are appliedBlinded-path PathID check prevents reply linking to self-created paths, but TODO notes the check should move once offers can have offer_pathsCreateOffer RPC is restricted to dev builds and requires offchain:write macaroon permission
a9d4ca3bby bitromortac+3113−7838 files
No security note in commit
Moderate 60 AI analysisMessage 78 · Adequate
LL Lightning LabsLND BitcoinLightning Network

invoices: reject settled AMP set shards

This change fixes a bug in LND's invoice handling for AMP (Atomic Multi-Path) payments. Previously, if someone tried to pay a fresh shard for an AMP set that was already fully paid, the invoice updater could return an internal error that w…

Denial-of-service vector: an internal updater error could force-fail a shared channel link, disrupting unrelated sibling HTLCsAMP invoice state machine edge case: reusable invoice stays open for other sets but must reject new shards for already-settled setsClean failure path introduced: ResultInvoiceNotOpen instead of error-driven link failure
99e3da37by yyforyongyu+49−02 files
No security note in commit
Moderate 59 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11282 from lightningnetwork/elle-base-branch-payment-service

This is a large feature merge for LND that adds a new optional RPC subsystem called switchrpc. It lets an external program hand a pre-built onion packet to LND for direct dispatch over a Lightning channel, instead of LND doing its own path…

New optional RPC surface (switchrpc) that accepts externally crafted onion packets and directly dispatches HTLCsIdempotency/deduplication added via InitAttempt durable write-ahead log and ErrPaymentIDAlreadyExistsStartup orphan cleanup fails half-open or pre-commit attempts to avoid hangs
11f79be0by Olaoluwa Osuntokun+11385−22458 files
Vendor flagged security relevance
Low 44 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11472 from yyforyongyu/task-sweep-rejections

This commit fixes a bug in LND's transaction sweeping logic. Previously, if the Bitcoin backend rejected a sweep transaction for a temporary or unknown reason (for example, the mempool was full, a network error occurred, or the rejection r…

Funds-availability / liveness fix: temporary or unknown mempool rejections could leave sweep inputs unspent.Error-handling reclassification: previously fatal errors now retryable.Retry metadata preservation: next fee rate and fee cap kept across attempts.
c5863e55by Yong+290−9720 files
No security note in commit
Low 32 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11292 from ViktorT-11/2026-10-harden-remote-signing-no-op

This change is a hardening fix for LND's remote-signing feature. Previously, if a node was configured to act as an outbound remote signer but was compiled without the required 'signrpc' and 'walletrpc' sub-servers, it would silently fall b…

silent-degradation-to-no-op preventedconfiguration-misconfiguration now surfaces as fatal errorbuild-tag-dependency explicitly validated at runtime
0c538e1fby Suheb+241−125 files
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

invoices: fix test whitespace

This commit only fixes blank-line spacing in a single test file to satisfy lint checks. It adds one blank line after a function signature and removes one trailing blank line. There are no code behavior changes, no bug fixes, and no securit…

a67d07f4by yyforyongyu+1−11 file
No security note in commit
Low 31 AI analysisMessage 92 · Strong
LL Lightning LabsLND BitcoinLightning Network

build: pin the new lint job actions by commit

This change updates two GitHub Actions used in the project's automated lint workflow so they are locked to specific commit hashes instead of floating version tags. A floating tag could be silently repointed to a different, possibly malicio…

CI/CD supply-chain hardeningthird-party action pinning by commit hashprevention of tag-movement attacks
2a9f137dby Olaoluwa Osuntokun+4−21 file
Vendor flagged security relevance
Repository ledger

Explore captured commits

Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.

Lower-prioritydocs: release note for BOLT-02 push_msat fundee enforcementby Erick Cestari · bb8abc75 · May 11, 2026 · 1 fileMessage 85 · StrongInformational 18Details
Commit message · Erick Cestari

docs: release note for BOLT-02 push_msat fundee enforcement

Document the user-visible error string change introduced when the
fundee rejects incoming open_channel messages whose push_msat exceeds
1000 * funding_satoshis.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
Why it was queued
documentation-only discount
AI analysis · Informational 18/100

This commit only adds a release note describing an earlier code change. It documents that LND now rejects certain invalid channel-open requests sooner and with a clearer error message. There is no code change in this commit, and the behavior it describes is a stricter enforcement of an existing Lightning protocol rule, not a security vulnerability.

AI review queuedfunding: enforce BOLT-02 push_msat bound on fundeeby Erick Cestari · d5505498 · May 11, 2026 · 3 filesMessage 73 · AdequateLow 45Details
Commit message · Erick Cestari

funding: enforce BOLT-02 push_msat bound on fundee

Reject incoming OpenChannel messages where push_msat exceeds
1000 * funding_satoshis, as required by BOLT-02. The existing RejectPush
flag only gates on push_msat > 0 and does not cover the spec bound.

An over-sized push is eventually caught downstream in reservation.go when
theirBalance = capacity - fee - push_msat goes negative and
ErrFunderBalanceDust is returned. Rejecting it up front produces a
clearer, spec-aligned error and avoids the chanacceptor and commitment
type negotiation round-trips for a channel we will refuse anyway.

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 · Low 45/100

This commit tightens validation in LND when another node asks to open a Lightning channel. It now rejects requests where the proposed 'push' payment is larger than the entire channel funding, as the Lightning protocol (BOLT-02) already requires. Before this change, such oversized pushes were only caught later in the process, after extra setup work. The change is a defensive hardening fix, not an active exploit patch, and the commit message frames it as spec compliance rather than a security vulnerability.

Lower-prioritygraph/db: remove address loading from cached node iterationby Elle Mouton · bfb12b1d · May 7, 2026 · 10 filesMessage 73 · AdequateInformational 18Details
Commit message · Elle Mouton

graph/db: remove address loading from cached node iteration

ForEachNodeCached is now only used for topology-oriented traversal,
so the address-loading option forced one autopilot scoring path to
bypass the in-memory graph cache for data it did not consume. Remove
the withAddrs parameter and the associated SQL/KV address plumbing
so cached node iteration can consistently use the graph cache when
it is loaded.

Autopilot still requires peer addresses before opening channels.
That filtering remains in Agent.openChans via ForEachNode, where the
selected candidates' addresses are collected for ConnectToPeer. The
trade-off is that ForEachNodesChannels no longer excludes
addressless nodes from graph-wide scoring inputs such as median
channel size or centrality, which also feed lncli getnetworkinfo
statistics like graph diameter. In practice the only addressless
nodes our local view tends to know about are nodes with no public
channels (e.g. our own node or peers we share only private channels
with), so the impact on the reported stats should be negligible.
Active channel candidates remain address-filtered before dialing.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 18/100

This is a performance and code-simplification cleanup, not a security fix. It removes an optional address-loading path from a cached graph-traversal function so the cache can be used more consistently. The only behavioral change is that autopilot's graph-wide scoring now includes nodes without advertised addresses when computing statistics such as median channel size and centrality. Those nodes were previously skipped. Active channel candidates are still filtered by address before any peer connection is attempted, so the practical security impact is minimal.

Lower-prioritykvdb/sqlbase: fix non-constant format stringsby Alex Akselrod · ce65753d · May 6, 2026 · 1 fileMessage 80 · StrongInformational 19Details
Commit message · Alex Akselrod

kvdb/sqlbase: fix non-constant format strings

When updating the Go version in kvdb to >= 1.24, schema.go no
longer compiles due to non-constant format strings. This is
invisible until:
- a new version of kvdb is tagged and imported in consumers
- kvdb is redirected to the local copy

This commit fixes the bug.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Informational 19/100

This is a code-compatibility fix, not a security fix. The Go compiler starting with version 1.24 rejects non-constant format strings passed to fmt.Sprintf. The patch changes several fmt.Sprintf calls to use a constant "%s" format string with the actual SQL string as an argument. Without the fix, the package simply fails to compile on newer Go versions. There is no indication this was exploitable or that it fixed a runtime vulnerability.

Lower-prioritydocs: release note for closed-channel tombstones on KV-SQL backendsby ziggie · 1a52e85b · May 4, 2026 · 1 fileMessage 93 · StrongLow 35Details
Commit message · ziggie

docs: release note for closed-channel tombstones on KV-SQL backends

Document the tombstone close path that #10780 wires onto sqlite/postgres,
the operator-visible iteration-cost growth that comes from leaving closed
chanBuckets on disk, and the NumForwardingPackages divergence that the
preserved forwarding-package bucket produces in PendingChannels.

93/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
documentation-only discount
AI analysis · Low 35/100

This commit only adds release-note documentation describing a previously merged code change (PR #10780). It explains that, on sqlite/postgres backends, closing a channel now leaves the old channel data on disk and instead marks the channel as closed by flipping an index entry. The note warns operators not to downgrade after closing channels, because older LND versions would see the leftover data and think the channel is still open. There is no code change here, only documentation, so it does not introduce a new security vulnerability by itself. The underlying design change could create operational confusion (channels appearing reopened after a downgrade), but that is a documented operational risk, not an exploitable weakness.

Lower-prioritychanneldb: tombstone closed channels without bulk deleteby ziggie · d643050d · May 4, 2026 · 2 filesMessage 83 · StrongLow 28Details
Commit message · ziggie

channeldb: tombstone closed channels without bulk delete

Wire the tombstone close path on backends that opted in via
OptionTombstoneClosedChannels:

- ChannelStateDB.CloseChannel branches on tombstoneClosedChannels.
The default path remains closeChannelSync; closeChannelTombstone
runs on tombstone-enabled backends.
- closeChannelTombstone leaves every byte of the channel's nested
state in place — chanBucket, revocation log, per-channel
forwarding-package bucket, commitment heads — and relies on the
outpointBucket flip from outpointOpen to outpointClosed (already
performed by the shared updateClosedOutpointIndex helper) as the
authoritative closed-channel marker. The historical-channel and
close-summary archival use the same archiveClosedChannel helper as
the synchronous path so closed-channel and historical readers see
uniform records regardless of backend.
- locateOpenChannel rejects already-closed chanKeys (outpointClosed
in the index) with ErrChannelNotFound so a redundant CloseChannel
is a no-op rather than a re-archive.

Open-channel-bucket readers still surface tombstoned channels — that
audit lands in the next commit. The tests added here only assert the
writer's on-disk artefacts and the redundant-close guard.

Tests:
- TestCloseChannelTombstoneWritePath: outpoint flipped, historical
record, close summary, revlog/fwd-pkgs preserved.
- TestCloseChannelTombstoneRedundantClose: second CloseChannel
returns ErrChannelNotFound.
- TestCloseChannelSync: regression test for the synchronous path —
chanBucket and fwd-pkgs gone, outpoint flipped.

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
fuzzing or regression evidence
AI analysis · Low 28/100

This commit changes how LND stores closed Lightning channels on certain database backends. Instead of deleting all the old channel data immediately when a channel closes, it now leaves the data in place and just flips a marker saying 'this channel is closed.' This is a performance optimization for SQL-based backends, not a fix for an active security bug. The main risk is that leftover channel data might be read by code that expects only open channels, but the commit adds a guard so repeated close attempts are rejected and the historical/closed-channel records are still written correctly.

Lower-prioritychanneldb: hide tombstoned channels from open viewsby ziggie · dc4b8514 · May 4, 2026 · 3 filesMessage 95 · StrongModerate 59Details
Commit message · ziggie

channeldb: hide tombstoned channels from open views

Wire every reader of openChannelBucket to consult isOutpointClosed
before treating a chanKey as open. Without this commit the previous one
flips the outpoint index but FetchAllChannels and friends still surface
the channel as if it were open — that intermediate state is fine for
tests because OptionTombstoneClosedChannels stays off until the multi:
commit flips it on for sqlite/postgres, but the readers must be wired
before that lands.

Audit covers all six call sites that descend into chanBucket:

- fetchChanBucket / fetchChanBucketRw — direct lookup paths used by
Refresh, MarkBorked, and the rest of OpenChannel's read/write
methods. Single-call sites; the tx.ReadBucket(outpointBucket)
lookup is inlined into the isOutpointClosed call.
- fetchNodeChannels — per-node ForEach iteration; tx threaded
through and the outpoint-bucket lookup is hoisted above the loop
so the closed-channel check is a per-iteration map probe rather
than a tx-level bucket resolve.
- FetchPermAndTempPeers — cross-node ForEach; same hoisting pattern.
The closed peer's protected status is still established by the
historical-channel second pass that runs after the open-channel
pass.
- channelScanner — single-channel-selector iteration site reached by
FetchChannel and FetchChannelByID; outpoint-bucket lookup hoisted
inside chanScan so a single visit pays the bucket-resolve cost
once.

The redundant-close guard added in the previous commit lives in
locateOpenChannel and is unchanged here.

Tests:
- TestCloseChannelTombstoneRemovesFromOpenScans: end-to-end —
FetchAllChannels, FetchOpenChannels, and FetchPermAndTempPeers all
behave as if the closed channel is gone, while the historical pass
still marks the peer as having a closed channel.
- TestClosedChannelHiddenFromFetchChannel: channelScanner path.
- TestClosedChannelHiddenFromDirectMethods: fetchChanBucket /
fetchChanBucketRw via Refresh and MarkBorked.

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
AI analysis · Moderate 59/100

This commit fixes an internal bookkeeping bug in LND's channel database. A new 'tombstone' close feature keeps closed channel data on disk but marks the channel as closed in a separate index. Before this fix, several database readers still treated those tombstoned channels as if they were open, which could make the node try to use or report already-closed channels as active. The patch wires every reader to check the closed-channel index first. It is a correctness fix rather than a remote exploit, but it prevents state confusion that could affect routing, channel management, or peer protections.

Lower-prioritymulti: enable closed-channel tombstones on KV-SQL backendsby ziggie · 95044124 · May 4, 2026 · 3 filesMessage 83 · StrongLow 26Details
Commit message · ziggie

multi: enable closed-channel tombstones on KV-SQL backends

Wire OptionTombstoneClosedChannels for sqlite and postgres backends in
config_builder.go. bbolt keeps the synchronous one-shot close path
unchanged.

Add UsesClosedChanTombstones() to the integration test harness so
backend-symmetric tests can skip post-close assertions about deleted
forwarding-package or revocation-log state — that state is intentionally
preserved on tombstone backends until the upcoming native-SQL
channel-state migration reclaims it. Update testWipeForwardingPackages
to honor the new predicate while still exercising the close flow on
both backend families.

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Low 26/100

This change adjusts how LND closes payment channels when using SQLite or Postgres database backends. Instead of immediately deleting all channel-related data in one big operation, it marks the channel as closed with a 'tombstone' and leaves the old data in place temporarily. This avoids long database lockups during channel closure. It is a performance and reliability improvement, not a fix for an exploitable vulnerability.

Lower-prioritychanneldb: add tombstone option and isOutpointClosed helperby ziggie · f94fba1e · May 4, 2026 · 3 filesMessage 73 · AdequateInformational 15Details
Commit message · ziggie

channeldb: add tombstone option and isOutpointClosed helper

Add the option, field, and reader helper that the tombstone close path
will consume in the next commit. Nothing is wired yet:

- OptionTombstoneClosedChannels — option modifier that sets the new
Options.tombstoneClosedChannels field. Defaults to off.
- ChannelStateDB.tombstoneClosedChannels — the decision-bit, set at
construction from the option.
- isOutpointClosed(opBucket, chanKey) — decodes the indexStatus TLV
stored under outpointBucket and reports true for entries flipped to
outpointClosed by updateClosedOutpointIndex (called from both close
paths). The helper accepts the bucket directly so loop-style
callers can hoist the tx.ReadBucket(outpointBucket) lookup out of
the inner loop and pay it once per iteration set.

Reusing outpointBucket as the "logically closed" signal avoids a
dedicated tombstone bucket. The flip from outpointOpen to outpointClosed
is already performed by the existing close path, so the signal exists on
both backends — readers just need to consult it.

Behavior is unchanged. The option and helper have no callers yet; the
close-path branch and reader audit land in the next two commits.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit only adds unused infrastructure for a future feature. It introduces a new option flag, a database field, and a small helper function to check whether a channel has been closed, but nothing is actually wired up or used yet. Behavior is unchanged, and there is no active security issue in this patch.

Lower-prioritychanneldb: extract close-channel helpersby ziggie · 4815ed2b · Apr 30, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · ziggie

channeldb: extract close-channel helpers

Move the body of OpenChannel.CloseChannel into ChannelStateDB.CloseChannel
(which dispatches to a new closeChannelSync method), and split the close
logic into three free helpers:

- locateOpenChannel: descends the open-channel bucket tree and returns the
chain bucket, channel bucket, and serialized chanKey for an OpenChannel.
- updateClosedOutpointIndex: flips the outpoint index entry for a chanKey
from open to closed.
- archiveClosedChannel: writes the historical-channel record and the close
summary that survive the close.

Behavior is preserved: closeChannelSync runs the same sequence of mutations
(packager wipe, chanBucket delete, log-bucket delete, outpoint flip,
historical archive, close summary) that the inline body did, just composed
out of the new helpers. No callers, options, or readers change.

This is preparation for adding a tombstone close strategy on KV-SQL
backends; the helpers will be shared between the synchronous and tombstone
paths so historical and closed-channel records remain identical across
backends.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit is a pure internal code reorganization. It moves the existing channel-closing logic into smaller helper functions without changing what the code actually does, who can call it, or any user-visible behavior. There is no security fix or vulnerability here.

Lower-prioritydocs: add release not for pathfindingby Abdullahi Yunus · 72873f62 · Apr 29, 2026 · 1 fileMessage 57 · ThinInformational 15Details
Commit message · Abdullahi Yunus

docs: add release not for pathfinding

57/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only adds a release note describing a new feature: pathfinding support for routing onion messages. It changes documentation text only and does not modify any code, configuration, or security behavior.

Lower-priorityonionmessage: add BFS pathfinding for onion messagesby Abdullahi Yunus · fd25ba98 · Apr 29, 2026 · 3 filesMessage 95 · StrongInformational 23Details
Commit message · Abdullahi Yunus

onionmessage: add BFS pathfinding for onion messages

In this commit we add FindPath, a BFS-based shsortest-path
algorithm that finds routes through the channel graph for
onion messages. The search filters nodes by the
OnionMessage feature bits (38/39).

We also add a unit tests covering: direct neighbor routing,
multi-hop paths, feature-bit filtering, missing destination
nodes, destination without onion support, max hop limits,
cycle handling, and shortest-path selection.
choice of BFS is because there isn't any weight involve.

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
AI analysis · Informational 23/100

This commit adds a new pathfinding feature for onion messages in the Lightning Network Daemon (LND). It is a routine feature addition: it finds the shortest route through nodes that support a specific messaging capability. There is no direct evidence in the commit that it fixes a security vulnerability; it appears to be new functionality with tests.

Lower-prioritydocs: fix Contributors TOC anchor in v0.21.0 release notesby ziggie · c0b417c7 · Apr 28, 2026 · 1 fileMessage 85 · StrongInformational 15Details
Commit message · ziggie

docs: fix Contributors TOC anchor in v0.21.0 release notes

The TOC link for the Contributors section pointed to `#contributors`,
but GitHub generates the anchor for `# Contributors (Alphabetical
Order)` as `#contributors-alphabetical-order`, leaving the link
broken when the rendered file is viewed on GitHub. Update the TOC
to use the working anchor (matching the form already used in
release-notes-0.18.0.md).

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit fixes a broken table-of-contents link in the release notes for version 0.21.0. The link pointed to '#contributors', but the actual heading anchor on GitHub is '#contributors-alphabetical-order'. The change simply updates the link so it works when the document is viewed on GitHub. There is no security relevance.

Lower-prioritydocs: add empty release notes for v0.22.0by ziggie · fa588eaf · Apr 28, 2026 · 1 fileMessage 80 · StrongInformational 15Details
Commit message · ziggie

docs: add empty release notes for v0.22.0

Scaffold release-notes-0.22.0.md with the same section structure as
the 0.21.0 file so contributors have a place to land entries during
the v0.22 cycle.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit simply creates an empty release notes template for the upcoming v0.22.0 version. It contains only section headings and no actual code, bug fixes, or feature descriptions. There is no security relevance.

Lower-prioritydocs: add EstimateRouteFee release noteby yyforyongyu · 8eab1edd · Apr 27, 2026 · 1 fileMessage 57 · ThinInformational 15Details
Commit message · yyforyongyu

docs: add EstimateRouteFee release note

57/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only adds a release note describing a bug fix that was already merged elsewhere. The actual code change happened in a previous pull request. There is no new executable code in this commit, so it does not introduce or fix a vulnerability by itself.

Lower-priorityrouterrpc: isolate LSP route fee probesby yyforyongyu · 1dd09d23 · Apr 27, 2026 · 2 filesMessage 45 · ThinLow 48Details
Commit message · yyforyongyu

routerrpc: isolate LSP route fee probes

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Low 48/100

This change fixes a bug in LND's fee-probing feature used for Lightning Service Providers (LSPs). Previously, when probing multiple LSPs for the same invoice, all probe payments shared the same payment hash. The Lightning payment system could then treat later probes as retries of the first probe and reuse its settings, potentially returning wrong fee estimates or routing through the wrong LSP. The fix gives each LSP probe its own random payment hash so they stay independent. A new test confirms each LSP gets a unique hash.

AI review queuedlnwallet/test: fix flaky neutrino reorg sync timeoutby ziggie · 3cf60bd4 · Apr 27, 2026 · 1 fileMessage 95 · StrongInformational 15Details
Commit message · ziggie

lnwallet/test: fix flaky neutrino reorg sync timeout

waitForWalletSync used time.Tick inside the poll loop, leaking a new
goroutine on every iteration. Over 5 reorg cycles with ~300 polls each
this accumulated up to 1500 leaked goroutines, adding measurable system
load that made the 30s timeout too tight, especially when running against
a postgres backend where block-processing writes carry more overhead.

Fix the leak by using a single time.NewTicker (deferred Stop), and raise
the timeout to 2 minutes to give the neutrino P2P layer and the
address-manager transaction walk enough headroom under load.

Also improve the timeout error messages to identify which of the two
sync layers was stuck:
- Layer 1 (header/P2P): ChainIO.GetBestBlock height has not yet caught
up to the miner tip — neutrino is still fetching headers.
- Layer 2 (transaction walk): heights matched but IsSynced() never
returned true — the chain-sync notification or the address-manager
DB write (undo+redo on reorg) did not complete in time.

Add a detailed doc comment to waitForWalletSync explaining the three
pipeline stages (header sync, compact-filter/block fetch, transaction
walk) and why each stage is relevant, so a future timeout can be
diagnosed from the error message alone.

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit fixes a flaky automated test helper in the LND codebase. It replaces a goroutine-leaking timer with a proper reusable ticker and increases a test timeout from 30 seconds to 2 minutes so the test is less likely to fail under heavy load. It also improves error messages and adds explanatory comments. There is no user-facing security issue or production bug being fixed.

Lower-prioritycontractcourt: make breach retribution final-taproot awareby yyforyongyu · 4d374fb5 · Apr 24, 2026 · 2 filesMessage 50 · ThinModerate 59Details
Commit message · yyforyongyu

contractcourt: make breach retribution final-taproot aware

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Moderate 59/100

This commit updates LND's breach-arbitrator (the component that punishes a counterparty for broadcasting an old channel state) so it correctly handles a new 'final taproot' channel type. Previously, the arbitrator likely treated final-taproot outputs as ordinary taproot or non-taproot outputs, which could have caused it to use the wrong witness type, skip control-block handling, miscount revoked funds, or fail to sweep funds after a breach. The patch adds the new witness-type constants everywhere the old taproot variants were used and adds tests to confirm the new paths work.

Lower-priorityGitHub: bump itest bitcoind to v31by ziggie · 651e5e6e · Apr 23, 2026 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · ziggie

GitHub: bump itest bitcoind to v31

Bitcoin Core v31.0 was released on 2026-04-20. Update the CI itest
matrix to track the latest major release.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit simply updates the version of Bitcoin Core used in automated testing from version 30 to version 31. It does not change any production code, user-facing behavior, or security-sensitive logic. It is a routine CI/test maintenance change.

Lower-prioritytesting: allow patch versions of bitcoin coreby ziggie · 154e5076 · Apr 23, 2026 · 1 fileMessage 55 · ThinInformational 15Details
Commit message · ziggie

testing: allow patch versions of bitcoin core

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
AI analysis · Informational 15/100

This commit updates a helper shell script used only for installing Bitcoin Core during testing. It changes how the script maps Docker image tags (like '29' or '30') to the directory names inside the container (like '/opt/bitcoin-29.0' or '/opt/bitcoin-30.0'), so patch releases such as '29.1' work correctly. There is no change to LND's runtime code, no user-facing behavior change, and no security relevance.

Security candidatelntest: pin pre-v30 mempool policy defaults in itest bitcoindby ziggie · 6914ea0b · Apr 23, 2026 · 1 fileMessage 83 · StrongInformational 14Details
Commit message · ziggie

lntest: pin pre-v30 mempool policy defaults in itest bitcoind

Bitcoind v30 lowered the default minrelaytxfee and incrementalrelayfee
from 1000 sat/kvB (1 sat/vB) to 100 sat/kvB. The itest suite was
written against the old defaults and the lower values cascade into:

- integer sat/vByte assertions losing precision below 1 sat/vB, and
- RBF bump thresholds that alter sweeper/bumpfee replacement timing.

Pin the old defaults in the itest bitcoind backend so the existing
tests keep passing without per-test adaptation. Running against the
new defaults is still worth doing, but that is a separate exercise
that should not be bundled with the v30 version bump.

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
access control
AI analysis · Informational 14/100

This change only adjusts the settings used for internal testing of LND with a Bitcoin Core backend. It pins older Bitcoin Core fee defaults so that existing automated tests continue to produce the same results after Bitcoin Core v30 changed its defaults. It does not change production LND code, user-facing behavior, or network consensus rules, and it does not fix a security vulnerability.

Lower-priorityprotofsm: implement the actor.ActorBehavior interface for StateMachineby Olaoluwa Osuntokun · ac4bc239 · Apr 23, 2026 · 2 filesMessage 73 · AdequateInformational 15Details
Commit message · Olaoluwa Osuntokun

protofsm: implement the actor.ActorBehavior interface for StateMachine

In this commit, we implement the actor.ActorBehavior interface for
StateMachine. This enables the state machine executor to be registered
as an actor, and have messages be sent to it via a unique ServiceKey
that a concrete instance will set.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit is a routine feature addition: it lets an existing internal state machine receive messages through a new 'actor' messaging interface. There is no indication of a security bug, fix, or vulnerability in the changes.

AI review queuedlnwallet/chancloser: create unique ServiceKey for the RBF chan closerby Olaoluwa Osuntokun · 07f54ae1 · Apr 23, 2026 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Olaoluwa Osuntokun

lnwallet/chancloser: create unique ServiceKey for the RBF chan closer

This can be used to allow any system to send a message to the RBF chan
closer if it knows the proper service key. In the future, we can use
this to redo the msgmux.Router in terms of the new actor abstractions.

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 commit adds a single type alias (a nickname for an existing type) in the Lightning Network Daemon's channel closer code. It does not change any behavior, fix any bug, or alter how messages are processed. It is a small code-cleanup/refactoring step to prepare for future architectural changes.

Lower-prioritypeer: register the rbfCloseActor, have RPC route fee bumps to itby Olaoluwa Osuntokun · fa2d0f99 · Apr 23, 2026 · 3 filesMessage 73 · AdequateLow 27Details
Commit message · Olaoluwa Osuntokun

peer: register the rbfCloseActor, have RPC route fee bumps to it

In this commit, we now register the rbfCloseActor when we create the rbf
chan closer state machine. Now the RPC server no longer neesd to
traverse a series of maps and pointers (rpcServer -> server -> peer ->
activeCloseMap -> rbf chan closer) to trigger a new fee bump.

Instead, it just creates the service key that it knows that the closer
can be reached at, and sends a message to it using the returned
actorRef/router. We also hide additional details re the various methods
in play, as we only care about the type of message we expect to send and
receive.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Low 27/100

This commit refactors how Lightning Network fee-bump requests reach the channel-closing state machine. Previously, the RPC server had to dig through several internal maps and pointers to find the right closer. Now it sends a message through a dedicated actor/router system. The change also adds cleanup logic so these actor registrations are removed when a peer disconnects or a channel closes, preventing stale entries. The commit itself is a code-quality and reliability improvement, not a fix for an active exploit, but it touches a security-sensitive path (cooperative channel close fee bumping).

Lower-prioritypeer: create new rbfCloseActor to decouple RPC RBF close bumpsby Olaoluwa Osuntokun · 2a3ae1ef · Apr 22, 2026 · 2 filesMessage 73 · AdequateInformational 15Details
Commit message · Olaoluwa Osuntokun

peer: create new rbfCloseActor to decouple RPC RBF close bumps

In this commit, we create a new rbfCloseActor wrapper struct. This will
wrap the RPC operations to trigger a new RBF close bump within a new
actor. In the next commit, we'll now register this actor, and clean up
the call graph from the rpc server to this actor.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit is a straightforward internal refactoring in the LND Lightning node. It introduces a new 'actor' wrapper so that future code can request RBF (Replace-By-Fee) channel close bumps through a message-passing actor system instead of calling the peer directly. No user-facing behavior changes, no bug fixes, and no security-sensitive logic is added.