From 5e92406ba1da8a58455420a10a9dd5ca963fa8f3 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 30 Nov 2026 15:12:04 +0000 Subject: A node joins a swarm of sets with nothing but the store's ID Given store-id and store-document, no file yet and no root, or a checkpoint pinned (store-checkpoint), a node starts with nothing of its store (held::Begun::Start, passing::Start): it asks the members whose handshake it took for the checkpoint named by the store's ID, its root, or by the pin, then for the events that one keeps, each taken only as what its name says; begins its set from them; and is ready, catching up as any node behind. A set gives the checkpoint its store holds by its name (passing::Unit::Checkpoint). A simulation: a node given the ID alone joins two that hold a write. --- src/config/mod.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/config/mod.rs') diff --git a/src/config/mod.rs b/src/config/mod.rs index 9c82673..5a723c7 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -220,7 +220,7 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[ Kind::Text, "PATH", None, - "With store-root or store-id: hold the store in a document of its own kind, a set of events (docs/document.md), kept in this file, instead of in the Automerge document a swarm syncs otherwise. The node then syncs with nodes holding such a set, and with no others: a swarm is of one kind. The file holds the store's events, what the node refused of its own and what its operator had it drop, and its members' entries; started again, the node goes on from it. Can't be combined with store-file, which the file stands for, nor with store-checkpoint.", + "With store-root or store-id: hold the store in a document of its own kind, a set of events (docs/document.md), kept in this file, instead of in the Automerge document a swarm syncs otherwise. The node then syncs with nodes holding such a set, and with no others: a swarm is of one kind. The file holds the store's events, what the node refused of its own and what its operator had it drop, and its members' entries; started again, the node goes on from it. Without the file yet, the node begins it from the root where it is given one (store-root) and pins no checkpoint; else it joins with nothing, and gathers of the members it reaches what its set begins from, by name: the root, or the checkpoint store-checkpoint names. Can't be combined with store-file, which the file stands for.", ), #[cfg(feature = "federation")] option( @@ -1384,15 +1384,8 @@ impl Settings { return Ok(()); } }; - if self.store_document.is_some() { - if self.store_file.is_some() { - bail!("store-document holds what store-file would: unset store-file"); - } - if self.store_checkpoint.is_some() { - bail!( - "store-document: a set of events starts from its root or from its file, from no pinned checkpoint: unset store-checkpoint" - ); - } + if self.store_document.is_some() && self.store_file.is_some() { + bail!("store-document holds what store-file would: unset store-file"); } match &self.store_party { None => bail!( -- cgit v1.3.1