LL
← All projectsLightning Labs

LND

Go implementation of a complete Lightning Network node.

BitcoinLightning NetworkNormal
Repository coverage

1687 commits in the local evidence base

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

186security candidates236second-pass queue1372AI analyses
162commits · 30 days
277commits · 60 days
643commits · 180 days
1422commits · 365 days
Backfill bands
Aug 5 → Feb 6405 seen5 candidatesComplete
Feb 6 → Jun 6665 seen28 candidatesComplete
Jun 6 → Jul 689 seen4 candidatesComplete
Jul 6 → Aug 569 seen0 candidatesComplete
Commit communication

Does the history explain itself?

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

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

Who is changing the project?

Public Git author strings; identities are not independently verified.

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

Published AI watches

Last scanned 48 minutes ago

Low 43 AI analysisMessage 73 · Adequate
LL Lightning LabsLND BitcoinLightning Network

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

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

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

Merge pull request #10708 from jtobin/alias-perms

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

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

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

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

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

docs: describe invoice collection finality

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

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

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

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

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

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

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

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

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

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

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

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

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

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

invoices: require complete payment collection

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

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

lnwallet: reject a zero CSV delay

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

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

lnwallet+chanstate: keep persisted HTLC data readable

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

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

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

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

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

invoices: reject settled AMP set shards

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

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

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

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

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

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

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

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

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

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

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

invoices: fix test whitespace

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

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

build: pin the new lint job actions by commit

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

CI/CD supply-chain hardeningthird-party action pinning by commit hashprevention of tag-movement attacks
2a9f137dby Olaoluwa Osuntokun+4−21 file
Vendor flagged security relevance
Informational 15 AI analysisMessage 92 · Strong
LL Lightning LabsLND BitcoinLightning Network

build: fix the custom linter cache wiring for CI

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

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

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

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

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

Explore captured commits

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

AI review queuedmulti: make RemoteNextRevocation an fn.Optionby Olaoluwa Osuntokun · 4bdb3320 · Sep 23, 2026 · 18 filesMessage 78 · AdequateLow 32Details
Commit message · Olaoluwa Osuntokun

multi: make RemoteNextRevocation an fn.Option

In this commit, we change OpenChannel.RemoteNextRevocation and
ChannelCloseSummary.RemoteNextRevocation from a bare *btcec.PublicKey to
an fn.Option[btcec.PublicKey], and have
LightningChannel.RemoteNextRevocation return one as well. The remote
party's next revocation point is legitimately absent until they send
channel_ready (and, for taproot channels, until we have their nonces),
so the type should say so rather than leaving it to convention.

With an Option, code can no longer move the point into a field that
assumes it's always set without first deciding what to do when it's
absent. Every place that needs the point now has to unwrap it: the
revocation rotation, restoring a pending remote commitment, the anchor
resolution and chain watcher paths for a pending remote commitment, and
a retransmitted channel_ready in the peer. Each returns the new
ErrNoNextRevocation if it's missing. The presence checks in the funding
manager, link and peer become IsSome/IsNone.

We hold the key by value rather than by pointer, so a present point is
always a real key: there's no Some(nil) to fall into. In the same
spirit, InsertNextRevocation and InitNextRevocation now take the key by
value, which moves the only pointer dereference to the funding manager,
where the point comes straight off a decoded channel_ready message.

The on-disk format is unchanged. The revocation state still omits the
point when it's absent, and the close summary still writes a presence
flag ahead of it. The frozen migration packages keep their own copies of
these types, so they're untouched.

We add a round trip test for a channel with no next point, and for
close summaries with and without one. The peer test for a retransmitted
channel_ready previously passed a channel with no next point and
inserted an empty value. It now asserts that case is rejected, and that
a real point makes it into the peer's copy of the channel.

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

This commit is a defensive code-quality change in LND that makes the 'remote next revocation point' an explicit optional value instead of a bare pointer that could be nil. It forces every piece of code that needs the point to check whether it is actually present before using it, and returns a clear error (ErrNoNextRevocation) when it is missing. The on-disk database format is unchanged, and new tests are added for channels and close summaries that lack the point. The change reduces the risk of accidental nil-pointer use or logic bugs around channels that have not yet received channel_ready, but it is not a fix for a known active exploit.

AI review queuedlnwallet: refine revocation validation orderby Olaoluwa Osuntokun · 9e9388ef · Sep 23, 2026 · 2 filesMessage 78 · AdequateModerate 59Details
Commit message · Olaoluwa Osuntokun

lnwallet: refine revocation validation order

In this commit, we refine revocation processing and extend its transition
coverage. The state-transition and key checks now run before their
corresponding revocation bookkeeping updates.

The tests cover the rejected cases for tweakless and taproot channels,
verify that their revocation bookkeeping stays unchanged, and confirm that
the next valid transition succeeds.

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

This change tightens the order of checks when LND processes a revocation message from the other party in a Lightning channel. Previously, the code could add a secret to its revocation store before confirming the revocation was actually expected and matched the right commitment point. Now it checks those conditions first, so a malformed or unexpected revocation cannot partially update local state. The patch is defensive hardening rather than a clear fix for an active exploit.

Lower-prioritybuild: tidy modules after driver updatesby ziggie · 66f6b98c · Sep 23, 2026 · 6 filesMessage 57 · ThinTriage 0Details
Commit message · ziggie

build: tidy modules after driver updates

57/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
Lower-prioritybuild: bump pgx to v5.11.0by ziggie · e29ee951 · Sep 23, 2026 · 8 filesMessage 57 · ThinTriage 0Details
Commit message · ziggie

build: bump pgx to v5.11.0

57/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
Lower-prioritybuild: bump modernc sqlite to v1.59.0by ziggie · 5da47f4d · Sep 23, 2026 · 8 filesMessage 57 · ThinTriage 0Details
Commit message · ziggie

build: bump modernc sqlite to v1.59.0

57/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
AI review queuedMerge pull request #11223 from gijswijs/legacy-dust-retribution-fixby ziggieXXX · 500ca51f · Sep 23, 2026 · 6 filesMessage 73 · AdequateModerate 56Details
Commit message · ziggieXXX

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

lnwallet+contractcourt: skip trimmed HTLCs in legacy breach retribution

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Moderate 56/100

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 crash or behave incorrectly when trying to claim funds back. The fix removes those blank entries and adds safety checks further down the line.

Lower-priorityMerge pull request #11239 from ziggie1984/docs-10520-v0205-release-notesby Yong · 4e8769f6 · Sep 23, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Yong

Merge pull request #11239 from ziggie1984/docs-10520-v0205-release-notes

docs: sync v0.20.5 routerrpc release notes

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
Why it was queued
documentation-only discountmerge-commit duplicate discount
Lower-prioritycontractcourt: resolve known-preimage commitment differencesby ziggie · dd0c09d8 · Sep 23, 2026 · 4 filesMessage 73 · AdequateTriage 0Details
Commit message · ziggie

contractcourt: resolve known-preimage commitment differences

Extend commitment-difference classification to distinguish outgoing
HTLCs whose preimages are available. A forwarded HTLC learns its
preimage from the downstream peer, which the link records in the
witness beacon before accepting the commitment that removes the HTLC,
so classification and settlement consult that source alone. This
matches the source the incoming contest resolver uses for forwarded
HTLCs on chain.

Publish their terminal result through the existing resolution-message
path, keeping commitment-difference handling consistent with other
resolved HTLC states.

The sites that classify incoming HTLCs keep the registry fallback, so an
incoming HTLC paying one of our invoices still takes us to chain and
sets the sweep deadline.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritydocs: sync v0.20.5 routerrpc release notesby ziggie · e6073314 · Sep 23, 2026 · 1 fileMessage 57 · ThinTriage 0Details
Commit message · ziggie

docs: sync v0.20.5 routerrpc release notes

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 review queuedMerge pull request #11190 from Roasbeef/zpay32-reject-duplicate-payment-hashesby Yong · 86306f89 · Sep 23, 2026 · 6 filesMessage 73 · AdequateModerate 62Details
Commit message · Yong

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

zpay32: reject duplicate payment hash fields

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
Why it was queued
parser or protocol pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Moderate 62/100

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 release notes frame this as an interoperability improvement rather than a security fix, but the behavior removes a potential source of confusion or invoice manipulation where a second, different payment hash could be present but ignored.

AI review queuedzpay32: reject duplicate payment hash fieldsby Olaoluwa Osuntokun · e2f27063 · Sep 23, 2026 · 6 filesMessage 98 · StrongModerate 62Details
Commit message · Olaoluwa Osuntokun

zpay32: reject duplicate payment hash fields

In this commit, we reject BOLT 11 invoices that contain more than one
payment hash (`p`) field. `zpay32.Decode` previously kept the first
supported payment hash and ignored later fields, so the interpreted
payment hash depended on field order.

The decoder now tracks whether a `p` field has appeared separately from
whether its contents parsed successfully, and any later `p` field returns
`ErrDuplicatePaymentHash`. This covers identical hashes, distinct hashes,
and a malformed first field followed by a valid one. The change is
deliberately stricter than the current BOLT 11 text, which tells a reader
to use the first `p` field; it is motivated by lightning/bolts#1357, and
will be backported to the v0.20.5 and v0.21.4 releases.

We also replace the stale comment above parse32Bytes, which quoted the
old BOLT 11 rule that a reader must skip over 32-byte fields with an
unsupported length. The current reader requirements say the opposite: a
reader must fail the payment if a fixed-length field (p, h, s, n) does
not have the correct length. The new comment states that reporting the
field as absent is a known divergence, and explains why the end result
for the payment hash is the same either way.

In the tests, we cover identical and distinct duplicate hashes, a
malformed first field followed by a valid one, and the signed vectors. A
valid variant of the flipped vector keeps the wrong-length h and n
fields, so the coverage that such fields are skipped survives. The
duplicate vector in the decode table pins ErrDuplicatePaymentHash
through a new wantErr field rather than asserting any decode error.

98/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
parser or protocol pathsecond-pass: security-sensitive path
AI analysis · Moderate 62/100

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 prevents an attacker from potentially tricking a wallet into interpreting a different payment hash than intended, which could lead to payments being sent to the wrong destination or failing in unexpected ways. The fix is being backported to two release branches.

Lower-priorityMerge pull request #11173 from Roasbeef/gossip-sync-failoverby ziggieXXX · 2eac3317 · Sep 22, 2026 · 5 filesMessage 73 · AdequateTriage 0Details
Commit message · ziggieXXX

Merge pull request #11173 from Roasbeef/gossip-sync-failover

discovery: rotate failed historical syncers

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discount
Lower-priorityMerge pull request #11161 from ziggie1984/invoice-lookup-cleanupby Yong · 55a3acb0 · Sep 22, 2026 · 15 filesMessage 73 · AdequateTriage 0Details
Commit message · Yong

Merge pull request #11161 from ziggie1984/invoice-lookup-cleanup

invoices: contain modifier errors and bypass interception for replays

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discount
Lower-prioritylnrpc: document that the legacy commitment type is rejected on inputby ziggie · 9b634bfd · Sep 22, 2026 · 3 filesMessage 73 · AdequateTriage 0Details
Commit message · ziggie

lnrpc: document that the legacy commitment type is rejected on input

In this commit, we document the restriction on the API itself, so callers
can discover it without reading the release notes. The LEGACY enum value
notes that it is only ever reported for channels that already exist, and the
commitment_type fields of OpenChannelRequest and BatchOpenChannel note that
it is turned down as an input.

Worth spelling out on those fields that an empty channel type on the wire
asks for the legacy type as well, so there is no way to request it at all.

The generated code carries no change beyond the comments.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritydocs: note forwarding response recoveryby ziggie · 413b02cd · Sep 22, 2026 · 2 filesMessage 72 · AdequateTriage 0Details
Commit message · ziggie

docs: note forwarding response recovery

Document forwarding response recovery across channel cleanup and node
restart in the v0.20.5 and v0.21.4 release notes.

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
Lower-prioritychanneldb: preserve responses during channel cleanupby ziggie · b17f70d7 · Sep 22, 2026 · 2 filesMessage 73 · AdequateTriage 0Details
Commit message · ziggie

channeldb: preserve responses during channel cleanup

Integrate the circuit-keyed forwarding response store with both channel
cleanup strategies.

Select eligible settle and fail messages before applying the forwarding
package lifecycle transition. The synchronous path updates both stores
in one transaction, while the tombstone path applies the same response
persistence rule with its existing package behavior.

This makes response state consistent across the supported database
cleanup strategies.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityhtlcswitch: retain circuits with pending responsesby ziggie · 94c598a0 · Sep 22, 2026 · 9 filesMessage 85 · StrongTriage 8Details
Commit message · ziggie

htlcswitch: retain circuits with pending responses

Extend the circuit cleanup retention predicate to include persisted
forwarding responses alongside contract-court resolution messages.

A clean store miss permits normal cleanup. Any other lookup error
preserves the current circuit state until the response state can be
determined.

Validate the new callbacks when constructing the switch because startup
uses them unconditionally.

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
defensive validation
Lower-priorityhtlcswitch: restore persisted forwarding responsesby ziggie · a8c17eed · Sep 22, 2026 · 4 filesMessage 85 · StrongTriage 0Details
Commit message · ziggie

htlcswitch: restore persisted forwarding responses

Load persisted forwarding responses during switch startup and send them
through the existing packet path.

Process these records before contract-court resolutions so the original
wire message takes precedence when both sources refer to one circuit.
The replayed packet has no destination reference because package
acknowledgement is handled by the persistence transition.

Prune records without an open circuit and propagate storage or decoding
errors. The store is not populated until the channel cleanup integration
lands in a later commit.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Lower-prioritychanneldb: add forwarding response storeby ziggie · e2e84bac · Sep 22, 2026 · 3 filesMessage 68 · AdequateTriage 0Details
Commit message · ziggie

channeldb: add forwarding response store

Add a top-level store for forwarding settle and fail messages indexed by
outgoing circuit key. This aligns response lookup with the
circuit-oriented model already used for contract-court resolution
messages.

Keep each response in its original wire encoding so replay preserves
failure reasons, custom records and other message details.

This commit establishes the storage schema and access methods. Later
commits connect the store to switch startup and channel cleanup.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Security candidateMerge pull request #11132 from yyforyongyu/task-11129-pongby Olaoluwa Osuntokun · d3d1f1d0 · Sep 22, 2026 · 5 filesMessage 58 · ThinModerate 53Details
Commit message · Olaoluwa Osuntokun

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

peer: answer every valid ping

58/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
Why it was queued
authentication pathmerge-commit duplicate discount
AI analysis · Moderate 53/100

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 think the connection is dead. Now LND replies to every valid ping, while still disconnecting peers that flood too many pings. The cost of a reply is counted against a single flood budget based on how large the reply would be.

Lower-prioritydocs: add 0.20.5 release notes for the legacy commitment typeby ziggie · 76c18acb · Sep 21, 2026 · 1 fileMessage 85 · StrongTriage 0Details
Commit message · ziggie

docs: add 0.20.5 release notes for the legacy commitment type

In this commit, we spell out that existing legacy channels are not affected
and can still be operated and closed, since that is the question an operator
reading these notes will have. Only opening new ones is refused.

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
Lower-prioritydocs: add 0.21.4 release notes for the legacy commitment typeby ziggie · a5556e05 · Sep 21, 2026 · 1 fileMessage 97 · StrongTriage 0Details
Commit message · ziggie

docs: add 0.21.4 release notes for the legacy commitment type

In this commit, we add the same entries as the 0.20.5 notes, kept in a commit
of their own so that each backport carries only the release notes of the
branch it lands on.

97/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
documentation-only discount
Lower-priorityfunding: never open a legacy channelby ziggie · 6ea22314 · Sep 21, 2026 · 3 filesMessage 90 · StrongTriage 0Details
Commit message · ziggie

funding: never open a legacy channel

In this commit, we stop opening and accepting new channels using the legacy
commitment type, which was removed from the spec in 2024. Its tweaked
to_remote output is why funds in such a channel cannot be recovered
unilaterally after data loss. Channels that already use it are untouched:
they keep working and can be operated, force closed and cooperatively closed
exactly as before.

An empty channel_type asks for precisely this type, and that branch performed
no feature check whatsoever, since the type predates feature bits entirely.
Any peer could obtain a legacy channel from us no matter what either side
signalled, which is what TestFundingManagerRejectLegacyChanType now covers.

Implicit negotiation keeps falling back to the static remote key type, and
only fails once there is nothing left below it.

The funding manager's own test nodes signalled no features at all, which
means they were negotiating legacy channels among themselves. They now
default to static remote key.

90/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Lower-priorityrpcserver: reject the legacy commitment type in OpenChannelby ziggie · a0374796 · Sep 21, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · ziggie

rpcserver: reject the legacy commitment type in OpenChannel

In this commit, we turn down a request for the legacy commitment type before
we touch the wallet or the peer, so the caller gets a clear error instead of
one from deep inside the funding flow.

The LEGACY enum value itself has to stay: CommitmentType is also the
reporting type for ListChannels, ClosedChannels, PendingChannels and the
channel acceptor, and channels we already have still report it.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI review queueditest: stop creating legacy channelsby ziggie · 03d8b09d · Sep 21, 2026 · 5 filesMessage 90 · StrongLow 33Details
Commit message · ziggie

itest: stop creating legacy channels

In this commit, we move the two tests that still opened legacy channels over
to static remote key. Both produce the same commitment shape and the same
fees, so no assertion moves.

The watchtower case opted into legacy deliberately. The remote signer one did
not: neither of its nodes runs with committweak, so both support static
remote key, and the channel only came out legacy because an empty
channel_type was accepted without any check. That is the bug this PR fixes,
sitting in our own suite.

The legacy node arguments and the unreferenced CfgLegacy go away with them,
since committweak no longer does anything.

90/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Low 33/100

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: previously, an empty channel_type was accepted without checking whether the nodes actually supported the legacy format, which could cause a channel to open in an unintended, deprecated commitment shape. The diff itself only changes tests and removes unused legacy-node configuration flags; it does not contain the actual production-code fix.