aboutsummaryrefslogtreecommitdiffstats
path: root/docs/federation.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/federation.md')
-rw-r--r--docs/federation.md59
1 files changed, 59 insertions, 0 deletions
diff --git a/docs/federation.md b/docs/federation.md
index 2576b57..96e1a87 100644
--- a/docs/federation.md
+++ b/docs/federation.md
@@ -1339,6 +1339,65 @@ the nodes taking a proposal up, which takes knowing its policy; refusing is keep
one's rules; the height is the base; and the epoch in every envelope keeps a
statement on its side.
+### What each payload holds
+
+The fields each rule reads; a version adds none that a rule reads without a policy
+saying so (Continuum changing under a swarm). Names of fields are the design's, the
+encoding the first stage's.
+
+**Every envelope** (a statement): `swarm` (the swarm's ID), `epoch` (the epoch it is
+signed in), `path` (its register, under its own digest), `kind`, `user` and `userId`
+(its signer: the name it had when it signed, and the ID; a `create`'s signer is the
+creator), `seen` (the hashes of the changes its signer had seen), `number` (the
+number of its kind among its user's statements: Users), `key` (the public key that
+signs) and the signature, over all the rest. Beside those, by kind:
+
+| Kind | Fields |
+|---|---|
+| `create` | `name`, `keys` (the first keys, public); a root's, for a user the root change holds: `for`, its ID there |
+| `vouch` | `for`, the ID of the user vouched for |
+| `unvouch` | `of`, the digest of the `create` or `vouch` taken back |
+| `key` | `key`, the key added (the signing key is above it) |
+| `retire` | `key`, the key retired; `cut`, change hashes; `keeps`, the digests it keeps within the cut (Cuts) |
+| `node` | `node`, the node's ID; a stop: `stop`, with `cut` and `keeps` |
+| `release` | `of`, the digest of the claim, vote or proposal given up; or `self`, the user giving itself up (signed with a first key) |
+| `claim` | `claimKind` and `name` |
+| `propose` | `matter`, `holds` (below), `matterNumber` (its number among its matter's proposals: Decisions) |
+| `vote` | `proposal`, its digest; `ends`, when it runs out; for a remake `base` (its heads), with no `ends` |
+
+A proposal's `matter` and what it `holds`:
+
+| Matter | `holds` |
+|---|---|
+| `number`, naming it | the value |
+| `policy` | the rest of the policy, whole |
+| `firstKeys`, naming the user | the keys, and a `cut` for those it has |
+| `name`, naming an out user and the name | free, or the user ID it is given to |
+| `whose`, naming a kind and a name | the digest of the claim that is to hold it |
+| `votersName`, naming a kind and a name | the user ID it is given to |
+| `remake` | `voters` (IDs), `roots` (IDs, and for each root left out which root has each name a rule gives it), `coordinator` (a node's ID), `switchDelay` |
+| `fork` | the policy to go on with, and, if it likes, `voters` and `roots` |
+
+A fork is no matter: a vote for one counts toward nothing, shows who would go, and
+leaves a voter's one vote a matter alone.
+
+**What a node writes plain**, each signed by the change it is in, as a node's change
+is:
+
+* **A record of a proposal**, `_continuum/decisions/<proposal>/<node ID>`: `proposal`;
+ of a remake, `base` (heads) and `epoch` (the ID it built from it, a voter's node);
+ of a fork, `base`, the proposer's node.
+* **A carry record**, `_continuum/carried/<node ID>`: `from` (the epoch it left),
+ `digests` (of the envelopes it holds that the base lacks), and what it held of
+ them: `late` and `givesWay` (pairs of claims' digests), `through` (statements that
+ count through an unvouch or a cut: their digests), `gone` (user IDs), `final`
+ (claims' digests), `dropped` (what is uncovered: digests).
+* **A member entry**, of the shape its policy's version gives it, within
+ `limits.entry`: what it is today (its addresses, what it reaches, whether it is
+ ready, its alive stamp), and `writersFor` (the user its writers count for: Users)
+ and `digest` (the registry as it resolves at the change's dependencies: Continuum
+ changing under a swarm).
+
### What every node judges
A change is first of all one that Automerge itself writes, or it is refused before