LL
← All projectsLightning Labs

LND

Go implementation of a complete Lightning Network node.

BitcoinLightning NetworkNormal
Repository coverage

1689 commits in the local evidence base

Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.

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

Does the history explain itself?

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

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

Who is changing the project?

Public Git author strings; identities are not independently verified.

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

Published AI watches

Last scanned 34 minutes ago

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

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

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

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

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

This commit fixes bugs in LND's new RBF-style cooperative channel close feature. Previously, fee-bump requests could be dropped or block the peer's main goroutine while waiting for an in-progress offer. The patch buffers those requests ins…

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

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

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

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

Merge pull request #10708 from jtobin/alias-perms

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

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

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

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

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

docs: describe invoice collection finality

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

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

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

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

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

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

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

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

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

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

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

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

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

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

invoices: require complete payment collection

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

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

lnwallet: reject a zero CSV delay

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

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

lnwallet+chanstate: keep persisted HTLC data readable

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

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

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

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

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

invoices: reject settled AMP set shards

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

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

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

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

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

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

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

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

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

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

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

invoices: fix test whitespace

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

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

build: pin the new lint job actions by commit

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

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

Explore captured commits

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

Lower-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-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-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: 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-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-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-prioritypaymentsdb: fix typo in commentby ziggie · 80b3eceb · Mar 12, 2026 · 2 filesMessage 45 · ThinInformational 15Details
Commit message · ziggie

paymentsdb: fix typo in comment

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

This commit only corrects a typo in two code comments, changing 'BatchedSQLPaymentsQueries' to 'BatchedSQLQueries' so the documentation matches the actual type name. No program code, logic, or behavior was changed.

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-prioritypayments/db: fix format in log messageby ziggie · 50205ffe · Mar 12, 2026 · 2 filesMessage 60 · AdequateInformational 15Details
Commit message · ziggie

payments/db: fix format in log message

fixes it for the orignal file and the code migration package where
the code was just copied over.

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

This commit fixes a typo in an error message by adding a missing space between two words. It does not change program behavior or fix any security issue.

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.

Lower-prioritymulti: add omit_hops option to ListPayments RPCby ziggie · 3a15d7e9 · Mar 12, 2026 · 9 filesMessage 68 · AdequateInformational 19Details
Commit message · ziggie

multi: add omit_hops option to ListPayments RPC

Add a new omit_hops field to ListPaymentsRequest that allows clients
to skip loading hop-level route data for HTLC attempts, reducing both
query cost and response size. When set, the route is returned with
only route-level fields (TotalTimeLock, TotalAmount, SourcePubKey)
and no individual hop data or hop-level custom records.

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

This commit adds a new optional flag called omit_hops to the ListPayments RPC in the LND Lightning node. When enabled, the node skips loading detailed per-hop route information for each payment attempt, returning only summary route fields. This is a performance and data-reduction feature, not a security fix or vulnerability. There is no indication in the commit that it addresses a security issue.

Lower-priorityrouterrpc: dont query for the channel capacityby ziggie · 21fa0710 · Mar 12, 2026 · 2 filesMessage 80 · StrongInformational 19Details
Commit message · ziggie

routerrpc: dont query for the channel capacity

During route retrieval don't query for the channel capacity. We
default to the static incomingAmt of the route. That was already
done previously when the channel was closed or private. The
channel capacity has been deprecated for quite a while so it is
acceptable to avoid the performance hit querying the graph db.

In the next release this field will be removed.

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

This change removes a database lookup for channel capacity when returning a payment route through the RPC interface. Instead of fetching the real channel capacity from the graph database, it now reports the amount flowing through each hop as a stand-in capacity. This is a performance and deprecation cleanup, not a security fix. The included test corrects a subtle bug where every hop was being assigned the route's total amount rather than the amount actually entering that hop.

Lower-prioritydocs: add removal notice of deprecated hop rpc elementsby ziggie · 3e619318 · Mar 12, 2026 · 1 fileMessage 85 · StrongInformational 15Details
Commit message · ziggie

docs: add removal notice of deprecated hop rpc elements

The previous commit stopped setting the channel capacity when
retrieving the route. This commit makes sure that in the next
release we remove the entries from the rpc interface.

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

This commit only updates the release notes document to announce that several old, deprecated fields in the `lnrpc.Hop` message will be removed in a future version. It does not change any code, API behavior, or fix any vulnerability. It is a documentation-only notice.

Lower-prioritysqldb: optimise payment index layout in new migration 13by ziggie · 3e7dfff0 · Mar 12, 2026 · 3 filesMessage 73 · AdequateInformational 15Details
Commit message · ziggie

sqldb: optimise payment index layout in new migration 13

Since migration 10 is already merged into master it cannot be edited.
Add a new migration (000013_payments_index_improvements) that carries
forward two index improvements:

- Drop idx_htlc_attempt_index on payment_htlc_attempts(attempt_index)
and idx_route_hops_htlc_attempt_index on
payment_route_hops(htlc_attempt_index). Both are redundant with
existing UNIQUE constraints and only add write/maintenance overhead.

- Add idx_htlc_payment_id_attempt_time on
payment_htlc_attempts(payment_id, attempt_time) to optimise batched
attempt reads that filter by payment_id and order by attempt_time
(FetchHtlcAttemptsForPayments).

- Add idx_htlc_resolutions_type_attempt_index on
payment_htlc_attempt_resolutions(resolution_type, attempt_index) to
optimise the failed-attempt cleanup path that filters by
resolution_type before joining on attempt_index
(DeleteFailedAttempts).

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

This commit is a routine database performance tuning change. It removes two indexes that duplicate existing uniqueness constraints and adds two new composite indexes to speed up common payment-related queries. There is no security fix or vulnerability here.

Lower-prioritymulti: remove payment tombstoneby ziggie · c2e8618f · Mar 12, 2026 · 2 filesMessage 70 · AdequateLow 30Details
Commit message · ziggie

multi: remove payment tombstone

The invoice tombstone acts as a system wide kv db tombstone so
there is no need for a specific payment tombstone. Moreover a
TODO is added to redesign the current setting of the invoice
tombstone because it is also fragile to crashes after
the tombstone is set and the sql transaction of the migration
fails to commit.

Additionally the missing cleanup calls are added in case we return
early because of an error.

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Low 30/100

This commit removes a separate 'tombstone' marker for payment data migrations and instead relies on a single invoice tombstone to prevent users from switching back to an older database format. It also adds missing cleanup calls when database setup fails and flags a pre-existing crash-safety weakness in how the invoice tombstone is set during SQL migrations. It is a hardening/refactoring change rather than a fix for an active exploit.

Lower-priorityinput: add template vs builder byte-for-byte equivalence testsby Olaoluwa Osuntokun · 8a5d241a · Mar 12, 2026 · 3 filesMessage 83 · StrongInformational 15Details
Commit message · Olaoluwa Osuntokun

input: add template vs builder byte-for-byte equivalence tests

Add regression tests that compare every ScriptTemplate-based function
against the original ScriptBuilder implementations extracted from git
history. This ensures the template migration produces identical script
bytes for all 22 script types (segwit v0 + taproot).

The legacy builder functions are kept as private test helpers in
script_utils_legacy_test.go, extracted verbatim from the pre-template
commit.

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidence
AI analysis · Informational 15/100

This commit only adds new test code. It does not change any production code. The tests compare newly added 'ScriptTemplate' functions against older 'ScriptBuilder' versions to make sure they produce identical Bitcoin scripts byte-for-byte. It is a regression-test addition, not a security fix or vulnerability.

Lower-priorityinput: add cut out for final taproot scripts from specby Olaoluwa Osuntokun · 50639114 · Mar 12, 2026 · 1 fileMessage 73 · AdequateInformational 11Details
Commit message · Olaoluwa Osuntokun

input: add cut out for final taproot scripts from spec

In this commit, we add an initial cut out to allow us to swap in the
taproot scripts (which changed slightly) once we start using the final
"production" feature bit.

The changes to the scripts are pretty mechanic: we avoid using `OP_DROP`
and instead use a `_VERIFY` earlier in the script to consume the stack
item.

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

This commit prepares the code to support two versions of certain Bitcoin scripts used in Lightning's experimental Taproot channels: a current draft version and a final 'production' version. The production version removes some unnecessary cleanup instructions (OP_DROP) and instead uses verification-style instructions (CHECKSIGVERIFY, CHECKSEQUENCEVERIFY) earlier in the script. This is a code organization and forward-compatibility change; it does not by itself fix a known vulnerability or change active behavior, because the new production scripts are not yet enabled by default.

Lower-priorityinput: use template to unify taproot "prod script" definitionby Olaoluwa Osuntokun · 833f17fe · Mar 12, 2026 · 1 fileMessage 50 · ThinInformational 11Details
Commit message · Olaoluwa Osuntokun

input: use template to unify taproot "prod script" definition

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

This commit is a code cleanup and documentation change in LND's Bitcoin script construction code. It rewrites several script templates to use a consistent 'prod script' style (CHECKSIGVERIFY instead of CHECKSIG+DROP) and adds explanatory comments. The actual Bitcoin opcodes produced appear functionally equivalent to the previous versions, just written more uniformly. There is no indication this fixes a security vulnerability.

Lower-prioritybuild: update to latest btcd versionby Olaoluwa Osuntokun · d3deeb45 · Mar 11, 2026 · 2 filesMessage 57 · ThinLow 30Details
Commit message · Olaoluwa Osuntokun

build: update to latest btcd version

57/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
AI analysis · Low 30/100

This commit simply updates a core Bitcoin library dependency (btcd) to a newer version in LND's build files. The change itself does not show any specific security fix, bug, or vulnerability. It is a routine dependency bump that could include many upstream changes, but the commit message and diff do not identify any security issue.

Lower-priorityinput: switch to using new txscript.ScriptTemplate functionby Olaoluwa Osuntokun · f26ad679 · Mar 11, 2026 · 2 filesMessage 73 · AdequateInformational 16Details
Commit message · Olaoluwa Osuntokun

input: switch to using new txscript.ScriptTemplate function

In this commit, we switch to using the new txscript.ScriptTemplate
function. This allows us to write the script in plain text, using some
hidden template operations to swap in items like keys or sigs.

This reduces in less code and boiler plate over all, the code that
defines the script now reads as if it was a comment.

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

This commit is a code cleanup: it rewrites many Bitcoin script-building helpers in LND to use a new text-based template function instead of manually assembling script pieces. The scripts themselves appear unchanged in behavior; only the way they are written in source code changed. There is no indication this fixes a security bug or introduces a known vulnerability.

AI review queuedci: update pinned grpc dependency to v1.79.1by Olaoluwa Osuntokun · 54688752 · Mar 10, 2026 · 1 fileMessage 80 · StrongInformational 15Details
Commit message · Olaoluwa Osuntokun

ci: update pinned grpc dependency to v1.79.1

In this commit, we update the CI workflow pinned dependency check
for google.golang.org/grpc from v1.59.0 to v1.79.1. While btcwallet
only requires v1.73.0, we upgrade to the latest stable release for
bug fixes and improvements.

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

This commit changes a single line in a GitHub CI workflow file, bumping the pinned version of a Google gRPC library used during automated testing from v1.59.0 to v1.79.1. It does not modify any application code, cryptographic logic, network handling, or user-facing behavior. There is no indication in the commit that this fixes a known security vulnerability.