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

graph/db: fetch policy version in cache paginated query

Public commit record

What the developer wrote

Authored by Elle Mouton

73/100 · Adequate
graph/db: fetch policy version in cache paginated query

The ListChannelsWithPoliciesForCachePaginated query was missing the
policy version column, causing extractChannelPolicies to hardcode
lnwire.GossipVersion1 for that row type. Add cp1.version and
cp2.version to the query and use the fetched values instead.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a bug in LND's channel graph cache where a database query forgot to fetch the 'version' field for routing policies. The code was then hardcoding an older policy version (GossipVersion1) for those cached policies. This could cause newer, extended routing policy fields to be misinterpreted or ignored when the cache is used, potentially leading to stale or incorrect routing information.

Recommended action

Treat as a bug fix with possible routing-reliability implications. Review whether cached graph state could have diverged from persisted state and whether any gossip propagation or pathfinding behavior was affected. No immediate emergency response is indicated, but operators should update to include this fix.

Security signals we found

01

Incorrect policy version used for cached graph data

02

Potential mismatch between stored and interpreted routing policy fields

03

Graph cache could serve stale or malformed channel policies

04

No explicit security framing in commit message

Risk score

Why this scored 34/100

Our methodology →
Potential impact 8/30
Exploitability 4/25
Stealth signal 6/15
Affected reach 7/15
Confidence 6/10
Evidence quality 3/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.