pub struct BootstrapCacheConfig {
pub cache_dir: PathBuf,
pub max_peers: usize,
pub epsilon: f64,
pub stale_threshold: Duration,
pub reachability_ttl: Duration,
pub save_interval: Duration,
pub quality_update_interval: Duration,
pub cleanup_interval: Duration,
pub min_peers_to_save: usize,
pub enable_file_locking: bool,
pub persist: bool,
pub weights: QualityWeights,
}Expand description
Configuration for the bootstrap cache
Fields§
§cache_dir: PathBufDirectory for cache files
max_peers: usizeMaximum number of peers to cache (default: 30,000 per ADR-007)
epsilon: f64Epsilon for exploration rate (default: 0.1 = 10%) Higher values = more exploration of unknown peers
stale_threshold: DurationTime after which peers are considered stale (default: 7 days)
reachability_ttl: DurationFreshness window for peer-verified direct reachability evidence.
save_interval: DurationInterval between background save operations (default: 5 minutes)
quality_update_interval: DurationInterval between quality score recalculations (default: 1 hour)
cleanup_interval: DurationInterval between stale peer cleanup (default: 6 hours)
min_peers_to_save: usizeMinimum peers required before saving (prevents empty cache overwrite)
enable_file_locking: boolEnable file locking for multi-process safety
persist: boolPersist the cache to disk (default: true).
When false the cache is purely in-memory: nothing is loaded on
open, nothing is written on save, and no cache directory or lock
file is created. Runtime behaviour (quality scoring, peer
selection, maintenance) is unchanged.
weights: QualityWeightsQuality score weights
Implementations§
Source§impl BootstrapCacheConfig
impl BootstrapCacheConfig
Sourcepub fn builder() -> BootstrapCacheConfigBuilder
pub fn builder() -> BootstrapCacheConfigBuilder
Create a new configuration builder
Trait Implementations§
Source§impl Clone for BootstrapCacheConfig
impl Clone for BootstrapCacheConfig
Source§fn clone(&self) -> BootstrapCacheConfig
fn clone(&self) -> BootstrapCacheConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more