From dd720b2556fa64bd07dc1d087b502ac4ab0f7899 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 19 Nov 2026 01:48:58 +0000 Subject: 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. --- src/config/mod.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/config') 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 @@ -305,6 +305,14 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[ "With store-vote-key: propose a checkpoint, as store-propose-events, once this long passed by its own clock since its store moved to its checkpoint, or started there.", ), #[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, @@ -835,6 +843,8 @@ pub(crate) struct Settings { )] pub(crate) store_propose_every: Option, #[cfg(feature = "federation")] + pub(crate) store_propose_versions: Option, + #[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) => { -- cgit v1.3.1