From 0231b7732b8c005e956a5b112c0e4fdddc38429e Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 16 Nov 2026 18:03:39 +0000 Subject: federation: the federation as the store's fold `Federation` is the store's fold for `docs/federation.md`. The state judging reads is the state of an event's history, which the store builds from the checkpoint and that history alone; so the version current there is the state's, the highest-numbered one written, and a history holding two versions of one number is refused. * A signed event's party is a party of the version current at its history. A write is signed by a key among its party's (those of its key set that counts, else those its version names) where a rule gives its party the place; a key set, node list, proposal or vote by a key its version names. * A vote is on the version current at its history, for a proposal proposed on it; a `true` only where every other proposal its party backs on that version is dead. Passing and dead go by the parties voting each way, a party with both counting for both. * A version event writes a proposal on the version current at its history, passed there, which is a version changing that one; one naming a checkpoint names heads after the current checkpoint at which it is current too, none in another's history, the version event above them. A node keeps a version event only where it changes the version it reads, or writes one it took. * What counts is read by the current version: of each party's writes at a place it may write, signed by a key among its party's, and of its key sets and node lists written under a version at least their `since`, the latest, then the lowest ID. A checkpoint keeps what counts at its heads and the proposals and votes on the version current there; a fork's root what counts at its heads by its version; the members are the nodes each party's node list names. Tests take a federation through writes, a key set, a proposal passing, one yes at a time, two versions changing one, a checkpoint and a node starting from it, and a fork. Events are read with their signature checked once, where they are judged. --- src/federation/mod.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/federation/mod.rs') diff --git a/src/federation/mod.rs b/src/federation/mod.rs index 43f683a..2be6632 100644 --- a/src/federation/mod.rs +++ b/src/federation/mod.rs @@ -6,6 +6,7 @@ #![allow(dead_code)] pub(crate) mod event; +pub(crate) mod fold; #[cfg(test)] pub(crate) mod harness; pub(crate) mod jcs; -- cgit v1.3.1