From c9707297bd393f69461c781a38a5ddb017dced60 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 16 Nov 2026 19:54:35 +0000 Subject: federation: the store read from the document A node of a swarm holding a store holds the store, read from its document (`docs/store.md`, What the store takes from the document): `federation::held`. Whenever the document changes, a worker reads the events it holds that the store wasn't offered from it, under the document's lock, and offers them to the store without it, each taken as from anywhere: once its dependencies are held, judged at its history. Another document (a drop, a rejoin) is read as it comes, the store going on. The node reads its store anew from its document whenever it starts, from the root, by what is its own of it: the events it refused by what it took before, and those its operator had it drop, which it keeps in a file (`--store-file`), written whenever that changes, so that a store read anew in another order refuses what it refused before. A file that doesn't read stops the node from starting; without one, a restart may take what it refused. --- src/state/mod.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/state') diff --git a/src/state/mod.rs b/src/state/mod.rs index 822f214..05eef1a 100644 --- a/src/state/mod.rs +++ b/src/state/mod.rs @@ -180,6 +180,9 @@ pub(crate) struct AppState { /// the one it was given (`--genesis-root`). pub(crate) roots: Arc>, pub(crate) genesis_root: Option, + /// The store it holds, where its swarm holds one (`federation::held`). + #[cfg(feature = "federation")] + pub(crate) holding: Arc, /// Whose signature on a strict remake's manifest this node takes (`access::strict`). pub(crate) strict_keys: Arc>, /// Origins whose pages may call this node's open endpoints (`api::cors`). -- cgit v1.3.1