From 5439b2e6b27a55a1da252cf745d0557686e9c815 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 17 Nov 2026 04:16:59 +0000 Subject: remake: holding a store, a node follows an epoch only from a checkpoint it builds A node of a swarm holding a store rejoining an epoch (`docs/store.md`, Remakes) follows it only where its snapshot has the swarm's policy and store, and holds the node's document's checkpoint, one it builds from that document, or one its operator pinned; with an empty document, the root of its store too (`Holding::follows`). A made-up epoch holding another, the root after the store moved on, say, would leave it holding events whose history nobody puts again: it stays on its own, as when a rejoin's check fails, and tries again later. --- src/remake/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/remake/mod.rs') diff --git a/src/remake/mod.rs b/src/remake/mod.rs index bd814da..1f7a644 100644 --- a/src/remake/mod.rs +++ b/src/remake/mod.rs @@ -217,6 +217,11 @@ pub(crate) trait Host: Clone + Send + Sync + 'static { #[cfg(feature = "federation")] fn holding(&self) -> Arc; + /// The store this node's swarm holds, as its operator named it (`--store-id`, + /// `--store-root`), if any. + #[cfg(feature = "federation")] + fn store_id(&self) -> Option; + /// The epoch of the local replica. fn current_epoch(&self) -> Epoch; -- cgit v1.3.1