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

graph/db: add version parameter to IsPublicNode

Public commit record

What the developer wrote

Authored by Elle Mouton

78/100 · Adequate
graph/db: add version parameter to IsPublicNode

Make IsPublicNode version-aware by routing to the appropriate SQL
query based on gossip version. V1 and v2 have different criteria for
determining node publicity (v1 requires four signatures, v2 requires
one). Convert TestNodeIsPublic to versioned test for both protocols.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit updates how LND decides whether a Lightning node is 'public' so that the decision respects the network's gossip protocol version. In the older v1 protocol, a node needed four signatures to be considered public; in the newer v2 protocol, one signature is enough. Previously the code always used the v1 rule, which could misclassify v2 nodes as private. The change is a correctness fix rather than an obvious remote-exploitable vulnerability, but misclassified publicity could affect routing, channel selection, or policy decisions.

Recommended action

Review the SQL implementations of IsPublicV1Node and IsPublicV2Node to confirm the v2 query correctly enforces the one-signature rule and that no edge cases allow private nodes to be treated as public. Ensure callers that need v2-aware behavior use VersionedGraph rather than ChannelGraph, since ChannelGraph still hardcodes GossipVersion1.

Security signals we found

01

Protocol-version-specific logic added to node publicity classification

02

Previously v2 gossip nodes could be evaluated under v1 four-signature rule

03

KVStore explicitly rejects non-v1 gossip versions for this query

04

SQLStore adds IsPublicV2Node query path

05

No explicit security framing in commit message or diff

Risk score

Why this scored 24/100

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