What changed, and why it matters
This commit changes how LND (a Bitcoin Lightning Network node) builds its own network address list when starting up. Previously, it merged newly configured addresses with addresses stored from a previous run. Now it stops doing that merge, using only the freshly configured addresses. The commit message says a condition to re-enable persisted addresses will be added in a follow-up commit. On its own, this is a behavior change, not a clear security fix or vulnerability.
Treat as a non-security refactor/behavioral change unless the follow-up commit or a vendor advisory establishes security relevance. Review the subsequent commit that reintroduces conditional persisted-address usage to understand the full intent and any security boundary.
Security signals we found
Behavior change in node address advertisement
Removal of address de-duplication logic
Commit message indicates this is an intermediate step, not final intended behavior
No explicit security claim in commit or diff
Evidence from the diff
In server.go’s setSelfNode function, the code that de-duplicated and appended previously persisted source-node addresses (srcNode.Addresses) to the current address list (addrs) is removed. The function now relies on addrs derived from externalip/config without merging in the graph DB’s stored addresses. The commit explicitly frames this as a temporary step: ‘We will introduce the condition to use persisted addresses in the next commit.’ No security relevance is stated, and the diff is partial (it removes functionality rather than adding the intended final logic).
Changed components
server.go setSelfNodeLND node address advertisement / persistenceInspect captured patch +0 / −18
diff --git a/server.go b/server.go
index 44be180..9c29adf 100644
--- a/server.go
+++ b/server.go
@@ -5559,15 +5559,6 @@ func (s *server) setSelfNode(ctx context.Context, nodePub route.Vertex,
return fmt.Errorf("unable to normalize addresses: %w", err)
}
- // To avoid having duplicate addresses, we'll only add addresses from
- // the source node that are not already in our address list yet. We
- // create this map for quick lookup.
- addressMap := make(map[string]struct{}, len(addrs))
- // Populate the map with the existing addresses.
- for _, existingAddr := range addrs {
- addressMap[existingAddr.String()] = struct{}{}
- }
-
// Parse the color from config. We will update this later if the config
// color is not changed from default (#3399FF) and we have a value in
// the source node.
@@ -5604,15 +5595,6 @@ func (s *server) setSelfNode(ctx context.Context, nodePub route.Vertex,
alias = srcNode.Alias
}
- // Append unique addresses from the source node to the address
- // list.
- for _, addr := range srcNode.Addresses {
- if _, found := addressMap[addr.String()]; !found {
- addrs = append(addrs, addr)
- addressMap[addr.String()] = struct{}{}
- }
- }
-
case errors.Is(err, graphdb.ErrSourceNodeNotSet):
// If an alias is not specified in the config, we'll use the
// default, which is the first 10 bytes of the serialized
Why this scored 24/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.