LL
← All projectsLightning Labs

LND

Go implementation of a complete Lightning Network node.

BitcoinLightning NetworkNormal
Repository coverage

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

141security candidates194second-pass queue1285AI analyses
78commits · 30 days
173commits · 60 days
599commits · 180 days
1237commits · 365 days
Backfill bands
Aug 5 → Feb 6405 seen5 candidatesComplete
Feb 6 → Jun 6665 seen28 candidatesComplete
Jun 6 → Jul 689 seen4 candidatesComplete
Jul 6 → Aug 569 seen0 candidatesComplete
Commit communication

Does the history explain itself?

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

67/100 average clarity
318Strong · 80–100
646Adequate · 60–79
391Thin · 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 Osuntokun20942204474
Elle Mouton26832268167
ziggie44416413165
Yong28513171
LNBiG111173
Jared Tobin909171
bitromortac531051069
yyforyongyu83861068
Erick Cestari26726070
Andras Banki-Horvath11311072
Gijs van Dam33230073
ziggieXXX2026070
Analysis record

Published AI watches

Last scanned 4 minutes ago

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

Merge pull request #11212 from ziggie1984/disable-legacy-channels

This change stops LND from opening new Lightning channels using the old 'legacy' commitment format. The legacy format makes it harder to recover funds if something goes wrong, because the money owed to you is tied to a secret key that chan…

Prevents opening new channels with the legacy commitment type, whose tweaked to_remote output complicates data-loss recoveryCloses a negotiation path where an empty channel_type TLV bypassed feature checks and forced a legacy channelAdds explicit RPC and wire rejection with a dedicated error code
112cb5f3by ziggieXXX+265−4716 files
Vendor flagged security relevance
Moderate 56 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11223 from gijswijs/legacy-dust-retribution-fix

This update fixes a bug in how LND handles old-style punishment transactions when a channel partner tries to cheat. Previously, tiny (dust) HTLCs were left as blank placeholder entries in the punishment data, which could cause the node to …

nil-pointer dereference risk in breach retribution pathlegacy revocation log handling inconsistency with modern formatdefensive hardening added for trimmed/dust HTLCs
500ca51fby ziggieXXX+168−146 files
No security note in commit
Moderate 62 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11190 from Roasbeef/zpay32-reject-duplicate-payment-hashes

This change tightens how LND reads Lightning invoices (BOLT 11). Previously, if an invoice contained more than one payment hash field, LND would silently keep the first one and ignore the rest. Now it rejects the invoice entirely. The rele…

Behavior change from 'use first duplicate field' to 'reject duplicate fields'New error type ErrDuplicatePaymentHash returned on duplicate payment hash fieldsMalformed/unsupported-length duplicate payment hash now treated as duplicate and rejected
86306f89by Yong+147−106 files
No security note in commit
Moderate 62 AI analysisMessage 98 · Strong
LL Lightning LabsLND BitcoinLightning Network

zpay32: reject duplicate payment hash fields

This change tightens how LND reads Lightning invoices. Previously, if an invoice contained more than one payment hash field, LND would silently keep the first valid one and ignore the rest. Now it rejects such invoices outright. This preve…

Behavioral change from silent first-field acceptance to explicit rejection of duplicate payment hash fieldsPrevents invoice parsing from depending on field ordering when multiple payment hashes are presentCovers malformed first field + valid second field, closing a potential bypass
e2f27063by Olaoluwa Osuntokun+147−106 files
Vendor flagged security relevance
Moderate 53 AI analysisMessage 58 · Thin
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11132 from yyforyongyu/task-11129-pong

This change fixes how LND answers network 'ping' messages from other Lightning nodes. Previously, LND would sometimes silently ignore valid pings to limit reply traffic, which violates the Lightning protocol (BOLT 1) and could make a peer …

Protocol compliance fix: BOLT 1 requires a Pong for every valid PingRemoved silent suppression of Pong replies that could cause peer timeout/misbehaviorUnified rate limiting now accounts for amplification bandwidth, not just ping count
d3d1f1d0by Olaoluwa Osuntokun+274−1715 files
Vendor flagged security relevance
Low 33 AI analysisMessage 90 · Strong
LL Lightning LabsLND BitcoinLightning Network

itest: stop creating legacy channels

This commit updates LND's integration tests to stop using an obsolete 'legacy' channel type and adds a test confirming that LND now rejects that legacy type. The commit message says the real fix is elsewhere in the same pull request: previ…

Deprecated commitment format (legacy) is now rejected by RPCTest added to verify legacy channel type is refusedUnused legacy node configuration flag removed
03d8b09dby ziggie+24−85 files
No security note in commit
Moderate 60 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11198 from gijswijs/amp-setlocal-reconstruction-fix

This change fixes a bug in LND's handling of AMP (Atomic Multi-Path) payments. Previously, if one partial payment set failed to reconstruct its secret preimage, the entire invoice was canceled, including unrelated partial payment sets from…

Denial-of-service against reusable static AMP invoices by causing unrelated accepted HTLC sets to be canceledIncorrect invoice state transition from set-local failure to global invoice cancellationAvailability impact on multi-payer AMP invoice scenarios
88959aecby Olaoluwa Osuntokun+155−44 files
Vendor flagged security relevance
Low 29 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11200 from ziggie1984/build-go-1.27.1

This commit updates the Go programming language version used to build LND from 1.25.13/1.26.6 to 1.26.8 (language version) and 1.27.1 (toolchain). It also regenerates many automatically generated RPC files and adjusts linter settings. The …

Go version bump may indirectly address unlisted runtime/standard-library security fixesLarge regenerated protobuf files suggest dependency/toolchain refresh rather than logic changeLinter configuration expanded to suppress new checks, consistent with a toolchain upgrade
ef4820e5by Olaoluwa Osuntokun+4932−412670 files
No security note in commit
Informational 15 AI analysisMessage 92 · Strong
LL Lightning LabsLND BitcoinLightning Network

build: adopt focused golangci-lint v2.13 checks

This commit is a routine build-maintenance change. It updates the project's Go linter configuration to a newer version and fixes the resulting style warnings: a WebSocket header spelling and several documentation comments that didn't start…

bada7ea3by ziggie+27−1911 files
No security note in commit
Informational 15 AI analysisMessage 68 · Adequate
LL Lightning LabsLND BitcoinLightning Network

lnrpc: regenerate protos with Go 1.27

This commit is a housekeeping change that regenerates automatically generated RPC binding files using a newer Go compiler version. The only differences are in code comments (doc-comment formatting), not in actual program logic or API behav…

dd523108by ziggie+4501−369826 files
No security note in commit
Informational 20 AI analysisMessage 100 · Strong
LL Lightning LabsLND BitcoinLightning Network

build: fix Go 1.27 compatibility

This commit is a routine build-and-test maintenance patch to make the LND codebase compile and pass tests with the upcoming Go 1.27 release. It upgrades the project's custom linter tool, refreshes many indirect tool dependencies, adjusts o…

No production code changesNo vulnerability fix or CVE reference presentDependency-only refresh in tools module (development tooling)
6b54a387by ziggie+365−3706 files
No security note in commit
Informational 15 AI analysisMessage 80 · Strong
LL Lightning LabsLND BitcoinLightning Network

build: bump Go language and toolchain versions

This commit is a routine maintenance update that changes which version of the Go programming language is used to build the lnd project. It does not change any application logic, fix a bug, or address a security vulnerability. The project i…

b1f9ca66by ziggie+39−3930 files
No security note in commit
Moderate 60 AI analysisMessage 83 · Strong
LL Lightning LabsLND BitcoinLightning Network

invoices: cancel only the failing AMP set on reconstruction failure

This commit fixes a bug in LND's invoice handling for reusable AMP (Atomic Multi-Path) invoices. Previously, if one payment set failed to reconstruct its preimage, the entire invoice was canceled, even though other valid payment sets on th…

Denial-of-service-like availability impact: a malicious or buggy payer could cause a whole reusable AMP invoice to be canceled, blocking legitimate concurrent payersSet-local failure incorrectly escalated to invoice-global cancellationRegression test added for concurrent-set survival after reconstruction failure
d74ab6faby Gijs van Dam+141−42 files
No security note in commit
Low 34 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

Merge pull request #11061 from bitromortac/2604-bolt12-1f

This commit adds the missing cryptographic signature layer for BOLT 12 offers in LND. It builds a Merkle tree from the message fields, signs that tree with a BIP-340 Schnorr signature, and now rejects invoice requests and invoices whose si…

Adds BIP-340 Schnorr signature verification for BOLT 12 invoice_request and invoice messagesMerkle tree commits to canonical re-encoded TLV records; non-minimal feature/amount encodings now rejected to preserve byte-exactnessSignature TLV type 240 and reserved range 240-1000 excluded from the signed Merkle root
1049d301by Yong+2076−7815 files
Vendor flagged security relevance
Low 35 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

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

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 chec…

New RPC fields release_after_spend_confs and confirmed_spend_height added to LeaseOutput and FundPsbtCustom lock ID enforced as required for confirmation-controlled FundPsbt leases; all-zero and reserved internal IDs rejectedCapability check (ResolveOutputLeaser) prevents silent downgrade to time-only lease when confirmation control is requested
80dde144by Yong+1293−10021 files
No security note in commit
Informational 19 AI analysisMessage 58 · Thin
LL Lightning LabsLND BitcoinLightning Network

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

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, …

Large refactoring with no change to cryptographic or consensus-critical logicCodec serialization moved verbatim to new package; wire format unchangedDatabase bucket keys and TLV record types preserved
62b0a073by Olaoluwa Osuntokun+3923−310924 files
No security note in commit
Low 25 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

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

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 previous…

Data-correctness fix in funding handshake: negotiated channel configs now exposed to auxiliary funding controllerAuxiliary funding controller receives incomplete channel state before patch, complete state after patchNo explicit security claim, CVE, or advisory referenced in commit or supplied materials
1e127653by Olaoluwa Osuntokun+291−254 files
No security note in commit
Moderate 60 AI analysisMessage 88 · Strong
LL Lightning LabsLND BitcoinLightning Network

bolt12: verify invoice_request and invoice signatures on read

This change makes LND's BOLT 12 invoice and invoice-request reader actually check that the digital signature is valid, instead of only checking that a signature field exists. Before, an attacker could craft or modify a BOLT 12 message and …

Missing cryptographic verification on parsed BOLT 12 messages replaced with BIP-340 Schnorr signature verificationReader accepted any 64-byte placeholder signature before the patchNew negative tests verify rejection of wrong-signer and tampered Merkle-root fields
aa8bd19fby bitromortac+272−723 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 78 · Adequate
LL Lightning LabsLND BitcoinLightning Network

itest: cover confirmation-controlled leases

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 lon…

a1ab4e92by Andras Banki-Horvath+152−02 files
No security note in commit
Moderate 68 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

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

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 m…

panic fix in request header parsingunbounded incoming WebSocket message read now cappedincorrect header value assignment possible before fix
c662f853by Yong+227−104 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.

Security candidatebolt12: add InvoiceError onion message repliesby bitromortac · e279cdf1 · Jul 21, 2026 · 4 filesMessage 73 · AdequateInformational 21Details
Commit message · bitromortac

bolt12: add InvoiceError onion message replies

InvoiceError is the negative-reply counterpart to an invoice, sent over
onion messages at namespace type 68 when the receiver rejects an invoice
request or the sender rejects a returned invoice. All three fields are
odd (informational): erroneous_field (TLV 1, the offending TLV type),
suggested_value (TLV 3, a valid replacement), and error (TLV 5, a UTF-8
explanation). Unlike Offer/InvoiceRequest/Invoice this type has no
bech32 form and no Merkle signature — it travels only inside onion
message payloads.

73/100 · AdequateMessage clarity
✓ 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 21/100

This commit adds support in LND for a new Lightning protocol message called InvoiceError. It is used to politely tell another node why their payment invoice or invoice request was rejected, sent privately through an onion-routed message. The change is mostly a feature addition with built-in validation to make sure the error message is well-formed before it is sent.

Lower-prioritydocs: update release notesby bitromortac · 5fcdc16a · Jul 21, 2026 · 1 fileMessage 47 · ThinInformational 15Details
Commit message · bitromortac

docs: update release notes

47/100 · ThinMessage clarity
✓ Descriptive subject✓ Uses a recognizable type or scope! No meaningful explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only updates the release notes document. It adds a one-line description mentioning that a new feature for handling BOLT 12 invoice errors was added. There are no code changes, no bug fixes, and no security-related content in the commit itself.

Lower-prioritypaymentsdb: normalize orphaned blinded totalby ziggie · 04da2fa5 · Jul 20, 2026 · 3 filesMessage 78 · AdequateLow 46Details
Commit message · ziggie

paymentsdb: normalize orphaned blinded total

The KV route format stores blinded fields independently. Routes accepted
through SendToRouteV2 could therefore contain a blinded total amount
without encrypted recipient data. The SQL migration treated the total as
proof of a blinded hop and bound nil to the required encrypted-data
column, preventing LND from starting.

Use encrypted recipient data as the blinded-hop discriminator and
normalize only the known total-only case. Reject blinding-point-only
records with payment, attempt and hop context instead of exposing an
opaque SQL constraint error. Log normalized totals, account for them
during migration validation, and cover both cases with regression tests.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidence
AI analysis · Low 46/100

This commit fixes a database migration bug in LND (Lightning Network Daemon) that could prevent the node from starting after upgrading. Some old payment routes stored a 'blinded total amount' without the matching encrypted recipient data. The previous migration incorrectly treated that total as proof of a real blinded hop and tried to insert a row with missing required data, causing a SQL constraint failure on startup. The fix uses the presence of encrypted recipient data as the real signal for a blinded hop, silently drops the harmless 'orphaned total' case, and reports a clear error for the genuinely malformed case of a blinding point without encrypted data. It also adds regression tests and adjusts validation so the migrated SQL data matches the original KV data.

Lower-prioritydocs: add payment migration release noteby ziggie · 17ee638e · Jul 20, 2026 · 1 fileMessage 80 · StrongLow 30Details
Commit message · ziggie

docs: add payment migration release note

Document the handling of historical total-only blinded route data and the
new SendToRouteV2 validation that prevents creating such records.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
Why it was queued
documentation-only discount
AI analysis · Low 30/100

This commit only adds a release note describing a previously fixed bug in LND's payment migration. The actual code change happened in an earlier pull request. The bug involved old payment routes that stored a 'blinded total amount' without the matching encrypted recipient data, which could cause database migration failures. The note also warns that SendToRouteV2 now rejects newly submitted routes with the same invalid combination, and that replaying an affected old route from ListPayments or TrackPayment will also be rejected. It is a documentation-only change, so it does not by itself introduce or fix a vulnerability, but it signals that a prior fix addressed a reliability issue that could disrupt node operation during upgrades.

Lower-priorityrouterrpc: require encrypted blinded hop databy ziggie · ffc62509 · Jul 20, 2026 · 2 filesMessage 68 · AdequateModerate 59Details
Commit message · ziggie

routerrpc: require encrypted blinded hop data

SendToRouteV2 accepts caller-provided routes. It already required
recipient-encrypted data when a blinding point was present. However, it
copied a blinded total amount independently. This allowed a total-only
hop to enter the payment database even though LND did not classify it
as blinded.

Require encrypted data when either blinded field is supplied. Cover the
rejected combination, a valid blinded total and a regular hop.

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

This commit tightens validation in LND's router RPC so that callers cannot supply a 'blinded total amount' for a payment hop unless they also provide the encrypted recipient data that marks the hop as blinded. It also restricts that total amount field to the final hop only. Previously, a route could be accepted with a blinded total amount on a regular hop, which could let inconsistent or partial blinded-payment data enter LND's payment database. The change is defensive and prevents a likely logic/state bug rather than a direct theft-of-funds vulnerability.

Lower-prioritykvdb/sqlbase: relax bulk migration isolationby ziggie · 18bbdb53 · Jul 18, 2026 · 1 fileMessage 45 · ThinInformational 23Details
Commit message · ziggie

kvdb/sqlbase: relax bulk migration isolation

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

This commit changes a database migration transaction from the strictest isolation level (Serializable) to a more relaxed one (Read Committed) for PostgreSQL bulk migrations. The stated reason is to prevent PostgreSQL from using excessive memory for predicate locks when migrating millions of rows. The developer argues this is safe because the migration is loading into an empty destination database that it exclusively controls. The change is presented as a performance/reliability fix, not a security fix.

Lower-prioritykvdb: test migration bulk operationsby ziggie · d12a8c3a · Jul 16, 2026 · 4 filesMessage 55 · ThinInformational 12Details
Commit message · ziggie

kvdb: test migration bulk operations

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

This commit adds automated tests for a new database migration helper in LND's Postgres and SQLite backends. It does not change production behavior; it only verifies that the migration-only bulk interface is opt-in, handles edge cases correctly, and is not accidentally exposed by normal database backends.

Lower-prioritykvdb/sqlbase: define migration bulk KV interfacesby ziggie · 5246c15f · Jul 16, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · ziggie

kvdb/sqlbase: define migration bulk KV interfaces

This commit introduces a migration-only interface set that lets the
KV-to-SQL migration load and verify the raw SQL KV schema directly,
bypassing the walletdb/kvdb bucket abstraction. Normal application code
continues to use the bucket APIs; these helpers exist solely to make the
one-time bulk migration fast and verifiable.

MigrationBulkKVStore is the entry point. It exposes CheckEmpty to guard
against migrating into a populated table, TruncateTargetTable to recover
from an interrupted fresh-only attempt, and two transaction openers:
BeginBulk for loading and BeginBulkVerify for batched verification.

The write path inserts buckets one at a time to obtain generated ids.
It inserts leaves in batches, leaving the concrete bulk strategy to the
backend. The read path walks the tree level with FetchTopLevel and
FetchChildren.

MigrationBulkChild uses an explicit IsBucket flag rather than inspecting
the value column. This prevents an empty leaf value from being confused
with the SQL NULL marker used for buckets.

The interfaces use the same build constraints as the SQL kvdb backends.
Backends expose the migration capability explicitly; the first concrete
implementation is Postgres-only.

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

This commit only adds new Go interface definitions for a future database migration feature. There is no executable code, no bug fixes, and no behavior changes to the running application. It cannot be exploited or cause security issues on its own.

Lower-prioritykvdb/sqlbase: add postgres migration bulk supportby ziggie · 9f97c49a · Jul 16, 2026 · 2 filesMessage 78 · AdequateLow 28Details
Commit message · ziggie

kvdb/sqlbase: add postgres migration bulk support

This commit implements MigrationBulkKVStore for Postgres/pgx. The
Postgres wrapper is available through an explicit constructor, so
regular Postgres and shared SQLite backends do not expose the migration
capability accidentally.

The bulk load transaction pins a dedicated *sql.Conn. InsertLeaves streams
rows through pgx COPY inside that transaction. The copied row count is
checked against the input to catch partial loads. Bucket rows are inserted
individually with RETURNING id so nested buckets can reference their parent.

Verification uses a read-only repeatable-read transaction. It fetches
children of a parent-id batch with a native pgx bigint-array and a single
ANY($1) query.

Migration transactions honor the WithTxLevelLock used by regular
transactions. Loads take the write lock and verification takes the
read lock. Commit and Rollback release both the lock and the dedicated
connection. Rollback is idempotent and tolerates an already-closed
transaction.

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

This commit adds a new internal-only Postgres bulk-loading helper for database migrations in LND. It is not a routine user-facing feature; it is a migration tool that copies key/value data efficiently into a Postgres backend. The code introduces a dedicated transaction path with table truncation, bulk COPY, and verification queries. There is no direct evidence in the commit that this fixes a known security bug; it reads as a performance/reliability improvement for migrating LND's database backend to Postgres.

Lower-prioritydocs: add release notes for v0.21.2by Jared Tobin · 0501731c · Jul 14, 2026 · 1 fileMessage 57 · ThinInformational 15Details
Commit message · Jared Tobin

docs: add release notes for v0.21.2

57/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only adds a line to the release notes document for version 0.21.2. It mentions that a bug was fixed where a feature called the 'RBF closer' could be used with incompatible auxiliary channels. The commit itself does not change any program code, so it cannot directly introduce or fix a security issue. It is purely documentation.

Lower-prioritypeer: never use RBF coop close for aux channelsby Jared Tobin · ceff3ceb · Jul 14, 2026 · 3 filesMessage 76 · AdequateHigh 74Details
Commit message · Jared Tobin

peer: never use RBF coop close for aux channels

The RBF coop close flow was selected purely from the peer-level
feature bits (rbfCoopCloseAllowed), with no per-channel exclusion.
The RBF close state machine does not invoke any of the aux closer
hooks: the Shutdown message it sends carries no aux custom records,
and the close transaction it negotiates contains no aux outputs. For
a taproot asset (overlay) channel this means the funding output --
which anchors the asset commitment -- is spent by a transaction that
does not re-commit the assets, irrevocably destroying them on-chain.
The aux closer then fails to finalize the confirmed close (it was
never asked to produce vPackets), which blocks the chain watcher's
coop close handler and leaves the channel stuck in waiting-close.

See lightninglabs/taproot-assets#2196 for an instance of this
happening in the wild.

Extend rbfCoopCloseAllowed to take the channel type: it now requires
the RBF feature bits AND that the channel type carries no tapscript
root, and is used at every site that chooses between the RBF closer
and the legacy negotiate closer. The RBF close actor's own eligibility
check is dropped entirely: an actor is only ever registered after
initRbfChanCloser has vetted the channel, so the check was redundant.
Aux channels now always fall back to the legacy closer, which is
aux-aware, regardless of the negotiated feature bits. Since no RBF
msg-router endpoint is registered for aux channels, an incoming Shutdown
from the peer likewise falls through to the legacy close handling. As a
backstop, initRbfChanCloser now refuses to construct an RBF closer for
aux channels outright.

76/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
AI analysis · High 74/100

This commit fixes a bug in LND where a new cooperative channel-closing mechanism (RBF coop close) was being used for special 'aux' channels that carry Taproot Assets. Those aux channels need extra steps to safely move the assets out, but the RBF close machine skipped those steps. If triggered, the closing transaction would spend the channel's funding output without preserving the asset commitment, effectively destroying the committed assets on-chain and leaving the channel stuck in a 'waiting-close' state. The fix forces aux channels to use the older, aux-aware close path even when both peers support the new RBF feature.

Lower-priorityrpcserver: fix stats undercount in GetNetworkInfoby elnosh · 9ccd3056 · Jul 13, 2026 · 2 filesMessage 68 · AdequateLow 25Details
Commit message · elnosh

rpcserver: fix stats undercount in GetNetworkInfo

On an already-seen channel, the loop returned from the whole node
callback instead of continuing, skipping the node's remaining
channels, this undercounted the stats.

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

This commit fixes a simple coding mistake in LND's GetNetworkInfo RPC. When building network statistics, if the code encountered a channel it had already counted, it accidentally stopped processing that node's remaining channels instead of just skipping the duplicate. This caused reported totals like network capacity and channel count to be too low. The fix changes 'return' to 'continue' so the loop keeps going. It is a correctness bug, not a security vulnerability.

Lower-prioritydocs: add release noteby Jared Tobin · 3ae31b76 · Jul 9, 2026 · 1 fileMessage 40 · ThinInformational 15Details
Commit message · Jared Tobin

docs: add release note

40/100 · ThinMessage clarity
✓ Subject identifies a change✓ Uses a recognizable type or scope! No meaningful explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only adds a release note describing a previously fixed bug in LND's sweeper logic. It does not change any code, so it cannot introduce or fix a security issue by itself. The described bug relates to fee budgeting for sweeping certain channel outputs, which could in theory affect funds recoverability, but the commit itself is purely documentation.

Lower-prioritysweep: account for aux extra budget when filtering inputsby Jared Tobin · a9e3e9ae · Jul 9, 2026 · 3 filesMessage 73 · AdequateModerate 57Details
Commit message · Jared Tobin

sweep: account for aux extra budget when filtering inputs

The BudgetAggregator filters out inputs whose budget cannot cover the
min relay fee or their requested starting fee rate. For inputs that
carry a resolution blob (custom channel outputs), the aux sweeper
contributes a sizable extra budget to any input set they join, but the
filter only considered the input's own budget, which for asset outputs
is tiny (their value is carried off-chain).

The filter is mostly harmless with default parameters, but the
starting fee rate of an input is ratcheted whenever a sweep attempt
fails, including failures that have nothing to do with fees: e.g. when
a concurrent sweep transaction spends the wallet UTXO that was backing
this input's set (the sweeper currently doesn't lease selected wallet
UTXOs, so concurrent input sets can pick the same one). One such
collision is enough to push the required starting fee above a small
asset input's own budget, after which the input is filtered out of
every future input set and the sweep is silently stranded forever.

Account for the aux extra budget in the filter, mirroring how the
budget input set itself accounts for it when deciding whether wallet
inputs are needed. Inputs without a resolution blob (the only kind
that exists without an aux sweeper) are unaffected.

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

This commit fixes a bug in LND's transaction sweeping logic that could permanently strand certain custom-channel (asset) outputs. The sweeper's budget filter was ignoring extra funds contributed by an optional 'aux sweeper' helper, so it would reject inputs whose own on-chain budget looked too small even though a separate budget pool was available to pay their fees. After a single unrelated sweep failure, the required fee estimate could rise enough that the input was silently dropped forever and never swept. The fix adds the aux contribution to the filter's budget check and falls back safely if the aux helper is temporarily unavailable.

Security candidatebolt12: validate Invoice messagesby bitromortac · e0f04f17 · Jul 9, 2026 · 4 filesMessage 73 · AdequateLow 36Details
Commit message · bitromortac

bolt12: validate Invoice messages

Implement the structural validators for the BOLT 12 invoice, adding
ValidateInvoiceWrite, ValidateInvoiceRead, ValidateInvoiceExpiry, and
ValidateInvoiceAgainstRequest.

The validators implement the spec writer and reader requirements in the
order the spec lists them. The reader confirms the signature TLV is
present but defers actual Schnorr verification until the merkle and
signing primitives land, mirroring the ValidateInvoiceRequestRead
precedent.

73/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
signing boundarydefensive validation
AI analysis · Low 36/100

This commit adds validation checks for BOLT 12 invoices in the LND Lightning node software. It ensures invoices contain required fields (creation time, amount, payment hash, node ID, payment paths), match their originating invoice requests, and aren't expired or malformed before being encoded or accepted. The change is defensive: it rejects invalid invoices rather than letting them propagate, which helps prevent payment failures, confusion, or minor abuse. Signature verification is explicitly left for a future patch, so this is not a complete security fix on its own.

Lower-prioritydocs: add BOLT 12 invoice release notesby bitromortac · 1ed6719b · Jul 9, 2026 · 1 fileMessage 72 · AdequateInformational 15Details
Commit message · bitromortac

docs: add BOLT 12 invoice release notes

Add release notes for the BOLT 12 invoice codec.

72/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides an explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only adds documentation to the release notes. It describes a new BOLT 12 invoice feature that was added in a previous code change, and explicitly notes that signature verification is not yet implemented. There is no code change in this commit, so it does not introduce, fix, or enable any security issue by itself.

Lower-prioritydocs: update release notesby bitromortac · 68bc7691 · Jul 9, 2026 · 1 fileMessage 47 · ThinInformational 15Details
Commit message · bitromortac

docs: update release notes

47/100 · ThinMessage clarity
✓ Descriptive subject✓ Uses a recognizable type or scope! No meaningful explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only adds a release notes document. It does not change any program code. The notes mention that a separate pull request fixed bugs in how LND decodes onion-routed Lightning messages, but this commit itself is purely documentation.

Lower-prioritylnwire: reject onion message payloads with multiple final hop fieldsby bitromortac · 233e3777 · Jul 9, 2026 · 2 filesMessage 83 · StrongModerate 60Details
Commit message · bitromortac

lnwire: reject onion message payloads with multiple final hop fields

BOLT 4 requires the final node to ignore an onion message whose
onionmsg_tlv contains more than one payload field, where payload fields
are the tlv types reserved for the final hop (type 64 and above). Decode
previously accumulated every such field it found, so a payload bundling
invoice_request, invoice, and invoice_error together was accepted.

Reject the payload when more than one final hop field is present. Every
entry collected in FinalHopTLVs is in the final hop range, so its count
is the number of payload fields. The round-trip test for multiple fields
becomes a rejection test, and the property test now draws at most one
payload field.

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

This change tightens how LND handles special 'final hop' data in onion-routed Lightning messages. Previously, a message could bundle several final-hop payload types (such as an invoice request, an invoice, and an invoice error) together and still be accepted. The patch now rejects any onion message that contains more than one such final-hop payload, matching the BOLT 4 specification. This prevents protocol confusion where a single message might be interpreted in conflicting ways.

Lower-prioritylnwire: reject onion message payloads with unknown even typesby bitromortac · 33c510fa · Jul 9, 2026 · 2 filesMessage 85 · StrongModerate 60Details
Commit message · bitromortac

lnwire: reject onion message payloads with unknown even types

BOLT 4 requires the final node to ignore an onion message whose
onionmsg_tlv contains an unknown even type, since even types are
"must understand". The TLV stream decoder does not enforce this on its
own: its parsed-type map collects unknown types of either parity, so an
even type such as 70 would otherwise be accepted as a final hop payload.

Reject any unknown even type during decode, regardless of its range. The
check runs before the final hop range skip so unknown even types below
type 64 are rejected as well.

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

This commit fixes a standards-compliance bug in how LND decodes onion-routed messages in the Lightning Network. The relevant protocol rule (BOLT 4) says that if a message contains an unknown even-numbered data field, the receiver must reject the whole message because even fields are 'must understand.' LND was previously accepting such messages, which could let a peer make LND process or forward malformed/ambiguous onion messages. The patch now rejects any unknown even field during decoding, no matter what numeric range it falls in.

Lower-prioritylnwire: preserve unknown odd zero-length final hop TLVsby bitromortac · bc5cfb5a · Jul 9, 2026 · 2 filesMessage 83 · StrongLow 49Details
Commit message · bitromortac

lnwire: preserve unknown odd zero-length final hop TLVs

When decoding an onion message payload, the loop that forwards
unrecognized final hop TLVs to higher layers skipped any entry with a
zero-length value. DecodeWithParsedTypesP2P marks a recognized type with
a nil map entry but records the raw bytes for an unknown type, and an
unknown odd TLV with an empty value is valid. Keying the skip off a
length check therefore dropped such a TLV instead of passing it through.

Test the recognized-type skip against a nil entry so a valid unknown odd
zero-length TLV is preserved.

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

This commit fixes a small but real bug in how LND decodes onion-routed messages (used in Lightning Network offers and blinded paths). Unknown extra data fields with a valid but empty value were accidentally dropped because the code used a length check to decide what was 'known.' After the fix, it uses a nil check instead, so legitimate empty unknown fields are preserved. The bug could cause a node to silently ignore data another node expected it to forward or process, potentially breaking protocol features that rely on those fields.

Security candidatebolt12: add Invoice struct and TLV codecby bitromortac · efbeef58 · Jul 9, 2026 · 2 filesMessage 73 · AdequateInformational 12Details
Commit message · bitromortac

bolt12: add Invoice struct and TLV codec

Add the BOLT 12 Invoice message: a struct mirroring the invoice_request
fields (types 0-91) plus the invoice-specific fields (types 160-176) and
the signature (type 240), together with its pure-TLV Encode/DecodeInvoice
codec and the UsableFallbackAddresses accessor that applies the spec's
MUST-ignore filter.

Additionally, add the NewInvoiceFromRequest constructor to build an Invoice
from a corresponding request. This copies all non-signature fields from the
request (including unknown signed-range TLVs via the decodedTLVs sidecar)
and mirrors invreq_amount into invoice_amount.

73/100 · AdequateMessage clarity
✓ 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 12/100

This commit adds new code to support BOLT 12 invoices in the LND Lightning node. It introduces a data structure, encoding/decoding logic, and helper functions to filter fallback addresses and blinded payment paths. There is no bug fix or security patch here; it is a feature addition implementing a protocol specification.

Lower-prioritybolt12: add TUint32 and invoice subtypesby bitromortac · e548d62d · Jul 9, 2026 · 3 filesMessage 78 · AdequateInformational 12Details
Commit message · bitromortac

bolt12: add TUint32 and invoice subtypes

Add the truncated uint32 (tu32) TLV type used by invoice_relative_expiry
and the dynamic invoice subtypes BlindedPayInfo and FallbackAddress,
along with their encode/decode helpers and round-trip tests.

These primitives are the building blocks for the BOLT 12 Invoice message
struct that follows. Isolating them keeps that codec commit focused on
the message shape rather than its component records.

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

This commit adds new data-encoding helpers for the BOLT 12 Lightning invoice format, including a truncated uint32 type, blinded payment info records, and fallback address records. It is a pure feature-addition patch with no bug fixes or security patches. The code includes explicit safety limits (caps on list lengths and address sizes) and tests for malformed input rejection. There is no indication this commit fixes a known vulnerability.

Lower-prioritybolt12: inject feature-bit catalogues into Offer and InvoiceRequest validatorsby bitromortac · 732b0413 · Jul 9, 2026 · 2 filesMessage 73 · AdequateLow 44Details
Commit message · bitromortac

bolt12: inject feature-bit catalogues into Offer and InvoiceRequest validators

Inject known feature-bit catalogues into the read-side validators to enable
correct must-understand capability checks, and remove write-side feature
enforcement entirely.

Whether a feature bit is "unknown" is a runtime property of the reading node,
not of the wire format or pure codec.

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

This change updates how the LND code checks feature bits in BOLT 12 offers and invoice requests. Previously, the read-side validator treated every even feature bit as unknown and would reject it, because it had no list of known features. Now the caller passes in a catalogue of known feature bits, so legitimate new features are accepted. The write-side validator is also relaxed: it no longer enforces feature rules when creating messages, because whether a feature is 'unknown' depends on the reader, not the writer. The change is a correctness fix for protocol feature negotiation, not a direct patch for an active exploit.

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.

Security candidateci: split issue dedupe into find and post jobsby Olaoluwa Osuntokun · d1ea8687 · Jul 8, 2026 · 1 fileMessage 80 · StrongInformational 15Details
Commit message · Olaoluwa Osuntokun

ci: split issue dedupe into find and post jobs

In this commit, we give the issue dedupe workflow the same shape: one job
finds the duplicate candidates, another posts the comment. The find job
records the candidate issue numbers to a file, and the post job hands
those numbers to comment-on-duplicates.sh, which already validates each
number and renders the comment from a fixed template.

Keeping detection and posting apart mirrors how the script is already
factored, so the post job ends up a thin wrapper over it. We also drop the
unused id-token permission and turn off checkout credential persistence
while we're in here.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
Why it was queued
defensive validationcredential or privilege statedocumentation-only discount
AI analysis · Informational 15/100

This commit is a hardening and refactoring change to a GitHub Actions workflow that detects duplicate issues. It splits the workflow into two jobs: one that only reads issue data and uses an AI model to find duplicates, and a second that only posts comments. The change reduces the privileges available to the AI step, pins the action to a specific version, disables credential persistence, and adds concurrency controls. There is no indication of a security vulnerability being fixed or introduced; it is a defensive improvement.