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

Lower-priorityhtlcswitch: classify a node-ID forward as a forward eventby bitromortac · a4844ef5 · Jul 30, 2026 · 4 filesMessage 73 · AdequateLow 25Details
Commit message · bitromortac

htlcswitch: classify a node-ID forward as a forward event

Now that the switch forwards blinded hops identified by node ID, a new
problem surfaces in the HTLC event stream. A node-ID next hop has no
outgoing short channel ID until non-strict forwarding selects one, so a
forward that fails before selection still carries outgoingChanID ==
hop.Exit. getEventType keys the exit hop off that sentinel, so it
misclassifies such a failed node-ID forward as a receive, mislabeling the
event streamed via SubscribeHtlcEvents (a forwarding failure reported as
a receive failure).

Two paths reach getEventType before an SCID is selected: the fail packet
built by failAddPacket and the resolution packet built by resolve, both
of which dropped the decoded next hop. Carry outgoingHop into both, and
classify a Right (node-ID) outgoingHop as a forward before the hop.Exit
check. A node-ID next hop is always a forward, never the exit hop.

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

This commit fixes a bookkeeping bug in LND's HTLC event stream. When a payment is forwarded to a 'blinded' next hop identified only by a node public key (not a channel ID), and it fails before the switch picks an outgoing channel, the event was wrongly labeled as a 'receive' (final delivery) instead of a 'forward'. The fix carries the original next-hop information through failure and resolution paths so the event is correctly classified as a forward. It is a reporting/telemetry issue, not a code-execution vulnerability.

Lower-priorityhtlcswitch/hop: decode next_node_id blinded hopsby bitromortac · 4fd4289a · Jul 30, 2026 · 6 filesMessage 68 · AdequateLow 29Details
Commit message · bitromortac

htlcswitch/hop: decode next_node_id blinded hops

Some implementations (e.g. Core Lightning) identify the next hop in a
blinded route by the next node's ID (next_node_id) instead of a short
channel ID. Decode such a hop into a node-ID next hop, the Right of
ForwardingInfo.NextHop, holding the next node's public key. The switch
resolves that key to one of our channels with the peer in a later commit.

BOLT 4 requires a non-final blinded hop to carry exactly one of
short_channel_id or next_node_id, so a hop that sets both is rejected.

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

This commit adds support in LND for a different way of identifying the next hop in a private ('blinded') Lightning payment route. Previously LND expected the next hop to be identified by a channel ID; now it also accepts the next node's public key, which some other Lightning implementations already use. The change also enforces a BOLT 4 rule that a blinded hop must set exactly one of those two identifiers, rejecting any hop that sets both. It is primarily an interoperability/standards-compliance change, not a clear security fix, though the new mutual-exclusivity check removes a small ambiguity in route parsing.

Lower-prioritylnwire: cap decoded short channel IDsby Olaoluwa Osuntokun · d1622919 · Jul 30, 2026 · 2 filesMessage 78 · AdequateModerate 60Details
Commit message · Olaoluwa Osuntokun

lnwire: cap decoded short channel IDs

In this commit, we cap each decompressed short channel ID set at 100,000
entries, matching the aggregate range reply budget. The old zlib reader
bounded compressed input rather than decoded output, so the two working-set
limits could drift apart.

We retain compatibility with protocol-valid compressed replies, reject
truncated or corrupt zlib streams, and close the reader on every exit.
Boundary, compatibility, corruption, and property tests cover the
decoder.

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

This commit tightens a safety limit in LND's Lightning wire protocol parser. Previously, a compressed network message could decompress into an unbounded number of short channel IDs, potentially consuming far more memory than the wire message size suggested. The patch caps decoded short channel IDs at 100,000, closes the decompressor on every exit, and now treats truncated or corrupt zlib streams as errors rather than accepting partial results. It is a hardening fix against memory-exhaustion and parsing-ambiguity attacks during channel-graph synchronization.

Lower-prioritylnrpc/routerrpc: add outgoing_node_id to HTLC intercept requestby bitromortac · 14640a50 · Jul 29, 2026 · 3 filesMessage 85 · StrongInformational 18Details
Commit message · bitromortac

lnrpc/routerrpc: add outgoing_node_id to HTLC intercept request

A blinded route may identify the next hop by node ID (next_node_id) rather
than by channel, in which case there is no sender-specified outgoing channel
to report to an HTLC interceptor. Add an outgoing_node_id field to
ForwardHtlcInterceptRequest to carry the next hop's public key for these
forwards, and document that outgoing_requested_chan_id then holds a reserved
sentinel value so that clients switching on a zero channel ID to detect the
exit hop do not misclassify the forward as a final receive.

This commit only adds the schema and regenerated stubs; the fields are
populated by later commits.

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

This commit only updates the API definition and auto-generated code for LND's HTLC interceptor. It adds a new optional field, outgoing_requested_node_id, and documents that when a blinded route uses a node ID instead of a channel ID, the existing outgoing_requested_chan_id field will be set to a special reserved value (the maximum unsigned 64-bit integer). The commit explicitly states that the new field is not yet populated by real logic; that will come in later commits. There is no runtime behavior change here, so it does not by itself create a security vulnerability or fix one.

Lower-prioritymulti: represent the blinded forwarding next hop as an fn.Eitherby bitromortac · d28a7176 · Jul 29, 2026 · 12 filesMessage 73 · AdequateInformational 18Details
Commit message · bitromortac

multi: represent the blinded forwarding next hop as an fn.Either

The forwarding next hop is currently always a short channel ID. To allow a
blinded route to identify the next hop by node ID instead, change
ForwardingInfo.NextHop to fn.Either[lnwire.ShortChannelID, [33]byte], where
the Left is the outgoing channel ID and the Right (wired up in a follow-up
commit) is the next node's public key.

This commit is a pure representational change with no behavioural effect:
every next hop is still a channel ID. The Either is encapsulated behind
ForwardingInfo methods so callers never destructure it directly: IsExit()
is the single source of truth for exit-hop detection (used by the link and
the contract court) and NextHopChannel() yields the outgoing SCID.

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

This commit is a behind-the-scenes code cleanup in the LND Lightning node. It changes how the 'next hop' for forwarding payments is stored internally so that, in the future, blinded routes can identify the next hop by a node's public key instead of only by a channel ID. The commit explicitly says it has no behavioral effect yet: every next hop is still a channel ID. There is no direct security vulnerability introduced here, but it is a preparatory step for a larger feature (blinded routing) that will need careful review when fully implemented.

Lower-priorityhtlcswitch: key the aux traffic shaper on the evaluated channelby bitromortac · b1667800 · Jul 29, 2026 · 2 filesMessage 73 · AdequateLow 44Details
Commit message · bitromortac

htlcswitch: key the aux traffic shaper on the evaluated channel

During non-strict forwarding, handlePacketAdd evaluates every candidate
channel to the next peer and calls CheckHtlcForward with the sender-requested
outgoing SCID (originalOutgoingChanID) for each candidate. That SCID flowed
through canSendHtlc into AuxTrafficShaper.ShouldHandleTraffic, so a
channel-keyed shaper was asked about the requested channel rather than the
candidate actually being evaluated. With parallel channels to a peer this
inspects the wrong channel.

Key the shaper on l.ShortChanID() (the channel under evaluation) instead.
originalScid is retained solely for createFailureWithUpdate / FailAliasUpdate,
so the alias-aware channel_update returned to the sender is unchanged and the
real SCID handed to the shaper never leaks onto the wire.

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

This commit fixes a routing bug in LND's Lightning payment forwarding. When a payment could take any of several parallel channels to the same next peer, the node was accidentally asking an optional 'auxiliary traffic shaper' about the channel the sender requested, rather than the channel actually being considered. That could lead to wrong bandwidth/custom-policy decisions and might leak the real channel ID if not carefully handled. The patch keys the shaper on the actual evaluated channel while keeping the sender-facing error messages on the requested (often alias) channel ID, so no real ID leaks onto the network.

Security candidatebolt12: add bech32 lno/lnr/lni codecby bitromortac · 81d31862 · Jul 28, 2026 · 8 filesMessage 85 · StrongInformational 23Details
Commit message · bitromortac

bolt12: add bech32 lno/lnr/lni codec

The bolt12 package can already encode and decode the TLV layer but has
no way to carry an offer as a human-transportable string, which is the
form the spec specifies for QR codes, URLs and email signatures. BOLT
12's envelope is subtractive relative to BIP-173: there is no BCH
checksum, because the BIP-340 signature over the Merkle root already
secures the payload, and a '+' continuation marker may split the string
across lines. btcutil/bech32's public API always wraps the checksum, so
the alphabet layer is duplicated here rather than reused. Enforce a
whitelist of BOLT 12 prefixes (lno, lnr, lni) on both Encode and Decode.

85/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Names security-relevant behavior explicitly
Why it was queued
signing boundary
AI analysis · Informational 23/100

This commit adds a new encoder/decoder that turns BOLT 12 Lightning payment data (offers, invoice requests, invoices) into human-readable strings like 'lno1...' and back again. It is a feature addition, not a fix for a known vulnerability. The code includes careful input checks for length, character set, case rules, allowed prefixes, and line-continuation markers, plus extensive tests. There is no indication in the commit that this resolves a security incident or was reported by an outside researcher.

Security candidatebolt12: test invoice request decodeby bitromortac · fa39cd74 · Jul 28, 2026 · 1 fileMessage 95 · StrongInformational 12Details
Commit message · bitromortac

bolt12: test invoice request decode

The invoice_request codec has round-trip coverage against locally-
constructed messages only, so a canonical-encoding bug would go
unnoticed until a real peer rejected a signature. Drive the decoder from
the spec's signature-test invoice_request and assert that re-encoding is
byte-identical to the wire bytes, because the signature commits to the
Merkle root of that exact encoding.

95/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
signing boundary
AI analysis · Informational 12/100

This commit only adds a new test. It does not change any production code. The test decodes a standard BOLT12 invoice request from the official specification's test vectors and checks that re-encoding it produces exactly the same bytes. This is a defensive quality-improvement change meant to catch canonical-encoding bugs before they reach real peers.

Lower-prioritygithub: bump gateway code-review to v0.6.0by Suheb · 17a4d42f · Jul 28, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Suheb

github: bump gateway code-review to v0.6.0

Bumps both pins together: the gateway-action SHA and the runtime_ref it
resolves. runtime_ref is pinned explicitly rather than left to the
action's default, so bumping only the action would leave the job on the
v0.5.0 runtime.

v0.6.0 adds no trigger and no input, so the rest of the shim is
unchanged.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit updates a GitHub Actions workflow that runs an optional code-review bot called 'gateway'. It only changes two pinned version numbers (SHA hashes) for the bot's action and its runtime, moving from v0.5.0 to v0.6.0. There is no change to triggers, inputs, or permissions. Based on the commit message and diff alone, this is a routine dependency bump with no visible security relevance.

Lower-prioritychanneldb: recover missing db versionby Elle Mouton · 68264c70 · Jul 22, 2026 · 3 filesMessage 68 · AdequateModerate 58Details
Commit message · Elle Mouton

channeldb: recover missing db version

Use strict metadata reads during migration selection so a metadata bucket with a
missing metadata/dbp key is not interpreted as the latest DB version.

Recover this state from mandatory DB version 33, the last mandatory version
before the v0.20.x releases that could initialize a DB without writing the DB
version key. This runs migration 35 without replaying migrations 0 through 33
against a DB that was already created by a modern schema/code path.

After the selected migrations complete, syncVersions writes the latest DB
version as usual.

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

This patch fixes a database migration bug in LND's channel database. Some databases were created without recording their schema version number, which could cause future mandatory upgrades to be skipped. The fix detects that missing version marker, safely resumes upgrades from a known baseline, and ensures a specific v0.21 data-format migration (for 'waiting proof' records) actually runs. It is a correctness/reliability fix rather than a remote attack vector, but skipped migrations can leave data in an inconsistent state that may affect node behavior.

Lower-prioritychanneldb: make waiting proof migration repeatableby Elle Mouton · 3aff61ae · Jul 22, 2026 · 2 filesMessage 73 · AdequateInformational 22Details
Commit message · Elle Mouton

channeldb: make waiting proof migration repeatable

Allow migration 35 to skip records that are already keyed using the typed
waiting proof format. This lets the missing-version recovery path safely run
migration 35 on DBs that were created directly by v0.21 and may already contain
typed waiting proofs.

Legacy 9-byte records are still migrated and unexpected key shapes still fail.

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

This commit fixes a database migration in LND so it can safely run twice. Previously, if a certain recovery process re-ran migration 35 on a database that already had newer-format 'waiting proof' records, the migration would likely fail or corrupt data. The fix makes the migration skip already-updated records while still converting old-format records. It is a robustness improvement, not a remote attack vector.

Lower-prioritychanneldb: preserve db version during initby Elle Mouton · 619913bf · Jul 22, 2026 · 4 filesMessage 76 · AdequateModerate 54Details
Commit message · Elle Mouton

channeldb: preserve db version during init

Keep the top-level bucket creation introduced by PR #9653, since initialized
DBs can still be missing newer buckets such as the historical channel bucket.

Do not let the metadata bucket created during init make a fresh DB look
initialized. Use strict metadata reads so a missing metadata/dbp key is distinct
from a present DB version, then write metadata/dbp for genuinely fresh DBs.

Existing DBs with a metadata bucket but missing metadata/dbp are left for the
migration recovery path instead of being treated as latest.

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

This commit fixes a database initialization bug in LND's channel database. Previously, creating an empty metadata bucket during setup could trick the code into thinking an old or partially-created database was already fully up-to-date, potentially skipping needed upgrades. The change distinguishes between a truly new database, a database missing its version key, and an already-initialized database, so migrations run when they should.

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.