From 1656f73b41a3528048c33774457b0d68ed430934 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 25 Nov 2026 13:03:52 +0000 Subject: store: a new event builds on a head holding what it is judged by A new event builds on the heads taken earliest, 64 at most. Where a store holds more, and those all come from before the current version was written, an event on them is written under the version before: a merge event, under one without merge events, was refused, so the backlog of heads a revision was passed to merge stayed, and with more heads than a checkpoint may name, no node proposed one. The fold now says which events a new one is to have in its history (Fold::judged_by; the federation: those writing the current version), and building_on names the earliest head holding one, in place of the last of the others. --- src/federation/store/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/federation/store/mod.rs') diff --git a/src/federation/store/mod.rs b/src/federation/store/mod.rs index d2028da..06f7a58 100644 --- a/src/federation/store/mod.rs +++ b/src/federation/store/mod.rs @@ -128,6 +128,13 @@ pub(crate) trait Fold { /// The heads of a later checkpoint, where a store reading as `now` moves to one. fn moves_to(now: &Self::State) -> Option>; + /// The events one of which a new event is to have in its history, where what an event + /// is judged by depends on its history beyond what the checkpoint says: of a store + /// reading as `now`, none unless the fold names some (`Store::building_on`). + fn judged_by(_now: &Self::State) -> Vec { + Vec::new() + } + /// The nodes that carry the store, each with its group. fn members(state: &Self::State) -> Vec<(String, String)>; } -- cgit v1.3.1