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 queueditest: add SubmitPackage integration testby Elle Mouton · 47661cea · Jun 30, 2026 · 3 filesMessage 78 · AdequateInformational 15Details
Commit message · Elle Mouton

itest: add SubmitPackage integration test

Add an integration test that exercises WalletKit.SubmitPackage: it builds
a zero-fee v3 (TRUC) parent that a standalone broadcast would reject,
pairs it with a fee-paying v3 CPFP child, and asserts the package is
accepted. A zero-fee transaction can only enter the mempool via package
evaluation, so this proves the CPFP package path end to end.

submitpackage is a bitcoind RPC, so the test skips on the btcd and
neutrino backends. Also adds the SubmitPackage wrapper to the
integration-test RPC harness.

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

This commit only adds a new integration test for an existing LND WalletKit RPC called SubmitPackage. It does not change production code, wallet logic, or network behavior. The test verifies that a zero-fee Bitcoin transaction can be accepted into the mempool when bundled with a fee-paying child transaction (a standard Bitcoin package-relay scenario). There is no security fix, vulnerability, or user-facing change here.

Lower-prioritydocs: add release note for WalletKit.SubmitPackageby Elle Mouton · 68c47407 · Jun 30, 2026 · 1 fileMessage 77 · AdequateInformational 15Details
Commit message · Elle Mouton

docs: add release note for WalletKit.SubmitPackage

Document the new WalletKit.SubmitPackage RPC and the lncli wallet
submitpackage command in the 0.22.0 release notes.

77/100 · AdequateMessage clarity
✓ Specific, 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 describing a new RPC command and lncli command that were already added in a previous pull request. It does not change any code, behavior, or security properties of the software.

Lower-prioritydocs: update release notesby bitromortac · e9a2cb43 · Jun 30, 2026 · 1 fileMessage 70 · AdequateInformational 15Details
Commit message · bitromortac

docs: update release notes

Add a BOLT 12 release note for the invoice_request codec, completing the
offer/invoice_request entries for the bolt12 package in 0.22.0.

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only edits the release notes document. It adds a description of a previously merged BOLT 12 invoice request codec feature and mentions a minor RPC behavior change where a nil reply path stays nil instead of appearing as an empty struct. There is no code change in this commit, so it does not by itself introduce or fix any security issue.

Security candidatebolt12: validate InvoiceRequest per BOLT 12 reader/writer requirementsby bitromortac · 8b4587b0 · Jun 30, 2026 · 3 filesMessage 88 · StrongLow 49Details
Commit message · bitromortac

bolt12: validate InvoiceRequest per BOLT 12 reader/writer requirements

ValidateInvoiceRequestRead and ValidateInvoiceRequestWrite enforce the
structural BOLT 12 requirements an invoice request can be checked
against on its own. The reader validates incoming requests. The writer
catches out-of-range types in decoded-then-mutated requests before they
leave the local boundary. Type 240 carries the signature and sits
outside the allowed range by spec design. Both validators skip it
during the range scan.

Two reader MUSTs are deferred. Schnorr signature verification against
the merkle root keyed by invreq_payer_id lands with the Invoice
message, where the merkle and signing primitives are shared. Offer
cross-validation requires an Offer reference the structural validator
does not carry, and lands in the bolt12handler layer where both the
request and the stored Offer are in scope.

88/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
signing boundarydefensive validation
AI analysis · Low 49/100

This commit adds validation checks for BOLT 12 invoice requests in the LND Lightning node. It ensures that invoice requests follow protocol rules when being created (written) and received (read), rejecting malformed or non-compliant requests before they are encoded or processed. The change is defensive: it prevents invalid invoice requests from leaving the node or being accepted from peers, which could otherwise lead to payment confusion, incorrect amounts, or protocol incompatibility. Signature verification and full offer cross-checking are intentionally left for future commits.

Lower-prioritybolt12: add ErrNilPublicKey and type the offer_issuer_id guardby bitromortac · 338e4bda · Jun 30, 2026 · 2 filesMessage 73 · AdequateLow 37Details
Commit message · bitromortac

bolt12: add ErrNilPublicKey and type the offer_issuer_id guard

The offer writer rejected a present-but-nil offer_issuer_id with an
ad-hoc error. Introduce a typed ErrNilPublicKey sentinel and use it here
so the rejection is recoverable by callers and reusable by the
invoice_request writer, which guards the same hazard for its own pubkey
fields.

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

This commit hardens LND's BOLT 12 offer handling by replacing a one-off panic-prevention check with a reusable, typed error. A malformed offer where a public-key field is technically 'present' but actually contains a nil pointer would previously crash during encoding; now it is cleanly rejected with a detectable error. The change is defensive and improves code quality, but it does not appear to fix an actively exploitable remote crash on its own because the nil path was already guarded on the write path and is now also guarded on the read path.

Lower-prioritybolt12: add NewInvoiceRequestFromOfferby bitromortac · c419ba56 · Jun 30, 2026 · 2 filesMessage 50 · ThinLow 26Details
Commit message · bitromortac

bolt12: add NewInvoiceRequestFromOffer

This ensures we copy all fields when replying to an offer.

50/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides an explanatory body
AI analysis · Low 26/100

This commit adds a new helper function in LND's BOLT 12 implementation to build invoice requests from offers. It ensures all fields from an offer—including unknown future fields—are copied into the invoice request. The change is primarily a correctness/spec-compliance improvement and does not appear to fix an active security vulnerability. However, failing to copy all fields could previously have caused invoice requests to omit required offer data, potentially leading to payment failures or protocol non-compliance.

Lower-priorityscripts/keys: add pub key for gijswijsby Gijs van Dam · 74102ae6 · Jun 29, 2026 · 2 filesMessage 45 · ThinInformational 15Details
Commit message · Gijs van Dam

scripts/keys: add pub key for gijswijs

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

This commit simply adds a new PGP public key for a person named 'gijswijs' to the list of keys used by LND's release verification script. It does not change any code that handles money, network connections, or cryptography beyond registering one more trusted signing key. There is no security vulnerability here.

Lower-prioritymod: use tagged tlv and tor modulesby yyforyongyu · 0b30a4fa · Jun 26, 2026 · 2 filesMessage 45 · ThinInformational 15Details
Commit message · yyforyongyu

mod: use tagged tlv and tor modules

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

This commit is a routine dependency housekeeping change. It switches two internal Go modules (tlv and tor) from using local source code replacements to using published tagged versions. There is no code change in this repository and no security relevance stated by the project.

Lower-prioritydocs: add v0.21.1 release noteby ziggie · 9c5f32a2 · Jun 26, 2026 · 1 fileMessage 57 · ThinInformational 15Details
Commit message · ziggie

docs: add v0.21.1 release note

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 release note describing a bug fix that was already merged in a previous pull request. The actual code change happened elsewhere, so this commit itself does not introduce, fix, or alter any executable software. It is purely documentation.

Lower-prioritywitnessbeacon: avoid interceptor deadlockby ziggie · 98da7b4a · Jun 26, 2026 · 3 filesMessage 58 · ThinModerate 57Details
Commit message · ziggie

witnessbeacon: avoid interceptor deadlock

Release the preimage beacon lock before invoking the on-chain
interceptor. The interceptor path can block on the htlcswitch event
loop, while resolution of another held on-chain HTLC can call back
into the beacon to add a preimage.

If interceptor delivery fails after the subscriber was registered,
cancel the subscription before returning the error.

On-chain held entries are replay handles for the interceptor while
contractcourt waits for a preimage or on-chain expiry. Once the resolver
tears down, keeping the handle until the refund timeout can replay a stale
HTLC to a reconnecting interceptor.

Thread a dedicated cleanup signal from the witness subscription cancel path
back through the interceptable switch event loop. The held set only removes
on-chain entries for that signal, leaving off-chain entries under the link
flow lifecycle.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Moderate 57/100

This patch fixes a deadlock and a stale-data replay problem in LND's 'witness beacon,' the component that notifies external interceptors about HTLCs that might need a preimage. The deadlock occurred because a lock was held while calling into another subsystem that could call back into the same locked code. The stale-replay problem occurred because on-chain HTLC handles were not cleaned up when a subscription was canceled, so a reconnecting interceptor could be replayed an old, already-resolved HTLC. The patch also cancels the subscription if interceptor delivery fails. These are reliability/availability issues with a plausible, though not directly demonstrated, security angle: a stuck node or replayed HTLC could be abused in a Lightning payment-channel attack.

Lower-priorityrouterrpc: add clarifying docs for the intercepted forwardby ziggie · 8909c2fb · Jun 26, 2026 · 3 filesMessage 65 · AdequateInformational 15Details
Commit message · ziggie

routerrpc: add clarifying docs for the intercepted forward

routerrpc: document on-chain interceptor responses

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit only adds documentation comments to the router RPC API. It explains that HTLC interception requests may be replayed after reconnect and clarifies what happens when an HTLC moves on-chain. No code behavior was changed.

Lower-priorityhtlcswitch: track held HTLC sourceby ziggie · eb1193f8 · Jun 26, 2026 · 7 filesMessage 90 · StrongModerate 59Details
Commit message · ziggie

htlcswitch: track held HTLC source

Store held forwards as off-chain or on-chain entries instead of a raw
InterceptedForward map. Off-chain entries keep the existing resume, fail,
settle and auto-fail behavior. On-chain entries are settle-only and
expire by pruning local interceptor state.

When contractcourt re-offers a circuit that is already held off-chain,
replace the stored entry with the on-chain forward so a later SETTLE
reaches the witness beacon instead of the old link mailbox path.

Also set the on-chain interceptor deadline to the HTLC refund timeout.
This keeps the public interceptor deadline populated while ensuring only
off-chain held entries use that value to fail back.

Only off-chain held HTLCs can be released when an optional interceptor
disconnects, because they can resume into the link forwarding flow.

On-chain held HTLCs have no link flow to resume. Keep them in the held
set so a reconnecting interceptor can replay and settle them while
contractcourt waits for the preimage or on-chain expiry.

Use distinct internal deadline types for off-chain auto-fail heights and
on-chain settlement deadlines instead of overloading the intercepted packet
field.

Project both variants back into the existing router RPC auto_fail_height
field to preserve wire compatibility. Reject mismatched held HTLC deadline
types in tests.

On-chain intercepted HTLCs can only be settled. Resume and fail actions
already return concrete errors through the on-chain intercepted forward, so
let those errors propagate to the interceptor client instead of converting
them to success.

Keep the held entry tracked on these errors so the client can reconnect and
settle the HTLC later.

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
AI analysis · Moderate 59/100

This commit rewrites how LND tracks HTLCs that are paused by an external interceptor, distinguishing between normal off-chain forwards and ones that have moved to on-chain contract resolution. It fixes a likely bug where a previously off-chain held HTLC, once forced on-chain, could still be settled through the old link path instead of the on-chain witness beacon, and it prevents on-chain HTLCs from being incorrectly auto-failed or released on interceptor disconnect. The change is defensive and correctness-oriented rather than a clear remote-exploitable vulnerability.

Lower-priorityitest: cover on-chain interceptor settlementby ziggie · 9b31ba83 · Jun 26, 2026 · 2 filesMessage 78 · AdequateModerate 57Details
Commit message · ziggie

itest: cover on-chain interceptor settlement

Add coverage for held forwards that move on chain after the
incoming channel force closes.

The restart case exercises the path where Bob loses the in-memory
held set and contractcourt re-offers the HTLC through the witness
beacon. The no-restart case keeps the original off-chain hold and
proves that settlement must still reach the on-chain resolver.

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

This commit adds new integration tests for the Lightning Network Daemon (LND). The tests check what happens when a payment is deliberately held by an external interceptor and the underlying channel is force-closed on-chain. The commit message and comments describe two related bug paths: after a restart, an on-chain held HTLC could be accidentally dropped when a new block is mined because it lacked an auto-fail height; and without a restart, an old off-chain held entry could block settlement from reaching the on-chain resolver. The commit itself only adds tests, not fixes, so it documents and reproduces the issue rather than changing production code.

Security candidatebolt12: add InvoiceRequest message struct and TLV codecby bitromortac · 6bb9c7e8 · Jun 26, 2026 · 2 filesMessage 78 · AdequateInformational 12Details
Commit message · bitromortac

bolt12: add InvoiceRequest message struct and TLV codec

The InvoiceRequest is the BOLT 12 message that links a payer to an
offer: it mirrors the offer's fields so the issuer can stay stateless,
and adds the payer-specific fields and Schnorr signature that prove the
request.

It implements lnwire.PureTLVMessage so it round-trips through the shared
TLV codec.

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

This commit adds a new data structure and serialization code for BOLT 12 invoice requests in the LND Lightning node. It is purely an implementation of a protocol message format and includes a round-trip test. There is no indication in the commit that it fixes a security bug or introduces a vulnerability.

Security candidategithub: bump gateway code-review to v0.4.4 (#10926)by Suheb · 5e1e827f · Jun 26, 2026 · 1 fileMessage 81 · StrongInformational 21Details
Commit message · Suheb

github: bump gateway code-review to v0.4.4 (#10926)

Bump the gateway-action pin to v0.4.4 (abe7cf8) and the runtime_ref to
gateway v0.4.4 (20675fc), and drop the hardcoded installation_id. As of
v0.4.4 the runtime resolves the App installation covering this repo from
app_id/private_key, so a static (and easily wrong-org) id is no longer
needed.

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
access controldocumentation-only discount
AI analysis · Informational 21/100

This commit updates a GitHub Actions workflow that runs an automated code-review bot called 'gateway'. It bumps the bot's version from v0.4.3 to v0.4.4 and removes a hardcoded numeric 'installation_id'. The new version figures out the correct installation ID automatically from the app's credentials. The change is a routine dependency/maintenance update for a CI/CD automation tool, not a fix for a known vulnerability in the LND software itself.

Lower-priorityhtlcswitch: fix outgoing cltv spellingby ziggie · 4518bc72 · Jun 25, 2026 · 14 filesMessage 68 · AdequateInformational 15Details
Commit message · ziggie

htlcswitch: fix outgoing cltv spelling

Rename the ForwardingInfo.OutgoingCTLV field to OutgoingCLTV and update all
call sites. This keeps the exported field spelling consistent with the CLTV
terminology used elsewhere.

Also fix the remaining CTLV typos in nearby comments.

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

This commit is a simple spelling cleanup. It renames a field called 'OutgoingCTLV' to the correctly spelled 'OutgoingCLTV' throughout the codebase and fixes related typos in comments. CLTV stands for 'CheckLockTimeVerify,' a Bitcoin time-lock feature. There is no functional change to how the software behaves.

Lower-prioritydocs: update release notesby ziggie · bffae65a · Jun 25, 2026 · 1 fileMessage 47 · ThinInformational 15Details
Commit message · ziggie

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 edits the release notes document. It describes a previously merged code change that tightens validation of time-lock settings for Lightning payments, but the commit itself contains no code changes and therefore does not alter software behavior or fix a bug directly.

Lower-prioritycontractcourt: align final htlc handling in contest resolverby ziggie · 03ca45a2 · Jun 25, 2026 · 6 filesMessage 73 · AdequateModerate 59Details
Commit message · ziggie

contractcourt: align final htlc handling in contest resolver

Mirror the link's final-hop HTLC checks in the incoming contest resolver so
the off-chain link path and on-chain resolver use the same final-hop handling.

Use MaxFinalCltvDelta directly in contractcourt to match invoice creation and
link processing.

Preserve the link's custom HTLC behavior by leaving amount checks to auxiliary
traffic shapers when custom HTLC handling applies.

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

This change fixes a mismatch between how Lightning Network payment checks are done while a payment is still flowing through the network versus when the channel is forced on-chain. Previously, the on-chain resolver could settle an exit-hop HTLC even if its amount or expiry did not match the invoice's final-hop rules, because it only checked the preimage. Now the on-chain resolver applies the same final-hop validation as the regular link path, and refuses to settle invalid final HTLCs. A special hook is preserved for custom/auxiliary HTLCs so they can still use their own amount validation.

Lower-priorityconfig: check cltv expiry policy rangeby ziggie · b8e861fe · Jun 25, 2026 · 3 filesMessage 68 · AdequateLow 44Details
Commit message · ziggie

config: check cltv expiry policy range

Check configured and advertised forwarding CLTV deltas against max-cltv-expiry
so local configuration and advertised channel policy stay within the same
supported range.

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

This commit adds validation checks to make sure a Lightning node's configured CLTV expiry limits and advertised channel policies stay within the same supported range. Previously, a node operator could configure settings that were internally inconsistent or advertise forwarding delays that the node was not actually willing to accept, which could lead to payment routing failures or unexpected channel behavior. The change prevents misconfiguration rather than fixing an active exploit.

Lower-priorityhtlcswitch+invoices: align final-hop CLTV handlingby ziggie · c5992d38 · Jun 25, 2026 · 8 filesMessage 73 · AdequateModerate 64Details
Commit message · ziggie

htlcswitch+invoices: align final-hop CLTV handling

Apply the same supported CLTV delta range to final-hop HTLC handling that is
already used for forwarding.

Use a shared helper for the exit-hop link path so final-hop amount and CLTV
checks remain consistent across invoice creation and HTLC handling.

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

This commit tightens the checks that Lightning nodes perform when they are the final recipient of a payment. It makes sure the payment's time-lock expiry is not unreasonably far in the future, matching the same limit already used when forwarding payments. It also moves the final-hop amount and time-lock checks into a shared helper so invoice creation and HTLC handling stay consistent. The change is defensive and reduces the risk of abuse involving very long-dated payment locks, but the commit message does not frame it as a security fix and no CVE or advisory is referenced.

AI review queueddocs: add release note for DNS fallback SRV lookup panic fix 0.21.1by Erick Cestari · 1ab34c4e · Jun 24, 2026 · 1 fileMessage 62 · AdequateModerate 58Details
Commit message · Erick Cestari

docs: add release note for DNS fallback SRV lookup panic fix 0.21.1

62/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
Why it was queued
documentation-only discountsecond-pass: broader security terminology
AI analysis · Moderate 58/100

This commit is just a documentation update adding a release note for a previously fixed bug. The actual bug was a crash (panic) in LND's DNS fallback code: when looking up network routing information, the program assumed every answer from a DNS server would be a specific record type (SRV). If a DNS server returned a different kind of record, the program would crash. The fix also handled an empty lookup result safely. This release note describes that earlier code fix; the commit itself does not change any program code.

AI review queueddocs: remove release note for DNS fallback panic of 0.22.0by Erick Cestari · 48ba0edf · Jun 24, 2026 · 1 fileMessage 62 · AdequateInformational 15Details
Commit message · Erick Cestari

docs: remove release note for DNS fallback panic of 0.22.0

62/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
Why it was queued
documentation-only discountsecond-pass: broader security terminology
AI analysis · Informational 15/100

This commit only removes a sentence from the release notes document for version 0.22.0. It does not change any program code, so it cannot by itself introduce, fix, or alter a security vulnerability. The deleted text described a previously documented bug fix (a daemon crash caused by mishandling DNS records), but the actual code change was made elsewhere and is not present in this commit.

AI review queuedmulti: fix lint findings from btcd v2 migrationby Elle Mouton · 39124289 · Jun 24, 2026 · 4 filesMessage 78 · AdequateInformational 20Details
Commit message · Elle Mouton

multi: fix lint findings from btcd v2 migration

The btcd v2 module migration re-touched several lines that the line-length
linter then flagged, and left one error return unchecked. Wrap the
over-length lines in input/test_utils.go and zpay32 (the address-decode
helpers and test fixtures whose btcutil->address rename lengthened them),
and check the LoadTxFilter error return in routing/chainview/btcd.go.

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

This commit is mostly a cleanup patch: it wraps long lines caused by a recent library rename and, importantly, adds a missing error check around a call that loads a Bitcoin transaction filter. The error check prevents a silent failure where the node might continue without realizing its filter was not updated, which could affect routing/chain monitoring. There is no direct evidence this is exploitable as a security vulnerability.

Security candidatemulti: upgrade to btcd v2 modulesby Oli · 8047149c · Jun 24, 2026 · 605 filesMessage 88 · StrongLow 32Details
Commit message · Oli

multi: upgrade to btcd v2 modules

Migrate all btcd dependencies to the new per-package v2 modules (wire/v2,
txscript/v2, chaincfg/v2, chainhash/v2, btcutil/v2, psbt/v2, btcec/v2)
introduced by btcd v0.26.0, and pin the tagged ecosystem versions:
btcwallet v0.17.0, neutrino v0.18.0 and lightning-onion v1.4.0.

The bulk of the import rewrite was produced by the scripted diff from
https://github.com/btcsuite/btcd/pull/2547 (followed by 'make rpc'). The
address symbols that moved out of btcutil into the new address package
are imported as btcaddr where a local "address" variable would otherwise
shadow them. The go.mod/go.sum updates and the remaining manual
compilation fixes are folded into this single commit so it builds on its
own (the migration was previously split into a reproducible scripted-diff
plus follow-ups, intended to be squashed on merge).

88/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
Why it was queued
signing boundaryaccess controlsigning or wallet pathboot or update pathparser or protocol path
AI analysis · Low 32/100

This is a large dependency upgrade for the LND Lightning node software. It moves LND from older btcd Bitcoin library packages to new 'v2' packages and updates related wallet and network libraries. The commit is almost entirely mechanical import-path changes and version bumps. It does not appear to fix a specific known security bug on its own, but it pulls in newer upstream versions that may contain security fixes. Because the change touches 605 files and many core Bitcoin-handling modules, any mistake in the migration could affect transaction parsing, address handling, or cryptographic operations, so it should be reviewed and tested carefully.

AI review queueddocs: add release note for DNS fallback SRV lookup panic fixby Erick Cestari · 2ee49698 · Jun 23, 2026 · 1 fileMessage 62 · AdequateModerate 58Details
Commit message · Erick Cestari

docs: add release note for DNS fallback SRV lookup panic fix

62/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
Why it was queued
documentation-only discountsecond-pass: broader security terminology
AI analysis · Moderate 58/100

This commit only adds a release note describing a previously fixed bug in LND's DNS fallback code. The actual code fix is not shown in this commit. The bug could crash the LND daemon (a panic) if a DNS response contained unexpected record types during a special service-location lookup, or if a host lookup returned no results. Because this is just documentation, the immediate code risk is low, but the described underlying issue was a real crash bug.