AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 36 Bitcoin

graph: make zombie detection version-aware

Public commit record

What the developer wrote

Authored by Elle Mouton

68/100 · Adequate
graph: make zombie detection version-aware

Introduce isPolicyZombie to handle version-specific channel staleness.
For v1 policies, staleness is measured by wall-clock time since the last
update (unchanged behaviour). For v2 policies, staleness is measured by
the number of blocks elapsed since LastBlockHeight, using
avgBitcoinBlockTime to convert the configured prune expiry into an
equivalent block count.

isZombieChannel is simplified to call isPolicyZombie for each edge and
inline the strict/non-strict pruning logic directly, removing the prior
indirect call through IsZombieChannel.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit changes how the Lightning Network Daemon (LND) decides when a payment channel is a 'zombie' (inactive and should be removed from the network graph). Previously, all channels were judged by wall-clock time since their last update. Now, newer 'v2' gossip channels are judged by how many Bitcoin blocks have passed since their last update block height. This is a correctness/robustness improvement for the newer gossip protocol, not a fix for an active exploit. It reduces the risk that v2 channels are wrongly pruned or kept due to clock skew.

Recommended action

Review the hard-coded avgBitcoinBlockTime assumption and consider whether it should be configurable or adjusted for testnet/signet. Ensure that downstream callers of IsZombieChannel still behave correctly now that isZombieChannel no longer uses it. No urgent security patch is indicated.

Security signals we found

01

Version-aware staleness logic reduces risk of incorrect graph pruning for v2 gossip channels

02

Future LastBlockHeight is explicitly treated as non-zombie, preventing premature pruning

03

Hard-coded avgBitcoinBlockTime (10 minutes) introduces approximation risk if block times diverge significantly

04

Refactor removes indirect call through exported IsZombieChannel, centralizing policy logic

Risk score

Why this scored 36/100

Our methodology →
Potential impact 8/30
Exploitability 4/25
Stealth signal 6/15
Affected reach 7/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.