mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-11 00:47:39 +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:
@@ -34,6 +34,8 @@ pub enum SessionMessageType {
|
||||
ReceiverReport = 0x12,
|
||||
/// Path MTU notification (discovered path MTU).
|
||||
PathMtuNotification = 0x13,
|
||||
/// Standalone coordinate cache warming (empty body, coords in CP flag).
|
||||
CoordsWarmup = 0x14,
|
||||
|
||||
// Link-layer error signals (0x20-0x2F) — plaintext, from transit routers
|
||||
/// Router cache miss — needs coordinates (link-layer error signal).
|
||||
@@ -52,6 +54,7 @@ impl SessionMessageType {
|
||||
0x11 => Some(SessionMessageType::SenderReport),
|
||||
0x12 => Some(SessionMessageType::ReceiverReport),
|
||||
0x13 => Some(SessionMessageType::PathMtuNotification),
|
||||
0x14 => Some(SessionMessageType::CoordsWarmup),
|
||||
0x20 => Some(SessionMessageType::CoordsRequired),
|
||||
0x21 => Some(SessionMessageType::PathBroken),
|
||||
_ => None,
|
||||
@@ -73,6 +76,7 @@ impl fmt::Display for SessionMessageType {
|
||||
SessionMessageType::SenderReport => "SenderReport",
|
||||
SessionMessageType::ReceiverReport => "ReceiverReport",
|
||||
SessionMessageType::PathMtuNotification => "PathMtuNotification",
|
||||
SessionMessageType::CoordsWarmup => "CoordsWarmup",
|
||||
SessionMessageType::CoordsRequired => "CoordsRequired",
|
||||
SessionMessageType::PathBroken => "PathBroken",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user