mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-12 09:33:23 +00:00
Hybrid coordinate warmup: CoordsWarmup message and proactive fallback
Implement hybrid coordinate cache warming strategy: piggyback coords via CP flag when they fit within transport MTU, send standalone CoordsWarmup (0x14) message when they don't. On CoordsRequired or PathBroken receipt, send CoordsWarmup immediately with source-side rate limiting (default 2s per destination, configurable). - Add CoordsWarmup = 0x14 session message type (empty body, CP flag) - Add send_coords_warmup() following send_session_msg() pattern - Restructure send_session_data() to send standalone warmup before data packet when piggybacked coords exceed MTU - Add immediate CoordsWarmup response in handle_coords_required() and handle_path_broken() with per-destination rate limiting - Add coords_response_interval_ms config (node.session) - Add RoutingErrorRateLimiter::with_interval() constructor - Zero transit-path changes: existing try_warm_coord_cache() handles CoordsWarmup identically to CP-flagged data packets - Update design docs (session layer, wire formats, mesh operation, configuration)
This commit is contained in:
@@ -233,6 +233,11 @@ pub struct SessionConfig {
|
||||
/// Also used as the reset count on CoordsRequired receipt.
|
||||
#[serde(default = "SessionConfig::default_coords_warmup_packets")]
|
||||
pub coords_warmup_packets: u8,
|
||||
/// Minimum interval (ms) between standalone CoordsWarmup responses to
|
||||
/// CoordsRequired/PathBroken signals, per destination
|
||||
/// (`node.session.coords_response_interval_ms`).
|
||||
#[serde(default = "SessionConfig::default_coords_response_interval_ms")]
|
||||
pub coords_response_interval_ms: u64,
|
||||
}
|
||||
|
||||
impl Default for SessionConfig {
|
||||
@@ -243,6 +248,7 @@ impl Default for SessionConfig {
|
||||
pending_max_destinations: 256,
|
||||
idle_timeout_secs: 90,
|
||||
coords_warmup_packets: 5,
|
||||
coords_response_interval_ms: 2000,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -253,6 +259,7 @@ impl SessionConfig {
|
||||
fn default_pending_max_destinations() -> usize { 256 }
|
||||
fn default_idle_timeout_secs() -> u64 { 90 }
|
||||
fn default_coords_warmup_packets() -> u8 { 5 }
|
||||
fn default_coords_response_interval_ms() -> u64 { 2000 }
|
||||
}
|
||||
|
||||
/// Session-layer Metrics Measurement Protocol (`node.session_mmp.*`).
|
||||
|
||||
Reference in New Issue
Block a user