From 8f6ec848b01fa692b09ae8aae25d383d281eb996 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 16 Nov 2026 17:10:41 +0000 Subject: federation: groups that parted come together as parties come in, not by merges A merge, a fork at heads of several stores, named every party's keys anew, so that a party wrote its key set again before anything a key of its set signed counted there; and kept each side's values side by side, so that a value a party replaced on one side came back where the other side's write had the lower ID. Letting the other side's parties in, by a version or a fork naming them, who sign again what they keep as a party's client signs again what a move refused, does the same with nothing new. So a fork is at heads of one store: the fold makes its root from that store's state, and the store from its own heads (`Store::fork`). Merges' rows go, those after them move up, and Roads not taken says why, with merging in place. --- src/federation/store/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/federation/store/mod.rs') diff --git a/src/federation/store/mod.rs b/src/federation/store/mod.rs index c87f337..b11c81a 100644 --- a/src/federation/store/mod.rs +++ b/src/federation/store/mod.rs @@ -97,9 +97,9 @@ pub(crate) trait Fold { /// The state a checkpoint reads as, with the events it keeps. fn start(checkpoint: &[u8], kept: &[(Id, Vec)]) -> Result; - /// The root of a fork at `heads` of the stores reading as `at`, made by `spec`: its + /// The root of a fork at `heads` of the store reading as `at`, made by `spec`: its /// bytes, and the events it keeps. - fn fork(at: &[&Self::State], heads: &[Id], spec: &[u8]) -> Result<(Vec, Vec), Refused>; + fn fork(at: &Self::State, heads: &[Id], spec: &[u8]) -> Result<(Vec, Vec), Refused>; /// The heads of a later checkpoint, where a store reading as `now` moves to one. fn moves_to(now: &Self::State) -> Option>; -- cgit v1.3.1