diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/federation.md | 117 |
1 files changed, 67 insertions, 50 deletions
diff --git a/docs/federation.md b/docs/federation.md index bb17467..8d709ff 100644 --- a/docs/federation.md +++ b/docs/federation.md @@ -16,10 +16,11 @@ are marked *(checked)* where they were read in it. A swarm is federated once its policy says so, and which federation it follows: this design is federation 1. It can say so from the genesis change, or later, written by one who may -write the policy (The policy). Nothing else changes: a swarm that doesn't say so stays as -it is, its registry, rules, remakes and replay included. Continuum's wire version says -only whether a node can take part in a federation at all; which federation a swarm follows -is its own number (Changing the federation). +write the policy (The policy), and stops, or moves to another, by a version of its policy +(Changing the policy). Nothing else changes: a swarm that doesn't say so stays as it is, +its registry, rules, remakes and replay included. Continuum's wire version says only +whether a node can take part in a federation at all; which federation a swarm follows is +its own number (Changing the federation). ## Parties and the adversary @@ -27,6 +28,10 @@ A **party** is a name in the policy, with its keys. Parties write, and parties v who isn't in the policy writes nothing, and comes in by a decision of those who are. Nobody owns the swarm, and any party may be malicious, alone or with others. +A party is whoever holds its keys: several people may keep one party together, and one +person may be in several, each with its vote. The parties decide whom they let in, +groups included; nothing tells a group from a person. + What an adversary can do: * run nodes, once a party lists them; @@ -129,7 +134,7 @@ design says below, the same in every version. |---|---| | `_continuum/federation/proposals/<hash>` | any party | | `_continuum/federation/votes/<party>/<hash>` | that party | -| `_continuum/federation/current/<chain>` | any party, once a proposal passed, or to fork | +| `_continuum/federation/current/<chain>` | any party, once a proposal passed | | `_continuum/federation/keys/<party>/<name>` | that party; a version that becomes current | | `_continuum/federation/nodes/<party>` | that party | | `_continuum/federation/went/<party>` | that party | @@ -176,34 +181,46 @@ written yet. * **A split vote passes nothing.** Forty, forty and twenty on three proposals is resolved by a new proposal enough parties agree on, or by going apart (Forks). -Everything the federation decides is a change of the policy: who the parties are, -and their keys where they lost them; who writes which identifier, which is giving -one, taking it back and giving it to another; the rules; the numbers. +Everything the federation decides is a change of the policy: who the parties are, and +their keys where they lost them; who writes which identifier, which is giving one, taking +it back and giving it to another; the rules; the numbers; and the federation itself. A +version may name another federation by its number (Changing the federation), or none, with +the policy the swarm goes on with (`"federation": null, "policy": {…}`), which the change +that makes it current writes at `_continuum/access/policy`. From then on, that policy is +the swarm's, whatever it is. ### What counts -A change is judged at its history, by the version current there, as every node -judges it ([`access.md`](access.md), Changes judged on every node). So a value its -party wrote while it could still write there is taken, even where a version that -passed at the same time says otherwise. What **counts** is read by the version current -in the document as a whole: +A change is judged at its history, by the version current there, as every node judges it +([`access.md`](access.md), Changes judged on every node). So a value its party wrote while +it could still write there is taken, even where a version that passed at the same time +says otherwise. What **counts** is read by the version current in the document as a whole. +These count no more, and nothing else is stale: -* a value counts if the key that signed it is still its party's, and the current - version lets that party write there; where two were written at once, the one shown; -* a proposal and its votes count while the version it changes is current. +1. a value at a place its party may not write by the current version: the party is no + longer one, the place went to another, a rule changed, or the value no longer fits its + rule; and of a party that is no longer one, its keys, its node list and its `went`; +2. a value signed by a key its party no longer holds; +3. a deletion, once its party holds none of the keys it names (Keys); +4. a proposal on a version that isn't current, and the votes on that version; +5. of two values written at once at one place, the one not shown. -**What doesn't count may be deleted by any member**, in a change that every node judges by -whether what it deletes counted at its history: a lapsed proposal and its votes, a value -whose key was removed or whose place went to another, a deletion once the key of what it -deleted went (Keys). That is the federation's own housekeeping; remakes carry whatever is -there. So that deletions don't flood the document, the party whose write made something -stop counting deletes it in the same change, or soon after; others delete only what they -find stale, as in a swarm where parties went quiet. What is deleted doesn't come back -where it would count again: its party writes it again. +**Who deletes it.** Any member, in a change that every node judges by whether what it +deletes counted at its history; but what stopped counting because its key went (2) only +its party, until the party holds no keys at all. The fifth isn't deleted apart, as a +deletion removes every value it saw at a place: its party's next write replaces both. That +is the federation's own housekeeping; remakes carry whatever is there. So that deletions +don't flood the document, the party whose write made something stop counting deletes it in +the same change, or soon after; others delete only what they find stale, as in a swarm +whose parties went quiet. What is deleted doesn't come back where it would count again: +its party writes it again. -An envelope signed with a key its party still holds can be put back where nothing is, -by whoever holds it, and counts: a party that wants its old values gone for good -removes the key that signed them. +**Nothing comes back.** An envelope that replaced nothing, the first at its place, could +be put back wherever its place is empty, by anyone who holds it; it counts if its key is +still its party's and its party may write there. Housekeeping empties a place only where +that can't be: by (1), where its party may not write; by (2), once its party holds no +keys; by (3), once its party holds none of the keys it held when it deleted, the only ones +that can have signed what came before. A removed key is never added again. ### Keys @@ -219,10 +236,10 @@ it holds; a version that becomes current writes those it sets. the thief removed the party's other keys first, or both removed each other's at once (the party then has none), the parties give it new keys by a version. A vote the thief cast on a version that passed stays passed. -* **Deleting a value** is writing an envelope with `null` in its place. It stays - until the key that signed the value it deleted is removed, and counts no more from - then: until then, the old envelope could be put back where nothing is. A party that - deletes much rotates its keys now and then, and the deletions go. +* **Deleting a value** is writing an envelope with `null` in its place, naming the keys + its party holds then. It stays while its party holds any of them: what came before it at + its place may have been signed by one of those, and could be put back. A party that + deletes much rotates its keys now and then, and its deletions go. ### Nodes @@ -236,23 +253,23 @@ without nodes of its own writes through any node that takes its envelopes. ### Forks Every proposal is a chance to fork. A group that wants one, on whatever version and -whoever voted for it, follows it: one of the group writes it at -`_continuum/federation/current/<chain>`, without any votes, where the chain is named by -the proposal's hash. That begins a **chain** of its own, with the parties the proposal -names, and versions on it pass by votes of its parties, as on any chain. The group might -be all but a few who won't cooperate, a few trying something the others may follow later -or never, or anyone who won't follow a version that passed. +whoever voted for it, follows it: its nodes follow the **chain** that begins with that +proposal, named by its hash. Nothing needs to be written for that. Versions on the new +chain pass by votes of its parties and are written at `current/<chain>`, as on any chain. +The group might be all but a few who won't cooperate, a few trying something the others +may follow later or never, or anyone who won't follow a version that passed. + +A node follows one chain: its operator's choice, by default the one it is on. It judges by +that chain, reads what counts by it, and syncs only with the nodes that its chain's +parties list. So the sides keep the history up to the fork, in the same document, and go +apart from there: nothing is copied, and no remake is needed. A party a chain leaves out +has no member there; to come back, its parties add it by a version, as they would anyone +new. A proposal may name parties that won't be among the first to go (every party its +proposer considers honest, say), so that they can go whenever they like, without asking. -A node follows one chain: its operator's choice, by default the one it is on. It -judges by that chain, reads what counts by it, and syncs only with the nodes that its -chain's parties list. So the sides keep the history up to the fork, in the same -document, and go apart from there: nothing is copied, and no remake is needed. A -party a chain leaves out has no member there; to come back, its parties add it by a -version, as they would anyone new. A proposal may name parties that won't be among -the first to go (every party its proposer considers honest, say), so that they can go -whenever they like, without asking. A party that goes may say where, at -`_continuum/federation/went/<party>` on the chain it leaves, so that others can -follow. +A party that goes may say where, at `_continuum/federation/went/<party>` on the chain it +leaves, so that others can follow. Voting is apart from it: a vote moves nobody, so voting +for a proposal that doesn't pass strands no one. ### Following @@ -337,9 +354,9 @@ Recommendations, not rules: none of these breaks a promise, only how fast a node votes are seen. Two proposals on one version both pass only if their voters share at least twice `share` less one of the parties, all of whom voted twice: a third, at two thirds. Votes never change, so a node that holds more is only further along. -3. **Carrying on.** A fork is a proposal a group follows; nodes go there by their - operators' choice only, and sync only with its parties' nodes. A party nobody follows - carries on alone. +3. **Carrying on.** A fork is a chain from a proposal a group follows; nodes go there by + their operators' choice only, and sync only with its parties' nodes. A party nobody + follows carries on alone. ## Roads not taken |
