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 34 minutes ago

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

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

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

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

Merge pull request #10708 from jtobin/alias-perms

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

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

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

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

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

docs: describe invoice collection finality

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

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

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

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

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

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

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

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

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

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

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

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

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

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

invoices: require complete payment collection

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

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

lnwallet: reject a zero CSV delay

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

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

lnwallet+chanstate: keep persisted HTLC data readable

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

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

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

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

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

invoices: reject settled AMP set shards

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

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

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

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

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

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

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

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

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

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

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

invoices: fix test whitespace

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

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

build: pin the new lint job actions by commit

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

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

build: fix the custom linter cache wiring for CI

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

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

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

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

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

Explore captured commits

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

AI review queuedserver: use channel state open channelby ziggie · 8e709678 · Jul 7, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · ziggie

server: use channel state open channel

Update server callback wiring to use chanstate.OpenChannel at the
funding manager boundary.

This follows the funding package change and removes another
consumer-facing dependency on the channeldb OpenChannel alias.

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 in LND. It changes three places in server.go to use a new internal type name (chanstate.OpenChannel) instead of an old alias (channeldb.OpenChannel). The actual behavior of the code is unchanged; it simply updates wiring after a previous refactoring in the funding package. There is no security-relevant change visible in the diff.

Lower-prioritychanstate: use channel types in watchtowerby ziggie · 4bb78770 · Jul 7, 2026 · 5 filesMessage 68 · AdequateInformational 15Details
Commit message · ziggie

chanstate: use channel types in watchtower

Move watchtower blob and client channel-type boundaries to chanstate.

The wtclient manager still imports channeldb for closed-channel lookup
errors, but the channel type and close-summary payloads now use the
channel state package directly.

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 in LND's watchtower subsystem. It changes which Go package the watchtower code uses to reference channel types and channel close summaries, moving from the older 'channeldb' package to a newer 'chanstate' package. There is no functional change visible in the diff, no bug fix, and no security patch.

Lower-prioritychanstate: use channel type in gossiperby ziggie · 7bd24477 · Jul 7, 2026 · 2 filesMessage 68 · AdequateInformational 15Details
Commit message · ziggie

chanstate: use channel type in gossiper

Move the gossiper channel lookup callback to chanstate.OpenChannel.

Discovery still depends on channeldb for waiting-proof persistence.
This commit only removes the channeldb compatibility alias from the
channel state lookup boundary.

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 in LND's channel gossip subsystem. It changes which internal data type the gossiper uses when looking up a channel, switching from a database-specific type to a newer channel-state type. There is no user-facing behavior change and no security fix.

Lower-prioritychanstate: use channel type in lnpeerby ziggie · c58d51d5 · Jul 7, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · ziggie

chanstate: use channel type in lnpeer

Move lnpeer.NewChannel to embed chanstate.OpenChannel.

This keeps the peer-facing channel event type independent of the
channeldb compatibility alias while preserving the existing embedded
OpenChannel field shape for callers.

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 one internal type reference (channeldb.OpenChannel) for another internal type reference (chanstate.OpenChannel) inside a peer-related data structure. The commit message says the goal is to keep the peer-facing type independent from a compatibility alias while keeping the same field layout for existing callers. There is no security-relevant behavior change visible in the diff.

AI review queuedchanstate: use channel type in wallet rpcby ziggie · 8a215d9e · Jul 7, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · ziggie

chanstate: use channel type in wallet rpc

Move the waiting-close channel helper to chanstate.OpenChannel.

The helper consumes channel state returned by the store interface, so
it should not spell the channeldb compatibility alias. Other database
errors and APIs in the wallet RPC server remain on channeldb.

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

This is a small internal code cleanup in LND's wallet RPC server. It changes one helper function to use a newer internal package type (chanstate.OpenChannel) instead of an older compatibility alias (channeldb.OpenChannel). There is no user-facing behavior change, no bug fix, and no security-relevant change visible in the diff.

Lower-prioritychanstate: use channel types in switch configby ziggie · 37249158 · Jul 7, 2026 · 4 filesMessage 68 · AdequateInformational 15Details
Commit message · ziggie

chanstate: use channel types in switch config

Move the htlcswitch channel fetch callbacks to chanstate types.

The switch still depends on channeldb for its KV circuit storage and
forwarding package access. This commit only moves channel-state
payloads at the switch and circuit-map boundaries.

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 straightforward internal code cleanup: it changes which Go package provides the data structures used to describe open and closed channels inside the HTLC switch. There is no change to how data is validated, stored, or transmitted, and no security-relevant behavior is altered.

Lower-prioritychanstate: use channel type in status managerby ziggie · cd038345 · Jul 7, 2026 · 2 filesMessage 68 · AdequateInformational 15Details
Commit message · ziggie

chanstate: use channel type in status manager

Move the channel status manager working set to chanstate.OpenChannel.

The DB interface already returns channelstate channel values, so this
removes another channeldb compatibility alias from the consumer path
while keeping the graph and announcement behavior unchanged.

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 straightforward internal code cleanup: it changes the channel status manager to use a newer internal package (chanstate) instead of an older compatibility alias (channeldb) for representing open channels. There is no user-facing behavior change, no bug fix, and no security-relevant change visible in the diff.

Lower-prioritychanstate: use channel types in backupsby ziggie · dac8a8fe · Jul 7, 2026 · 5 filesMessage 68 · AdequateInformational 15Details
Commit message · ziggie

chanstate: use channel types in backups

Move static channel backup construction to chanstate channel types.

The package still imports channeldb where it uses real database
concerns, including address sourcing and duplicate-channel recovery.
The backup payload and live-channel source boundaries no longer depend
on the channeldb compatibility aliases.

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 in LND's channel backup system. It replaces references to the older `channeldb` package with a newer `chanstate` package for channel type definitions. The actual backup data, encryption, and recovery logic are unchanged. There is no indication this fixes a security bug or introduces a vulnerability.

Lower-prioritychanstate: use channel type in backup notifierby ziggie · 897f2ce5 · Jul 7, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · ziggie

chanstate: use channel type in backup notifier

Move the root backup notifier adapter to chanstate.OpenChannel.

The adapter still depends on channeldb for address sourcing and close
type handling, but the new-channel payload it forwards into chanbackup
now matches the chanstate-owned backup interfaces.

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 in LND. It changes one function parameter type from channeldb.OpenChannel to chanstate.OpenChannel inside the channel backup notifier. There is no visible security fix, behavior change, or bug correction in the diff. It appears to be part of a larger refactoring to move channel-state logic into a new chanstate package.

Lower-prioritychanstate: use channel types in consumersby ziggie · fea9c171 · Jul 7, 2026 · 4 filesMessage 68 · AdequateInformational 15Details
Commit message · ziggie

chanstate: use channel types in consumers

Move channelnotifier and invoice hop-hint code to the chanstate channel
types.

These consumers already depend on the chanstate store interfaces, so
they no longer need to refer to the channeldb compatibility aliases for
OpenChannel and ChannelCloseSummary.

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 straightforward internal code cleanup. It changes which Go package name is used to refer to common channel data types (OpenChannel, ChannelCloseSummary, etc.) in two parts of the codebase. Previously these types were referenced through an older compatibility alias in the channeldb package; now they are referenced directly through the newer chanstate package. The actual data structures and behavior are unchanged, and there is no indication this fixes or introduces a security issue.

Lower-prioritychanstate: use htlc type in beaconby ziggie · 471c9b69 · Jul 7, 2026 · 2 filesMessage 68 · AdequateInformational 15Details
Commit message · ziggie

chanstate: use htlc type in beacon

Move the witness subscription HTLC parameter to chanstate.HTLC.

The beacon still depends on channeldb for witness-cache errors, but it
no longer needs the channel DB compatibility alias for HTLC payloads.

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 small internal code cleanup. It changes one function to use a different internal data type for HTLC (payment channel transaction) information, moving from a database-specific type to a channel-state type. There is no security-relevant change visible in the diff.

Lower-prioritychanstate: use channel types in interfacesby ziggie · a3fdcba5 · Jul 7, 2026 · 3 filesMessage 68 · AdequateInformational 15Details
Commit message · ziggie

chanstate: use channel types in interfaces

Move small interface-only consumers to chanstate.OpenChannel.

These packages only expose open-channel values through callback or
store interfaces, so they can depend on the channel-state package
without pulling in channeldb compatibility aliases.

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 straightforward internal code cleanup. It changes three interface definitions to reference a new package (chanstate.OpenChannel) instead of an older one (channeldb.OpenChannel). There is no functional change to how the software behaves, no bug fix, and no security-related change.

Lower-prioritychanstate: use channel types in fitnessby ziggie · 19e656b2 · Jul 7, 2026 · 3 filesMessage 68 · AdequateInformational 15Details
Commit message · ziggie

chanstate: use channel types in fitness

Move channel event payloads in chanfitness to chanstate types.

The event store still uses channeldb for flap-count persistence and
related errors, but open-channel and close-summary values now come from
the channel-state package.

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 small internal code cleanup in LND's channel-fitness subsystem. It swaps one internal Go data type for another equivalent one (moving from channeldb to a newer chanstate package) in test and production code. There is no user-facing behavior change, no bug fix, and no security-relevant change visible in the diff.

Security candidatechanstate: fix htlc copyby ziggie · b720fd5c · Jul 6, 2026 · 2 filesMessage 56 · ThinLow 46Details
Commit message · ziggie

chanstate: fix htlc copy

Copy all HTLC fields when cloning channel commitment state.

The old copy method only copied a subset of scalar fields and copied
into nil slices for Signature and ExtraData. Allocate those slices and
deep-copy custom record values so snapshots and channel copies retain
complete HTLC metadata.

56/100 · ThinMessage clarity
✓ Subject identifies a change✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
signing boundary
AI analysis · Low 46/100

This commit fixes a bug in how the Lightning Network Daemon (LND) copies payment channel data. When the program made a copy of an HTLC (a pending payment in a Lightning channel), it failed to copy several important fields and did not properly duplicate variable-length data like signatures, extra data, and custom records. This could cause copies or snapshots of channel state to be incomplete or accidentally share mutable data. The fix deep-copies all relevant fields and adds a test to verify the copy is fully independent.

AI review queuedchanstate: remove store genericsby ziggie · 68ad283d · Jul 6, 2026 · 15 filesMessage 58 · ThinInformational 15Details
Commit message · ziggie

chanstate: remove store generics

Drop the temporary channel type parameter from the channel-state store
interfaces now that OpenChannel lives in chanstate.

The domain store subinterfaces now refer to *OpenChannel directly while
retaining the same backend-independent shape. Update callers and
compatibility aliases to use the concrete Store and ChannelShell types.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is a routine internal code cleanup in the LND Lightning node software. It removes temporary generic type parameters from channel-state database interfaces and replaces them with direct references to the concrete OpenChannel type. There are no user-facing behavior changes, no bug fixes, and no security-related modifications.

Lower-prioritychanneldb: document legacy fwd packager interfaceby ziggie · c5aabdf8 · Jul 6, 2026 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · ziggie

channeldb: document legacy fwd packager interface

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

This commit only adds a documentation comment (a TODO note) to an existing interface in the channel database code. No code behavior was changed, no bug was fixed, and no security issue is present in the diff.

Lower-prioritychanstate: split commitment store interfaceby ziggie · 07ede43a · Jul 6, 2026 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · ziggie

chanstate: split commitment store interface

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

This commit is a pure code refactoring change. It takes one existing Go interface called OpenChannelCommitmentStore and splits it into two smaller interfaces: one for write/mutation operations and one for read/query operations. The original interface is preserved by embedding the two new ones. No behavior, logic, or security properties of the software change.

Lower-prioritychanneldb: add store status checkby ziggie · 6eef3ad6 · Jul 6, 2026 · 1 fileMessage 68 · AdequateInformational 11Details
Commit message · ziggie

channeldb: add store status check

Add a transitional non-locking status predicate for channeldb store
code and use it from KV serialization helpers.

This avoids calling an unexported OpenChannel helper from channeldb
after the type moves into chanstate.

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

This commit is a small internal code cleanup in LND's channel database code. It adds a new public helper method that lets store/serialization code check a channel's status without grabbing a lock, and switches a few internal serialization functions to use it. There is no direct security fix or vulnerability being patched here; it appears to be preparation for a larger code reorganization.

Lower-prioritychanstate: move channel snapshot typeby ziggie · aeab363a · Jul 6, 2026 · 2 filesMessage 68 · AdequateInformational 15Details
Commit message · ziggie

chanstate: move channel snapshot type

Move the backend-neutral ChannelSnapshot value type into chanstate and
leave channeldb with a compatibility alias.

This keeps the future OpenChannel Snapshot receiver close to its return
type without changing existing channeldb callers.

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

This commit is a simple code reorganization: it moves a data structure called ChannelSnapshot from one package (channeldb) to another (chanstate), and leaves a compatibility alias so existing code keeps working. There are no functional changes, no bug fixes, and no security implications.

Lower-prioritychanstate: move open channel typeby ziggie · 3adc0133 · Jul 6, 2026 · 7 filesMessage 78 · AdequateInformational 15Details
Commit message · ziggie

chanstate: move open channel type

Move OpenChannel and its backend-neutral receiver methods into the
chanstate package.

channeldb now keeps a compatibility alias while retaining the KV store
implementation and serialization helpers. Tests that used private
channel status fields now use store-facing accessors.

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

This commit is a pure internal code reorganization (refactor). It moves the OpenChannel data type and its methods from the channeldb package into a new chanstate package, while leaving a compatibility alias in channeldb so existing code keeps working. There are no user-facing behavior changes, no protocol changes, and no security fixes or vulnerabilities introduced in the visible diff.

AI review queuedchanstate: move taproot channel helpersby ziggie · c065aa91 · Jul 6, 2026 · 2 filesMessage 78 · AdequateInformational 15Details
Commit message · ziggie

chanstate: move taproot channel helpers

Move the backend-neutral taproot shachain and verification nonce
helpers into chanstate with the thaw-height threshold they support.

Leave channeldb aliases for existing callers while OpenChannel and its
receiver methods are moved across the package boundary.

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 validationsecond-pass: broader security terminology
AI analysis · Informational 15/100

This commit is a routine code reorganization: it moves two helper functions and a constant related to Taproot channels from one internal package (channeldb) to another (chanstate), and leaves aliases in the old location so existing callers keep working. There is no change to behavior, no bug fix, and no security patch.

AI review queuedchanneldb: derive channel packagersby ziggie · 0229e0ad · Jul 6, 2026 · 9 filesMessage 58 · ThinInformational 18Details
Commit message · ziggie

channeldb: derive channel packagers

Remove the KV forwarding packager from OpenChannel and derive a
ChannelPackager inside the channeldb store methods that need one.

This keeps the backend-specific kvdb transaction helper in channeldb,
so the OpenChannel type no longer carries that dependency toward
chanstate.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: broader security terminologysecond-pass: security-sensitive path
AI analysis · Informational 18/100

This commit is a code cleanup: it removes a forwarding-package helper object from the in-memory channel state and instead creates it on demand inside database methods. There is no direct security fix or vulnerability being patched. It mainly reduces coupling between components and updates tests to match the new structure.

Lower-prioritychanstate: move revocation log typesby ziggie · dbc9a701 · Jul 6, 2026 · 3 filesMessage 78 · AdequateInformational 15Details
Commit message · ziggie

chanstate: move revocation log types

Move the revocation-log value types and TLV serialization helpers into
chanstate.

Leave channeldb aliases and wrapper functions for the existing KV
persistence code and tests. Bucket keys, errors, and transaction
helpers stay in channeldb, so this commit only moves backend-neutral
state data.

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

This commit is a straightforward code reorganization: it moves data type definitions and serialization helpers for revocation logs from the channeldb package into a new chanstate package, while keeping the actual database storage code in channeldb. There is no change to how data is stored, parsed, or validated, and no security-relevant behavior is altered.

Lower-prioritychanstate: add previous state lookupby ziggie · 1bcd4d65 · Jul 6, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · ziggie

chanstate: add previous state lookup

Add FindPreviousState to the chanstate commitment store subinterface now that
RevocationLog is a chanstate value type.

This extends the store contract without changing runtime behavior. The
existing ChannelStateDB method already satisfies the new method.

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

This commit only adds a new method declaration to an internal Go interface in LND's channel state package. It does not change any running code, data handling, or security behavior. The commit message explicitly says it extends the store contract without changing runtime behavior. There is no security issue visible in this change.

Lower-prioritychanneldb: store channel state by interfaceby ziggie · 40234f3c · Jul 6, 2026 · 6 filesMessage 78 · AdequateInformational 15Details
Commit message · ziggie

channeldb: store channel state by interface

Change OpenChannel.Db to the composed chanstate Store interface while
keeping the existing field name.

Tests that need raw channeldb access now assert the concrete test
backend explicitly instead of reaching through OpenChannel.Db. This
keeps backend setup out of the store contract.

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

This commit is a straightforward internal code cleanup: it changes the type of one field in LND's channel database from a concrete database pointer to a more generic 'Store' interface. The goal is to make future refactoring easier, not to fix a bug or close a security hole. No security relevance is visible in the change itself or in the commit message.