diff --git a/.gitignore b/.gitignore index 09f42ba..09138dd 100644 --- a/.gitignore +++ b/.gitignore @@ -220,7 +220,6 @@ proptest-regressions/ # Package manager caches .cargo/ -!.cargo/config.toml # Claude/AI assistant files .claude/ diff --git a/Cargo.lock b/Cargo.lock index 8b8cc78..7f98bc1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -859,7 +859,7 @@ dependencies = [ [[package]] name = "ant-node" -version = "0.6.0" +version = "0.7.0" dependencies = [ "aes-gcm-siv", "alloy", @@ -5217,8 +5217,6 @@ dependencies = [ [[package]] name = "saorsa-core" version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d3d05b97f789b0e0b7d54b2fe05f05edfafb94f72d065482fc20ce1e9fab69e" dependencies = [ "anyhow", "async-trait", diff --git a/src/bin/ant-node/main.rs b/src/bin/ant-node/main.rs index c3f557d..390798b 100644 --- a/src/bin/ant-node/main.rs +++ b/src/bin/ant-node/main.rs @@ -10,7 +10,14 @@ use tracing::{info, warn}; use tracing_subscriber::prelude::*; use tracing_subscriber::{fmt, EnvFilter, Layer}; -#[tokio::main] +/// Force at least 4 worker threads regardless of CPU count. +/// +/// On small VMs (1-2 vCPU), the default `num_cpus` gives only 1-2 worker +/// threads. The NAT traversal `poll()` function does synchronous work +/// (`parking_lot` locks, `DashMap` iteration) that blocks its worker thread. +/// With only 1 worker, this freezes the entire runtime — timers stop, +/// keepalives can't fire, and connections die silently. +#[tokio::main(flavor = "multi_thread", worker_threads = 4)] async fn main() -> color_eyre::Result<()> { // Initialize error handling color_eyre::install()?;