LL
← All projectsLightning Labs

LND

Go implementation of a complete Lightning Network node.

BitcoinLightning NetworkNormal
Repository coverage

1386 commits in the local evidence base

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

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

Does the history explain itself?

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

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

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
Olaoluwa Osuntokun20942204474
Elle Mouton26832268167
ziggie44416413165
Yong28513171
LNBiG111173
Jared Tobin909171
bitromortac531051069
yyforyongyu83861068
Erick Cestari26726070
Andras Banki-Horvath11311072
Gijs van Dam33230073
ziggieXXX2026070
Analysis record

Published AI watches

Last scanned 4 minutes ago

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

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

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

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

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

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

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

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

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

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

zpay32: reject duplicate payment hash fields

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

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

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

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

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

itest: stop creating legacy channels

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

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

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

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

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

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

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

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

build: adopt focused golangci-lint v2.13 checks

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

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

lnrpc: regenerate protos with Go 1.27

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

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

build: fix Go 1.27 compatibility

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

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

build: bump Go language and toolchain versions

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

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

invoices: cancel only the failing AMP set on reconstruction failure

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

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

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

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

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

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

This commit adds a new optional wallet feature to LND that lets users lock UTXOs until the transaction spending them reaches a chosen confirmation depth, instead of relying on a wall-clock timeout. It is a feature addition with safety chec…

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

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

This commit is a large internal code reorganization for the LND Lightning node. It moves channel state storage logic from the `channeldb` package into a new `chanstate` package, while keeping the same database keys, serialization formats, …

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

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

This change fixes a data-handling bug in LND's channel-opening code. When opening a Lightning channel using an optional 'auxiliary funding controller' (used for custom channel types such as Taproot Assets), the funding manager was previous…

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

bolt12: verify invoice_request and invoice signatures on read

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

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

itest: cover confirmation-controlled leases

This commit only adds a new integration test for an existing feature called confirmation-controlled leases. It does not change production code, so it cannot introduce a security vulnerability or fix one directly. The test exercises how lon…

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

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

This update fixes two security-related bugs in LND's REST WebSocket proxy. First, a specially crafted WebSocket protocol header could crash the proxy (a panic). Second, the proxy previously had no limit on how large an incoming WebSocket m…

panic fix in request header parsingunbounded incoming WebSocket message read now cappedincorrect header value assignment possible before fix
c662f853by Yong+227−104 files
Vendor flagged security relevance
Repository ledger

Explore captured commits

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

AI review queuedmod: bump neutrino dependencyby ziggie · 80d04a50 · May 12, 2026 · 2 filesMessage 35 · OpaqueInformational 6Details
Commit message · ziggie

mod: bump neutrino dependency

35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body
Why it was queued
second-pass: broader security terminologysecond-pass: opaque commit message
AI analysis · Informational 6/100

This commit only updates a dependency version number in LND's package list (go.mod and go.sum). It bumps the 'neutrino' library from version 0.16.2 to a newer pre-release snapshot. The commit itself contains no code changes, no description of why the update is needed, and no mention of security issues. Without seeing what actually changed inside the neutrino library, we cannot tell whether this is a routine maintenance update or a security fix.

Lower-prioritypayments/db: remap legacy zero attempt IDsby ziggie · c11a292e · May 12, 2026 · 3 filesMessage 68 · AdequateLow 41Details
Commit message · ziggie

payments/db: remap legacy zero attempt IDs

Legacy KV payments can contain HTLC attempts with attempt ID zero. The
SQL payments schema requires payment_htlc_attempts.attempt_index to be
globally unique, so migrating multiple such attempts can fail with a
UNIQUE constraint violation.

Allocate synthetic attempt indexes for legacy zero-ID attempts from the
switch payment ID sequencer horizon. Keep nonzero attempt IDs unchanged
and advance the switch sequence once after migration validation succeeds.

This preserves the SQL uniqueness invariant and prevents future switch
IDs from colliding with migrated attempts. It also wraps HTLC insert
errors with the attempted index and payment hash so future migration
failures identify the problematic row.

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

This commit fixes a database migration bug in LND where very old payment records could have HTLC attempt ID zero, which would collide under the new SQL schema's uniqueness requirement. The patch assigns synthetic unique IDs to those legacy attempts and advances the switch sequencer so future IDs don't overlap. It also fails any still-in-flight legacy zero-ID attempts before migration because they can't be safely resumed. This is a defensive correctness fix, not an exploitable vulnerability.

AI review queuedlnrpc: depend on chanstate Storeby ziggie · 186ea36f · May 12, 2026 · 4 filesMessage 68 · AdequateInformational 15Details
Commit message · ziggie

lnrpc: depend on chanstate Store

Replace concrete ChannelStateDB fields in the invoices and wallet RPC
configs with chanstate.Store, and update the subserver dependency
wiring to pass the interface. The affected RPC paths only need
channel-state store methods for hop hints and waiting-close channel
queries.

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

This is a small internal refactoring change. It swaps out a specific database type for a narrower interface in a few RPC configuration structs. There is no user-facing behavior change, no bug fix, and no security-relevant change visible in the diff.

Lower-priorityserver: depend on chanstate Storeby ziggie · 0376270e · May 12, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · ziggie

server: depend on chanstate Store

Store channel-state access on server as chanstate.Store instead of
*channeldb.ChannelStateDB. Keep link-node access as a separate concrete
*channeldb.LinkNodeDB field so LinkNodeDB does not leak into the
channel-state store contract.

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

This is a routine internal code cleanup. It changes how one part of the Lightning Network Daemon (LND) refers to its channel-state database, using a narrower interface instead of a concrete type, and separates link-node database access into its own field. There is no security-relevant change visible in the diff.

Lower-prioritylnd: use chanstate Store for channel restoreby ziggie · 2e7a1d8a · May 12, 2026 · 1 fileMessage 68 · AdequateInformational 16Details
Commit message · ziggie

lnd: use chanstate Store for channel restore

Make chanDBRestorer persist restored channel shells through
chanstate.Store instead of the concrete ChannelStateDB. The restorer
still builds channeldb channel shell values, but only needs
RestoreChannelShells from the store.

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

This is a small internal code cleanup in LND. It changes one component (the channel restorer) to use a more abstract storage interface instead of a specific database implementation. There is no indication this fixes a security bug or introduces a vulnerability; it appears to be a refactoring to make the code more modular and easier to test.

AI review queuedcontractcourt: use chanstate Store in breach arbby ziggie · 8f10cf54 · May 11, 2026 · 1 fileMessage 68 · AdequateInformational 17Details
Commit message · ziggie

contractcourt: use chanstate Store in breach arb

Replace BreachConfig's concrete ChannelStateDB dependency with
chanstate.Store. The breach arbitrator only needs closed-channel reads
and MarkChanFullyClosed from the channel-state store.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 17/100

This is a small internal code cleanup change in LND's contract court. It swaps a broad database dependency for a narrower interface that only exposes what the breach arbitrator actually needs: reading closed channels and marking a channel fully closed. There is no direct security fix, new feature, or behavior change visible in the diff. It reduces the code's attack surface by limiting what the breach arbitrator can access, but the change alone does not close any known vulnerability.

AI review queuedfunding: depend on chanstate Storeby ziggie · ae9de8d0 · May 11, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · ziggie

funding: depend on chanstate Store

Replace the funding manager's concrete *channeldb.ChannelStateDB
dependency with chanstate.Store. The manager only uses methods covered
by the store contract, including channel opening state and initial
forwarding policy persistence.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 15/100

This is a small internal code cleanup in LND's funding manager. It replaces a direct dependency on a specific database type with a narrower interface (chanstate.Store). There is no functional change visible in the diff, no bug fix, and no security-relevant behavior change.

Lower-prioritychanstate: introduce Store interfaceby ziggie · 96e0fd74 · May 11, 2026 · 3 filesMessage 58 · ThinInformational 15Details
Commit message · ziggie

chanstate: introduce Store interface

Add a new chanstate package containing the Store interface plus a
package logger. The interface mirrors the public surface of
*channeldb.ChannelStateDB so the compile-time assertion

var _ ChannelStore = (*channeldb.ChannelStateDB)(nil)

No consumer migrates in this commit.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit only adds a new Go interface definition and a package logger. It does not change any existing behavior, fix any bug, or alter how data is stored or accessed. There is no security-relevant change for users or operators.

AI review queuedpeer: depend on chanstate Storeby ziggie · d08b1b07 · May 11, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · ziggie

peer: depend on chanstate Store

Replace the peer config's concrete channel state DB dependency with
chanstate.Store. Brontide only needs channel lookups, closed-channel
lookup, and initial forwarding policy access from the channel-state
store.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 15/100

This commit is a straightforward internal code cleanup: it swaps a specific database type for a narrower interface in one part of the Lightning Network Daemon (LND). It does not change user-facing behavior, fix a bug, or alter security logic. There is no indication this is a security patch.

Lower-prioritychannelnotifier: depend on chanstate Storeby ziggie · 1f4a756f · May 11, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · ziggie

channelnotifier: depend on chanstate Store

Accept chanstate.Store in ChannelNotifier instead of the concrete
ChannelStateDB. The notifier only fetches open and closed channel
records to populate channel event payloads.

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

This is a small internal code cleanup change. It swaps a concrete database type for a narrower interface in a component that sends out channel event notifications. There is no visible security fix, behavior change, or bug being patched.

Lower-prioritychanneldb: drop unused kvdb.RTx parameter from FetchChannelByIDby ziggie · bb8eeb23 · May 11, 2026 · 4 filesMessage 73 · AdequateInformational 15Details
Commit message · ziggie

channeldb: drop unused kvdb.RTx parameter from FetchChannelByID

All four call sites pass nil for tx today (server.go, two in
channeldb/db_test.go, funding/manager_test.go). The internal
channelScanner(nil, selector) call inside FetchChannelByID is preserved
verbatim, so runtime behavior is unchanged.

This is a prerequisite for the upcoming chanstate.ChannelStore
interface: keeping the parameter would leak kvdb into a domain
interface.

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

This is a small internal code cleanup: a function that fetches a channel by its ID had an optional database-transaction parameter that nobody was actually using (every caller passed nil). The patch removes that unused parameter and updates the four callers. The commit message explicitly says runtime behavior is unchanged, and the diff confirms the internal call still passes nil exactly as before. There is no security-relevant change here.

Lower-prioritydocs: release note for BOLT-02 push_msat fundee enforcementby Erick Cestari · bb8abc75 · May 11, 2026 · 1 fileMessage 85 · StrongInformational 18Details
Commit message · Erick Cestari

docs: release note for BOLT-02 push_msat fundee enforcement

Document the user-visible error string change introduced when the
fundee rejects incoming open_channel messages whose push_msat exceeds
1000 * funding_satoshis.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
Why it was queued
documentation-only discount
AI analysis · Informational 18/100

This commit only adds a release note describing an earlier code change. It documents that LND now rejects certain invalid channel-open requests sooner and with a clearer error message. There is no code change in this commit, and the behavior it describes is a stricter enforcement of an existing Lightning protocol rule, not a security vulnerability.

AI review queuedfunding: enforce BOLT-02 push_msat bound on fundeeby Erick Cestari · d5505498 · May 11, 2026 · 3 filesMessage 73 · AdequateLow 45Details
Commit message · Erick Cestari

funding: enforce BOLT-02 push_msat bound on fundee

Reject incoming OpenChannel messages where push_msat exceeds
1000 * funding_satoshis, as required by BOLT-02. The existing RejectPush
flag only gates on push_msat > 0 and does not cover the spec bound.

An over-sized push is eventually caught downstream in reservation.go when
theirBalance = capacity - fee - push_msat goes negative and
ErrFunderBalanceDust is returned. Rejecting it up front produces a
clearer, spec-aligned error and avoids the chanacceptor and commitment
type negotiation round-trips for a channel we will refuse anyway.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Low 45/100

This commit tightens validation in LND when another node asks to open a Lightning channel. It now rejects requests where the proposed 'push' payment is larger than the entire channel funding, as the Lightning protocol (BOLT-02) already requires. Before this change, such oversized pushes were only caught later in the process, after extra setup work. The change is a defensive hardening fix, not an active exploit patch, and the commit message frames it as spec compliance rather than a security vulnerability.

Lower-prioritygraph/db: remove address loading from cached node iterationby Elle Mouton · bfb12b1d · May 7, 2026 · 10 filesMessage 73 · AdequateInformational 18Details
Commit message · Elle Mouton

graph/db: remove address loading from cached node iteration

ForEachNodeCached is now only used for topology-oriented traversal,
so the address-loading option forced one autopilot scoring path to
bypass the in-memory graph cache for data it did not consume. Remove
the withAddrs parameter and the associated SQL/KV address plumbing
so cached node iteration can consistently use the graph cache when
it is loaded.

Autopilot still requires peer addresses before opening channels.
That filtering remains in Agent.openChans via ForEachNode, where the
selected candidates' addresses are collected for ConnectToPeer. The
trade-off is that ForEachNodesChannels no longer excludes
addressless nodes from graph-wide scoring inputs such as median
channel size or centrality, which also feed lncli getnetworkinfo
statistics like graph diameter. In practice the only addressless
nodes our local view tends to know about are nodes with no public
channels (e.g. our own node or peers we share only private channels
with), so the impact on the reported stats should be negligible.
Active channel candidates remain address-filtered before dialing.

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

This is a performance and code-simplification cleanup, not a security fix. It removes an optional address-loading path from a cached graph-traversal function so the cache can be used more consistently. The only behavioral change is that autopilot's graph-wide scoring now includes nodes without advertised addresses when computing statistics such as median channel size and centrality. Those nodes were previously skipped. Active channel candidates are still filtered by address before any peer connection is attempted, so the practical security impact is minimal.

Lower-prioritykvdb/sqlbase: fix non-constant format stringsby Alex Akselrod · ce65753d · May 6, 2026 · 1 fileMessage 80 · StrongInformational 19Details
Commit message · Alex Akselrod

kvdb/sqlbase: fix non-constant format strings

When updating the Go version in kvdb to >= 1.24, schema.go no
longer compiles due to non-constant format strings. This is
invisible until:
- a new version of kvdb is tagged and imported in consumers
- kvdb is redirected to the local copy

This commit fixes the bug.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Informational 19/100

This is a code-compatibility fix, not a security fix. The Go compiler starting with version 1.24 rejects non-constant format strings passed to fmt.Sprintf. The patch changes several fmt.Sprintf calls to use a constant "%s" format string with the actual SQL string as an argument. Without the fix, the package simply fails to compile on newer Go versions. There is no indication this was exploitable or that it fixed a runtime vulnerability.

Lower-prioritydocs: release note for closed-channel tombstones on KV-SQL backendsby ziggie · 1a52e85b · May 4, 2026 · 1 fileMessage 93 · StrongLow 35Details
Commit message · ziggie

docs: release note for closed-channel tombstones on KV-SQL backends

Document the tombstone close path that #10780 wires onto sqlite/postgres,
the operator-visible iteration-cost growth that comes from leaving closed
chanBuckets on disk, and the NumForwardingPackages divergence that the
preserved forwarding-package bucket produces in PendingChannels.

93/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
documentation-only discount
AI analysis · Low 35/100

This commit only adds release-note documentation describing a previously merged code change (PR #10780). It explains that, on sqlite/postgres backends, closing a channel now leaves the old channel data on disk and instead marks the channel as closed by flipping an index entry. The note warns operators not to downgrade after closing channels, because older LND versions would see the leftover data and think the channel is still open. There is no code change here, only documentation, so it does not introduce a new security vulnerability by itself. The underlying design change could create operational confusion (channels appearing reopened after a downgrade), but that is a documented operational risk, not an exploitable weakness.

Lower-prioritymulti: enable closed-channel tombstones on KV-SQL backendsby ziggie · 95044124 · May 4, 2026 · 3 filesMessage 83 · StrongLow 26Details
Commit message · ziggie

multi: enable closed-channel tombstones on KV-SQL backends

Wire OptionTombstoneClosedChannels for sqlite and postgres backends in
config_builder.go. bbolt keeps the synchronous one-shot close path
unchanged.

Add UsesClosedChanTombstones() to the integration test harness so
backend-symmetric tests can skip post-close assertions about deleted
forwarding-package or revocation-log state — that state is intentionally
preserved on tombstone backends until the upcoming native-SQL
channel-state migration reclaims it. Update testWipeForwardingPackages
to honor the new predicate while still exercising the close flow on
both backend families.

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

This change adjusts how LND closes payment channels when using SQLite or Postgres database backends. Instead of immediately deleting all channel-related data in one big operation, it marks the channel as closed with a 'tombstone' and leaves the old data in place temporarily. This avoids long database lockups during channel closure. It is a performance and reliability improvement, not a fix for an exploitable vulnerability.

Lower-prioritychanneldb: hide tombstoned channels from open viewsby ziggie · dc4b8514 · May 4, 2026 · 3 filesMessage 95 · StrongModerate 59Details
Commit message · ziggie

channeldb: hide tombstoned channels from open views

Wire every reader of openChannelBucket to consult isOutpointClosed
before treating a chanKey as open. Without this commit the previous one
flips the outpoint index but FetchAllChannels and friends still surface
the channel as if it were open — that intermediate state is fine for
tests because OptionTombstoneClosedChannels stays off until the multi:
commit flips it on for sqlite/postgres, but the readers must be wired
before that lands.

Audit covers all six call sites that descend into chanBucket:

- fetchChanBucket / fetchChanBucketRw — direct lookup paths used by
Refresh, MarkBorked, and the rest of OpenChannel's read/write
methods. Single-call sites; the tx.ReadBucket(outpointBucket)
lookup is inlined into the isOutpointClosed call.
- fetchNodeChannels — per-node ForEach iteration; tx threaded
through and the outpoint-bucket lookup is hoisted above the loop
so the closed-channel check is a per-iteration map probe rather
than a tx-level bucket resolve.
- FetchPermAndTempPeers — cross-node ForEach; same hoisting pattern.
The closed peer's protected status is still established by the
historical-channel second pass that runs after the open-channel
pass.
- channelScanner — single-channel-selector iteration site reached by
FetchChannel and FetchChannelByID; outpoint-bucket lookup hoisted
inside chanScan so a single visit pays the bucket-resolve cost
once.

The redundant-close guard added in the previous commit lives in
locateOpenChannel and is unchanged here.

Tests:
- TestCloseChannelTombstoneRemovesFromOpenScans: end-to-end —
FetchAllChannels, FetchOpenChannels, and FetchPermAndTempPeers all
behave as if the closed channel is gone, while the historical pass
still marks the peer as having a closed channel.
- TestClosedChannelHiddenFromFetchChannel: channelScanner path.
- TestClosedChannelHiddenFromDirectMethods: fetchChanBucket /
fetchChanBucketRw via Refresh and MarkBorked.

95/100 · StrongMessage clarity
✓ Specific, 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 fixes an internal bookkeeping bug in LND's channel database. A new 'tombstone' close feature keeps closed channel data on disk but marks the channel as closed in a separate index. Before this fix, several database readers still treated those tombstoned channels as if they were open, which could make the node try to use or report already-closed channels as active. The patch wires every reader to check the closed-channel index first. It is a correctness fix rather than a remote exploit, but it prevents state confusion that could affect routing, channel management, or peer protections.

Lower-prioritychanneldb: tombstone closed channels without bulk deleteby ziggie · d643050d · May 4, 2026 · 2 filesMessage 83 · StrongLow 28Details
Commit message · ziggie

channeldb: tombstone closed channels without bulk delete

Wire the tombstone close path on backends that opted in via
OptionTombstoneClosedChannels:

- ChannelStateDB.CloseChannel branches on tombstoneClosedChannels.
The default path remains closeChannelSync; closeChannelTombstone
runs on tombstone-enabled backends.
- closeChannelTombstone leaves every byte of the channel's nested
state in place — chanBucket, revocation log, per-channel
forwarding-package bucket, commitment heads — and relies on the
outpointBucket flip from outpointOpen to outpointClosed (already
performed by the shared updateClosedOutpointIndex helper) as the
authoritative closed-channel marker. The historical-channel and
close-summary archival use the same archiveClosedChannel helper as
the synchronous path so closed-channel and historical readers see
uniform records regardless of backend.
- locateOpenChannel rejects already-closed chanKeys (outpointClosed
in the index) with ErrChannelNotFound so a redundant CloseChannel
is a no-op rather than a re-archive.

Open-channel-bucket readers still surface tombstoned channels — that
audit lands in the next commit. The tests added here only assert the
writer's on-disk artefacts and the redundant-close guard.

Tests:
- TestCloseChannelTombstoneWritePath: outpoint flipped, historical
record, close summary, revlog/fwd-pkgs preserved.
- TestCloseChannelTombstoneRedundantClose: second CloseChannel
returns ErrChannelNotFound.
- TestCloseChannelSync: regression test for the synchronous path —
chanBucket and fwd-pkgs gone, outpoint flipped.

83/100 · StrongMessage clarity
✓ Specific, 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 28/100

This commit changes how LND stores closed Lightning channels on certain database backends. Instead of deleting all the old channel data immediately when a channel closes, it now leaves the data in place and just flips a marker saying 'this channel is closed.' This is a performance optimization for SQL-based backends, not a fix for an active security bug. The main risk is that leftover channel data might be read by code that expects only open channels, but the commit adds a guard so repeated close attempts are rejected and the historical/closed-channel records are still written correctly.

Lower-prioritychanneldb: add tombstone option and isOutpointClosed helperby ziggie · f94fba1e · May 4, 2026 · 3 filesMessage 73 · AdequateInformational 15Details
Commit message · ziggie

channeldb: add tombstone option and isOutpointClosed helper

Add the option, field, and reader helper that the tombstone close path
will consume in the next commit. Nothing is wired yet:

- OptionTombstoneClosedChannels — option modifier that sets the new
Options.tombstoneClosedChannels field. Defaults to off.
- ChannelStateDB.tombstoneClosedChannels — the decision-bit, set at
construction from the option.
- isOutpointClosed(opBucket, chanKey) — decodes the indexStatus TLV
stored under outpointBucket and reports true for entries flipped to
outpointClosed by updateClosedOutpointIndex (called from both close
paths). The helper accepts the bucket directly so loop-style
callers can hoist the tx.ReadBucket(outpointBucket) lookup out of
the inner loop and pay it once per iteration set.

Reusing outpointBucket as the "logically closed" signal avoids a
dedicated tombstone bucket. The flip from outpointOpen to outpointClosed
is already performed by the existing close path, so the signal exists on
both backends — readers just need to consult it.

Behavior is unchanged. The option and helper have no callers yet; the
close-path branch and reader audit land in the next two commits.

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

This commit only adds unused infrastructure for a future feature. It introduces a new option flag, a database field, and a small helper function to check whether a channel has been closed, but nothing is actually wired up or used yet. Behavior is unchanged, and there is no active security issue in this patch.

Lower-prioritychanneldb: extract close-channel helpersby ziggie · 4815ed2b · Apr 30, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · ziggie

channeldb: extract close-channel helpers

Move the body of OpenChannel.CloseChannel into ChannelStateDB.CloseChannel
(which dispatches to a new closeChannelSync method), and split the close
logic into three free helpers:

- locateOpenChannel: descends the open-channel bucket tree and returns the
chain bucket, channel bucket, and serialized chanKey for an OpenChannel.
- updateClosedOutpointIndex: flips the outpoint index entry for a chanKey
from open to closed.
- archiveClosedChannel: writes the historical-channel record and the close
summary that survive the close.

Behavior is preserved: closeChannelSync runs the same sequence of mutations
(packager wipe, chanBucket delete, log-bucket delete, outpoint flip,
historical archive, close summary) that the inline body did, just composed
out of the new helpers. No callers, options, or readers change.

This is preparation for adding a tombstone close strategy on KV-SQL
backends; the helpers will be shared between the synchronous and tombstone
paths so historical and closed-channel records remain identical across
backends.

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 pure internal code reorganization. It moves the existing channel-closing logic into smaller helper functions without changing what the code actually does, who can call it, or any user-visible behavior. There is no security fix or vulnerability here.

Lower-priorityonionmessage: add BFS pathfinding for onion messagesby Abdullahi Yunus · fd25ba98 · Apr 29, 2026 · 3 filesMessage 95 · StrongInformational 23Details
Commit message · Abdullahi Yunus

onionmessage: add BFS pathfinding for onion messages

In this commit we add FindPath, a BFS-based shsortest-path
algorithm that finds routes through the channel graph for
onion messages. The search filters nodes by the
OnionMessage feature bits (38/39).

We also add a unit tests covering: direct neighbor routing,
multi-hop paths, feature-bit filtering, missing destination
nodes, destination without onion support, max hop limits,
cycle handling, and shortest-path selection.
choice of BFS is because there isn't any weight involve.

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
AI analysis · Informational 23/100

This commit adds a new pathfinding feature for onion messages in the Lightning Network Daemon (LND). It is a routine feature addition: it finds the shortest route through nodes that support a specific messaging capability. There is no direct evidence in the commit that it fixes a security vulnerability; it appears to be new functionality with tests.

Lower-prioritydocs: add release not for pathfindingby Abdullahi Yunus · 72873f62 · Apr 29, 2026 · 1 fileMessage 57 · ThinInformational 15Details
Commit message · Abdullahi Yunus

docs: add release not for pathfinding

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 new feature: pathfinding support for routing onion messages. It changes documentation text only and does not modify any code, configuration, or security behavior.

Lower-prioritydocs: fix Contributors TOC anchor in v0.21.0 release notesby ziggie · c0b417c7 · Apr 28, 2026 · 1 fileMessage 85 · StrongInformational 15Details
Commit message · ziggie

docs: fix Contributors TOC anchor in v0.21.0 release notes

The TOC link for the Contributors section pointed to `#contributors`,
but GitHub generates the anchor for `# Contributors (Alphabetical
Order)` as `#contributors-alphabetical-order`, leaving the link
broken when the rendered file is viewed on GitHub. Update the TOC
to use the working anchor (matching the form already used in
release-notes-0.18.0.md).

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit fixes a broken table-of-contents link in the release notes for version 0.21.0. The link pointed to '#contributors', but the actual heading anchor on GitHub is '#contributors-alphabetical-order'. The change simply updates the link so it works when the document is viewed on GitHub. There is no security relevance.

Lower-prioritydocs: add empty release notes for v0.22.0by ziggie · fa588eaf · Apr 28, 2026 · 1 fileMessage 80 · StrongInformational 15Details
Commit message · ziggie

docs: add empty release notes for v0.22.0

Scaffold release-notes-0.22.0.md with the same section structure as
the 0.21.0 file so contributors have a place to land entries during
the v0.22 cycle.

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

This commit simply creates an empty release notes template for the upcoming v0.22.0 version. It contains only section headings and no actual code, bug fixes, or feature descriptions. There is no security relevance.