From d61ebc07db70d9f03b1d74b03712cea9310b05a7 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 16 Nov 2026 17:55:32 +0000 Subject: federation: events and checkpoints as bytes, and a harness that signs them `Event::read` reads an event and says what makes one none (`docs/federation.md`, Events): bytes that aren't the JCS of the JSON they read as, larger than 256 KiB, with no dependency or more than 64, not ascending, or a field missing or more; and of a signed event, a party that is no party's name, a key or signature that doesn't read back to itself or doesn't hold, a path, key set, node list or vote spelled otherwise. A proposal is taken whatever it holds, named by its hash; a version event names a hash. `Checkpoint` reads and writes `{"at", "keeps", "version"}`, a root among them, which is no event. The tests' harness (`docs/federation-tests.md`, The harness) makes parties with keys from seeds, signs each kind of event as the design says, and spells versions out. --- src/federation/mod.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/federation/mod.rs') diff --git a/src/federation/mod.rs b/src/federation/mod.rs index ddd4c4a..43f683a 100644 --- a/src/federation/mod.rs +++ b/src/federation/mod.rs @@ -5,6 +5,9 @@ // Until a node runs it (stage 3), parts of it are used by nothing, or by tests alone. #![allow(dead_code)] +pub(crate) mod event; +#[cfg(test)] +pub(crate) mod harness; pub(crate) mod jcs; pub(crate) mod keys; pub(crate) mod store; -- cgit v1.3.1