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

graph/db: add VersionedGraph routing/cache methods

Public commit record

What the developer wrote

Authored by Elle Mouton

73/100 · Adequate
graph/db: add VersionedGraph routing/cache methods

Add version-free shadow methods to VersionedGraph so it satisfies the
routing.Graph, graphdb.NodeTraverser, and related interfaces used by the
channel router and RPC layer.

FetchNodeFeatures and ForEachNodeDirectedChannel delegate to the graph
cache when available, falling back to the store with the baked-in
version. ForEachNode, ForEachNodeCached, ChannelView, and
NodeUpdatesInHorizon all forward to the embedded ChannelGraph with the
version pre-applied.

Update server.go and rpcserver.go to pass s.v1Graph (a *VersionedGraph
wrapping the main graphDB with GossipVersion1) wherever the routing and
session interfaces are needed, replacing direct *ChannelGraph references
that no longer satisfy those interfaces after the version parameters were
added.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit adds wrapper methods to a new 'VersionedGraph' type so the existing channel graph can be used by the router and RPC layer even after internal interfaces gained a 'version' parameter. It also wires up that wrapper in the main server and RPC server. There is no obvious security bug in the diff itself; it is a refactoring/forward-compatibility change. A TODO comment notes that one fallback path still hardcodes an older version, which could matter later but is not an active vulnerability.

Recommended action

Treat as a normal refactoring commit. Review the noted TODO about hardcoded GossipVersion1 in GraphSession to ensure version-correct behavior before enabling GossipVersion2 production paths. No immediate security patch is indicated by this diff alone.

Security signals we found

01

Interface-satisfying wrapper methods added to VersionedGraph

02

Cache-first delegation for FetchNodeFeatures and ForEachNodeDirectedChannel

03

Server/RPC wiring switched from raw ChannelGraph to VersionedGraph

04

TODO noting hardcoded GossipVersion1 in fallback GraphSession path

Risk score

Why this scored 25/100

Our methodology →
Potential impact 5/30
Exploitability 3/25
Stealth signal 3/15
Affected reach 5/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.