From 7bb467a013a9146620b633e3c3cdd21e3a48f80f Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 16 Nov 2026 16:15:04 +0000 Subject: federation: the feature, and the store's fold `federation`, a feature of its own, builds what `docs/federation.md` and `docs/store.md` design, stage by stage; without it continuum builds and behaves as it does. The aliases build with it, and `docs/development.md` says so. Its first part is the store's: an event's ID, the SHA-256 of its bytes written as 64 lower-case hex digits and read back only so, and the `Fold` trait as `docs/store.md` gives it. The trait reads a checkpoint's parts too, the heads it was built at and the events it keeps, which a node taking a pinned checkpoint needs; the design names it. Nothing uses either yet, but a test. --- docs/store.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/store.md') diff --git a/docs/store.md b/docs/store.md index 002b906..b766d41 100644 --- a/docs/store.md +++ b/docs/store.md @@ -113,6 +113,8 @@ pub trait Fold { } /// The checkpoint at `heads`, read as `at`: its bytes, and the events it keeps. fn checkpoint(at: &Self::State, heads: &[Id]) -> (Vec, Vec); + /// The heads a checkpoint was built at, and the events it keeps. + fn parts(checkpoint: &[u8]) -> Option<(Vec, Vec)>; /// 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`. -- cgit v1.3.1