node: demote routine per-peer and capacity-cap events from info/warn to debug

On a saturated public-mesh node the connection-lifecycle and capacity-cap
events fire continuously and drown out the genuinely notable INFO/WARN
lines. Demote them to debug and drop a redundant duplicate:

- FMP K-bit cutover promotion (encrypted): info -> debug
- "Connection promoted to active peer" (handshake): info -> debug, and
  remove the duplicate "Inbound peer promoted to active" line that
  shadowed it on the inbound path
- "Peer restart detected" (handshake): info -> debug
- "Peer removed and state cleaned up" (dispatch): info -> debug
- "Rejecting inbound TCP connection (max_inbound_connections reached)"
  (tcp): warn -> debug
- "Congestion detected, CE flag set on forwarded packet" (forwarding):
  warn -> debug
- "Removing peer: link dead timeout" (mmp): warn -> debug

These are expected, high-frequency conditions on a busy public node (new
and reconnecting peers, ECN CE marking, the inbound connection cap, and
link-dead churn), not operator-actionable signals.
This commit is contained in:
Johnathan Corgan
2026-06-06 19:11:45 +00:00
parent 180950badf
commit 974e146bb9
6 changed files with 11 additions and 14 deletions

View File

@@ -194,7 +194,7 @@ impl Node {
let remaining_peers: Vec<NodeAddr> = self.peers.keys().copied().collect();
self.bloom_state.mark_all_updates_needed(remaining_peers);
info!(
debug!(
peer = %self.peer_display_name(node_addr),
link_id = %link_id,
tree_changed = tree_changed,

View File

@@ -5,7 +5,7 @@ use crate::node::wire::{EncryptedHeader, FLAG_CE, FLAG_KEY_EPOCH, FLAG_SP, strip
use crate::noise::NoiseError;
use crate::transport::ReceivedPacket;
use std::time::Instant;
use tracing::{debug, info, trace, warn};
use tracing::{debug, trace, warn};
/// Force-remove a peer after this many consecutive decryption failures.
const DECRYPT_FAILURE_THRESHOLD: u32 = 20;
@@ -94,7 +94,7 @@ impl Node {
});
if let Some(plaintext) = pending_plaintext {
info!(
debug!(
peer = %display_name,
"Peer new-epoch frame authenticated, K-bit flip promoting new session"
);

View File

@@ -106,7 +106,7 @@ impl Node {
.unwrap_or(true);
if should_log {
self.last_congestion_log = Some(now);
warn!(next_hop = %next_hop_addr, "Congestion detected, CE flag set on forwarded packet");
debug!(next_hop = %next_hop_addr, "Congestion detected, CE flag set on forwarded packet");
}
}

View File

@@ -248,7 +248,7 @@ impl Node {
match (existing_epoch, new_epoch) {
(Some(existing), Some(new)) if existing != new => {
// Epoch mismatch — peer restarted. Tear down stale session.
info!(
debug!(
peer = %self.peer_display_name(&peer_node_addr),
"Peer restart detected (epoch mismatch), removing stale session"
);
@@ -510,12 +510,9 @@ impl Node {
if let Some(peer) = self.peers.get_mut(&node_addr) {
peer.set_handshake_msg2(wire_msg2.clone());
}
debug!(
peer = %self.peer_display_name(&node_addr),
link_id = %link_id,
our_index = %our_index,
"Inbound peer promoted to active"
);
// Promotion is logged once by `promote_connection`
// ("Connection promoted to active peer"); no separate
// inbound-path line.
// Send initial tree announce to new peer
if let Err(e) = self.send_tree_announce_to_peer(&node_addr).await {
debug!(peer = %self.peer_display_name(&node_addr), error = %e, "Failed to send initial TreeAnnounce");
@@ -1166,7 +1163,7 @@ impl Node {
self.retry_pending.remove(&peer_node_addr);
self.register_identity(peer_node_addr, verified_identity.pubkey_full());
info!(
debug!(
peer = %self.peer_display_name(&peer_node_addr),
link_id = %link_id,
our_index = %our_index,

View File

@@ -573,7 +573,7 @@ impl Node {
.unwrap_or(0);
for addr in &dead_peers {
warn!(
debug!(
peer = %self.peer_display_name(addr),
timeout_secs = self.config.node.link_dead_timeout_secs,
"Removing peer: link dead timeout"

View File

@@ -801,7 +801,7 @@ async fn accept_loop(
// operator-facing inbound cap.
if stats.pool_inbound_count() >= max_inbound as u64 {
stats.record_connection_rejected();
warn!(
debug!(
transport_id = %transport_id,
peer_addr = %peer_addr,
max = max_inbound,