LL
← All projectsLightning Labs

LND

Go implementation of a complete Lightning Network node.

BitcoinLightning NetworkNormal
Repository coverage

1373 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 candidates192second-pass queue1283AI analyses
65commits · 30 days
160commits · 60 days
586commits · 180 days
1224commits · 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
314Strong · 80–100
642Adequate · 60–79
386Thin · 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
ziggie43516412164
Yong26513172
LNBiG111173
Jared Tobin909171
bitromortac531051069
yyforyongyu83861068
Erick Cestari26726070
Andras Banki-Horvath11311072
Gijs van Dam33230073
ziggieXXX1925071
Analysis record

Published AI watches

Last scanned 48 minutes ago

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
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
Low 46 AI analysisMessage 85 · Strong
LL Lightning LabsLND BitcoinLightning Network

docs: add v0.21.3 release notes for ws proxy fixes

This commit adds release notes for two fixes in LND's REST WebSocket proxy: one that could crash the proxy with a malformed header, and another that limits how large incoming WebSocket messages can be. The actual code changes happened in a…

Denial-of-service vector: malformed Sec-Websocket-Protocol header could panic the REST WebSocket proxyInput validation improvement: header now parsed as comma-separated sub-protocol listResource-exhaustion mitigation: incoming WebSocket message size now bounded by MaxWsMsgSize
d3e02876by Gijs van Dam+15−01 file
Vendor flagged security relevance
Moderate 60 AI analysisMessage 85 · Strong
LL Lightning LabsLND BitcoinLightning Network

docs: add v0.20.4 release notes for ws proxy fixes

This commit adds release notes for two fixes in LND's REST WebSocket proxy. One fix prevents a server crash (panic) triggered by a malformed WebSocket protocol header. The other fix limits how large incoming WebSocket messages can be, reje…

Denial-of-service vector: malformed Sec-Websocket-Protocol header caused a panic in the REST WebSocket proxyInput validation improvement: WebSocket sub-protocol header now parsed as a comma-separated listResource exhaustion mitigation: incoming WebSocket message size now bounded by MaxWsMsgSize with early rejection
307c1ac1by Gijs van Dam+15−01 file
Vendor flagged security relevance
Repository ledger

Explore captured commits

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

Security candidateMerge pull request #11090 from yyforyongyu/task-peer-managerby Yong · d24719e0 · Aug 28, 2026 · 15 filesMessage 73 · AdequateHigh 76Details
Commit message · Yong

Merge pull request #11090 from yyforyongyu/task-peer-manager

peer: bound peer-controlled resource growth

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
Why it was queued
boot or update pathauthentication pathmerge-commit duplicate discount
AI analysis · High 76/100

This update to the LND Lightning node software fixes two security-related bugs. First, it prevents a connected peer from exhausting the node's memory or CPU by sending floods of ping messages or by forcing the node to queue too many outbound messages. Second, it fixes a signature mismatch in channel-update messages that carry inbound fees, so updates are signed exactly as they are broadcast and unknown extra data is preserved. The release notes explicitly describe both as preventing peer-controlled resource exhaustion and remote signature failures.

Lower-prioritycontractcourt: fix stuck HTLC after confirmationby Boris Nagaev · 510dd685 · Aug 27, 2026 · 2 filesMessage 80 · StrongTriage 0Details
Commit message · Boris Nagaev

contractcourt: fix stuck HTLC after confirmation

When we forward a payment we hold two HTLCs that must resolve together:
the incoming one (someone pays us) and the outgoing one (we pay the next
hop). If the outgoing HTLC dies, we have to deal with the incoming one
back upstream. Otherwise the incoming HTLC is stuck and hangs until its
own channel force closes near the timeout.

For an outgoing HTLC that is dust there is no output to resolve on chain,
so we process the incoming one back. This can happen at two points: before
any commitment confirms, and again in StateContractClosed once one did.

Whether an HTLC is dust is not fixed though, it depends on the fee rate
and the dust limit of the commitment it sits on. So an HTLC can have an
output on our local commitment, yet be trimmed to dust on the remote one.
If we did not see it as dust before, and the remote commitment is the one
that confirms, neither point handled the incoming HTLC back:
StateContractClosed only handled the dangling action and assumed all dust
HTLCs were already resolved. The incoming HTLC was left stuck.

StateContractClosed now also processes the incoming HTLCs of the dust
action. For an HTLC that was already handled before the confirmation
this sends a duplicate resolution message, which is safe as the switch
processes them idempotently.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Lower-prioritypeer: test outgoing queue lifecycleby yyforyongyu · 1a82436c · Aug 27, 2026 · 1 fileMessage 78 · AdequateTriage 0Details
Commit message · yyforyongyu

peer: test outgoing queue lifecycle

Exercise queue drain accounting, teardown servicing, and the shared
priority/lazy admission policy. Join every goroutine so the tests pin
backlog behavior without leaking asynchronous work.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-priorityqueue: synchronize circular bufferby yyforyongyu · 65b1f709 · Aug 27, 2026 · 2 filesMessage 68 · AdequateTriage 0Details
Commit message · yyforyongyu

queue: synchronize circular buffer

Guard circular buffer writers and readers with one RWMutex. Add a
concurrent regression that exercises every public access method and
checks final ordering under the race detector.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification
Security candidatedocs: note configurable WalletKit lease lifetimeby Andras Banki-Horvath · 37945535 · Aug 26, 2026 · 1 fileMessage 72 · AdequateInformational 15Details
Commit message · Andras Banki-Horvath

docs: note configurable WalletKit lease lifetime

Document the new LeaseOutput and FundPsbt confirmation-depth option in
the 0.22.0 release notes.

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

This commit only adds documentation to the release notes describing a new WalletKit feature: output leases can now optionally stay active until a spending transaction reaches a chosen confirmation depth. There is no code change, no bug fix, and no security-related content in the commit itself.

AI review queuedwalletrpc: release partial locks by owner IDby Andras Banki-Horvath · 6e81414a · Aug 26, 2026 · 2 filesMessage 68 · AdequateLow 47Details
Commit message · Andras Banki-Horvath

walletrpc: release partial locks by owner ID

Make multi-input lease acquisition all-or-nothing. A metadata lookup or
lease failure after an earlier success now triggers one guarded deferred
rollback.

Release each acquired output with its recorded lock ID. This preserves a
caller's custom owner ID instead of incorrectly using LND's internal ID.
Cover both metadata and lease failures with internal and custom owners.

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: security-sensitive path
AI analysis · Low 47/100

This change fixes a bug in LND's wallet RPC code that handles locking multiple bitcoin inputs at once. Previously, if locking one input failed after earlier inputs were already locked, the rollback tried to unlock the earlier inputs using LND's internal lock ID instead of the caller's actual lock ID. That meant the earlier locks might not get released, leaving funds stuck or unavailable. The patch makes the rollback use the real lock ID recorded for each acquired lease, and also rolls back on metadata lookup failures, not just lease failures.

Security candidatewalletrpc: expose configurable output leasesby Andras Banki-Horvath · 515ceaac · Aug 26, 2026 · 8 filesMessage 68 · AdequateInformational 24Details
Commit message · Andras Banki-Horvath

walletrpc: expose configurable output leases

Add optional confirmation-depth fields to LeaseOutput and FundPsbt. A
non-zero value selects a lease that ignores wall-clock expiry and
releases at the requested spend depth or by explicit owner release. Zero
preserves time-controlled leases.

Resolve wallet capability before acquiring inputs so unsupported
backends fail closed even when FundPsbt selects no new input. Echo the
accepted depth after installation, and expose persisted spend height
through ListLeases so clients can observe confirmation and reorg
progress.

Cover option forwarding, zero-depth compatibility, unsupported wallets,
partial acquisition rollback, and response marshalling.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet path
AI analysis · Informational 24/100

This commit adds a new optional feature to LND's wallet RPC that lets callers lock a coin (a 'UTXO lease') until the transaction spending it reaches a chosen number of confirmations, instead of relying only on a clock-time expiration. It also exposes more lease information in responses and lists. The change is defensive: it checks wallet support before locking, rejects unsupported wallets, requires a caller-chosen lock ID for the new mode, and preserves the old time-based behavior when the new option is not used. There is no direct evidence in the commit of a fixed vulnerability; it reads like a capability addition with safety checks.

AI review queuedlnwallet: add configurable output lease capabilityby Andras Banki-Horvath · dfca8039 · Aug 26, 2026 · 7 filesMessage 73 · AdequateInformational 12Details
Commit message · Andras Banki-Horvath

lnwallet: add configurable output lease capability

Define an optional interface for confirmation-controlled output leases
without widening WalletController or changing existing callers.

Resolve that capability through adapter chains before applying a
non-zero depth. LightningWallet and RPCKeyRing expose their wrapped
controller, so local and remote-signer nodes reach the concrete
btcwallet backend. Unsupported controllers fail closed.

Map the accepted depth to btcwallet's persisted option and retain the
legacy LeaseOutput path for zero-depth callers.

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

This commit adds a new optional wallet feature that lets LND lock a coin (UTXO) until the transaction spending it reaches a chosen number of confirmations. It is purely additive: it defines a new interface, routes calls through wallet adapter wrappers, and keeps the old zero-confirmation lease path unchanged. There is no bug fix, no reported vulnerability, and no evidence this change itself introduces a security issue.

Security candidatebuild: pin configurable btcwallet output leasesby Andras Banki-Horvath · 6f73d73d · Aug 26, 2026 · 3 filesMessage 80 · StrongModerate 60Details
Commit message · Andras Banki-Horvath

build: pin configurable btcwallet output leases

Pin btcwallet and wtxmgr to the canonical upstream commit that
merged the configurable-lease API and its wall-clock expiry fix.

Without the follow-up fix, a slowly confirming spend can outlive its
timed lease before wtxmgr records the spend height. A later shallow
reorg can then expose the input to coin selection.

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
access control
AI analysis · Moderate 60/100

This commit updates LND's dependency versions for btcwallet and wtxmgr to a newer upstream version that fixes a timing issue with 'output leases.' In plain terms, when LND temporarily reserves a coin (UTXO) for a transaction, it sets an expiration time. The bug being fixed is that a slow-to-confirm spend could have its reservation expire before the wallet records that the coin was actually spent. If a shallow blockchain reorganization then happens, the wallet might mistakenly think the coin is still available and select it again for a new transaction. This could lead to double-spending attempts or channel failures. The commit itself only changes version pins and linter settings; the actual code fix lives in the upstream btcwallet/wtxmgr libraries.

Security candidatelnwire: preserve channel update extrasby yyforyongyu · 7afea2bd · Aug 26, 2026 · 4 filesMessage 83 · StrongModerate 59Details
Commit message · yyforyongyu

lnwire: preserve channel update extras

Canonicalize channel update TLV data without mutating the message during
encoding. This keeps unknown records intact, reconciles legacy duplicate
inbound fee representations, and makes signing match the emitted bytes.

Cover receiver immutability, legacy encoding shapes, concurrent
encoding, and signature verification across a wire round trip.

83/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
signing boundarydefensive validationboot or update path
AI analysis · Moderate 59/100

This change fixes how Lightning channel-update messages handle optional extra data. Previously, encoding could silently rewrite the message's internal byte slice, which could cause signature mismatches, lost unknown fields, and race conditions when the same message was encoded from multiple threads. The patch now builds a fresh canonical copy of the extra data for each encoding/signing operation without changing the original message. The tests explicitly verify that signatures still verify after a full encode-decode round trip, that unknown fields survive, and that concurrent encoders no longer race.

Lower-prioritylnrpc: bound incoming websocket message sizeby Gijs van Dam · 75a1ba02 · Aug 25, 2026 · 2 filesMessage 68 · AdequateTriage 0Details
Commit message · Gijs van Dam

lnrpc: bound incoming websocket message size

The WebSocket proxy never set a read limit on the upgraded connection.
The gorilla default is unlimited, so the proxy would read a message of
any size a client cared to send, even though lnd already defines
MaxWsMsgSize and applies it to the responses written back out.

Note that this is a bound, not a fix for an amplification: ReadMessage
is io.ReadAll over the frame reader, so the buffer grows as bytes
actually arrive rather than being sized from the declared payload
length. A client that wants lnd to buffer N bytes has to send N bytes.
What the limit adds is the cheap rejection: gorilla now fails the frame
from its header in advanceFrame, before the payload is read at all.

Apply MaxWsMsgSize to the read side so both directions agree.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI review queuedlnrpc: fix Sec-Websocket-Protocol parsingby Gijs van Dam · 1a40089a · Aug 25, 2026 · 2 filesMessage 90 · StrongModerate 67Details
Commit message · Gijs van Dam

lnrpc: fix Sec-Websocket-Protocol parsing

forwardHeaders assumed that a Sec-Websocket-Protocol value matching one
of the allowed prefixes also contains the "+" delimiter, and indexed the
split result at [1] unconditionally. A client that sends only the
protocol name, for example "Grpc-Metadata-Macaroon" with no delimiter,
therefore caused an index out of range panic.

The panic is currently contained because forwardHeaders runs on the
net/http handler goroutine, whose deferred recover catches it, so only
the client's own connection dies. That containment is incidental to the
current call graph rather than by design though: neither the read loop
nor the backend forwarder goroutine has a recover of its own.

The prefix match was too loose in the other direction as well. The field
is a comma separated list of sub protocols, but it was matched and split
as a single string, so "Grpc-Metadata-Macaroon,other+value" passed the
prefix check and forwarded "value" from the second entry as the macaroon
for the first.

Split the field on "," first and cut each entry at its own delimiter,
forwarding only entries whose name adjoins that delimiter and is
allowed. Add a table test covering the forwarding rules including these
cases.

90/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
second-pass: broader security terminology
AI analysis · Moderate 67/100

This commit fixes a bug in how LND's WebSocket proxy handled a special browser header called Sec-Websocket-Protocol. Previously, a client could send just the protocol name without a required separator, causing the server to crash with a panic. The crash was only contained by accident, not by design. The fix also prevents a trick where a client could make one protocol entry steal a value from another entry in the same list. The patch adds tests to confirm the correct behavior.

Lower-prioritypeer: price outgoing queue messagesby yyforyongyu · 4fbc13f3 · Aug 25, 2026 · 2 filesMessage 68 · AdequateTriage 0Details
Commit message · yyforyongyu

peer: price outgoing queue messages

Estimate memory retained by each outgoing wire message without
serialization. Include peer-controlled onion, gossip feature-map,
address, and opaque payload allocations in the byte budget.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritypeer: define outgoing queue limitsby yyforyongyu · e67713c6 · Aug 25, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · yyforyongyu

peer: define outgoing queue limits

Define the per-peer outgoing backlog count and retained-memory bounds.
Keep the policy grouped so queue ownership and producers share one
immutable configuration.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Security candidatepeer: test outgoing queue costsby yyforyongyu · 64645cc5 · Aug 25, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · yyforyongyu

peer: test outgoing queue costs

Cover each non-serializing queue cost rule with declarative message
shapes. Pin the retained opaque data charged for all active v1 bulk
gossip messages.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
access control
AI analysis · Informational 15/100

This commit only adds a new automated test file. It does not change any production code, so it cannot introduce a security vulnerability or fix one directly. The test verifies how the outgoing message queue calculates the memory cost of different network messages, helping ensure future code changes do not accidentally under-count or over-count queue memory usage.

Security candidateMerge pull request #11008 from LNBIG-COM/fix/psbt-funding-lock-orderby Yong · a912dd69 · Aug 24, 2026 · 3 filesMessage 73 · AdequateModerate 66Details
Commit message · Yong

Merge pull request #11008 from LNBIG-COM/fix/psbt-funding-lock-order

lnwallet: fix limboMtx/intentMtx lock order inversion in PsbtFundingVerify

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
Why it was queued
signing boundarysigning or wallet pathmerge-commit duplicate discount
AI analysis · Moderate 66/100

This commit fixes a classic multi-threading bug in LND's wallet code. Two functions were acquiring the same two locks in opposite orders, which could cause a deadlock. When triggered, the wallet's single request-handler goroutine would freeze, permanently stopping all channel opening on the node and preventing newly confirmed channels from being announced. Only a restart would recover. The fix reorders the lock acquisition so both functions now take the locks in the same order.

Lower-prioritypeer: test routed ping floodsby yyforyongyu · 120f307d · Aug 21, 2026 · 1 fileMessage 78 · AdequateTriage 0Details
Commit message · yyforyongyu

peer: test routed ping floods

Use a mock message router that would consume an oversized Ping. Prove
flood accounting disconnects first and preserves the sentinel error for
operator diagnostics.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-prioritypeer: test ping policy boundariesby yyforyongyu · a97db0e4 · Aug 21, 2026 · 1 fileMessage 78 · AdequateTriage 0Details
Commit message · yyforyongyu

peer: test ping policy boundaries

Exercise exact production burst, refill, and Pong-size boundaries.
Retain deterministic cadence and reply-suppression coverage without
relying on wall-clock scheduling.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Security candidatepeer: rate limit inbound pingsby yyforyongyu · b9388cca · Aug 21, 2026 · 2 filesMessage 68 · AdequateModerate 65Details
Commit message · yyforyongyu

peer: rate limit inbound pings

Bound Pong replies with separate reply and flood token buckets.
Count every decoded Ping before generic routing. Disconnect peers that
exhaust the flood budget through a stable sentinel error.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
authentication path
AI analysis · Moderate 65/100

This commit adds rate limits on incoming ping messages in LND's peer connection handler. Without these limits, a malicious or misconfigured peer could send a flood of ping messages, forcing the node to waste CPU, memory, and bandwidth processing them and sending pong replies. The fix counts every incoming ping and disconnects peers that exceed a flood threshold, while also limiting how often pong replies are sent. This is a defensive hardening change against a potential denial-of-service attack.

Lower-priorityMerge pull request #11106 from ziggie1984/invoice-sql-migby ziggieXXX · 90ea05d5 · Aug 20, 2026 · 4 filesMessage 73 · AdequateTriage 0Details
Commit message · ziggieXXX

Merge pull request #11106 from ziggie1984/invoice-sql-mig

invoices: migrate legacy AMP invoice HTLCs

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discount
Lower-priorityMerge pull request #11105 from ziggie1984/bump-grpc-1.82.1by Yong · 19563915 · Aug 20, 2026 · 6 filesMessage 58 · ThinTriage 0Details
Commit message · Yong

Merge pull request #11105 from ziggie1984/bump-grpc-1.82.1

build: bump grpc to v1.83.1

58/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
Why it was queued
merge-commit duplicate discount
Lower-prioritykvdb: bump grpc module floorby ziggie · 81c3fb26 · Aug 20, 2026 · 2 filesMessage 78 · AdequateTriage 0Details
Commit message · ziggie

kvdb: bump grpc module floor

The kvdb module is versioned and published independently, so it must
also be tested or consumed as a nested module on its own.

Run go mod tidy in kvdb so the transitive requirements and checksums
match the grpc version selected by the module graph.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-prioritybrontide: clarify InitializeKey error-discard invariantby ziggie · 8a23e33c · Aug 20, 2026 · 1 fileMessage 85 · StrongTriage 0Details
Commit message · ziggie

brontide: clarify InitializeKey error-discard invariant

x/crypto v0.51.0 adds a second failure mode to chacha20poly1305.New:
it now returns an error under Go's strict FIPS 140-only mode, in
addition to the existing bad-key-length case. The key here is a fixed
[32]byte, and lnd cannot run under strict FIPS mode because brontide
mandates ChaCha20-Poly1305, so the discarded error remains unreachable.
Expand the comment to record that widened invariant.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Lower-prioritybuild: bump grpc to v1.83.1by ziggie · ad7ccc00 · Aug 20, 2026 · 3 filesMessage 57 · ThinTriage 0Details
Commit message · ziggie

build: bump grpc to v1.83.1

57/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
Lower-prioritypeer: attach outgoing queue costsby yyforyongyu · 99f537a4 · Aug 19, 2026 · 2 filesMessage 68 · AdequateTriage 0Details
Commit message · yyforyongyu

peer: attach outgoing queue costs

Calculate retained-memory charges when messages enter the peer queue.
Carry them as immutable metadata. Keep generic priority queue accounting
independent of wire types.

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