ingress: hold at most 64 announces per interface by default

This commit is contained in:
DeFiDude committed 2026-11-18 12:19:12 -07:00
1 parent 0842e9d86e
commit 8bdd1f828a
3 files changed
+6 -3

No files matched your search

+1 -1
View File
@@ -288,7 +288,7 @@ pub const AR_MINFREQ_HZ: f64 = 0.1;
pub const PR_MINFREQ_HZ: f64 = 0.1;
pub const AR_FREQ_DECAY: f64 = 1.0 / AR_MINFREQ_HZ;
pub const PR_FREQ_DECAY: f64 = 1.0 / PR_MINFREQ_HZ;
pub const MAX_HELD_ANNOUNCES: usize = 256;
pub const MAX_HELD_ANNOUNCES: usize = rns_transport::constants::MAX_HELD_ANNOUNCES;
/// Duration a new interface stays in "new" state (seconds).
pub const IC_NEW_TIME: f64 = 7200.0;
/// Burst threshold for new interfaces (announces/sec).
+2 -2
View File
@@ -192,8 +192,8 @@ pub const BLACKHOLE_CHECK_INTERVAL: f64 = 60.0;
/// (0.02 means 2%). Supply a fraction, not a percentage, to transport APIs.
pub const ANNOUNCE_CAP: f64 = 0.02;
/// Maximum ingress-limited announces to hold per interface.
pub const MAX_HELD_ANNOUNCES: usize = 256;
/// Maximum ingress-limited announces to hold per interface (Interface.py).
pub const MAX_HELD_ANNOUNCES: usize = 64;
/// Held announce release interval (seconds).
pub const IC_HELD_RELEASE_INTERVAL: f64 = 5.0;
+3
View File
@@ -759,6 +759,9 @@ mod tests {
assert_eq!(IC_HELD_RELEASE_INTERVAL, 5.0);
assert_eq!(EC_PR_FREQ, 5.0);
const { assert!(!EGRESS_CONTROL) };
// Interface.py 1.6.1, the `ic_max_held_announces` default.
assert_eq!(MAX_HELD_ANNOUNCES, 64);
assert_eq!(IngressController::new().max_held, 64);
}
#[test]