aboutsummaryrefslogtreecommitdiffstats
path: root/src/config/mod.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-19 01:48:58 +0000
committertv <tv@krebsco.de>2026-11-19 03:19:39 +0100
commitdd720b2556fa64bd07dc1d087b502ac4ab0f7899 (patch)
tree1a56f3f9c556a3d44197732d66ba0a1af52f3d35 /src/config/mod.rs
parentb00371d1260f4379241a9226d576270dd3a68285 (diff)
vote: propose a checkpoint after so many versions
The votes cast before count at a history from before too: a proposal that died, or a rival, needs there only the votes it lacked, and after a close vote one key voting twice is enough, at any time until a checkpoint above the version that followed. Nodes that took that version refuse it; one lagging behind, or joining from the root, may take it. `federation.md` said it took the keys of two thirds of the parties. A node voting by itself proposes a checkpoint once so many versions were written since its store's (`--store-propose-versions`), as the design lists: with 1, after every version, so that what keys voting twice grow beside a version ends at a checkpoint above it. `federation.md` says how little a rival version takes, row 20 too, and the guides the option.
Diffstat (limited to 'src/config/mod.rs')
-rw-r--r--src/config/mod.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs
index feb16e3..0e6e1b9 100644
--- a/src/config/mod.rs
+++ b/src/config/mod.rs
@@ -306,6 +306,14 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[
),
#[cfg(feature = "federation")]
option(
+ "store-propose-versions",
+ Kind::Integer,
+ "COUNT",
+ None,
+ "With store-vote-key: propose a checkpoint, as store-propose-events, once this many versions were written since its store's checkpoint: with 1, after every version, so that what keys voting twice could grow beside it at a history from before ends there.",
+ ),
+ #[cfg(feature = "federation")]
+ option(
"store-held-for",
Kind::Duration,
"DURATION",
@@ -835,6 +843,8 @@ pub(crate) struct Settings {
)]
pub(crate) store_propose_every: Option<Duration>,
#[cfg(feature = "federation")]
+ pub(crate) store_propose_versions: Option<u64>,
+ #[cfg(feature = "federation")]
#[serde(
default = "default_store_held_for",
with = "crate::units::duration_option"
@@ -1370,6 +1380,10 @@ impl Settings {
("store-nay-beside", self.store_nay_beside),
("store-propose-events", self.store_propose_events.is_some()),
("store-propose-every", self.store_propose_every.is_some()),
+ (
+ "store-propose-versions",
+ self.store_propose_versions.is_some(),
+ ),
];
match (&self.store_vote_key, &self.store_vote_record) {
(Some(_), None) => {