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/federation/fold.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/federation/fold.rs') diff --git a/src/federation/fold.rs b/src/federation/fold.rs index 46f56e1..3670051 100644 --- a/src/federation/fold.rs +++ b/src/federation/fold.rs @@ -348,6 +348,11 @@ impl State { ballots } + /// The checkpoint's version: the one current where the store moved there, or started. + pub(crate) fn checkpoint_version(&self) -> &Version { + &self.versions[&self.checkpoint] + } + /// The version the proposal of hash `proposal` proposes, as JSON, where it holds one: /// whether it is a version is asked apart (`Version::read`). pub(crate) fn proposal(&self, proposal: &Id) -> Option<&Json> { -- cgit v1.3.1