From 6c6f978189eafa15add0df865f713dc946dfc5cb Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 19 Nov 2026 03:52:49 +0000 Subject: federation: merge events, the first revision What builds on many heads merges them, but only an event a party writes: in a quiet federation, heads beside each other stay so, and past 64 no event is above them all. Revision 1 (`merge-events`) adds merge events: `{"merge": true}`, signed with a node's own key, the `key` its Ed25519 key, for the party whose node list names it. One counts for nothing, and only gathers what it builds on into the history of what builds on it. Under the base revision, signed by a node its party doesn't list, or by a party's key, it is refused; the model alike. Generated federations begin at either revision, and their nodes merge. A node voting by itself backs no version changing the revision, on any version neither: its party's operators vote on that one, once their nodes run a continuum that knows it. `federation.md` lists the revisions, says what a merge event is, and row 71 is tested (`federation_attack_71`). --- src/federation/vote.rs | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'src/federation/vote.rs') diff --git a/src/federation/vote.rs b/src/federation/vote.rs index 2e5ce15..c274849 100644 --- a/src/federation/vote.rs +++ b/src/federation/vote.rs @@ -5,7 +5,8 @@ //! * **Following**: it votes `true` on a proposal on the current version where a party it //! follows voted `true`, never `false`; by default only on a version that only moves to a //! checkpoint (`Version::only_moves_on`), and then only where no proposal that changes -//! more holds it back (`holds_back`), as such a version lapses it. +//! more holds it back (`holds_back`), as such a version lapses it; never on one changing +//! the revision. //! * **Proposing a checkpoint**: once so many events are held beyond its checkpoint, so //! many versions were written since, or so long after it moved there by its own clock, it //! proposes a version that only moves to a checkpoint, at the heads of what it held for a @@ -268,6 +269,15 @@ pub(crate) fn decide(seen: &Seen<'_>, rules: &Rules, record: &Record) -> Vec