From e4275de43f7dac2353923cbb8ae971d6b7ec2590 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 16 Nov 2026 17:14:33 +0000 Subject: federation: every event's shape, and the fold's name `keys`, `nodes` and `proposal` events had no shape written, a vote's was written as if it were the event, and the fold had no name, though the genesis change is built byte for byte from the policy naming it. Each field an event may have is written with what it holds, a version's hash as an ID is, and the fold is named `federation`: `{"version": 2, "store": "federation"}`. --- docs/federation.md | 25 +++++++++++++++---------- docs/store.md | 2 +- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/docs/federation.md b/docs/federation.md index 43f5856..45e7e25 100644 --- a/docs/federation.md +++ b/docs/federation.md @@ -123,9 +123,14 @@ Spread out: its 32 bytes an Ed25519 public key. Keys in a version and a key set are spelled so too, and node IDs as continuum spells them: `continuum:` and the 64 lower-case hex digits of the node's Ed25519 public key. -* **What it does**, one of: `write`, a value at a place (The policy); `keys`, the - party's key set (Keys); `nodes`, its node list (Nodes); `proposal` and `vote` - (Changing the policy). +* **What it does**, one field of: + * `write`, `{"path": "", "value": }`: a value at a place (The policy); + * `keys`, `["", …]`: the party's key set (Keys); + * `nodes`, `["", …]`: its node list (Nodes); + * `proposal`, a version, the object (Changing the policy); + * `vote`, `{"on": "", "proposal": "", "yes": true}`, `"yes"` `true` or + `false` (Changing the policy): a version's hash, the SHA-256 of its JCS bytes, + written as an ID is. * **`sig`**: an SSH signature (`ssh-keygen -Y sign`, namespace `continuum-federation`) over the event's bytes without `sig`: the SSHSIG blob of version 1, hashed with `sha512`, its key the event's `key`, its reserved field empty, as `ssh-keygen` writes @@ -234,9 +239,8 @@ signed with one of the keys the version it is written under names for its party: proposal is **on** that version, and its hash is the version's. It counts as signed by those keys, whatever keys the party writes since, until it lapses. -A party **votes** on a proposal by a `vote` event, -`{"on": , "proposal": , "yes": true}` or `"yes": false`: the version the -proposal is on, and the proposal, by their hashes. +A party **votes** on a proposal by a `vote` event, naming the version the proposal is on +(`on`) and the proposal, by their hashes, and saying `true` or `false` (`yes`). * **A vote is taken only where, at its history, the version it is on is current and its proposal is proposed on it.** A vote cast at a history from before can't reach a @@ -564,10 +568,11 @@ keeps nothing, its version the first, which no party signs (Checkpoints), so one version makes one federation, named by the root's ID. Among the node lists the version gives, one names a node of its founders', so the federation starts with members, and other nodes come in as their parties list them. Its swarm's genesis change holds the -root, built byte for byte from it ([`store.md`](store.md), On Automerge). So nothing is -from before the federation: it changes by versions, and any group carries on by a fork. -A running swarm doesn't become federated; its parties start one, and sign into it what -they keep. +root, built byte for byte from it, its policy naming the fold `federation` +(`{"version": 2, "store": "federation"}`, [`store.md`](store.md), On Automerge). So +nothing is from before the federation: it changes by versions, and any group carries on +by a fork. A running swarm doesn't become federated; its parties start one, and sign +into it what they keep. ## Why it holds diff --git a/docs/store.md b/docs/store.md index aef814a..3051f44 100644 --- a/docs/store.md +++ b/docs/store.md @@ -200,7 +200,7 @@ document holds nothing but the store and continuum's protocol data. |---|---| | `_continuum/events/` | an event, as bytes, at its ID: the root, the events a checkpoint keeps, and those after it | | `_continuum/checkpoint` | the store's checkpoint, as bytes, where a snapshot holds one other than the root | -| `_continuum/access/policy` | `{"version": 2, "store": ""}`: a store, and its fold | +| `_continuum/access/policy` | `{"version": 2, "store": ""}`: a store, and its fold by name (`federation`) | | `_continuum/swarm` | the swarm's ID: the root's | | elsewhere under `_continuum` | continuum's protocol data, as far as this says | -- cgit v1.3.1