aboutsummaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-01 13:25:49 +0100
committertv <tv@krebsco.de>2026-11-01 13:25:49 +0100
commit9333940209c48d460a5f61b80ba827db7889f147 (patch)
treec818fcba62b052cd77934d91de66a0ba9539400a /src/config
parentd5de69630cf544fd048c8376e1b51cd0e4e7c7fc (diff)
electorate window must be at least 7d
Diffstat (limited to 'src/config')
-rw-r--r--src/config/mod.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs
index 418c8e3..c5b2dad 100644
--- a/src/config/mod.rs
+++ b/src/config/mod.rs
@@ -254,7 +254,7 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[
Kind::Duration,
"DURATION",
Some("7d"),
- "Members that renewed their alive stamp within this time vote on remakes (a majority of them must agree). Matters on the node that coordinates a remake.",
+ "Members that renewed their alive stamp within this time vote on remakes (a majority of them must agree). At least 7h (members renew every seventh of their own window, hourly at most); the same on every node, or a coordinator with a shorter one counts fewer members.",
),
option(
"clock-skew-warn",
@@ -748,8 +748,11 @@ impl Settings {
if !(1024..=4 << 20).contains(&self.blob_chunk) {
bail!("blob-chunk must be between 1KiB and 4MiB");
}
- if self.electorate_window.is_zero() {
- bail!("electorate-window must be longer than 0");
+ // Members renew their alive stamp hourly at most (`members::alive_renewal`): in
+ // a shorter window, live members would drop out between renewals, down to an
+ // electorate of the coordinator alone.
+ if self.electorate_window < crate::swarm::members::MIN_ELECTORATE_WINDOW {
+ bail!("electorate-window must be at least 7h (seven hourly renewals)");
}
if let Some(alias) = &self.alias {
check_alias(alias)?;