LL
← All projectsLightning Labs

LND

Go implementation of a complete Lightning Network node.

BitcoinLightning NetworkNormal
Repository coverage

1399 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.

142security candidates195second-pass queue1287AI analyses
86commits · 30 days
186commits · 60 days
609commits · 180 days
1241commits · 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.

67/100 average clarity
322Strong · 80–100
655Adequate · 60–79
391Thin · 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 Osuntokun20942204474
Elle Mouton26832268167
ziggie44416413165
Yong28513171
LNBiG111173
Jared Tobin909171
bitromortac661153071
yyforyongyu83861068
Erick Cestari26726070
Andras Banki-Horvath11311072
Gijs van Dam33230073
ziggieXXX2026070
Analysis record

Published AI watches

Last scanned 13 minutes ago

Moderate 62 AI analysisMessage 58 · Thin
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11212 from ziggie1984/disable-legacy-channels

This change stops LND from opening new Lightning channels using the old 'legacy' commitment format. The legacy format makes it harder to recover funds if something goes wrong, because the money owed to you is tied to a secret key that chan…

Prevents opening new channels with the legacy commitment type, whose tweaked to_remote output complicates data-loss recoveryCloses a negotiation path where an empty channel_type TLV bypassed feature checks and forced a legacy channelAdds explicit RPC and wire rejection with a dedicated error code
112cb5f3by ziggieXXX+265−4716 files
Vendor flagged security relevance
Moderate 56 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11223 from gijswijs/legacy-dust-retribution-fix

This update fixes a bug in how LND handles old-style punishment transactions when a channel partner tries to cheat. Previously, tiny (dust) HTLCs were left as blank placeholder entries in the punishment data, which could cause the node to …

nil-pointer dereference risk in breach retribution pathlegacy revocation log handling inconsistency with modern formatdefensive hardening added for trimmed/dust HTLCs
500ca51fby ziggieXXX+168−146 files
No security note in commit
Moderate 62 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11190 from Roasbeef/zpay32-reject-duplicate-payment-hashes

This change tightens how LND reads Lightning invoices (BOLT 11). Previously, if an invoice contained more than one payment hash field, LND would silently keep the first one and ignore the rest. Now it rejects the invoice entirely. The rele…

Behavior change from 'use first duplicate field' to 'reject duplicate fields'New error type ErrDuplicatePaymentHash returned on duplicate payment hash fieldsMalformed/unsupported-length duplicate payment hash now treated as duplicate and rejected
86306f89by Yong+147−106 files
No security note in commit
Moderate 62 AI analysisMessage 98 · Strong
LL Lightning LabsLND BitcoinLightning Network

zpay32: reject duplicate payment hash fields

This change tightens how LND reads Lightning invoices. Previously, if an invoice contained more than one payment hash field, LND would silently keep the first valid one and ignore the rest. Now it rejects such invoices outright. This preve…

Behavioral change from silent first-field acceptance to explicit rejection of duplicate payment hash fieldsPrevents invoice parsing from depending on field ordering when multiple payment hashes are presentCovers malformed first field + valid second field, closing a potential bypass
e2f27063by Olaoluwa Osuntokun+147−106 files
Vendor flagged security relevance
Moderate 53 AI analysisMessage 58 · Thin
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11132 from yyforyongyu/task-11129-pong

This change fixes how LND answers network 'ping' messages from other Lightning nodes. Previously, LND would sometimes silently ignore valid pings to limit reply traffic, which violates the Lightning protocol (BOLT 1) and could make a peer …

Protocol compliance fix: BOLT 1 requires a Pong for every valid PingRemoved silent suppression of Pong replies that could cause peer timeout/misbehaviorUnified rate limiting now accounts for amplification bandwidth, not just ping count
d3d1f1d0by Olaoluwa Osuntokun+274−1715 files
Vendor flagged security relevance
Low 33 AI analysisMessage 90 · Strong
LL Lightning LabsLND BitcoinLightning Network

itest: stop creating legacy channels

This commit updates LND's integration tests to stop using an obsolete 'legacy' channel type and adds a test confirming that LND now rejects that legacy type. The commit message says the real fix is elsewhere in the same pull request: previ…

Deprecated commitment format (legacy) is now rejected by RPCTest added to verify legacy channel type is refusedUnused legacy node configuration flag removed
03d8b09dby ziggie+24−85 files
No security note in commit
Moderate 60 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11198 from gijswijs/amp-setlocal-reconstruction-fix

This change fixes a bug in LND's handling of AMP (Atomic Multi-Path) payments. Previously, if one partial payment set failed to reconstruct its secret preimage, the entire invoice was canceled, including unrelated partial payment sets from…

Denial-of-service against reusable static AMP invoices by causing unrelated accepted HTLC sets to be canceledIncorrect invoice state transition from set-local failure to global invoice cancellationAvailability impact on multi-payer AMP invoice scenarios
88959aecby Olaoluwa Osuntokun+155−44 files
Vendor flagged security relevance
Low 29 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11200 from ziggie1984/build-go-1.27.1

This commit updates the Go programming language version used to build LND from 1.25.13/1.26.6 to 1.26.8 (language version) and 1.27.1 (toolchain). It also regenerates many automatically generated RPC files and adjusts linter settings. The …

Go version bump may indirectly address unlisted runtime/standard-library security fixesLarge regenerated protobuf files suggest dependency/toolchain refresh rather than logic changeLinter configuration expanded to suppress new checks, consistent with a toolchain upgrade
ef4820e5by Olaoluwa Osuntokun+4932−412670 files
No security note in commit
Informational 15 AI analysisMessage 92 · Strong
LL Lightning LabsLND BitcoinLightning Network

build: adopt focused golangci-lint v2.13 checks

This commit is a routine build-maintenance change. It updates the project's Go linter configuration to a newer version and fixes the resulting style warnings: a WebSocket header spelling and several documentation comments that didn't start…

bada7ea3by ziggie+27−1911 files
No security note in commit
Informational 15 AI analysisMessage 68 · Adequate
LL Lightning LabsLND BitcoinLightning Network

lnrpc: regenerate protos with Go 1.27

This commit is a housekeeping change that regenerates automatically generated RPC binding files using a newer Go compiler version. The only differences are in code comments (doc-comment formatting), not in actual program logic or API behav…

dd523108by ziggie+4501−369826 files
No security note in commit
Informational 20 AI analysisMessage 100 · Strong
LL Lightning LabsLND BitcoinLightning Network

build: fix Go 1.27 compatibility

This commit is a routine build-and-test maintenance patch to make the LND codebase compile and pass tests with the upcoming Go 1.27 release. It upgrades the project's custom linter tool, refreshes many indirect tool dependencies, adjusts o…

No production code changesNo vulnerability fix or CVE reference presentDependency-only refresh in tools module (development tooling)
6b54a387by ziggie+365−3706 files
No security note in commit
Informational 15 AI analysisMessage 80 · Strong
LL Lightning LabsLND BitcoinLightning Network

build: bump Go language and toolchain versions

This commit is a routine maintenance update that changes which version of the Go programming language is used to build the lnd project. It does not change any application logic, fix a bug, or address a security vulnerability. The project i…

b1f9ca66by ziggie+39−3930 files
No security note in commit
Moderate 60 AI analysisMessage 83 · Strong
LL Lightning LabsLND BitcoinLightning Network

invoices: cancel only the failing AMP set on reconstruction failure

This commit fixes a bug in LND's invoice handling for reusable AMP (Atomic Multi-Path) invoices. Previously, if one payment set failed to reconstruct its preimage, the entire invoice was canceled, even though other valid payment sets on th…

Denial-of-service-like availability impact: a malicious or buggy payer could cause a whole reusable AMP invoice to be canceled, blocking legitimate concurrent payersSet-local failure incorrectly escalated to invoice-global cancellationRegression test added for concurrent-set survival after reconstruction failure
d74ab6faby Gijs van Dam+141−42 files
No security note in commit
Informational 15 AI analysisMessage 68 · Adequate
LL Lightning LabsLND BitcoinLightning Network

bolt12: describe the lnwire dependency

This is a documentation-only change. A package comment was updated to accurately describe that the bolt12 codec library does depend on LND's lnwire package for low-level message types, while clarifying it still does not interact with the r…

5f53171dby bitromortac+3−21 file
No security note in commit
Moderate 60 AI analysisMessage 91 · Strong
LL Lightning LabsLND BitcoinLightning Network

bolt12: cover the amount overflow guard

This commit adds a test to ensure that when a BOLT 12 invoice is validated against a request, the multiplication of the offer amount by the requested quantity cannot overflow and wrap around to zero. Without this guard, a malicious or malf…

Integer overflow / wraparound in amount calculationMissing test coverage for security-critical branchBOLT 12 invoice amount validation
3c8e2bcbby bitromortac+47−01 file
Vendor flagged security relevance
Low 34 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11061 from bitromortac/2604-bolt12-1f

This commit adds the missing cryptographic signature layer for BOLT 12 offers in LND. It builds a Merkle tree from the message fields, signs that tree with a BIP-340 Schnorr signature, and now rejects invoice requests and invoices whose si…

Adds BIP-340 Schnorr signature verification for BOLT 12 invoice_request and invoice messagesMerkle tree commits to canonical re-encoded TLV records; non-minimal feature/amount encodings now rejected to preserve byte-exactnessSignature TLV type 240 and reserved range 240-1000 excluded from the signed Merkle root
1049d301by Yong+2076−7815 files
Vendor flagged security relevance
Low 35 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11125 from bhandras/codex/reorg-aware-output-lock-20260825

This commit adds a new optional wallet feature to LND that lets users lock UTXOs until the transaction spending them reaches a chosen confirmation depth, instead of relying on a wall-clock timeout. It is a feature addition with safety chec…

New RPC fields release_after_spend_confs and confirmed_spend_height added to LeaseOutput and FundPsbtCustom lock ID enforced as required for confirmation-controlled FundPsbt leases; all-zero and reserved internal IDs rejectedCapability check (ResolveOutputLeaser) prevents silent downgrade to time-only lease when confirmation control is requested
80dde144by Yong+1293−10021 files
No security note in commit
Informational 19 AI analysisMessage 58 · Thin
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #10812 from ziggie1984/chanstate-kv-store-move

This commit is a large internal code reorganization for the LND Lightning node. It moves channel state storage logic from the `channeldb` package into a new `chanstate` package, while keeping the same database keys, serialization formats, …

Large refactoring with no change to cryptographic or consensus-critical logicCodec serialization moved verbatim to new package; wire format unchangedDatabase bucket keys and TLV record types preserved
62b0a073by Olaoluwa Osuntokun+3923−310924 files
No security note in commit
Low 25 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #10804 from GeorgeTsagk/close-immediately-itest-lnd-7c38

This change fixes a data-handling bug in LND's channel-opening code. When opening a Lightning channel using an optional 'auxiliary funding controller' (used for custom channel types such as Taproot Assets), the funding manager was previous…

Data-correctness fix in funding handshake: negotiated channel configs now exposed to auxiliary funding controllerAuxiliary funding controller receives incomplete channel state before patch, complete state after patchNo explicit security claim, CVE, or advisory referenced in commit or supplied materials
1e127653by Olaoluwa Osuntokun+291−254 files
No security note in commit
Moderate 60 AI analysisMessage 88 · Strong
LL Lightning LabsLND BitcoinLightning Network

bolt12: verify invoice_request and invoice signatures on read

This change makes LND's BOLT 12 invoice and invoice-request reader actually check that the digital signature is valid, instead of only checking that a signature field exists. Before, an attacker could craft or modify a BOLT 12 message and …

Missing cryptographic verification on parsed BOLT 12 messages replaced with BIP-340 Schnorr signature verificationReader accepted any 64-byte placeholder signature before the patchNew negative tests verify rejection of wrong-signer and tampered Merkle-root fields
aa8bd19fby bitromortac+272−723 files
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.

Security candidatechanneldb: add type-prefix to waiting proof store recordsby Elle Mouton · e0256a7d · Mar 17, 2026 · 7 filesMessage 95 · StrongLow 26Details
Commit message · Elle Mouton

channeldb: add type-prefix to waiting proof store records

Existing waiting proof records encode a bare isRemote flag followed by a
raw AnnounceSignatures1 payload. A future gossip v2 implementation will
store AnnounceSignatures2 (taproot) proofs in the same bucket, so each
record needs a discriminator byte to select the correct decoder.

This commit:

1. Defines WaitingProofTypeV1 (= 0x00) for the current
AnnounceSignatures1-based proofs.
2. Updates WaitingProofKey to 10 bytes [proofType(1) || scid(8) ||
isRemote(1)] to avoid cross-version key collisions.
3. Adds migration 35, which rewrites every existing record to prepend
the type byte and rewrites keys to the new format.
4. Updates WaitingProof.Encode/Decode to always write/expect the prefix.

The migration, codec changes, and tests are kept in one atomic commit so
there is no intermediate revision where the new Decode can encounter
unmigrated records.

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 boundary
AI analysis · Low 26/100

This commit is a forward-looking database format change for LND's 'waiting proof store,' which holds channel announcement proofs. It adds a one-byte type marker to each stored record and its lookup key so that a future gossip v2/Taproot version can safely store a different proof type in the same place. It also ships a database migration that rewrites all existing records to the new format. The change is defensive and structural, not a fix for an active vulnerability.

Lower-prioritydocs: update v0.21 release notesby Calvin Zachman · 58f5997e · Mar 16, 2026 · 1 fileMessage 57 · ThinInformational 15Details
Commit message · Calvin Zachman

docs: update v0.21 release notes

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 documentation line to the release notes for LND version 0.21.0, describing a previously merged feature that allows multiple read-only RPC middleware interceptors to be registered at the same time. There are no code changes, no bug fixes, and no security-related content in the commit itself.

Lower-priorityitest: add test for multiple read-only rpc mwby Calvin Zachman · 2fa9d92e · Mar 16, 2026 · 1 fileMessage 55 · ThinInformational 15Details
Commit message · Calvin Zachman

itest: add test for multiple read-only rpc mw

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 only adds a new integration test that checks whether two read-only RPC middlewares can be registered at the same time and both receive copies of the same RPC traffic. It does not change any production code, so it cannot introduce or fix a security vulnerability on its own.

Lower-priorityrpcperms: allow multiple read-only middlewareby Calvin Zachman · e94e2117 · Mar 16, 2026 · 1 fileMessage 68 · AdequateLow 34Details
Commit message · Calvin Zachman

rpcperms: allow multiple read-only middleware

There is validation which requires "read-only" middle ware
not specify a caveat name. But when you try to register a second
read-only middleware, there's validation which prevents double
registration for same caveat (though in this case the caveat name
is the empty string).

Update the dameon to permit the registration of multiple
read-only rpc middleware.

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

This change loosens a registration rule in LND's RPC middleware system so that multiple 'read-only' middlewares can be registered at the same time. Previously, the code treated all middlewares the same and rejected any second registration that shared a caveat name, even when both were read-only. The patch also adds a guard so that if a read-only middleware somehow tries to replace a message, its replacement is ignored and logged instead of being applied.

Lower-prioritygraph/db: version DeleteChannelEdges, IsPublicNode, IsZombieEdgeby Elle Mouton · 084bac6e · Mar 16, 2026 · 4 filesMessage 73 · AdequateLow 27Details
Commit message · Elle Mouton

graph/db: version DeleteChannelEdges, IsPublicNode, IsZombieEdge

Propagate the gossip version parameter through DeleteChannelEdges,
IsPublicNode, and IsZombieEdge on ChannelGraph, passing it down to the
underlying Store. Previously these methods hard-coded GossipVersion1
internally; surfacing the parameter lets callers operate on the version
appropriate for the channel.

Also fix two call sites that were still passing *ChannelGraph where a
version-aware interface was expected:

- rpcserver.go AddInvoice now uses s.v1Graph (a *VersionedGraph) so
that the invoicesrpc.GraphSource interface—whose IsPublicNode method
does not take a version parameter—is satisfied.
- subrpcserver_config.go wraps graphDB in NewVersionedGraph with
GossipVersion1 when populating the invoicesrpc config Graph field
via reflection, for the same reason.

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

This commit is a code-cleanup change that makes several Lightning Network graph database methods aware of which 'gossip version' they are working with, instead of always assuming version 1. It also fixes two places where the wrong graph object was being passed to invoice-related code. The change is mostly architectural and does not by itself fix a known, exploitable bug, but it removes a class of mistakes where code could accidentally operate on the wrong version of the graph data.

Lower-prioritydocs: update release notesby Elle Mouton · d47dd3ff · Mar 16, 2026 · 1 fileMessage 47 · ThinInformational 15Details
Commit message · Elle Mouton

docs: update release notes

47/100 · ThinMessage clarity
✓ Descriptive subject✓ 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 updates release notes documentation by adding a link to one more pull request. There are no code changes, no bug fixes, and no security-related content in the diff itself.

Lower-prioritymulti: version ForEachNode, ForEachNodeCached, NumZombiesby Elle Mouton · 8a7afc1b · Mar 16, 2026 · 10 filesMessage 83 · StrongInformational 22Details
Commit message · Elle Mouton

multi: version ForEachNode, ForEachNodeCached, NumZombies

Add a gossip version parameter to ForEachNode, ForEachNodeCached, and
NumZombies in the Store interface and propagate it through the KV and
SQL implementations and the ChannelGraph wrapper.

The KVStore gates each method against GossipVersion1, returning
ErrVersionNotSupportedForKVDB for any other version. The SQLStore uses
the version to filter the underlying queries.

All call sites—routing graph, autopilot, RPC server, and the graph
migration integration test—are updated to pass the appropriate version
explicitly.

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

This commit is a software plumbing change: it adds a 'gossip version' parameter to several graph database methods so the code can distinguish between different network protocol versions. It does not fix a crash, a privacy leak, or an obvious way for an attacker to steal funds. Instead, it prepares the codebase for future multi-version channel graph support. The KV (file-based) backend now refuses non-V1 versions, while the SQL backend uses the version to filter queries. Several internal callers are updated to explicitly request version 1.

Lower-prioritygraph/db: add VersionedGraph routing/cache methodsby Elle Mouton · 50b2567a · Mar 16, 2026 · 5 filesMessage 73 · AdequateLow 25Details
Commit message · Elle Mouton

graph/db: add VersionedGraph routing/cache methods

Add version-free shadow methods to VersionedGraph so it satisfies the
routing.Graph, graphdb.NodeTraverser, and related interfaces used by the
channel router and RPC layer.

FetchNodeFeatures and ForEachNodeDirectedChannel delegate to the graph
cache when available, falling back to the store with the baked-in
version. ForEachNode, ForEachNodeCached, ChannelView, and
NodeUpdatesInHorizon all forward to the embedded ChannelGraph with the
version pre-applied.

Update server.go and rpcserver.go to pass s.v1Graph (a *VersionedGraph
wrapping the main graphDB with GossipVersion1) wherever the routing and
session interfaces are needed, replacing direct *ChannelGraph references
that no longer satisfy those interfaces after the version parameters were
added.

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

This commit adds wrapper methods to a new 'VersionedGraph' type so the existing channel graph can be used by the router and RPC layer even after internal interfaces gained a 'version' parameter. It also wires up that wrapper in the main server and RPC server. There is no obvious security bug in the diff itself; it is a refactoring/forward-compatibility change. A TODO comment notes that one fallback path still hardcodes an older version, which could matter later but is not an active vulnerability.

Lower-prioritygraph/db: version ChannelView and add v2 queriesby Elle Mouton · 4ae4c703 · Mar 16, 2026 · 10 filesMessage 78 · AdequateLow 32Details
Commit message · Elle Mouton

graph/db: version ChannelView and add v2 queries

Add a gossip version parameter to ChannelView in the Store interface,
KV and SQL implementations, and the ChannelGraph wrapper. The KVStore
guards v2 requests with ErrVersionNotSupportedForKVDB; the SQLStore
filters by the requested version.

Add three new SQL queries to support version-scoped channel lookups:

- GetPublicV1ChannelsBySCID: public v1 channels in a SCID range,
ordered by SCID.
- GetPublicV2ChannelsBySCID: public v2 channels in a SCID range,
ordered by SCID.
- ListChannelsPaginatedV2: paginate v2 channels by internal DB ID,
used by ChanUpdateRange.

Add TestVersionedDBs/channel_view to verify that v1 and v2 channel
views each return only their respective channels.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Low 32/100

This commit extends the Lightning Network graph database so it can separately handle two different channel announcement formats (v1 and v2). It adds version-aware queries and makes the channel-view lookup respect the requested gossip version. There is no obvious security bug in the patch; it appears to be a feature/refactoring change to support dual-version gossip. The most notable security-relevant detail is that the older KV database backend now refuses v2 channel-view requests, while the newer SQL backend can serve both versions.

Lower-prioritygraph/db: version MarkEdgeZombieby Elle Mouton · 23288dce · Mar 16, 2026 · 6 filesMessage 58 · ThinInformational 18Details
Commit message · Elle Mouton

graph/db: version MarkEdgeZombie

Add a gossip version parameter to MarkEdgeZombie in the Store interface,
both KV and SQL implementations, and the ChannelGraph wrapper, following
the same pattern established for MarkEdgeLive.

KVStore guards against non-v1 versions with ErrVersionNotSupportedForKVDB.
SQLStore accepts any known gossip version and uses it in the UpsertZombieChannel
call and cache invalidation.

Builder.MarkZombieEdge (the ad-hoc path for validation failures) passes
GossipVersion1 as all channels in that path are v1.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Informational 18/100

This commit is a small internal plumbing change: it adds a 'gossip version' parameter to the function that marks Lightning channels as 'zombies' (inactive/stale), so the database layer can handle different channel gossip formats consistently. It is not a security fix and does not appear to introduce a vulnerability. It simply extends an existing pattern already used for the 'mark live' function.

Security candidategraph/db: version FilterChannelRangeby Elle Mouton · 3c06daed · Mar 16, 2026 · 5 filesMessage 73 · AdequateLow 28Details
Commit message · Elle Mouton

graph/db: version FilterChannelRange

Add a gossip version parameter to FilterChannelRange in the Store interface,
both KV and SQL implementations, and the ChannelGraph wrapper.

KVStore guards against non-v1 versions with ErrVersionNotSupportedForKVDB.
SQLStore accepts any known gossip version, filtering the channel results by
version and using it in policy lookups. The SQL query still uses
GetPublicV1ChannelsBySCID for now (a TODO marks where a version-aware query
will be substituted in a follow-up).

VersionedGraph.FilterChannelRange shadows the ChannelGraph method with a
version-free signature, passing its baked-in version to the store. This keeps
the ChannelGraphTimeSeries interface and ChanSeries implementation unchanged.

Add TestFilterChannelRangeVersionGuard to verify that the KV store returns
ErrVersionNotSupportedForKVDB for v2 requests while the SQL store handles
them gracefully.

73/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
signing boundary
AI analysis · Low 28/100

This commit changes how LND's graph database filters channel ranges by adding a 'gossip version' parameter. It is a preparatory/infrastructure change: the older KV database now explicitly refuses version 2 requests, while the newer SQL database accepts them but still mostly uses the old version-1 query path (marked with a TODO for a future update). There is no obvious security vulnerability in the patch itself; it is more about making the code ready for future gossip protocol versions.

Security candidategraph,discovery: version IsZombieChannelby Elle Mouton · cb99637f · Mar 16, 2026 · 5 filesMessage 63 · AdequateLow 40Details
Commit message · Elle Mouton

graph,discovery: version IsZombieChannel

Change the IsZombieChannel / isStillZombieChannel function signature
throughout the gossip and routing stacks from
func(time.Time, time.Time) bool to func(ChannelUpdateInfo) bool.

This allows zombie detection to inspect the full channel update info—
including version and freshness type—rather than receiving two raw unix
timestamps that carry no meaning for v2 channels.

Builder.IsZombieChannel is updated to extract version-appropriate
freshness from the ChannelUpdateInfo: unix-time expiry for v1, and a
block-count expiry (derived from ChannelPruneExpiry and
avgBitcoinBlockTime) for v2. The gossipSyncer, SyncManager, and gossiper
Config fields are updated to use the new signature.

63/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
signing boundary
AI analysis · Low 40/100

This commit updates how the Lightning Network Daemon (LND) decides whether a payment channel is a 'zombie'—meaning it has gone stale and should be ignored or pruned. Previously, zombie detection only looked at wall-clock timestamps, which works for older v1 gossip channels but not for newer v2 channels that use block heights to show freshness. The change lets the code inspect the full channel update information, including its version and freshness type, so v2 channels are correctly evaluated by block height rather than by time. This is a correctness improvement, not an obvious active vulnerability, but misclassifying v2 channels could affect routing reliability and graph health.

Lower-prioritygraph/db: rework ChannelUpdateInfo to use lnwire.Timestampby Elle Mouton · 2a9a4315 · Mar 16, 2026 · 4 filesMessage 73 · AdequateInformational 12Details
Commit message · Elle Mouton

graph/db: rework ChannelUpdateInfo to use lnwire.Timestamp

Replace the separate Node1UpdateTimestamp/Node2UpdateTimestamp (time.Time)
and Node1BlockHeight/Node2BlockHeight (uint32) fields in ChannelUpdateInfo
with a unified Node1Freshness/Node2Freshness pair typed as lnwire.Timestamp.

The lnwire.Timestamp interface (added in the previous commit) is either a
UnixTimestamp (v1) or BlockHeightTimestamp (v2), making it structurally
impossible to pass block-height values into a v1 constructor or vice versa.

Two version-specific constructors replace the old single constructor:
- NewV1ChannelUpdateInfo(scid, node1Time, node2Time time.Time)
- NewV2ChannelUpdateInfo(scid, node1BlockHeight, node2BlockHeight uint32)

Add Node1FreshnessTime/Node2FreshnessTime helper methods on ChannelUpdateInfo
to extract the underlying time.Time from a UnixTimestamp, which the discovery
syncer needs for its v1-only isStale/isSkewed and isStillZombieChannel checks.

All call sites in kv_store, sql_store, graph_test, and syncer are updated
accordingly.

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

This commit is a code cleanup that changes how LND stores 'freshness' timestamps for Lightning channel gossip updates. It replaces separate time and block-height fields with a single typed field that can hold either a Unix timestamp or a block height depending on the gossip protocol version. There is no indication this fixes an active security bug; it appears to be a structural improvement to prevent mixing up v1 and v2 timestamp types.

Lower-prioritygraph/db: version FilterKnownChanIDs callbackby Elle Mouton · 08823ac0 · Mar 16, 2026 · 7 filesMessage 68 · AdequateLow 25Details
Commit message · Elle Mouton

graph/db: version FilterKnownChanIDs callback

Change the isZombieChan callback in FilterKnownChanIDs (and its
ChannelGraphTimeSeries interface counterpart) from
func(time.Time, time.Time) bool to func(ChannelUpdateInfo) bool.

This allows callers to make version-aware zombie decisions using the full
ChannelUpdateInfo—including freshness type—rather than two raw time.Time
values that are meaningless for v2 channels.

The GossipSyncer adapts its v1-only isStillZombieChannel check by
wrapping it in a closure that extracts Node1/Node2FreshnessTime from the
ChannelUpdateInfo. All other call sites are updated accordingly.

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

This commit refactors how LND decides whether a Lightning channel is a 'zombie' (inactive/stale) during gossip synchronization. Previously the code only passed two timestamps into the decision function, which worked for older v1 gossip channels but was meaningless for newer v2 channels that use block heights instead of timestamps. The change passes the full channel update info—including the gossip version—so future code can make version-aware zombie decisions. It is a preparatory/internal cleanup, not a direct fix for an active exploit.

Lower-prioritylnwire: add Timestamp interfaceby Elle Mouton · 50dd8640 · Mar 16, 2026 · 2 filesMessage 58 · ThinInformational 15Details
Commit message · Elle Mouton

lnwire: add Timestamp interface

Add a Timestamp interface for channel and node update ordering values
that abstracts over the two freshness semantics used by the gossip
versions:

- UnixTimestamp (uint64): seconds-since-epoch, used by v1 gossip
channels and nodes.
- BlockHeightTimestamp (uint32): block height, used by v2 gossip
channels and nodes.

Both concrete types implement IsZero() and Cmp(). Cmp returns an error
if the two operands are of different concrete types, preventing
accidental cross-version comparisons.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit only adds a new internal helper interface and two timestamp types for comparing channel and node update ordering values. It does not change any existing behavior, fix a bug, or alter how the program handles user input. There is no security issue visible in this change.

Lower-prioritygraph/db: version MarkEdgeLiveby Elle Mouton · e9eff629 · Mar 16, 2026 · 9 filesMessage 68 · AdequateLow 29Details
Commit message · Elle Mouton

graph/db: version MarkEdgeLive

Add a gossip version parameter to MarkEdgeLive throughout the stack:

- Store interface and KVStore/SQLStore implementations now take
lnwire.GossipVersion; KVStore rejects non-v1 with
ErrVersionNotSupportedForKVDB, SQLStore uses the version in the
DeleteZombieChannel query and cache invalidation.
- ChannelGraph.MarkEdgeLive passes the version through to both the
store call and the FetchChanInfos cache repopulation.
- FilterKnownChanIDs uses GossipVersion1 explicitly for its internal
MarkEdgeLive call; this site will be properly versioned when
FilterKnownChanIDs itself is versioned.
- graph.ChannelGraphSource interface and Builder.MarkEdgeLive updated
accordingly.
- Discovery gossiper and test mock updated to pass GossipVersion1 at
their (v1-only) call sites.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Low 29/100

This commit changes how LND tracks whether a Lightning channel is 'alive' versus a 'zombie' by adding a gossip-version parameter throughout the code. It is a plumbing/refactoring change to prepare for multiple gossip versions. It does not by itself fix a known exploit, but it tightens version handling: the older KV database backend now explicitly rejects non-version-1 gossip, and the newer SQL backend now uses the supplied version when deleting zombie records and clearing its cache. The most concrete security-relevant effect is preventing version confusion between the database and cache layers, which could otherwise leave stale or mismatched channel state.

Lower-prioritygraph: make zombie detection version-awareby Elle Mouton · 787dbcf7 · Mar 16, 2026 · 2 filesMessage 68 · AdequateLow 36Details
Commit message · Elle Mouton

graph: make zombie detection version-aware

Introduce isPolicyZombie to handle version-specific channel staleness.
For v1 policies, staleness is measured by wall-clock time since the last
update (unchanged behaviour). For v2 policies, staleness is measured by
the number of blocks elapsed since LastBlockHeight, using
avgBitcoinBlockTime to convert the configured prune expiry into an
equivalent block count.

isZombieChannel is simplified to call isPolicyZombie for each edge and
inline the strict/non-strict pruning logic directly, removing the prior
indirect call through IsZombieChannel.

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

This commit changes how the Lightning Network Daemon (LND) decides when a payment channel is a 'zombie' (inactive and should be removed from the network graph). Previously, all channels were judged by wall-clock time since their last update. Now, newer 'v2' gossip channels are judged by how many Bitcoin blocks have passed since their last update block height. This is a correctness/robustness improvement for the newer gossip protocol, not a fix for an active exploit. It reduces the risk that v2 channels are wrongly pruned or kept due to clock skew.

Lower-prioritydocs: add release-notes for LND 21by ziggie · 17da81d6 · Mar 15, 2026 · 1 fileMessage 57 · ThinInformational 15Details
Commit message · ziggie

docs: add release-notes for LND 21

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 line to the release notes document for LND version 0.21.0. It describes a previously existing SQL payments migration feature being promoted from test-only code to production code. There are no code changes, no bug fixes, and no security-related content in the diff.

Lower-prioritysqldb: move native SQL payments migrations into mainlineby ziggie · 04aeca44 · Mar 13, 2026 · 2 filesMessage 83 · StrongInformational 19Details
Commit message · ziggie

sqldb: move native SQL payments migrations into mainline

The native SQL payments migrations were previously gated behind test
build tags in migrations_dev.go. This commit promotes them into the
main migration sequence in migrations.go, making them available in
production builds.

The following migrations are moved to mainline:
- 000010_payments (v12): initial payments SQL schema
- 000011_payment_duplicates (v13): duplicate payment support
- kv_payments_migration (v14): optional KV to SQL payment migration
- 000012_drop_redundant_invoice_indexes (v15): index cleanup
- 000013_payments_index_improvements (v16): payment index optimizations

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

This commit moves five database upgrade steps from a test-only file into the normal production upgrade path for LND. It is a code-organization change that makes new payment-related database features available in release builds. There is no direct evidence in the commit that this fixes a security vulnerability; it appears to be a feature-enablement change.

Lower-prioritydocs: move coop close confirmation scaling note to 0.21.0by ziggie · 3657fb4b · Mar 13, 2026 · 2 filesMessage 93 · StrongInformational 15Details
Commit message · ziggie

docs: move coop close confirmation scaling note to 0.21.0

In this commit, we move the release note for the improved confirmation
scaling for cooperative closes (PR #10331) from the 0.20.1 release notes
to 0.21.0, where the change actually landed.

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 · Informational 15/100

This commit only moves text between two release note documents. It removes two entries from the 0.20.1 release notes and adds the same entries to the 0.21.0 release notes, because the related code change actually shipped in version 0.21.0 rather than 0.20.1. No program code was changed, so there is no direct security impact from this commit itself.

Lower-prioritydocs: update release notesby ziggie · 291e4456 · Mar 13, 2026 · 1 fileMessage 62 · AdequateInformational 15Details
Commit message · ziggie

docs: update release notes

The previous release-note entry was not super accurrate so we
update it to reflect the change in more detail.

62/100 · AdequateMessage clarity
✓ Descriptive subject✓ Uses a recognizable type or scope✓ Provides an explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only edits a release notes markdown file to make an earlier description more accurate. It does not change any code, configuration, or behavior of the LND software. There is no security issue in the commit itself.

Lower-prioritypayments/db: add percentage and rolling window ETA to migration progressby ziggie · e0ea1f9d · Mar 12, 2026 · 1 fileMessage 85 · StrongInformational 19Details
Commit message · ziggie

payments/db: add percentage and rolling window ETA to migration progress

Before this change the migration progress log only showed absolute counts
and a cumulative average rate. This adds two improvements:

- A cheap pre-count pass over the payments index bucket before migration
starts, giving an upper-bound estimate of the total entries to migrate
(noted as approximate since duplicates are also indexed). This allows
showing a percentage complete on each progress line.

- A rolling 300s window rate for the ETA calculation instead of the
cumulative average rate. The cumulative rate is slow to react when
throughput changes mid-migration; the rolling window makes the ETA
responsive to recent conditions. On window reset the previous window's
rate is used as a fallback for one tick to avoid a gap in the ETA.

Example progress line after this change:

Progress: 500000 payments (~48.5%), 499860 attempts | Rate: 399.2
pmt/s | Elapsed: 20m50s | ETA: ~22m8s

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

This commit only improves the progress messages shown during a database migration. It adds a percentage-complete estimate and a rolling ETA timer so operators can better monitor a long-running upgrade. There is no change to how payments are stored, validated, or secured, and no security-relevant behavior is introduced.

Lower-prioritysqldb: fix error comparison and refactor sqlite bench helpersby ziggie · cb36d0d9 · Mar 12, 2026 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · ziggie

sqldb: fix error comparison and refactor sqlite bench helpers

Replace direct `err != sql.ErrNoRows` comparison with `errors.Is` and
extract the repeated fetch-and-check logic into a helper to reduce
duplication across the sequential and concurrent benchmarks.

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 changes benchmark test code in LND. It replaces one style of error checking with another and removes duplicated code in a performance test. There is no change to production code, user-facing behavior, or wallet security.

Lower-prioritysqldb: scope DeleteFailedAttempts query to payment's own attemptsby ziggie · c5866b97 · Mar 12, 2026 · 3 filesMessage 73 · AdequateLow 29Details
Commit message · ziggie

sqldb: scope DeleteFailedAttempts query to payment's own attempts

The previous query used an IN subquery that scanned all failed
resolutions across all payments (O(N) where N = total failed attempts
globally). Replace with a correlated EXISTS subquery that only checks
resolutions for the specific payment's attempts, making it O(k) where
k = attempts for this payment (typically 1-5).

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

This commit fixes a database cleanup query in LND's payment handling. The old query could accidentally consider failed payment attempts from other payments because it looked at all failed attempts globally rather than only the current payment's attempts. The new query restricts the check to the specific payment being cleaned up, which also makes it much faster. There is no direct evidence this caused a security vulnerability, but the old behavior is a logic bug that could lead to deleting the wrong data under rare conditions.

Lower-prioritydocs: add release-notesby ziggie · bd18a1e2 · Mar 12, 2026 · 1 fileMessage 40 · ThinInformational 15Details
Commit message · ziggie

docs: add release-notes

40/100 · ThinMessage clarity
✓ Subject identifies a change✓ 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 few lines to the release notes document describing unrelated SQL payment store improvements. It is a documentation-only change with no code modifications.