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
270commits · 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 33 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.

AI review queueditest: extend relevant itests to cover taproot chans finalby Olaoluwa Osuntokun · 5bbfdc62 · Apr 13, 2026 · 9 filesMessage 50 · ThinInformational 19Details
Commit message · Olaoluwa Osuntokun

itest: extend relevant itests to cover taproot chans final

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

This commit only adds and updates integration tests for a new Lightning channel type called 'simple taproot final'. It does not change the actual production code that handles money or network messages, so it does not introduce or fix a security vulnerability by itself. It is test-only work that exercises existing channel features such as opening, force-closing, payments, backups, and revocations under the new channel type.

AI review queuedlnwallet: integrate production script options in commitment generationby Olaoluwa Osuntokun · 2e0343cc · Apr 13, 2026 · 3 filesMessage 85 · StrongLow 30Details
Commit message · Olaoluwa Osuntokun

lnwallet: integrate production script options in commitment generation

This commit updates the wallet's commitment transaction generation logic to
use appropriate script options based on the channel type. The commitment
builder now determines whether a channel uses production taproot scripts
and passes the WithProdScripts() option accordingly to HTLC script generation
functions.

The changes affect three key areas of the wallet: channel state management,
commitment transaction construction, and funding reservation handling. Each
area now properly detects production taproot channels using the IsTaprootFinal()
method and applies the correct script generation options to ensure consistency
with the channel's script optimization level.

This integration ensures that production taproot channels generate commitment
transactions with optimized script trees using OP_CHECKSIGVERIFY, while
maintaining full compatibility with staging taproot and legacy channel types.
The script option selection is applied consistently across all commitment
transaction scenarios including local commits, remote commits, and HTLC
processing.

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

This commit adds support for a new 'production' version of taproot Lightning channels. It makes sure the wallet picks the correct, optimized Bitcoin scripts when building commitment transactions for this new channel type, while keeping older staging taproot and legacy channels unchanged. There is no direct evidence in the commit that this fixes an active security vulnerability; it reads more like feature completion for a new channel type.

Lower-prioritychanneldb: add production taproot channel type supportby Olaoluwa Osuntokun · 749a8e45 · Apr 13, 2026 · 1 fileMessage 85 · StrongInformational 19Details
Commit message · Olaoluwa Osuntokun

channeldb: add production taproot channel type support

This commit introduces the infrastructure necessary to distinguish between
staging and production taproot channels in the channel database. A new
TaprootFinalBit flag is added to the ChannelType enumeration to identify
channels that use the final taproot specification with optimized scripts.

The IsTaprootFinal() method provides a clean interface for determining when
a channel uses production taproot scripts versus the staging implementation.
Production taproot channels are characterized by their use of feature bits
80/81 and optimized script structures that employ OP_CHECKSIGVERIFY for
improved efficiency and reduced transaction sizes.

This channel type distinction is essential for the contract resolution system
to select appropriate witness types and script generation options. The bit
must be set alongside SimpleTaprootFeatureBit to ensure proper channel type
validation and backwards compatibility with existing taproot implementations.

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 adds a new database flag and helper method so LND can tell apart experimental 'staging' taproot channels from the finalized 'production' version. It is a small infrastructure change (11 lines) and does not, by itself, change how funds are secured or how transactions are validated. It simply prepares the code to recognize a new channel variant.

Lower-prioritycontractcourt: add channel type support to HTLC resolversby Olaoluwa Osuntokun · 6b0c3f5c · Apr 13, 2026 · 5 filesMessage 73 · AdequateLow 32Details
Commit message · Olaoluwa Osuntokun

contractcourt: add channel type support to HTLC resolvers

This commit extends all HTLC contract resolvers to accept and store channel
type information, which is essential for determining whether to use staging
or production taproot witness types during contract resolution. Each resolver
constructor now accepts a channeldb.ChannelType parameter and stores it as
a field within the resolver struct.

The channel arbitrator has been updated to extract channel type information
from the channel state and pass it to all resolver constructors. This ensures
that each resolver has the necessary context to make appropriate decisions
about script generation and witness type selection based on the specific
channel type being resolved.

Helper methods isTaprootFinal() have been added to each resolver to provide
a clean interface for determining when production taproot witness types
should be used. This lays the groundwork for the resolvers to properly
handle both staging and production taproot channels with the correct
script optimizations.

The changes maintain backward compatibility with existing channel types
while providing the infrastructure needed for production taproot channel
support throughout the contract resolution system.

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

This commit prepares LND's on-chain contract-resolution code to distinguish between experimental 'staging' taproot channels and the new 'final' production taproot channels. It passes the channel type into HTLC resolvers and adds helper checks so the correct Bitcoin witness script is chosen when a channel is force-closed. The change itself is infrastructure: it does not fix an active bug, but it prevents a class of future failures where a production taproot channel could be resolved using the wrong script type.

Security candidateinput: add production taproot HTLC succeed input constructorby Olaoluwa Osuntokun · 0720abca · Apr 13, 2026 · 1 fileMessage 78 · AdequateInformational 17Details
Commit message · Olaoluwa Osuntokun

input: add production taproot HTLC succeed input constructor

This commit adds MakeTaprootHtlcSucceedInputFinal, a new input constructor
specifically for creating HTLC success inputs that use production taproot
witness types. This function parallels the existing MakeTaprootHtlcSucceedInput
but creates inputs with the TaprootHtlcAcceptedRemoteSuccessFinal witness type
instead of the staging variant.

The new constructor follows the same pattern and signature as its staging
counterpart, ensuring consistency in the input creation API. This allows
contract resolvers to create the appropriate input type based on whether
they are handling a staging or production taproot channel, ensuring that
the correct witness generation logic is applied during transaction creation.

This addition provides the necessary infrastructure for production taproot
channels to properly construct inputs for sweeping HTLC outputs on remote
commitment transactions with the optimized script structure.

78/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
signing boundary
AI analysis · Informational 17/100

This commit adds a new helper function in LND for creating a specific kind of Bitcoin transaction input used when claiming a Lightning HTLC (a payment locked by a hash/time condition) on a production taproot channel. It mirrors an existing staging-channel helper but uses the final/production witness type. There is no direct evidence in the commit of a security vulnerability; it appears to be infrastructure for an upcoming or recently enabled feature.

Lower-prioritycontractcourt: implement production taproot witness selectionby Olaoluwa Osuntokun · 269d2c38 · Apr 13, 2026 · 1 fileMessage 73 · AdequateLow 32Details
Commit message · Olaoluwa Osuntokun

contractcourt: implement production taproot witness selection

This commit implements the core logic for selecting appropriate witness types
based on channel type in the contract resolution system. The commit sweep
resolver, HTLC timeout resolver, and HTLC success resolver have been updated
to use production taproot witness types when handling final taproot channels.

For each resolver, the witness type selection follows a consistent three-way
pattern: production taproot channels use Final witness types, staging taproot
channels use the existing taproot witness types, and legacy channels continue
to use their established witness types. This ensures that each channel type
uses the appropriate script structure and witness generation logic.

The HTLC success resolver required the addition of a new production input
constructor to properly handle direct HTLC sweeps on remote commitments with
production taproot channels. The HTLC timeout resolver was updated to handle
both second-level timeout transactions and direct timeout sweeps with the
correct production witness types.

These changes ensure that production taproot channels benefit from the
optimized script structure using OP_CHECKSIGVERIFY while maintaining full
backward compatibility with staging taproot and legacy channel types.

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

This commit updates part of LND's on-chain dispute-resolution code so that a new 'final' taproot channel type uses its own dedicated witness types when spending commitment outputs. It is a feature-completion change that adds the correct script/witness selection for production taproot channels while keeping older channel types on their existing paths. There is no direct evidence in the commit that this fixes an active security vulnerability; it appears to be correctness and compatibility work for a new channel type.

Lower-priorityinput: add production taproot witness types for final channelsby Olaoluwa Osuntokun · fc2e01a3 · Apr 13, 2026 · 3 filesMessage 73 · AdequateLow 28Details
Commit message · Olaoluwa Osuntokun

input: add production taproot witness types for final channels

This commit introduces seven new witness types specifically designed for
production taproot channels that use the final optimized script structure.
These witness types correspond to the existing staging taproot witness types
but are intended for channels using the finalized taproot specification with
optimized scripts that employ OP_CHECKSIGVERIFY instead of OP_CHECKSIG + OP_DROP.

The new witness types cover all taproot channel operations including local and
remote commitment spends, second-level HTLC transactions, direct HTLC sweeps,
and revocation scenarios. Each production witness type follows the established
naming convention by appending "Final" to distinguish them from their staging
counterparts.

The witness generation logic for these new types mirrors the existing taproot
implementation but will be used when the channel type indicates a production
taproot channel rather than a staging one. This ensures that the correct
script tree structure and witness format is used for each channel type.

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

This commit adds new witness types and size constants for production taproot channels in LND. It is a feature-completion change that mirrors existing staging taproot logic but uses slightly optimized scripts (OP_CHECKSIGVERIFY instead of OP_CHECKSIG + OP_DROP). There is no direct evidence in the commit that this fixes an active security vulnerability; it appears to be part of maturing taproot channel support.

Lower-prioritycontractcourt: integrate production taproot support in nurseryby Olaoluwa Osuntokun · f9a85986 · Apr 13, 2026 · 9 filesMessage 73 · AdequateLow 33Details
Commit message · Olaoluwa Osuntokun

contractcourt: integrate production taproot support in nursery

This commit completes the production taproot integration by updating the
UTXO nursery to properly handle production taproot channels. The nursery
is responsible for incubating time-locked outputs from commitment transactions
and must use the correct witness types for successful sweeping operations.

The witness type selection logic has been updated in three key areas within
the IncubateOutputs function: incoming HTLC resolution handling, outgoing
HTLC resolution handling, and baby output creation through makeBabyOutput.
Each location now uses a consistent three-way selection pattern that chooses
production taproot witness types for final channels, staging types for
development channels, and legacy types for traditional channels.

A new helper method isProdTaprootResolution has been added to determine
production taproot channels by examining the presence of a ResolutionBlob,
which indicates auxiliary channel information used by production taproot
implementations. The makeBabyOutput function has been converted to a method
to access this helper function.

The NurseryReport function has been updated to include all new Final witness
types in its switch statements, ensuring that production taproot outputs are
properly categorized and reported. This maintains consistency in the nursery's
reporting system while supporting the new witness types.

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

This commit finishes adding support for a new kind of Bitcoin taproot channel in LND's 'UTXO nursery' — the component that looks after time-locked funds after a channel is force-closed. It makes sure the nursery picks the correct transaction-signature format (called a witness type) for production taproot channels, instead of accidentally using the older or staging taproot formats. The change is mostly about completing a feature and preventing sweep failures for the new channel type, not about fixing an obvious exploitable bug.

Lower-priorityfeature: add taproot final to feature bit managerby Olaoluwa Osuntokun · 8ce6327c · Apr 11, 2026 · 3 filesMessage 45 · ThinInformational 19Details
Commit message · Olaoluwa Osuntokun

feature: add taproot final to feature bit manager

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

This commit adds a new advertised protocol feature flag for final/fully-released Taproot channels in LND. It tells other nodes that this LND node supports the finalized version of simple Taproot channels, and it wires up the same dependencies and on/off switch as the earlier 'staging' version. There is no direct security bug in the diff; it is a feature-enablement change.

Lower-prioritybuild: update to actor v0.0.6by Olaoluwa Osuntokun · 48e3a2f9 · Apr 11, 2026 · 2 filesMessage 57 · ThinInformational 15Details
Commit message · Olaoluwa Osuntokun

build: update to actor v0.0.6

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

This commit simply updates a Go module dependency called 'actor' from version 0.0.5 to 0.0.6 and removes a temporary local override. It is a routine build/maintenance change with no visible security implications in the diff itself.

Lower-prioritydiscovery/test: assert ProcessSyncTransition error in sync transition testby Gijs van Dam · cc375a66 · Apr 11, 2026 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Gijs van Dam

discovery/test: assert ProcessSyncTransition error in sync transition test

TestGossipSyncerSyncTransitions calls ProcessSyncTransition but
discards its return value. If the function ever regresses and returns
an error on the happy path, the test would silently pass. Assert
that the returned error is nil.

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

This commit only adds a missing error check inside a unit test. It does not change any production code, so it cannot introduce or fix a security vulnerability in the running software. It simply makes the test fail loudly if the function being tested ever starts returning an unexpected error.

Lower-priorityactor/test: extend TestAwaitFuture to cover fn.Err result pathby Olaoluwa Osuntokun · fb86988c · Apr 11, 2026 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Olaoluwa Osuntokun

actor/test: extend TestAwaitFuture to cover fn.Err result path

In this commit, we extend TestAwaitFuture to cover the case where the
future is completed with an fn.Err result. The existing test only
exercised the fn.Ok (success) and context cancellation paths.

The new case calls promise.Complete(fn.Err[string](sentinel)) directly
and verifies that AwaitFuture surfaces the error as the second return
value while returning the zero string value in the first, which is the
documented contract for Result[T].Unpack().

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

This commit only adds a new test case to an existing unit test. It checks that a helper function correctly returns an error when a future/promise is completed with an error value. There are no changes to production code, no bug fixes, and no security-relevant behavior changes.

Security candidateactor: add CompleteWith and AwaitFuture generic package-level helpersby Olaoluwa Osuntokun · 4e0992fa · Apr 11, 2026 · 2 filesMessage 73 · AdequateInformational 15Details
Commit message · Olaoluwa Osuntokun

actor: add CompleteWith and AwaitFuture generic package-level helpers

In this commit, we add two package-level generic helpers to the actor
module as part of the broader chan error -> Future[error] migration in
the discovery package.

CompleteWith[T](p Promise[T], val T) is a one-liner convenience wrapper
over p.Complete(fn.Ok(val)). It lets callers complete a promise with a
plain value without constructing an fn.Result inline, which cuts noise
at every completion site.

AwaitFuture[T](ctx, f Future[T]) (T, error) provides the symmetric
receive side: it blocks until the future resolves or the context is
cancelled and returns the value and any context error unpacked from
the fn.Result, matching the (val, err) convention callers expect.

Both functions are deliberately thin (no policy, no timeout, no new
state) so they compose freely with higher-level helpers built on top,
e.g. discovery.AwaitGossipResult.

go.mod is updated to pin the actor module via a local replace directive
so the rest of the lnd module picks up these additions without waiting
for a tagged release.

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

This commit adds two small helper functions to an internal actor package and updates the Go module file to use the local copy of that package. There is no security-relevant change; it is purely a code cleanup and convenience addition for future development work.

Lower-prioritylnutils: add ContextFromQuit to bridge quit channels to contextsby Olaoluwa Osuntokun · eadea00a · Apr 11, 2026 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Olaoluwa Osuntokun

lnutils: add ContextFromQuit to bridge quit channels to contexts

In this commit, we add ContextFromQuit, a utility for bridging the quit
channel shutdown pattern to context.Context-based cancellation.

Several subsystems in lnd use a plain quit <-chan struct{} for
cooperative shutdown rather than a context.Context. When those
subsystems need to await a Future[error], which uses a context for
cancellation, they need a way to derive a context that is cancelled
when the quit channel closes.

ContextFromQuit does exactly that: it returns a context tied to
context.Background() plus a cancel function, and spins up a minimal
goroutine that cancels the context as soon as quit is closed. The
returned cancel must be called (deferred at the call site) so the
goroutine exits when the enclosing operation completes normally before
shutdown.

This is a pure utility with no policy and no default timeout, so
callers remain in full control of lifetime.

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 small internal helper function that lets existing shutdown channels in lnd work with newer code that expects Go's standard context-based cancellation. It does not change any behavior, fix any bug, or introduce any user-facing feature. There is no security relevance in the change itself.

Lower-prioritymulti/test: add unit tests for gossip result helpers and context bridgeby Olaoluwa Osuntokun · 532a7032 · Apr 11, 2026 · 5 filesMessage 83 · StrongInformational 15Details
Commit message · Olaoluwa Osuntokun

multi/test: add unit tests for gossip result helpers and context bridge

In this commit, we add test coverage for the new helper functions
introduced as part of the chan error -> Future[error] migration.

discovery/gossip_result_test.go covers AwaitGossipResult (success,
error propagation, and context cancellation) and the idempotency of
completeGossipResult (a second call must never block or overwrite the
first result).

lnutils/context_test.go covers ContextFromQuit, verifying that closing
the quit channel cancels the derived context and that calling cancel()
allows the internal goroutine to exit cleanly without leaking.

actor/future_test.go removes a stale doc comment that was left over
from a prior edit pass.

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

This commit only adds and updates unit tests. It does not change any production code, so it cannot introduce a security vulnerability or fix one directly. The tests verify that helper functions behave correctly when futures complete, contexts cancel, or goroutines shut down. A test comment that previously described a 'Network Isolation Attack' regression was removed, but the actual regression test remains and the production behavior it exercises was already in place before this commit.

Lower-prioritydiscovery: add gossip result helpers wrapping actor.Future[error]by Olaoluwa Osuntokun · fc348602 · Apr 11, 2026 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Olaoluwa Osuntokun

discovery: add gossip result helpers wrapping actor.Future[error]

In this commit, we add gossip_result.go with three thin wrappers that
form the internal vocabulary for the chan error -> Future[error]
migration.

completeGossipResult(p Promise[error], err error) resolves a gossip
processing promise. A nil error signals success; non-nil signals the
specific gossip failure. Calling it more than once is safe since the
underlying Promise.Complete uses sync.Once, making any repeat call a
no-op. This idempotency is the core property that makes the pattern
safe for deferred message re-processing.

AwaitGossipResult(ctx, f Future[error]) error is the public-facing
counterpart: it blocks until the future resolves or the context is
cancelled, returning whichever error applies. Callers outside the
discovery package (funding, server) use this.

awaitGossipResult is a package-internal alias for AwaitGossipResult,
avoiding the need to qualify the symbol inside the package.

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 small helper file in the discovery package that wraps a generic 'future/promise' concurrency pattern for gossip message processing. It does not change behavior, fix a bug, or alter security controls. There is no security issue visible in the diff.

Lower-prioritydiscovery+funding+peer+server: migrate gossip result to actor.Future[error]by Olaoluwa Osuntokun · ac71ea75 · Apr 11, 2026 · 8 filesMessage 85 · StrongModerate 64Details
Commit message · Olaoluwa Osuntokun

discovery+funding+peer+server: migrate gossip result to actor.Future[error]

In this commit, we eliminate the three buffered chan error patterns in
the discovery package and replace them with actor.Promise[error]/
actor.Future[error]. The old pattern is error-prone: if a channel is
completed more than once (e.g. when a deferred message copy is
re-enqueued and processed again), the second write to a capacity-1
channel blocks forever. actor.Promise.Complete() is idempotent via
sync.Once, so the second call is always a safe no-op regardless of
whether anyone holds a reference to the Future.

Additionally, PropagateChanPolicyUpdate previously blocked on <-errChan
after enqueuing a policy update with no quit-channel check, creating a
latent deadlock if the gossiper shut down between enqueue and send. It
now uses AwaitGossipResult with a ContextFromQuit-derived context, so
shutdown is always respected.

This is an atomic migration that updates all callers in the same
commit so each commit builds standalone. The three main pieces are:

discovery

networkMsg.err chan error becomes errPromise actor.Promise[error].
chanPolicyUpdateRequest.errChan chan error becomes errPromise.
syncTransitionReq.errChan chan error becomes errPromise. All ~65 sites
that previously wrote to the error channel now call
completeGossipResult(nMsg.errPromise, err) instead.

ProcessRemoteAnnouncement and ProcessLocalAnnouncement now return
actor.Future[error] instead of chan error. The capacity-2 buffer
comment on ProcessRemoteAnnouncement, which was itself a workaround
for the old pattern, is removed along with the TODO referencing the
actor model redesign. ProcessSyncTransition in syncer.go follows the
same pattern: the errChan select is replaced with AwaitGossipResult
using a ContextFromQuit-derived context.

funding

The SendAnnouncement function type in funding.Config changes from
returning chan error to returning actor.Future[error]. The call sites
in addToGraph and announceChannel are updated to await the future with
AwaitGossipResult, passing a context derived from f.quit via
ContextFromQuit. Shutdown signals (context.Canceled and
discovery.ErrGossiperShuttingDown) are both mapped to
ErrFundingManagerShuttingDown via the new mapGossipError helper, which
also factors out the duplicated graph-rejected / unknown-error
handling. The three mock SendAnnouncement implementations in
manager_test.go are updated accordingly.

peer+server

In peer/brontide.go, the ProcessRemoteAnnouncement call in the gossip
stream handler intentionally discards the result since remote gossip
messages are fire-and-forget from the peer's perspective. The old
comment explaining why the chan error was unsafe to use is replaced
with a note that an unawaited Future[error] carries no overhead.

In server.go (applyChannelUpdate), the previous select on errChan and
the quit channel is replaced with ContextFromQuit + AwaitGossipResult.

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

This commit refactors how LND's gossip subsystem reports errors back to callers. Previously, code used buffered Go channels to carry a single error result. That pattern could deadlock if a deferred gossip message was processed twice, because the second write to an already-full channel would block forever. The change replaces those channels with a new 'actor.Promise/Future' abstraction whose completion is idempotent (safe to call many times). It also makes shutdown handling more uniform by deriving contexts from quit channels, preventing another latent deadlock in channel-policy propagation. The commit includes regression tests for premature-announcement reprocessing and shutdown paths.

Lower-prioritylnd: skip network validation when migrations are skippedby ziggie · e744e19b · Apr 10, 2026 · 1 fileMessage 73 · AdequateLow 31Details
Commit message · ziggie

lnd: skip network validation when migrations are skipped

Skip the chain_params network check when startup is explicitly
configured to skip SQL migrations. In that mode the schema is assumed
to already be managed externally, and the chain_params table may not
exist yet. Avoid failing startup on a missing table in this path.

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

This change lets LND skip a safety check that prevents accidentally using a database from the wrong Bitcoin network (like mainnet vs testnet) when the user has explicitly told LND to skip SQL database migrations. The check is skipped because the table it reads may not exist in that special setup. This is a deliberate relaxation of a guardrail, not a fix for an attack, and it only affects users who opt into the 'skip migrations' mode.

Lower-prioritydocs: add release note for network separation safeguardby ziggie · a10cd169 · Apr 10, 2026 · 1 fileMessage 85 · StrongModerate 58Details
Commit message · ziggie

docs: add release note for network separation safeguard

This is in particular important when running with a postgres
backend.

This only works if you run LND with the native sql flag but
people should run it with this flag from 21 on anyways.

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

This commit is just a documentation update adding a release note for a safeguard that was already merged via a previous code change (PR #10684). The safeguard prevents LND from accidentally starting up with the wrong Bitcoin network while reusing the same database, which could silently corrupt data. The actual protective code is not in this commit; only the description of it is.

Lower-priorityitest: cover postgres network separationby ziggie · ccabac60 · Apr 10, 2026 · 3 filesMessage 45 · ThinInformational 12Details
Commit message · ziggie

itest: cover postgres network separation

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

This commit only adds an integration test that checks an existing safety feature: LND refuses to start if the Bitcoin network setting doesn't match the one already recorded in a Postgres database. It does not change production code or fix a new vulnerability. The test helps prevent accidental data corruption from reusing the same database across different Bitcoin networks, but it is not itself a security patch.

Lower-prioritysqldb: add validate-network unit testsby ziggie · d988682e · Apr 10, 2026 · 3 filesMessage 55 · ThinInformational 15Details
Commit message · ziggie

sqldb: add validate-network unit tests

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
defensive validation
AI analysis · Informational 15/100

This commit only adds new unit tests for an existing database network-validation feature. It does not change any production code, fix a bug, or alter behavior users would see. There is no security issue here.

Lower-prioritysqldb: add new chainparam storeby ziggie · 3697f63a · Apr 10, 2026 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · ziggie

sqldb: add new chainparam store

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

This commit adds a new database-backed store that records which Bitcoin network (mainnet, testnet, etc.) the node was first started with. On every startup it checks the stored value against the current configuration and refuses to run if they differ. This is a defensive safety feature, not a vulnerability fix or exploitable change.

Lower-prioritylnd: validate native-sql network on startupby ziggie · 5eebbb0e · Apr 10, 2026 · 1 fileMessage 45 · ThinModerate 58Details
Commit message · ziggie

lnd: validate native-sql network on startup

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
defensive validation
AI analysis · Moderate 58/100

This commit adds a startup safety check in LND (a Bitcoin Lightning Network node implementation) that verifies a native SQL database was created for the same Bitcoin network (mainnet, testnet, etc.) the node is currently configured to use. Without this check, a user could accidentally point LND at the wrong database—such as reusing a mainnet database while running on testnet—which could silently corrupt payment channel data. The change makes LND refuse to start rather than risk that corruption.

Lower-prioritysqldb/sqlc: add chain_param schema and queriesby ziggie · 0b82a89f · Apr 10, 2026 · 7 filesMessage 45 · ThinInformational 15Details
Commit message · ziggie

sqldb/sqlc: add chain_param schema and queries

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

This commit adds a new database table called chain_params to store which Bitcoin network (e.g., mainnet or testnet) the database was created for. It also adds simple read/write queries and registers a new migration. There is no security fix or vulnerability here; it is ordinary infrastructure code.

Lower-prioritysqldb: harden migration config consistency testsby ziggie · bd7e950c · Apr 9, 2026 · 3 filesMessage 78 · AdequateInformational 16Details
Commit message · ziggie

sqldb: harden migration config consistency tests

Strengthen migration consistency coverage by checking the reverse
mapping from embedded SQL files to migrationConfig entries, deriving
previous schema state from slice order instead of Version, rejecting
schema version regressions, and asserting migration names match the
embedded SQL file stems.

Also fix the graph v2 migration config name to match the embedded
migration filename.

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

This commit is a hardening patch for database migration tests in LND. It adds and strengthens automated checks that ensure every embedded SQL migration file is registered in the migration configuration, that schema versions never go backwards, and that migration names match their SQL filenames. It also fixes one mismatched migration name. There is no runtime code change that would directly create or fix an exploitable vulnerability; the change is defensive test coverage.