diff options
| author | tv <tv@krebsco.de> | 2026-11-19 14:09:23 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-19 15:18:44 +0100 |
| commit | 8347900a553a3c4c9f9d3fc4a539fd31b41b07d3 (patch) | |
| tree | 5674d614bd4a79cdc624eaf09d607efff878b227 /src | |
| parent | f85298c40c2528ee801c14a10a7db8920b50fdf8 (diff) | |
vote: a checkpoint after every version that changes more, unless told otherwise
After a close vote, one key voting twice passes a rival version at a
history from before the version that followed, the votes cast before
counting with its own, any time until a checkpoint above that version:
nodes that took the version refuse it, but one lagging behind, or
joining from the root, may take it. A node voting by itself proposed a
checkpoint after a version only where its operator set
`--store-propose-versions`; now it does unless told otherwise (1 unless
set; 0 never so). Versions that change more than moving to a checkpoint
are rare, so the cost is a checkpoint each.
A default set, store-propose-versions no longer asks for store-vote-key,
as store-held-for and store-back-after don't.
Diffstat (limited to 'src')
| -rw-r--r-- | src/config/mod.rs | 8 | ||||
| -rw-r--r-- | src/lib.rs | 2 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index caecb49..652a10e 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -309,8 +309,8 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[ "store-propose-versions", Kind::Integer, "COUNT", - None, - "With store-vote-key: propose a checkpoint, as store-propose-events, once this many versions changing more than moving to a checkpoint were written since its store's checkpoint: with 1, after every such version, so that what keys voting twice could grow beside it at a history from before ends there.", + Some("1"), + "With store-vote-key: propose a checkpoint, as store-propose-events, once this many versions changing more than moving to a checkpoint were written since its store's checkpoint: with 1, after every such version, so that what keys voting twice could grow beside it at a history from before ends there; with 0, never so.", ), #[cfg(feature = "federation")] option( @@ -1380,10 +1380,6 @@ 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) => { @@ -70,7 +70,7 @@ fn voter(args: &config::Settings) -> Result<Option<federation::held::Voter>> { nay_beside: args.store_nay_beside, propose_events: args.store_propose_events, propose_every: args.store_propose_every, - propose_versions: args.store_propose_versions, + propose_versions: args.store_propose_versions.filter(|versions| *versions > 0), held_for: args.store_held_for, back_after: args.store_back_after, }, |
