aboutsummaryrefslogtreecommitdiffstats
path: root/src/config/mod.rs
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
commit43b5280a71d5095b0763b10844ca99b4c8049107 (patch)
tree4b5bd0431291925056fae80399b2710a78abd457 /src/config/mod.rs
parent86a7d35438df0c1c3174583205df56d8dd4c8788 (diff)
electorate window must be at least 7d
Diffstat (limited to 'src/config/mod.rs')
-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)?;