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/state/host.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/state') diff --git a/src/state/host.rs b/src/state/host.rs index 345dfbf..0b2b27d 100644 --- a/src/state/host.rs +++ b/src/state/host.rs @@ -310,6 +310,12 @@ impl Host for AppState { Arc::clone(&self.holding) } + #[cfg(feature = "federation")] + fn store_id(&self) -> Option { + use crate::locks::MutexExt; + self.screening.lock_or_recover().store + } + fn current_epoch(&self) -> Epoch { self.local_epoch() } -- cgit v1.3.1