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 queue1236AI analyses
55commits · 30 days
171commits · 60 days
830commits · 180 days
1220commits · 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 Osuntokun19940198474
Elle Mouton26832268167
ziggie41015408164
Jared Tobin909171
Erick Cestari26726070
bitromortac46546067
yyforyongyu55355065
saubyk15215070
Oli727057
Suheb323075
Yong323073
elnosh323071
Analysis record

Published AI watches

Last scanned 35 minutes ago

Moderate 59 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11023 from ellemouton/update-fee-log

This commit hardens how LND handles Lightning channel fee updates and mailbox message admission. It enforces the protocol rule that only the channel opener can send fee updates, prevents uncommitted fee updates from piling up in the update…

BOLT 2 role validation for UpdateFee senderReplacement of uncommitted fee updates to prevent log bloat and index gapsBounded mailbox wire-message queue (count and bytes)
7f56541dby Yong+750−138 files
No security note in commit
Moderate 57 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11019 from Roasbeef/coop-close-race-public

This update fixes two related problems in LND's cooperative channel-closing code. First, it eliminates a data race where the same state machine was being advanced by two different internal goroutines at once, which could cause crashes or i…

Data race in legacy cooperative close state machine driven concurrently by link and peer goroutinesMissing or inconsistent validation of remote delivery script when no upfront shutdown script is recordedpanic() in DustLimitForSize on unrecognized script sizes replaced with safe fallback
f4ae5656by Yong+463−609 files
Vendor flagged security relevance
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
Moderate 60 AI analysisMessage 88 · Strong
LL Lightning LabsLND BitcoinLightning Network

peer+lnwallet/chancloser: advance the legacy closer from one goroutine

This commit fixes a concurrency bug in how LND negotiates cooperative channel closures. Previously, two different goroutines could update the same channel-closing state machine at the same time, which could corrupt internal data or cause a…

Data race on ChanCloser state field detected under go test -raceConcurrent access to priorFeeOffers map and signing step by two goroutinesSingle-goroutine ownership invariant now documented on ChanCloser type
e5e134ddby Olaoluwa Osuntokun+292−384 files
Vendor flagged security relevance
Low 29 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

lnwallet/chancloser: record the remote close output only when accepted

This change fixes a bookkeeping bug in how LND records the other party's preferred closing address during a channel close. Previously, a late or unexpected Shutdown message could overwrite the correct address with one from a message that w…

State variable written before validationRejected message could overwrite accepted close outputFix prevents stale/incorrect close metadata
fb89732dby Olaoluwa Osuntokun+7−21 file
No security note in commit
High 72 AI analysisMessage 68 · Adequate
LL Lightning LabsLND BitcoinLightning Network

htlcswitch: bound peer-controlled channel ingress

This commit hardens LND's channel message handling against a peer that tries to overwhelm the node. It adds limits on how many ordered messages and how much data a peer can queue up for a channel, and it disconnects the peer if either limi…

Adds resource bounds on peer-controlled channel ingress (count + bytes)Disconnects peer on mailbox admission failure instead of silently dropping ordered channel messagesPrevents unauthorized UpdateFee from channel initiator before fee-exposure calculations
ef24f2c5by Elle Mouton+507−94 files
Vendor flagged security relevance
Moderate 64 AI analysisMessage 83 · Strong
LL Lightning LabsLND BitcoinLightning Network

lnwallet/chancloser: validate delivery scripts in the RBF closer

This commit fixes a bug in LND's cooperative channel-closing code where a peer could supply an invalid, empty, or even money-burning Bitcoin address during a close, and LND would accept it without checking. The fix makes the newer 'RBF' cl…

Missing input validation on remote-supplied shutdown/delivery scriptEmpty/zero-length script accepted as valid due to nil-treatment in validatorMid-negotiation script swap via ClosingComplete not validated
a8e2a0f7by Olaoluwa Osuntokun+131−142 files
Vendor flagged security relevance
Moderate 51 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

lnwallet: make DustLimitForSize total over the sizes it can be handed

This change removes a deliberate program crash (panic) in LND's fee/dust-limit helper and replaces it with a safe fallback. Previously, if the helper received a script length it didn't explicitly recognize, it would panic and potentially c…

Removal of a panic/default branch in favor of a conservative fallbackDefensive handling of arbitrary and future witness-version script sizesPotential denial-of-service vector eliminated: unhandled script lengths no longer crash the helper
f80f92dcby Olaoluwa Osuntokun+23−62 files
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
Repository ledger

Explore captured commits

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

Lower-prioritylnd: provide aux closer to chain arbitratorby George Tsagkarelis · 2f869715 · Dec 4, 2025 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · George Tsagkarelis

lnd: provide aux closer to chain arbitrator

The final step is to provide the aux closer to the corresponding configs
from the server.

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

This is a small, ordinary code change that wires up a new optional component (an 'aux closer') to the chain arbitrator during server startup. It only adds plumbing: importing a package under a shorter alias and passing one more optional field into a configuration struct. There is no indication of a security bug, fix, or vulnerability in the diff or commit message.

AI review queuedcontractcourt+lnwallet: move aux close finalization to chain watcherby George Tsagkarelis · 9a88999c · Dec 4, 2025 · 2 filesMessage 73 · AdequateLow 32Details
Commit message · George Tsagkarelis

contractcourt+lnwallet: move aux close finalization to chain watcher

We now execute the aux chan closer finalization within the chain
watcher. This is better as we don't need to rely on the remote party
being online and sending us a message. Instead we do the finalization
once the on-chain transaction has been confirmed.

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

This commit moves a finalization step for special auxiliary channel closes from the interactive negotiation phase to the point where the closing transaction is confirmed on-chain. The goal is to make the process more reliable by not depending on the remote party staying online and sending a message. The change itself is a refactor of when and where finalization happens, not a fix for a known exploit.

Lower-prioritycontractcourt: add aux chan closer to chain watcherby George Tsagkarelis · fd772d45 · Dec 4, 2025 · 2 filesMessage 50 · ThinInformational 15Details
Commit message · George Tsagkarelis

contractcourt: add aux chan closer to chain watcher

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

This commit adds a new optional hook (AuxChanCloser) that lets external code finalize cooperative channel closes. It is purely an infrastructure/plumbing change: it defines an interface, adds a config field, and passes that field into the chain watcher. There is no actual implementation of the closer logic, no change to existing security behavior, and no bug fix or vulnerability patch visible in the diff.

AI review queuedlnwallet+peer: extract close types to separate pkgby George Tsagkarelis · e1200851 · Dec 4, 2025 · 5 filesMessage 85 · StrongInformational 15Details
Commit message · George Tsagkarelis

lnwallet+peer: extract close types to separate pkg

The aux close types will soon be used by a different package that would
otherwise cause an import cycle if used directly from
lnwallet/chancloser. We now create a new sub-package lnwallet/types that
will be improrted from all users of these types.

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

This commit is a straightforward internal code reorganization. It moves some data type definitions related to channel closing from one package to a new shared package so other parts of the program can use them without creating circular imports. No behavior changes, bug fixes, or security-sensitive logic changes are visible in the diff.

Lower-prioritydocs: update sql migration guideby AbelLykens · f811805c · Dec 4, 2025 · 1 fileMessage 57 · ThinInformational 15Details
Commit message · AbelLykens

docs: update sql migration guide

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 updates a documentation file (docs/db_migration_guide.md) to explain when and how SQL migration steps are automatically applied. It adds three lines of clarifying text about log messages users will see. There is no code change and no security relevance.

Lower-prioritydocs: add release noteby Elle Mouton · 3e0bc6b1 · Dec 3, 2025 · 1 fileMessage 40 · ThinInformational 15Details
Commit message · Elle Mouton

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 document describing a bug fix that was already merged in a separate pull request. No code was changed, so this commit itself does not fix or introduce any security issue.

Lower-prioritysqldb: add UpsertSelfNode queryby Elle Mouton · 8349a6f8 · Dec 3, 2025 · 3 filesMessage 58 · ThinInformational 17Details
Commit message · Elle Mouton

sqldb: add UpsertSelfNode query

This query is less strict in terms of the latest update timestamp field.
We want to be less strict with our own node data since we always want
our own updates recorded.

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

This commit adds a new database helper that lets LND update its own node information even when the timestamp hasn't advanced. It changes the comparison from 'newer than' to 'newer than or equal to' for the node's own record. There is no obvious security bug in the diff itself, but it slightly relaxes a consistency rule that normally prevents stale data from overwriting newer data.

AI review queuedgraph/db: fix SetSourceNode race with lenient upsertby Elle Mouton · c04aa655 · Dec 3, 2025 · 2 filesMessage 83 · StrongLow 32Details
Commit message · Elle Mouton

graph/db: fix SetSourceNode race with lenient upsert

This commit fixes a race condition where multiple goroutines call
SetSourceNode concurrently during startup, causing sql.ErrNoRows
errors. The race occurs when multiple code paths (setSelfNode,
createNewHiddenService, RPC updates) read the same old timestamp,
independently increment it to the same new value (T+1), and race to
write.

The fix uses the new UpsertSourceNode SQL query (without strict
timestamp constraint) instead of UpsertNode. This allows
last-write-wins semantics for our own node, ensuring all parameter
changes persist even when timestamps collide.

Refactored sql_store.go for reusability:
- upsertNodeAncillaryData: common logic for features/addresses/extras
- populateNodeParams: common parameter building with callback pattern
- buildNodeUpsertParams: builds params for strict UpsertNode
- buildSourceNodeUpsertParams: builds params for lenient UpsertSourceNode
- upsertSourceNode: new function using lenient query

Updated TestSetSourceNodeSameTimestamp to verify that concurrent
updates with the same timestamp now succeed and parameter changes
persist.

Fixes the itest error:
"unable to upsert source node: upserting node(...): sql: no rows in
result set"

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

This commit fixes a race condition in LND's graph database code. During startup, multiple internal routines could try to update the node's own information at the same time, using the same timestamp. The old SQL upsert required a strictly newer timestamp, so these concurrent updates sometimes failed with 'sql: no rows in result set'. The fix uses a more lenient upsert for the local node so that last-write-wins and parameter changes persist even when timestamps collide. It is a reliability/availability fix rather than a vulnerability that external attackers can exploit.

Lower-prioritygraph/db: add test for SetSourceNode same timestamp behaviorby Elle Mouton · 41615f74 · Dec 3, 2025 · 1 fileMessage 95 · StrongLow 27Details
Commit message · Elle Mouton

graph/db: add test for SetSourceNode same timestamp behavior

This commit adds TestSetSourceNodeSameTimestamp to demonstrate the
current behavior when SetSourceNode is called with the same last update
timestamp. The test reveals a difference between the SQL and bbolt
implementations:

- SQL store returns sql.ErrNoRows when attempting to update with the
same timestamp, as the upsert query's UPDATE clause requires the new
timestamp to be strictly greater than the existing one
- bbolt store silently ignores stale updates and returns no error

This behavior is important to document because our own node
announcements may change quickly with the same timestamp, unlike
announcements from other nodes where same timestamp typically means
identical parameters.

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

This commit only adds a new test to document an existing inconsistency between two database backends in the Lightning Network Daemon (LND). It does not change production code. The test shows that when LND updates its own node information with the same timestamp but different details, the SQL database backend rejects it with an error, while the older bbolt backend accepts it silently. The commit message says this will be fixed later. So by itself, this commit is not a security fix and does not introduce a vulnerability, but it documents a real behavioral quirk that could affect how LND stores its own node announcements.

Lower-prioritydocs: update release notesby Mohamed Awnallah · 0a6f69dd · Dec 3, 2025 · 1 fileMessage 47 · ThinInformational 15Details
Commit message · Mohamed Awnallah

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. It adds a description of a previously fixed startup bug related to TLS certificate/key files and adds a contributor name. There is no code change in this commit itself.

Lower-prioritydocs: add release-notes for LND 20.1by ziggie · 17b77b64 · Dec 2, 2025 · 1 fileMessage 57 · ThinInformational 15Details
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 15/100

This commit only adds a line to the release notes document for LND 0.20.1, describing a previously merged bug fix. No actual code changes are included, so it cannot by itself introduce, fix, or exploit any security issue.

AI review queuedrouting: allow misson control manager to startup despite errorsby ziggie · f6bc88f3 · Dec 2, 2025 · 2 filesMessage 73 · AdequateLow 31Details
Commit message · ziggie

routing: allow misson control manager to startup despite errors

We now allow the mission control manager to skip over deserializable
errors. We cannot repair this these results but we just skip over
it so we can startup properly.

When fetchAll() encounters entries that fail to deserialize, in
addition to skipping them, now also:

- Delete the corrupted entries from the database
- Remove them from the in-memory keysMap and keys tracking structures

This prevents corrupted entries from:
- Being counted toward maxRecords, which would cause valid entries
to be pruned prematurely
- Persisting in the database indefinitely
- Causing inaccurate entry counts in startup logs

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

This change makes LND's routing memory (mission control) more resilient: if the database contains damaged or unreadable entries, the node now starts up anyway instead of crashing, and it cleans out the bad entries. The patch itself is defensive and does not introduce an obvious vulnerability, but it silently deletes data, which could hide underlying corruption or, in theory, allow a subtle attacker to manipulate routing history if they could already write corrupt records to the database.

Lower-prioritydocs: add release-notes for LND 20.1by ziggie · de0424ec · Dec 1, 2025 · 1 fileMessage 57 · ThinInformational 15Details
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 15/100

This commit only adds documentation text to the release notes for an upcoming LND version. It describes a previously merged feature that improves fee estimation for Lightning Service Provider routes. There is no code change, no bug fix, and no security-related content in the diff.

Lower-prioritydocs: update api documentation for estimateRouteFeeby ziggie · 34619d47 · Dec 1, 2025 · 1 fileMessage 62 · AdequateInformational 15Details
Commit message · ziggie

docs: update api documentation for estimateRouteFee

62/100 · AdequateMessage clarity
✓ Specific, 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 updates documentation. It changes the description and a flowchart in a markdown file explaining how LND's EstimateRouteFee feature detects Lightning Service Providers (LSPs). No code, configuration, or executable behavior was changed.

Lower-priorityitest: enhance testEstimateRouteFee with multi-LSP scenariosby ziggie · 0e6bab17 · Dec 1, 2025 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · ziggie

itest: enhance testEstimateRouteFee with multi-LSP scenarios

This commit enhances the integration test to validate the LSP heuristic
end-to-end with real network topology and payment probing.

Network topology additions:
- Added Frank node as a private destination
- Created multi-LSP test scenario with Bob, Eve, and Dave as LSPs

New test cases:

1. "probe based estimate, public target with public hop hints"
- Validates Rule 1: public invoice target routes directly
- Even with public hop hints, direct routing is used
- Expected: standard single-hop fees

2. "probe based estimate, multiple different public LSPs"
- Validates multi-LSP worst-case selection
- Frank has routes through Bob (low fee), Eve (HIGH fee), Dave (medium)
- Expected: Eve's worst-case fees (most expensive)
- Tests griefing protection (max 3 LSP probes)

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
defensive validation
AI analysis · Informational 15/100

This commit only adds and improves an integration test for the EstimateRouteFee feature in LND. It does not change production code, so it cannot introduce a security vulnerability or fix one directly. The test checks that route-fee estimates correctly handle public targets, multiple LSPs, and worst-case fee selection.

Lower-priorityrouterrpc: implement LSP heuristic and multi-LSP worst-case probingby ziggie · 79fe6761 · Dec 1, 2025 · 2 filesMessage 83 · StrongLow 37Details
Commit message · ziggie

routerrpc: implement LSP heuristic and multi-LSP worst-case probing

This commit implements a comprehensive LSP (Lightning Service Provider)
detection heuristic and updates the payment probing logic to handle
multiple LSPs with worst-case fee estimation.

Key changes:

1. LSP Detection Heuristic (isLSP function):
Implements three rules to detect LSP setups:
- Rule 1: If invoice target is public → NOT an LSP (route directly)
- Rule 2: If at least one destination hop is public → IS an LSP
- Rule 3: If all destination hops are private → NOT an LSP

2. LSP Route Preparation (prepareLspRouteHints function):
- Groups route hints by unique public LSP nodes
- Filters out non-LSP routes based on the heuristic
- Tracks worst-case fees and CLTV delays for each LSP
- Returns adjusted route hints with LSP hop stripped

3. Multi-LSP Probing (probePaymentRequest updates):
- Probes up to 3 unique LSPs maximum (griefing protection)
- Selects the WORST-CASE (most expensive) route for conservative
fee estimation
- Adds comprehensive debug logging for worst-case selection process
- Properly formats vertex logging using %v (calls Vertex.String())

The worst-case approach ensures users won't be surprised by higher fees
when the actual payment is sent, providing a more conservative and
reliable fee estimate.

This commit also adds extensive unit test coverage for the LSP detection
heuristic and route preparation logic.

TestIsLsp:
- Edge cases: empty route hints, nil scenarios
- Rule 1: Public invoice target (3 tests)
- Rule 2: All private destination hops (4 tests)
- Rule 3: At least one public destination hop (6 tests)

TestPrepareLspRouteHints:
- LSP grouping and filtering logic
- Worst-case fee selection across route hints
- Worst-case CLTV delta tracking
- Adjusted route hints validation (LSP hop stripped)
- Multi-LSP scenarios with different fees

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

This commit rewrites how the LND Lightning node's fee-estimation probing handles invoices that route through Lightning Service Providers (LSPs). It changes the LSP-detection rules, probes up to three distinct public LSPs, and returns the most expensive (worst-case) fee estimate rather than a single or cheapest estimate. The change is a defensive feature/refactor, not a clear vulnerability fix, but it alters security-relevant fee and route logic and removes an older public-channel check in favor of a graph-membership check.

Lower-priorityrouterrpc: add HasNode backend function for LSP heuristicby ziggie · 48da56b2 · Nov 29, 2025 · 2 filesMessage 73 · AdequateInformational 15Details
Commit message · ziggie

routerrpc: add HasNode backend function for LSP heuristic

This commit adds the HasNode function to the RouterBackend struct,
which checks if a node exists in the graph (i.e., has public channels).
This function is needed by the LSP detection heuristic to determine
if a node is publicly reachable.

The function is wired up in rpcserver.go to query the graph database.

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

This commit adds a simple internal helper function called HasNode that lets other parts of the Lightning Network Daemon (LND) ask whether a given node is publicly known in the network graph. It is purely a read-only lookup and does not change any behavior, access controls, or data. There is no indication this fixes or introduces a security issue.

Lower-prioritygraph/db: fix HasNode commentby ziggie · 06886e71 · Nov 29, 2025 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · ziggie

graph/db: fix HasNode comment

The comment was incorrectly referring to HasLightningNode but the
function is named HasNode. Update the comment to match the actual
function name.

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

This commit only fixes a typo in a code comment, changing the name 'HasLightningNode' to 'HasNode' so it matches the actual function name. No code behavior was changed and there is no security impact.

Lower-prioritydocs: add release-notes for LND 20.1by ziggie · 56563357 · Nov 28, 2025 · 1 fileMessage 57 · ThinInformational 15Details
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 15/100

This commit only adds documentation text to the release notes for LND version 0.20.1. It describes a new Postgres database configuration option but does not change any code, configuration defaults, or runtime behavior. There is no security issue in this change itself.

Lower-prioritylncfg+scripts: use configurable global lock for postgres backendsby ziggie · 4f051d97 · Nov 28, 2025 · 4 filesMessage 85 · StrongLow 32Details
Commit message · ziggie

lncfg+scripts: use configurable global lock for postgres backends

Replace hardcoded WithGlobalLock assignment with configurable
options wallet postgres backends. Also add the WithGlobalLock
option to the channeldb table for postgres backends.

Defaults:
- channeldb: false (allow concurrent access)
- wallet: true (maintain safe single-writer behavior)

Users can now override these defaults via:
- db.postgres.channeldb-with-global-lock
- db.postgres.walletdb-with-global-lock

This gives operators flexibility while maintaining safe defaults
until full native SQL migration is complete.

Moreover exclude db.postgres.walletdb-with-global-lock check
in the sample config file script. We cannot easily check the
correct default because we set it later in the LND startup
sequence so we exclude it.

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

This commit makes a database-locking setting configurable for users running LND with a PostgreSQL backend. Previously, the wallet database always used a single-writer 'global lock' and the channel database did not. Now operators can turn each on or off via new config options. The change is framed as a temporary safety/concurrency workaround, not as a fix for an active security vulnerability.

Lower-prioritysqldb: add global lock config options for postgresby ziggie · 2e16efed · Nov 28, 2025 · 1 fileMessage 73 · AdequateInformational 23Details
Commit message · ziggie

sqldb: add global lock config options for postgres

Add two configuration options to control global lock usage for
different postgres database backends:

- ChannelDBWithGlobalLock: for channeldb access (default: false)
- WalletDBWithGlobalLock: for wallet database access (default: true)

These allow fine-grained control over which databases use global
locks, rather than hardcoding the behavior. This is a temporary
measure until the revocation log and wallet are migrated to native
SQL and become fully concurrent-safe.

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

This commit adds two new configuration options for LND's Postgres database backends that let operators choose whether to use a single global lock for channel database and wallet database access. The defaults are chosen to preserve existing behavior: channeldb does not use the global lock, while walletdb does. The commit describes this as a temporary workaround until those subsystems are migrated to native SQL. There is no direct security fix here; it is a configurability change that may help operators avoid concurrency-related bugs or data corruption, but it does not by itself patch a known vulnerability.

AI review queuedtls_manager.go: handle case when either TLS pair files existby Thiago Romão Barcala · c7fe6425 · Nov 27, 2025 · 1 fileMessage 50 · ThinLow 34Details
Commit message · Thiago Romão Barcala

tls_manager.go: handle case when either TLS pair files exist

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
second-pass: broader security terminology
AI analysis · Low 34/100

This small change fixes a logic bug in how LND decides whether to create its TLS certificate and private key. Previously, if either the certificate or the key file existed, the program skipped creating a new pair and tried to handle encryption settings instead. After the fix, it only skips creation when both files exist. The old behavior could leave LND running with a mismatched certificate/key pair (for example, a new certificate paired with an old key, or vice versa), which can break TLS connections to the node or, in rare cases, affect how private keys are protected on disk.

AI review queuedtls_manager_test.go: reproduce partial tls files handlingby Mohamed Awnallah · c9dea6d6 · Nov 27, 2025 · 1 fileMessage 73 · AdequateLow 34Details
Commit message · Mohamed Awnallah

tls_manager_test.go: reproduce partial tls files handling

When there is only one of the tls pairs (key/certificate) and the
other is missing, the TLS manager currently assumes it exists
and ignore generating them. This results in error propgated to user
that the other tls pair file is missing/not found.

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

This commit only adds a new test file that reproduces a bug: when LND's TLS manager finds only one of its two TLS files (either the certificate or the private key) on disk, it wrongly assumes the other file also exists and skips generating a fresh pair. That leaves the node unable to start or serve TLS correctly. The commit does not include the actual fix, only the failing/regression test.

Lower-prioritydocs: add release-notes for lnd v0.20.1by bitromortac · b513efc5 · Nov 26, 2025 · 1 fileMessage 57 · ThinInformational 15Details
Commit message · bitromortac

docs: add release-notes for lnd v0.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 15/100

This commit only updates the release notes document for version 0.20.1. It adds a one-line description of an already-fixed bug about duplicate network addresses appearing in node announcements and the getinfo output. There are no code changes in this commit, so it cannot by itself introduce, fix, or enable any security issue.

Lower-priorityserver: ensure unique addresses for node annby bitromortac · 031903f2 · Nov 26, 2025 · 1 fileMessage 68 · AdequateLow 38Details
Commit message · bitromortac

server: ensure unique addresses for node ann

Modifiers of the node announcement may add duplicate addresses, which we
remove here after the modifications were applied. This also ensures that
any previously added duplicate addresses are removed as well.

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

This change makes sure a Lightning node's public announcement doesn't accidentally list the same network address twice. Duplicate addresses could confuse other nodes, waste resources, or in some protocol situations be misused. The fix removes duplicates right before signing the announcement.