LL
← All projectsLightning Labs

LND

Go implementation of a complete Lightning Network node.

BitcoinLightning NetworkNormal
Repository coverage

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

186security candidates236second-pass queue1372AI analyses
162commits · 30 days
277commits · 60 days
643commits · 180 days
1422commits · 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
387Strong · 80–100
837Adequate · 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 Osuntokun29659235474
ziggie49922422265
Elle Mouton26832268167
Yong60926172
ziggieXXX50617170
George Tsagkarelis37335167
LNBiG111173
Jared Tobin909171
yyforyongyu1211574070
bitromortac731154071
Erick Cestari26726070
Suheb746074
Analysis record

Published AI watches

Last scanned 47 minutes ago

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
Informational 15 AI analysisMessage 92 · Strong
LL Lightning LabsLND BitcoinLightning Network

build: fix the custom linter cache wiring for CI

This commit fixes the GitHub Actions CI setup for running a custom code linter. It makes sure Docker can read and write build caches correctly and that the built linter image is available for later steps. There is no user-facing security f…

6f665663by Olaoluwa Osuntokun+30−82 files
No security note in commit
Moderate 66 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11482 from Roasbeef/pub/unsigned-acked-wrap

This patch fixes a database bug in the Lightning Network Daemon (LND) where very long lists of unsigned, acknowledged channel updates could be silently truncated when saved to disk. Because the storage format used a 16-bit counter, lists l…

Integer truncation / wrap-around in serialization format (uint16 count)Silent data loss on restart due to undersized length fieldDefensive deserialization with count-modulo validation
7431093fby Olaoluwa Osuntokun+218−127 files
Vendor flagged security relevance
Repository ledger

Explore captured commits

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

AI review queuedbolt12: describe the lnwire dependencyby bitromortac · 5f53171d · Sep 10, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · bitromortac

bolt12: describe the lnwire dependency

The package doc claimed no LND dependencies while importing lnwire for the
pure-TLV framing, the blinded-path types and the feature vector.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 15/100

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

AI review queuedMerge pull request #11125 from bhandras/codex/reorg-aware-output-lock-20260825by Yong · 80dde144 · Sep 4, 2026 · 21 filesMessage 73 · AdequateLow 35Details
Commit message · Yong

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

walletrpc: retain input leases through spend confirmation

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
signing or wallet pathmerge-commit duplicate discountsecond-pass: unusually broad changesecond-pass: security-sensitive path
AI analysis · Low 35/100

This commit adds a new optional wallet feature to LND that lets users lock UTXOs until the transaction spending them reaches a chosen confirmation depth, instead of relying on a wall-clock timeout. It is a feature addition with safety checks (required custom lock ID, capability checks, rollback on partial failure) and is not a fix for a known exploit. The main risk is that a bug in the new reorg-aware lease logic could keep coins locked longer than intended or, in a worst case, allow double-spending of locked UTXOs, but the diff itself does not show such a vulnerability.

AI review queuedMerge pull request #10812 from ziggie1984/chanstate-kv-store-moveby Olaoluwa Osuntokun · 62b0a073 · Sep 2, 2026 · 24 filesMessage 58 · ThinInformational 19Details
Commit message · Olaoluwa Osuntokun

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

chanstate: move channel state kv store

58/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
Why it was queued
merge-commit duplicate discountsecond-pass: unusually broad change
AI analysis · Informational 19/100

This commit is a large internal code reorganization for the LND Lightning node. It moves channel state storage logic from the `channeldb` package into a new `chanstate` package, while keeping the same database keys, serialization formats, and public behavior. There is no new feature or obvious security fix in the visible diff; it is primarily a refactoring to separate concerns.

AI review queuedMerge pull request #10804 from GeorgeTsagk/close-immediately-itest-lnd-7c38by Olaoluwa Osuntokun · 1e127653 · Sep 2, 2026 · 4 filesMessage 73 · AdequateLow 25Details
Commit message · Olaoluwa Osuntokun

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

lnwallet: expose negotiated configs in aux chan state

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
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Low 25/100

This change fixes a data-handling bug in LND's channel-opening code. When opening a Lightning channel using an optional 'auxiliary funding controller' (used for custom channel types such as Taproot Assets), the funding manager was previously passing an incomplete channel state object that lacked the negotiated local and remote channel settings. The patch adds a new method that builds a complete view including both sides' agreed configuration, and updates the funding manager to use it. There is no direct evidence this is exploitable as a security vulnerability; it appears to be a correctness fix that could prevent misbehavior or failures in custom channel flows.

AI review queueditest: cover confirmation-controlled leasesby Andras Banki-Horvath · a1ab4e92 · Sep 2, 2026 · 2 filesMessage 78 · AdequateInformational 15Details
Commit message · Andras Banki-Horvath

itest: cover confirmation-controlled leases

Exercise the WalletKit and btcwallet lease lifecycle with a real node
and miner. Let the wall-clock deadline pass before broadcasting. Confirm
the spend, disconnect it, restart the node, and reconfirm it.

Assert persisted spend progress at each transition and verify that the
lease remains active until the requested confirmation depth is reached.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit only adds a new integration test for an existing feature called confirmation-controlled leases. It does not change production code, so it cannot introduce a security vulnerability or fix one directly. The test exercises how long a wallet lease stays locked under various conditions (time passing, blockchain reorganization, node restart, and multiple confirmations).

AI review queuedMerge pull request #11122 from gijswijs/websocket-proxy-hardeningby Yong · c662f853 · Aug 29, 2026 · 4 filesMessage 73 · AdequateModerate 68Details
Commit message · Yong

Merge pull request #11122 from gijswijs/websocket-proxy-hardening

lnrpc: websocket proxy hardening (protocol header panic, missing read limit)

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
defensive validationmerge-commit duplicate discountsecond-pass: broader security terminology
AI analysis · Moderate 68/100

This update fixes two security-related bugs in LND's REST WebSocket proxy. First, a specially crafted WebSocket protocol header could crash the proxy (a panic). Second, the proxy previously had no limit on how large an incoming WebSocket message it would accept, which could let an attacker exhaust server memory. The patch caps incoming message sizes and correctly parses the protocol header as a comma-separated list.

AI review queueddocs: add v0.21.3 release notes for ws proxy fixesby Gijs van Dam · d3e02876 · Aug 28, 2026 · 1 fileMessage 85 · StrongLow 46Details
Commit message · Gijs van Dam

docs: add v0.21.3 release notes for ws proxy fixes

Adds entries for the Sec-Websocket-Protocol panic under Bug Fixes and for
the incoming message size bound under Functional Updates.

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

This commit adds release notes for two fixes in LND's REST WebSocket proxy: one that could crash the proxy with a malformed header, and another that limits how large incoming WebSocket messages can be. The actual code changes happened in a different pull request; this commit only documents them.

AI review queueddocs: add v0.20.4 release notes for ws proxy fixesby Gijs van Dam · 307c1ac1 · Aug 28, 2026 · 1 fileMessage 85 · StrongModerate 60Details
Commit message · Gijs van Dam

docs: add v0.20.4 release notes for ws proxy fixes

Adds entries for the Sec-Websocket-Protocol panic under Bug Fixes and for
the incoming message size bound under Functional Updates.

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 discountsecond-pass: broader security terminology
AI analysis · Moderate 60/100

This commit adds release notes for two fixes in LND's REST WebSocket proxy. One fix prevents a server crash (panic) triggered by a malformed WebSocket protocol header. The other fix limits how large incoming WebSocket messages can be, rejecting oversized frames early. Both are defensive hardening changes, but the commit itself only documents them; the actual code changes are in a different pull request.

AI review queuedMerge pull request #10969 from darioAnongba/fix/chancloser-include-aux-outputsby Yong · cb58f8bb · Aug 28, 2026 · 10 filesMessage 73 · AdequateLow 44Details
Commit message · Yong

Merge pull request #10969 from darioAnongba/fix/chancloser-include-aux-outputs

chancloser: account for aux close outputs in initial coop close fee baseline

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
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Low 44/100

This patch fixes a bug in LND's cooperative channel-closing logic where extra 'auxiliary' outputs (used by custom/taproot channel types) were not counted when the initial closing fee was first estimated. If the fee was too low, the resulting close transaction could be rejected by the Bitcoin network's mempool. The fix adds a new 'shape' query so the closer knows the size of these extra outputs up front, includes them in the fee calculation, and then verifies that the final outputs match the declared shape before signing.

AI review queuedwalletrpc: release partial locks by owner IDby Andras Banki-Horvath · 6e81414a · Aug 26, 2026 · 2 filesMessage 68 · AdequateLow 47Details
Commit message · Andras Banki-Horvath

walletrpc: release partial locks by owner ID

Make multi-input lease acquisition all-or-nothing. A metadata lookup or
lease failure after an earlier success now triggers one guarded deferred
rollback.

Release each acquired output with its recorded lock ID. This preserves a
caller's custom owner ID instead of incorrectly using LND's internal ID.
Cover both metadata and lease failures with internal and custom owners.

68/100 · AdequateMessage clarity
✓ 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 47/100

This change fixes a bug in LND's wallet RPC code that handles locking multiple bitcoin inputs at once. Previously, if locking one input failed after earlier inputs were already locked, the rollback tried to unlock the earlier inputs using LND's internal lock ID instead of the caller's actual lock ID. That meant the earlier locks might not get released, leaving funds stuck or unavailable. The patch makes the rollback use the real lock ID recorded for each acquired lease, and also rolls back on metadata lookup failures, not just lease failures.

AI review queuedlnwallet: add configurable output lease capabilityby Andras Banki-Horvath · dfca8039 · Aug 26, 2026 · 7 filesMessage 73 · AdequateInformational 12Details
Commit message · Andras Banki-Horvath

lnwallet: add configurable output lease capability

Define an optional interface for confirmation-controlled output leases
without widening WalletController or changing existing callers.

Resolve that capability through adapter chains before applying a
non-zero depth. LightningWallet and RPCKeyRing expose their wrapped
controller, so local and remote-signer nodes reach the concrete
btcwallet backend. Unsupported controllers fail closed.

Map the accepted depth to btcwallet's persisted option and retain the
legacy LeaseOutput path for zero-depth callers.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 12/100

This commit adds a new optional wallet feature that lets LND lock a coin (UTXO) until the transaction spending it reaches a chosen number of confirmations. It is purely additive: it defines a new interface, routes calls through wallet adapter wrappers, and keeps the old zero-confirmation lease path unchanged. There is no bug fix, no reported vulnerability, and no evidence this change itself introduces a security issue.

AI review queuedlnrpc: fix Sec-Websocket-Protocol parsingby Gijs van Dam · 1a40089a · Aug 25, 2026 · 2 filesMessage 90 · StrongModerate 67Details
Commit message · Gijs van Dam

lnrpc: fix Sec-Websocket-Protocol parsing

forwardHeaders assumed that a Sec-Websocket-Protocol value matching one
of the allowed prefixes also contains the "+" delimiter, and indexed the
split result at [1] unconditionally. A client that sends only the
protocol name, for example "Grpc-Metadata-Macaroon" with no delimiter,
therefore caused an index out of range panic.

The panic is currently contained because forwardHeaders runs on the
net/http handler goroutine, whose deferred recover catches it, so only
the client's own connection dies. That containment is incidental to the
current call graph rather than by design though: neither the read loop
nor the backend forwarder goroutine has a recover of its own.

The prefix match was too loose in the other direction as well. The field
is a comma separated list of sub protocols, but it was matched and split
as a single string, so "Grpc-Metadata-Macaroon,other+value" passed the
prefix check and forwarded "value" from the second entry as the macaroon
for the first.

Split the field on "," first and cut each entry at its own delimiter,
forwarding only entries whose name adjoins that delimiter and is
allowed. Add a table test covering the forwarding rules including these
cases.

90/100 · StrongMessage clarity
✓ 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 · Moderate 67/100

This commit fixes a bug in how LND's WebSocket proxy handled a special browser header called Sec-Websocket-Protocol. Previously, a client could send just the protocol name without a required separator, causing the server to crash with a panic. The crash was only contained by accident, not by design. The fix also prevents a trick where a client could make one protocol entry steal a value from another entry in the same list. The patch adds tests to confirm the correct behavior.

AI review queuedMerge pull request #11098 from ziggie1984/agent/bump-go-1.25.13-toolchain-1.26.6by Yong · eac5a5b8 · Aug 19, 2026 · 30 filesMessage 73 · AdequateInformational 15Details
Commit message · Yong

Merge pull request #11098 from ziggie1984/agent/bump-go-1.25.13-toolchain-1.26.6

build: bump Go language to 1.25.13 and toolchain to 1.26.6

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
merge-commit duplicate discountsecond-pass: unusually broad change
AI analysis · Informational 15/100

This commit is a routine maintenance update that changes the version numbers of the Go programming language used to build LND from 1.25.11 to 1.25.13 (and the build toolchain from 1.26.4 to 1.26.6). It only edits configuration files, Dockerfiles, documentation, and module files. There is no code change, no bug fix, and no security patch visible in the diff.

AI review queuedMerge pull request #11065 from ellemouton/agent/walletrpc-create-accountby Yong · b309be58 · Aug 17, 2026 · 20 filesMessage 73 · AdequateInformational 24Details
Commit message · Yong

Merge pull request #11065 from ellemouton/agent/walletrpc-create-account

walletrpc: add XCreateAccount for wallet-derived accounts

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
signing or wallet pathmerge-commit duplicate discountsecond-pass: unusually broad changesecond-pass: security-sensitive path
AI analysis · Informational 24/100

This commit adds a new, clearly marked experimental RPC and command-line option called XCreateAccount that lets an LND user create a separate, named pocket of on-chain funds within the same wallet. It is not a security patch and does not fix a vulnerability. The main risk is user error: money sent to one of these accounts cannot be found again with only the wallet seed, so the user must separately save extra recovery details. The feature is gated behind an explicit 'I know what I am doing' flag on release builds to reduce accidental misuse.

AI review queuedMerge pull request #8754 from ViktorT-11/2024-05-add-outbound-remote-signerby Yong · 2bbf02ba · Aug 17, 2026 · 37 filesMessage 73 · AdequateLow 37Details
Commit message · Yong

Merge pull request #8754 from ViktorT-11/2024-05-add-outbound-remote-signer

Add `Outbound` Remote Signer implementation

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
signing or wallet pathmerge-commit duplicate discountsecond-pass: unusually broad changesecond-pass: security-sensitive path
AI analysis · Low 37/100

This commit adds a new 'outbound' remote-signer mode to LND. In the existing 'inbound' mode, the watch-only node connects to the signer; in the new 'outbound' mode, the signer node connects out to the watch-only node. The change introduces a dedicated gRPC listener, a new macaroon permission ('remotesigner:generate'), and configuration validation. It is a large feature addition rather than a clear-cut vulnerability fix, but it touches authentication, network exposure, and wallet startup logic, so it has security relevance.

AI review queuedMerge pull request #11035 from yyforyongyu/fix-p2p-wedgesby ziggieXXX · 648d635f · Aug 14, 2026 · 8 filesMessage 58 · ThinLow 48Details
Commit message · ziggieXXX

Merge pull request #11035 from yyforyongyu/fix-p2p-wedges

lnwallet+lnwire: handle boundary cases

58/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
Why it was queued
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Low 48/100

This commit fixes two separate boundary-case bugs in the Lightning Network Daemon (LND). First, it prevents a peer from getting stuck when a channel-funding message arrives after its wallet reservation has already been cleaned up: the code now sends a completion signal instead of leaving the caller waiting forever. Second, it corrects how zero-block gossip range queries are handled so that empty queries keep their starting block height and so that a densely populated first block no longer triggers an invalid zero-block reply before the real reply.

AI review queuedlnwallet: complete missing reservationsby yyforyongyu · 8bf173e5 · Aug 6, 2026 · 2 filesMessage 68 · AdequateLow 32Details
Commit message · yyforyongyu

lnwallet: complete missing reservations

Return both completion results when the reservation is no longer
present.

Add a focused regression test for the missing-reservation response.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidencesigning or wallet pathsecond-pass: security-sensitive path
AI analysis · Low 32/100

This commit fixes a small but real bug in LND's channel-funding code. When a funding request referred to a reservation that no longer existed, the code sent an error message but forgot to send the matching 'completion' signal. A caller waiting on both channels could hang or misbehave. The fix adds the missing completion signal and includes a regression test. There is no claim in the commit that this is a security issue, but incomplete error handling in wallet code can sometimes be abused to cause denial of service.

AI review queuedMerge pull request #11019 from Roasbeef/coop-close-race-publicby Yong · f4ae5656 · Aug 6, 2026 · 9 filesMessage 73 · AdequateModerate 57Details
Commit message · Yong

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

lnwallet/chancloser: fix data race in the legacy coop close state machine

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
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Moderate 57/100

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 inconsistent close negotiations. Second, it now always checks that the other party's payout address is well-formed and safe to pay, instead of only checking when an upfront shutdown address was already on file. Previously, a malformed or malicious address could slip through in some cases.

AI review queuedlnwallet/chancloser: record the remote close output only when acceptedby Olaoluwa Osuntokun · fb89732d · Aug 4, 2026 · 1 fileMessage 73 · AdequateLow 29Details
Commit message · Olaoluwa Osuntokun

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

In this commit, we hold off on recording the remote party's close output until
we've decided we can act on their Shutdown. ReceiveShutdown wrote the field
before it looked at the state, so a Shutdown that arrives at a point where we
have nothing to do with it, say once we've already finished the negotiation,
would still overwrite the output we settled on before being turned away with
ErrInvalidState. The output we report for the close then describes a message we
rejected.

Nothing acts on this today, as we hand the outputs to the caller only after
ClosingTx tells it the negotiation finished, but the field is what we report to
the party that asked for the close, so we may as well only fill it in from a
message we accepted.

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

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 was rejected. The fix only saves the address when the message is actually accepted. The bug currently has no downstream effect because the recorded value is not used until after negotiation finishes, but it makes the close record more accurate.

AI review queuedlnwallet/chancloser: validate delivery scripts in the RBF closerby Olaoluwa Osuntokun · a8e2a0f7 · Aug 4, 2026 · 2 filesMessage 83 · StrongModerate 64Details
Commit message · Olaoluwa Osuntokun

lnwallet/chancloser: validate delivery scripts in the RBF closer

In this commit, we make the RBF co-op closer validate the remote party's
delivery script in all cases, matching what the negotiation closer already does.
Previously we only ran the check when we had an upfront shutdown script on record
for the peer, so a peer that never committed to an upfront script could hand us a
delivery script that we'd stash and carry through the rest of the close flow
without ever looking at it.

We now always call validateShutdownScript with the (possibly nil) upfront
script: a nil upfront script still runs the well-formedness check on the peer's
script, and a non-nil one additionally enforces the exact match, same as before.
We also require the script to be present. The wire format puts no lower bound on
the address length, and validateShutdownScript treats an absent peer script as
nothing to check, so an empty one passed validation by default rather than on its
merits. Both entry points now go through one helper that insists on a script
before running the usual checks over it, which also covers a CloserScript
swapped in mid-negotiation via ClosingComplete rather than letting that one go
unchecked.

The delivery-form coverage is spelled out in the tests: the spec dropped p2pkh
and p2sh for co-op closes to keep the dust calculations uniform, and we don't
implement the OP_RETURN form that option_simple_close allows, so all of those are
rejected along with an empty or malformed script.

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 validationsigning or wallet pathsecond-pass: near security thresholdsecond-pass: security-sensitive path
AI analysis · Moderate 64/100

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' closer always validate the peer's payout address, matching what the older negotiation closer already did. Before, validation only happened if the peer had previously committed to a specific upfront address. Without that, a malicious or buggy peer could have caused funds to be sent to an unspendable or malformed script.

AI review queuedlnwallet: make DustLimitForSize total over the sizes it can be handedby Olaoluwa Osuntokun · f80f92dc · Aug 3, 2026 · 2 filesMessage 73 · AdequateModerate 51Details
Commit message · Olaoluwa Osuntokun

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

In this commit, we have DustLimitForSize fall back to the generic witness dust
threshold for any script size that doesn't match one of the well-known
templates.

The size switch covered P2WPKH, P2WSH, P2SH, P2PKH, and the explicit
unknown-witness size, and treated every other length as unreachable. That's a
narrower assumption than the callers can actually make good on: a witness
program for versions 1 through 16 carries a program of anywhere from 2 to 40
bytes, so its serialized length won't always land on one of those exact values.

The dust calculation only needs a representative output of roughly the right
shape, and the unknown-witness pricing is the conservative choice among the
ones we have, so we make it the default. That leaves the helper well defined
across the whole range of sizes callers can pass it, including scripts carrying
witness versions we don't know about yet.

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 · Moderate 51/100

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 crash the node. Now it treats any unrecognized length as a generic witness output and returns a dust value instead. The patch is defensive: it makes the code well-defined for future Bitcoin witness versions and arbitrary script sizes, but the commit message does not frame it as fixing a known exploitable vulnerability.

AI review queuedlnwallet: expose negotiated configs in aux chan stateby George Tsagkarelis · 98abfba1 · Jul 8, 2026 · 4 filesMessage 50 · ThinLow 28Details
Commit message · George Tsagkarelis

lnwallet: expose negotiated configs in aux chan state

50/100 · ThinMessage clarity
✓ Specific, 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 · Low 28/100

This commit fixes an internal bookkeeping bug in LND's channel-opening code. When opening a Lightning channel that uses an auxiliary (aux) funding controller, the code was previously handing the controller an incomplete view of the negotiated channel settings. The patch makes sure the controller receives the final, agreed-upon local and remote channel configuration values. There is no direct evidence in the commit that this is exploitable as a security vulnerability; it reads as a correctness/robustness fix for a feature used by custom channel types such as Taproot Assets channels.

AI review queuedlnwallet: use channel state open channelby ziggie · fa31c564 · Jul 7, 2026 · 9 filesMessage 78 · AdequateInformational 15Details
Commit message · ziggie

lnwallet: use channel state open channel

Update lnwallet channel, reservation, wallet, and test helpers to use
chanstate.OpenChannel directly.

The wallet package still imports channeldb for database APIs and other
channel-state aliases, but the OpenChannel type boundary now points at
the package that owns the type.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is a straightforward internal code cleanup: it changes the lnwallet package to use the OpenChannel type from a dedicated chanstate package instead of getting it indirectly through the channeldb package. There is no change to user-facing behavior, network protocol handling, cryptographic operations, or database logic. It is purely a refactoring move to make the code's type ownership clearer.

AI review queuedhtlcswitch: use channel state open channelby ziggie · a4bec71b · Jul 7, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · ziggie

htlcswitch: use channel state open channel

Update htlcswitch test utilities to construct and pass
chanstate.OpenChannel values directly.

This removes another test-only dependency on the channeldb OpenChannel
alias while leaving the test database helpers unchanged.

78/100 · AdequateMessage clarity
✓ 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 · Informational 15/100

This commit only changes test helper code in LND. It swaps one internal type name (channeldb.OpenChannel) for another (chanstate.OpenChannel) inside test utilities. There is no change to production code, no user-facing behavior change, and no security fix.

AI review queuedserver: use channel state open channelby ziggie · 8e709678 · Jul 7, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · ziggie

server: use channel state open channel

Update server callback wiring to use chanstate.OpenChannel at the
funding manager boundary.

This follows the funding package change and removes another
consumer-facing dependency on the channeldb OpenChannel alias.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 15/100

This commit is a straightforward internal code cleanup in LND. It changes three places in server.go to use a new internal type name (chanstate.OpenChannel) instead of an old alias (channeldb.OpenChannel). The actual behavior of the code is unchanged; it simply updates wiring after a previous refactoring in the funding package. There is no security-relevant change visible in the diff.