diff --git a/src/node/lifecycle.rs b/src/node/lifecycle.rs index d2ba455..be9a4d5 100644 --- a/src/node/lifecycle.rs +++ b/src/node/lifecycle.rs @@ -901,9 +901,9 @@ impl Node { } } - /// Drain mDNS-discovered peers and initiate Noise XX handshakes. + /// Drain mDNS-discovered peers and initiate Noise IK handshakes. /// The handshake itself is the authentication — a spoofed mDNS advert - /// with someone else's npub fails the XX exchange and is dropped. + /// with someone else's npub fails the IK exchange and is dropped. pub(super) async fn poll_lan_discovery(&mut self) { let Some(runtime) = self.lan_discovery.clone() else { return; diff --git a/src/node/mod.rs b/src/node/mod.rs index 1120b75..e9bb248 100644 --- a/src/node/mod.rs +++ b/src/node/mod.rs @@ -1307,9 +1307,12 @@ impl Node { /// Compute and cache the estimated mesh size from bloom filters. /// - /// Uses the spanning tree partition: parent's filter covers nodes reachable - /// upward, children's filters cover disjoint subtrees downward. The sum - /// of estimated entry counts plus one (self) approximates total network size. + /// Builds an OR-union of self plus every connected peer's inbound filter + /// and estimates its cardinality once. Unioning (rather than summing + /// per-peer counts) deduplicates the overlap between the split-horizon + /// filters, each of which approximates "the whole mesh minus my subtree". + /// See the body for why all routing peers contribute, not just the tree + /// neighborhood. pub(crate) fn compute_mesh_size(&mut self) { let my_addr = *self.tree_state.my_node_addr();