LL
← All projectsLightning Labs

LND

Go implementation of a complete Lightning Network node.

BitcoinLightning NetworkNormal
Repository coverage

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

118security candidates168second-pass queue1203AI analyses
55commits · 30 days
171commits · 60 days
830commits · 180 days
1229commits · 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
279Strong · 80–100
564Adequate · 60–79
367Thin · 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 Osuntokun19940194474
ziggie41015400164
Jared Tobin908171
Elle Mouton26832253067
Erick Cestari26726070
bitromortac46546067
yyforyongyu55355065
saubyk15215070
Oli727057
Suheb323075
Yong321073
elnosh323071
Analysis record

Published AI watches

Last scanned 23 minutes ago

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

Merge pull request #11024 from ziggie1984/invoices-update-validation

This commit tightens how LND processes invoice payments, especially for newer multi-path (MPP) and AMP invoices, keysend payments, and replayed payments. It adds checks that ensure the right payment preimage is used for each invoice type a…

Preimage validation added for AMP and regular invoice replaysAMP invoices forced into MPP update path, preventing legacy-path processingLegacy settlement now fails when invoice-level preimage is missing
61f3b5a7by ziggieXXX+482−114 files
No security note in commit
Moderate 59 AI analysisMessage 35 · Opaque
LL Lightning LabsLND BitcoinLightning Network

invoices: refine update handling

This commit tightens how LND handles invoice payment updates, especially for newer 'AMP' invoices and old-style 'keysend' payments. It adds checks so that the wrong kind of payment cannot be processed against the wrong kind of invoice, and…

Added preimage/hash mismatch checks for both regular and AMP invoice replaysAMP records now require an MPP payload, preventing AMP processing on the legacy pathLegacy path now rejects AMP invoices and invoices missing invoice-level preimages
6be6350eby ziggie+476−113 files
No security note in commit
Informational 15 AI analysisMessage 57 · Thin
LL Lightning LabsLND BitcoinLightning Network

docs: update 0.21.2 release notes

This commit only updates the release notes document for version 0.21.2. It adds a bullet point describing a previously merged code change about invoice handling and adds a contributor name to the credits list. No actual code was changed, s…

758bbb8eby ziggie+6−01 file
No security note in commit
Informational 15 AI analysisMessage 57 · Thin
LL Lightning LabsLND BitcoinLightning Network

docs: move gossip bounds note to v0.21.2

This commit only moves an existing release-note entry from one version's notes (v0.22.0) to another (v0.21.2). It does not change any code, build files, configuration, or tests. The change is purely editorial documentation bookkeeping.

83e7eb8cby ziggie+11−112 files
No security note in commit
High 72 AI analysisMessage 68 · Adequate
LL Lightning LabsLND BitcoinLightning Network

discovery: bound channel range reply buffering

This change fixes a way a malicious or buggy peer could make an LND node use an unpredictable amount of memory while syncing the Lightning channel graph. Before the fix, the node only limited the size of one compressed reply message, but a…

Resource exhaustion / unbounded memory growth in gossip syncRemote peer can influence memory allocation via ReplyChannelRange streamMissing aggregate limit on decoded working set
ceff94faby Olaoluwa Osuntokun+335−153 files
Vendor flagged security relevance
Low 33 AI analysisMessage 47 · Thin
LL Lightning LabsLND BitcoinLightning Network

docs: update release notes

This commit updates the release notes for LND 0.21.2 to describe a fix for a bug in the HTLC interceptor RPC. The bug caused LND to fail to forward payments in blinded routes when the next hop was identified by node ID instead of channel I…

Blinded route forwarding failure could disrupt payment routing or be used to probe path structure.Sentinel value change in RPC API could cause client misclassification of forwards if not handled.Release notes describe the change as a fix for a forwarding issue, not as a security vulnerability.
f42b4298by bitromortac+20−01 file
No security note in commit
Informational 14 AI analysisMessage 83 · Strong
LL Lightning LabsLND BitcoinLightning Network

itest: cover blinded route next_node_id forwarding

This commit only adds new integration tests for an existing feature in LND: forwarding blinded payments where the next hop is identified by node ID rather than channel ID. It does not change production code, fix a bug, or introduce any new…

da6a40c0by bitromortac+432−02 files
No security note in commit
Low 25 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

witness beacon: report node-ID next hop to the on-chain HTLC interceptor

This change fixes a reporting gap in LND's 'witness beacon,' a component that watches on-chain transactions and tells the HTLC interceptor where a payment should go next. Previously, when the next hop was identified by a node ID rather tha…

Missing security-critical metadata in on-chain interception pathBehavioral parity between on-chain and off-chain HTLC interceptionPotential misclassification of node-ID forwards as final receives
9c4b8bfeby bitromortac+59−52 files
No security note in commit
Moderate 59 AI analysisMessage 81 · Strong
LL Lightning LabsLND BitcoinLightning Network

htlcswitch: forward node-ID blinded hops via non-strict forwarding

This commit fixes a bug in LND's payment forwarding for 'blinded routes'—a privacy feature in the Lightning Network. Previously, if the next hop was identified by node ID rather than a specific channel ID, the payment could not be forwarde…

Fixes a functional forwarding failure for blinded-route payments using node-ID next hops (issue #10937).Prevents private channel SCID leakage in failure messages for node-ID blinded hops by returning FailUnknownNextPeer instead of a channel_update.Adds circular-route filtering for node-ID next hops before non-strict forwarding selection.
dbc57040by bitromortac+334−416 files
No security note in commit
Informational 19 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

htlcswitch+lnrpc: report node-ID next hop to the off-chain HTLC interceptor

This change improves how the Lightning Network Daemon (LND) reports forwarding details to external plugins that inspect HTLCs (payment packets). For a new type of blinded route where the next hop is identified by node ID rather than a spec…

Information-correctness fix for HTLC interceptor APIPrevents misclassification of node-ID forwards as exit hopsAdds explicit sentinel to disambiguate zero SCID semantics
32373b76by bitromortac+29−13 files
No security note in commit
Low 25 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

htlcswitch: classify a node-ID forward as a forward event

This commit fixes a bookkeeping bug in LND's HTLC event stream. When a payment is forwarded to a 'blinded' next hop identified only by a node public key (not a channel ID), and it fails before the switch picks an outgoing channel, the even…

Event misclassification in HTLC event stream (forward reported as receive)Blinded/node-ID forwarding path introduced prior to this fixFailure and resolution packets dropped next-hop metadata before fix
a4844ef5by bitromortac+149−04 files
No security note in commit
Low 29 AI analysisMessage 68 · Adequate
LL Lightning LabsLND BitcoinLightning Network

htlcswitch/hop: decode next_node_id blinded hops

This commit adds support in LND for a different way of identifying the next hop in a private ('blinded') Lightning payment route. Previously LND expected the next hop to be identified by a channel ID; now it also accepts the next node's pu…

New validation enforces BOLT 4 mutual exclusivity of short_channel_id and next_node_id in blinded route dataPreviously ambiguous or unhandled next_node_id forwarding case now explicitly decodedNo memory-safety, cryptographic, or authorization changes observed
4fd4289aby bitromortac+471−86 files
No security note in commit
Moderate 60 AI analysisMessage 78 · Adequate
LL Lightning LabsLND BitcoinLightning Network

lnwire: cap decoded short channel IDs

This commit tightens a safety limit in LND's Lightning wire protocol parser. Previously, a compressed network message could decompress into an unbounded number of short channel IDs, potentially consuming far more memory than the wire messa…

Resource-limit bypass: compressed-input bound did not bound decoded outputMemory-exhaustion risk from zlib decompression of peer-supplied dataTruncated/corrupt zlib streams previously accepted as valid partial results
d1622919by Olaoluwa Osuntokun+271−502 files
No security note in commit
Informational 18 AI analysisMessage 85 · Strong
LL Lightning LabsLND BitcoinLightning Network

lnrpc/routerrpc: add outgoing_node_id to HTLC intercept request

This commit only updates the API definition and auto-generated code for LND's HTLC interceptor. It adds a new optional field, outgoing_requested_node_id, and documents that when a blinded route uses a node ID instead of a channel ID, the e…

No runtime logic changed; only protobuf schema and generated stubsNew field is explicitly documented as unpopulated until later commitsSentinel value (MaxUint64) introduced to prevent misclassification of final receive vs node-addressed forward
14640a50by bitromortac+48−73 files
No security note in commit
Informational 18 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

multi: represent the blinded forwarding next hop as an fn.Either

This commit is a behind-the-scenes code cleanup in the LND Lightning node. It changes how the 'next hop' for forwarding payments is stored internally so that, in the future, blinded routes can identify the next hop by a node's public key i…

Refactor of core HTLC forwarding data structure (ForwardingInfo.NextHop)Preparation for blinded route next-hop identification by node public keyEncapsulation of Either type behind IsExit() and NextHopChannel() to centralize exit-hop detection
d28a7176by bitromortac+83−2612 files
No security note in commit
Low 44 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

htlcswitch: key the aux traffic shaper on the evaluated channel

This commit fixes a routing bug in LND's Lightning payment forwarding. When a payment could take any of several parallel channels to the same next peer, the node was accidentally asking an optional 'auxiliary traffic shaper' about the chan…

Logic error: wrong channel identifier used for auxiliary policy/bandwidth checkPotential information disclosure: real SCID could leak if passed to shaper-driven wire messages; commit explicitly prevents thisParallel-channel forwarding correctness issue
b1667800by bitromortac+133−12 files
No security note in commit
Informational 15 AI analysisMessage 68 · Adequate
LL Lightning LabsLND BitcoinLightning Network

github: bump gateway code-review to v0.6.0

This commit updates a GitHub Actions workflow that runs an optional code-review bot called 'gateway'. It only changes two pinned version numbers (SHA hashes) for the bot's action and its runtime, moving from v0.5.0 to v0.6.0. There is no c…

17a4d42fby Suheb+4−41 file
No security note in commit
Moderate 58 AI analysisMessage 68 · Adequate
LL Lightning LabsLND BitcoinLightning Network

channeldb: recover missing db version

This patch fixes a database migration bug in LND's channel database. Some databases were created without recording their schema version number, which could cause future mandatory upgrades to be skipped. The fix detects that missing version…

Database schema version key can be absent due to an init-ordering regressionMissing version key previously caused migration selection to treat DB as latest, potentially skipping mandatory migrationsFix recovers baseline from last mandatory version before the regression (33)
68264c70by Elle Mouton+176−33 files
Vendor flagged security relevance
Informational 22 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

channeldb: make waiting proof migration repeatable

This commit fixes a database migration in LND so it can safely run twice. Previously, if a certain recovery process re-ran migration 35 on a database that already had newer-format 'waiting proof' records, the migration would likely fail or…

Database migration idempotency/robustness fixPotential data corruption or node startup failure if migration re-run against mixed-format bucketNo input validation of attacker-controlled data; issue is local/state-recovery only
3aff61aeby Elle Mouton+93−02 files
No security note in commit
Moderate 54 AI analysisMessage 76 · Adequate
LL Lightning LabsLND BitcoinLightning Network

channeldb: preserve db version during init

This commit fixes a database initialization bug in LND's channel database. Previously, creating an empty metadata bucket during setup could trick the code into thinking an old or partially-created database was already fully up-to-date, pot…

Database version detection logic flawPotential migration skip due to incorrect initialized-state detectionNew explicit error for missing DB version key
619913bfby Elle Mouton+111−104 files
No security note in commit
Repository ledger

Explore captured commits

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

Security candidatediscovery: add panic recovery for serial announce signatures processingby Olaoluwa Osuntokun · bcb65f5a · Jan 13, 2026 · 1 fileMessage 73 · AdequateModerate 57Details
Commit message · Olaoluwa Osuntokun

discovery: add panic recovery for serial announce signatures processing

In this commit, we extend the panic recovery mechanism to cover the
serial processing path for AnnounceSignatures1 messages. Unlike other
gossip messages which are processed in parallel goroutines, announcement
signatures are processed serially in the main networkHandler loop.

A panic during this serial processing would previously crash the entire
gossiper. This change wraps the processing in an anonymous function with
a deferred panic recovery, ensuring resilience without changing the
serial processing semantics.

Since AnnounceSignatures bypass the validation barrier, we pass nil for
the jobID parameter.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundary
AI analysis · Moderate 57/100

This update adds a safety net around a specific message-handling path in LND's gossip subsystem. Previously, a crash while handling an AnnounceSignatures1 message could bring down the whole gossip component; now the code catches such crashes and keeps running. The change is defensive hardening rather than a fix for a known active attack.

AI review queueddiscovery: add panic recovery for gossip message processingby Olaoluwa Osuntokun · caf4850f · Jan 13, 2026 · 2 filesMessage 73 · AdequateLow 46Details
Commit message · Olaoluwa Osuntokun

discovery: add panic recovery for gossip message processing

In this commit, we add a centralized panic recovery mechanism for gossip
goroutines. This increases the robustness of message processing in the
gossiper, as now we are able to keep on trucking in the face of logic
errors that may lead to panics.

We ensure that any deps are freed and we log the panic trace to help
catch bugs in the future.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Low 46/100

This commit adds a safety net around the Lightning node's gossip message handling. Previously, a programming bug (panic) while processing network gossip could crash the whole goroutine or leave related tasks waiting forever. The new code catches such panics, logs them, frees resources, notifies waiting tasks, and reports an error back so the node keeps running. It is a defensive hardening change, not a fix for a known active exploit.

Lower-prioritydiscovery: enforce non-zero timestamp in gossip messagesby Olaoluwa Osuntokun · cad1b957 · Jan 10, 2026 · 3 filesMessage 85 · StrongLow 48Details
Commit message · Olaoluwa Osuntokun

discovery: enforce non-zero timestamp in gossip messages

In this commit, we add validation for channel updates and node
announcements to ensure that we reject gossip messages with zero
timestamps at the discovery layer.

From BOLT 7:
"MUST set timestamp to greater than 0, AND to greater than any
previously-sent channel_update for this short_channel_id."

This validation is performed in the gossip handlers (handleNodeAnnouncement
and handleChanUpdate) rather than at the wire protocol level. This approach
ensures we can still decode messages from disk or embedded in onion errors
while rejecting invalid gossip from peers.

Remote peers sending zero-timestamp gossip will have their ban score
incremented.

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

This change tightens validation in LND's gossip message handling. It now rejects network announcements (channel updates and node announcements) that carry a timestamp of zero, which the Lightning BOLT specification forbids for channel updates. Remote peers sending zero-timestamp channel updates will also have their 'ban score' increased, moving them closer to being disconnected. The patch is defensive and does not appear to fix an active exploit, but it closes a spec-compliance gap that could be abused to propagate invalid routing data.

Lower-prioritydocs: update release notesby Slyghtning · 202e473c · Jan 7, 2026 · 1 fileMessage 47 · ThinInformational 15Details
Commit message · Slyghtning

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 the release notes document for LND version 0.21.0. It adds two bullet points describing new user-facing features (explicit input selection in the EstimateFee RPC and a new --utxos flag in lncli) and adds one contributor name to the credits list. There are no code changes, no bug fixes, and no security-related content.

Lower-priorityitest: estimate on-chain fee with selected inputsby Slyghtning · 422aa7d1 · Jan 7, 2026 · 2 filesMessage 45 · ThinInformational 14Details
Commit message · Slyghtning

itest: estimate on-chain fee with selected inputs

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

This commit only adds new integration tests for the EstimateFee RPC. It does not change any production code, wallet logic, or RPC behavior. There is no security issue here.

Lower-prioritycmd: EstimateFee for explicit inputsby Slyghtning · 44aa5efc · Jan 7, 2026 · 1 fileMessage 45 · ThinInformational 19Details
Commit message · Slyghtning

cmd: EstimateFee for explicit inputs

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

This commit adds a new command-line option to the `lncli estimatefee` command, allowing users to specify exact UTXOs (unspent transaction outputs) to use when estimating a transaction fee. Previously, the fee estimation relied on automatic coin selection. This is a feature addition that exposes an existing backend capability in the command-line tool; it does not, on its own, appear to fix or introduce a security vulnerability.

AI review queuedcmd: make types.go accessible in lnd packageby Slyghtning · e5456d39 · Jan 7, 2026 · 5 filesMessage 45 · ThinInformational 15Details
Commit message · Slyghtning

cmd: make types.go accessible in lnd package

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit simply moves a set of helper types and functions used for formatting Bitcoin transaction data from one internal package to another. It does not change what the code does, only where it lives in the project. There is no user-facing change and no security impact.

Lower-priorityrpcserver: return inputs in EstimateFeeResponseby Slyghtning · 280929ba · Jan 7, 2026 · 1 fileMessage 45 · ThinInformational 19Details
Commit message · Slyghtning

rpcserver: return inputs in EstimateFeeResponse

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

This commit updates the EstimateFee RPC in LND so that callers can optionally specify which wallet inputs (UTXOs) to use for the fee estimate, and the response now lists the inputs that were actually selected. It is a feature/enhancement change. There is no direct evidence in the commit that this fixes a security vulnerability; it mainly improves transparency and control for API users.

Lower-prioritylnrpc: transaction inputs in EstimateFeeRequestby Slyghtning · 049f2c73 · Jan 7, 2026 · 3 filesMessage 45 · ThinInformational 16Details
Commit message · Slyghtning

lnrpc: transaction inputs in EstimateFeeRequest

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

This commit only changes the API definition files (protobuf, generated Go code, and swagger JSON) for LND's EstimateFee RPC. It adds an optional 'inputs' field so callers can specify which transaction inputs to use when estimating fees, and the server can echo back the selected inputs. There is no server-side logic shown in this commit, and nothing in the commit message or diff indicates a security fix or vulnerability.

Security candidateserver: remove accountability signal experiment periodby elnosh · 6f49bea5 · Jan 6, 2026 · 7 filesMessage 73 · AdequateInformational 21Details
Commit message · elnosh

server: remove accountability signal experiment period

In the previous iteration with endorsement
signaling, the recommendation was for the sender to
set it to 1 and that could have had privacy concerns
when first deploying given that the default was to
downgrade the signal to 0. In the latest proposal
the recommended default for both sending and
forwarding nodes is to set `accountable` to 0.
As a result, the dates have been removed given
that there are no privacy risks associated
with relaying the signal with zero values.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
update trust
AI analysis · Informational 21/100

This commit removes a time-limited 'experiment period' for a new Lightning network signaling feature called 'accountable' (previously 'endorsement signal'). Previously, nodes would only relay this signal until a fixed date in 2026, after which they would stop. Now, because the latest protocol proposal says the default should be to send a zero/'unaccountable' value, there is no longer a privacy risk from relaying it, so the experiment end date is removed. The signal is now relayed whenever the feature is enabled, regardless of date. This is a protocol behavior change, not a fix for an exploitable security bug.

Security candidatemulti: rename experimental endorsement signal to accountableby elnosh · 34329c68 · Jan 6, 2026 · 21 filesMessage 73 · AdequateInformational 19Details
Commit message · elnosh

multi: rename experimental endorsement signal to accountable

Renames the endorsement signal to accountable to
match the latest proposal https://github.com/lightning/blips/pull/67

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
Why it was queued
boot or update pathparser or protocol path
AI analysis · Informational 19/100

This commit is a pure rename of an experimental Lightning Network feature from 'endorsement' to 'accountable/accountability' to match a community proposal update. No security vulnerability is introduced or fixed; the underlying behavior, feature bits, TLV type, and experiment end date remain unchanged. It is a terminology and identifier refactor across 21 files.

Lower-prioritymulti: make sure previous inconsitent states are fixedby ziggie · d9fb9092 · Jan 6, 2026 · 4 filesMessage 65 · AdequateLow 46Details
Commit message · ziggie

multi: make sure previous inconsitent states are fixed

We make sure that nodes previously suffering from this error will
have a consitent db view when restarting their node.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Low 46/100

This commit adds a startup repair routine for the LND Lightning node database. It fixes cases where a previous bug could delete 'link node' records even though the node still had open payment channels. On startup, LND now scans for missing link nodes and recreates them so the database stays consistent. The commit itself is a repair/cleanup patch, not an active vulnerability fix, but it addresses the after-effects of a prior race-condition bug.

Security candidatechanneldb: fix race condition in link node pruningby ziggie · 51f3c6f5 · Jan 6, 2026 · 1 fileMessage 100 · StrongModerate 68Details
Commit message · ziggie

channeldb: fix race condition in link node pruning

This commit fixes a critical race condition in MarkChanFullyClosed and
pruneLinkNode where link nodes could be incorrectly deleted despite
having pending or open channels.

The race occurred because the check for open channels and the link node
deletion happened in separate database transactions:

Thread A: TX1 checks open channels → [] (empty)
Thread A: TX1 commits
Thread B: Opens new channel with same peer
Thread A: TX2 deletes link node (using stale data)
Result: Link node deleted despite pending channel existing

This creates a TOCTOU (time-of-check to time-of-use) vulnerability where
database state changes between reading the channel count and deleting
the node.

Fix for MarkChanFullyClosed:
- Move link node deletion into the same transaction as the channel
closing check, making the check-and-delete operation atomic

Fix for pruneLinkNode:
- Add double-check within the write transaction to verify no channels
were opened since the caller's initial check
- Maintains performance by keeping early return for common case
- Prevents deletion if channels exist at delete time

This ensures the invariant: "link node exists iff channels exist"
is never violated, preventing database corruption and potential
connection issues.

100/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✓ Names security-relevant behavior explicitly
Why it was queued
explicit security language
AI analysis · Moderate 68/100

This commit fixes a database race condition in LND (a Bitcoin Lightning Network implementation). When a channel closed, the software could incorrectly delete stored peer information ('link node') even though a new channel with that same peer had just been opened. The fix moves the 'check for open channels' and 'delete peer info' steps into the same database transaction, so they happen atomically and cannot be interrupted by another operation.

Lower-priorityfn: fix Result[T].FlatMapby Gijs van Dam · e7b9515e · Jan 6, 2026 · 2 filesMessage 86 · StrongLow 36Details
Commit message · Gijs van Dam

fn: fix Result[T].FlatMap

For a Result[T], FlatMap should apply f when the result is Ok, and
propagate the error unchanged when it's Err. The original code returns r
on Ok and tries to use r.left when Err, which is wrong. This commit
fixes that.

Secondly, the group of FlatMap/AndThen and OrElse functions and methods
are now properly tested with new unit tests.

fixes #10401

86/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
AI analysis · Low 36/100

This commit fixes a logic bug in a small helper function called FlatMap used inside the LND codebase. FlatMap is supposed to transform a successful value and pass through failures unchanged. The old code did the opposite: it left successes alone and tried to transform failures, which could cause errors to be silently mishandled or successful values to be lost. The commit also adds unit tests to prevent the bug from returning.

Lower-priorityitest: fix endorsement itestsby ziggie · 5f307977 · Jan 5, 2026 · 3 filesMessage 80 · StrongInformational 15Details
Commit message · ziggie

itest: fix endorsement itests

Due to the signaling period expiring tests had to be adopted bc
they were not taking the activation time period into account.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit only updates integration tests to account for an experimental feature's activation window expiring. It does not change production code behavior or fix any security vulnerability. The new helper checks whether the endorsement experiment is still active and adjusts test expectations accordingly.

Lower-prioritydocs: add release-notesby Erick Cestari · 52300298 · Dec 29, 2025 · 1 fileMessage 40 · ThinInformational 15Details
Commit message · Erick Cestari

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 edits the release notes document for version 0.21.0. It describes a previously merged fix that makes certain data-parsing routines stricter about record sizes, and it adds a contributor name. The commit itself changes no program code, so it cannot directly introduce or fix a security issue.

Lower-prioritymulti: enforce strict TLV length checksby Erick Cestari · 5a792500 · Dec 29, 2025 · 10 filesMessage 78 · AdequateModerate 64Details
Commit message · Erick Cestari

multi: enforce strict TLV length checks

This commit improves TLV decoding safety and consistency across multiple
packages by enforcing fixed-length requirements and adding unit tests to
prevent malformed TLV records from being accepted.

Changes include:

- lnwire:
* Enforce 8-byte length in Fee TLV decoder.
* Enforce PubNonceSize in Musig2Nonce TLV decoder.
* Enforce 8-byte length in ShortChannelID TLV decoder.
* Added roundtrip and invalid length tests for Fee, Musig2Nonce,
and ShortChannelID records.

- routing/route:
* Enforce Vertex TLV length (33 bytes).
* Added encode/decode and invalid length tests for Vertex.

- tlv:
* Enforce correct length in DBytes33 decoder (33 bytes).
* Added tests ensuring all fixed-size primitive decoders reject
incorrect TLV lengths.

By strictly validating TLV lengths, we prevent malformed or corrupted
TLV records from being silently accepted, improving protocol safety.

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

This commit tightens validation for a message-encoding format (TLV) used inside the Lightning Network daemon lnd. Previously, several decoders would accept a record whose declared length did not match the fixed size they expected, which could let malformed or corrupted data be silently processed. The patch now rejects wrong-length records and adds tests to prove it. It is a defensive hardening change rather than a fix for a publicly disclosed exploit.

Lower-prioritypeer: fix log output when not applicableby ziggie · 4d1faabd · Dec 25, 2025 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · ziggie

peer: fix log output when not applicable

Before we would always log that the peer was not ready starting
up although it was not the case. We now make sure we still log
this case but only when applicable.

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

This commit fixes a minor logging issue in LND's peer connection code. Previously, the software would always print a debug message saying it was waiting for a peer to finish starting up, even when that wasn't true. The change makes the log message appear only in the actual waiting case. There is no security impact.

Lower-prioritydocs: add release noteby Abdullahi Yunus · 68f558c8 · Dec 24, 2025 · 1 fileMessage 40 · ThinInformational 15Details
Commit message · Abdullahi Yunus

docs: add release note

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 line to the release notes describing a previous performance improvement. It does not change any code, configuration, or behavior. There is no security issue here.

Lower-prioritygraphdb: add benchmark for isPublicNode queryby Abdullahi Yunus · 86cde4b9 · Dec 23, 2025 · 1 fileMessage 70 · AdequateInformational 15Details
Commit message · Abdullahi Yunus

graphdb: add benchmark for isPublicNode query

In this commit we add a benchmark to test the performance of
IsPublicNode query.

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit only adds a new performance benchmark test for an existing database query. It does not change any production code, fix any bug, or alter any behavior that users or attackers could interact with.

Lower-prioritygraph: use UNION for isPublicNode queryby Abdullahi Yunus · ac2cec46 · Dec 23, 2025 · 2 filesMessage 68 · AdequateInformational 19Details
Commit message · Abdullahi Yunus

graph: use UNION for isPublicNode query

In this commit we updated the IsPublicV1Node query to use UNION
instead of OR, since sqlite struggles to efficiently use
multiple indexes in a single query involving OR conditions across
different columns.

We use UNION ALL since the query doesn't care about duplicates.

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

This commit rewrites a single database query so that it checks two possible relationships as separate sub-queries combined with UNION ALL, instead of using OR inside one JOIN condition. The goal is to make SQLite run the query faster by using its indexes better. The result returned to the application is unchanged, so this is a performance fix, not a security fix.

Lower-prioritylntest: make sure HTLCs are locked in when sending a paymentby ziggie · ece84690 · Dec 21, 2025 · 1 fileMessage 83 · StrongInformational 17Details
Commit message · ziggie

lntest: make sure HTLCs are locked in when sending a payment

Before this change, CompletePaymentRequestsNoWait would return as
soon as the channel's NumUpdates increased by at least one. When
sending multiple payments, this meant the function could return
while some HTLCs were still in-flight and not yet committed to the
channel state.

The problem occurred when tests captured the channel state
immediately after calling this function. Even though we read the
current NumUpdates from the channel, HTLCs could still be in the
process of being committed. This led to a race where the channel
would progress to a new state after we thought we had correctly
captured it, causing tests to see unexpected commitment heights.

Fix this by waiting for all outgoing HTLCs to appear in
PendingHtlcs before returning. We count outgoing HTLCs before
sending, then wait until exactly len(paymentRequests) new HTLCs
are present. This guarantees all payments have fully completed
their commitment exchange and are locked in on both sides.

Fixes the flaky revokedCloseRetributionRemoteHodlCase test where
backups would capture state at height N+1 instead of the expected
height N.

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

This commit fixes a timing bug in LND's internal test helper. The helper previously returned too early when sending test payments, before all payment commitments were fully recorded on the channel. This caused occasional flaky test failures because tests captured channel state at the wrong moment. The fix makes the helper wait until every sent payment appears as a pending HTLC. There is no indication this affects real user funds or production code paths.

AI review queueditest: accept NO_ROUTE or TIMEOUT in testLocalClaimOutgoingHTLCby ziggie · c493f7d9 · Dec 18, 2025 · 2 filesMessage 95 · StrongInformational 15Details
Commit message · ziggie

itest: accept NO_ROUTE or TIMEOUT in testLocalClaimOutgoingHTLC

Fix flaky test due to race between channel closure propagation and
payment timeout. Both failure reasons are correct depending on timing.

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
second-pass: broader security terminology
AI analysis · Informational 15/100

This commit only changes an integration test to accept either of two valid failure reasons for a payment, fixing a flaky test. It does not change production code or fix a security vulnerability.

Lower-prioritydocs: add release-notes for LND 20.1by ziggie · e5b0704d · Dec 16, 2025 · 1 fileMessage 57 · ThinInformational 16Details
Commit message · ziggie

docs: add release-notes for LND 20.1

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 16/100

This commit only edits the release notes document for LND 0.20.1. It adds a description of a previously merged bug fix (PR #10449) that could cause startup failures due to timestamp comparison issues. The commit itself does not change any executable code, so it cannot directly introduce or fix a security vulnerability. It is purely documentation.

Lower-priorityserver: fix timestamp comparison in setSelfNodeby ziggie · 865e1556 · Dec 16, 2025 · 2 filesMessage 68 · AdequateLow 34Details
Commit message · ziggie

server: fix timestamp comparison in setSelfNode

Fix bug where setSelfNode compared only the seconds component of
timestamps instead of the full timestamp. This caused the node to
attempt persisting an older timestamp than what existed in the
database during restart, resulting in "sql: no rows in result set"
errors.

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

This commit fixes a bug in the LND Lightning node where it compared only the seconds part of timestamps (e.g., the :30 in 12:00:30) instead of the full Unix timestamp when deciding whether to update its own network announcement. Because of this, a node could try to save an announcement with an older timestamp than what was already in its database, which the database rejected with a 'no rows in result set' error. The fix makes the comparison use the full timestamp, preventing restart failures and ensuring the node can rejoin the network properly.