From 62037cc131ab52c926debeacbef86d7728ecda2e Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 16 Nov 2026 16:51:43 +0000 Subject: store: properties over generated histories Two to four writers, each knowing what it wrote and what was written when it last caught up with the others, write the test fold's events on one or two events they know. Eras and cuts are numbered by their history, each number written once, or, for some properties, as often as it comes. A store offered them is checked against the whole history, read from the root with nothing forgotten: * it holds the same whatever order the events come in: every order putting each after what it builds on, for up to six events; some shuffled beyond; and backwards, where every event waits until the first comes; * it judges every event as the whole history does, the store's own refusals aside; * what builds on a refused event is refused; * what it took is above its checkpoint's heads, the cut naming the checkpoint among it, and it reads as its checkpoint and what it took, and as its whole history; * a node starting from its checkpoint holds what it holds. A failing history is cut down, events taken out with what builds on them for as long as it still fails, and printed. --- src/federation/store/mod.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/federation/store/mod.rs') diff --git a/src/federation/store/mod.rs b/src/federation/store/mod.rs index 73ed029..c87f337 100644 --- a/src/federation/store/mod.rs +++ b/src/federation/store/mod.rs @@ -10,6 +10,8 @@ use crate::transport::Hex; pub(crate) mod memory; #[cfg(test)] +mod properties; +#[cfg(test)] pub(crate) mod testfold; /// An event's name: the SHA-256 of its bytes, written as 64 lower-case hex digits. -- cgit v1.3.1