aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/federation.md175
1 files changed, 91 insertions, 84 deletions
diff --git a/docs/federation.md b/docs/federation.md
index 98085d3..678e1c0 100644
--- a/docs/federation.md
+++ b/docs/federation.md
@@ -156,9 +156,9 @@ What is not promised:
* **When a proposal is decided.** One that had the votes and lacks records of nodes
hangs over its matter: whoever holds the last record chooses the day. The voters end
that by deciding a later proposal of the matter (Decisions).
-* **Decisions without the voters.** With a third of an epoch's voters not taking
- part (gone, silent, without a node that carries for them), nothing more is decided
- there; what users write goes on. Those left go apart (Going apart).
+* **Decisions without the voters.** With a third of an epoch's voters not taking part
+ (gone, silent, without a node that carries for them), nothing more is decided there,
+ and no remake passes; what users write goes on. Those left go apart (Going apart).
* **Anything of 7 with one voter.** A swarm that one user starts has that user as its
only root and voter until it decides on others: it decides alone, and what a third
of the voters see, it sees alone. And as the only root, its cut takes back a name
@@ -1083,13 +1083,18 @@ envelopes are brought along as they were signed (below).
`remakeChanges` changes beyond its root change, or its changes started
`remakeWriters` writers (Automerge: writers), after a random wait, unless one is
under way; and acks one whose proposal has that in its history. It follows only a
- remake whose base holds that. So remakes come as the document grows, nobody asking,
- and no faster, whoever proposes them.
-* **Any base.** The base is the coordinator's heads when it commits, as in every swarm,
- and the coordinator may be anyone's node. One that leaves out what others hold, or
- is old, loses nothing: every node brings along what it holds beyond the base, with
- what it held of it (below). A node that lacks the base syncs it from a peer that
- keeps the epoch.
+ remake whose base holds that, and holds stamps of nodes of more than a third of the
+ voters (a node counted for one voter, as for what is seen for long), each written
+ where its own history already held that. So remakes come as the document grows,
+ nobody asking, and no faster, whoever proposes them.
+* **A base that is fresh.** The base is the coordinator's heads when it commits, as in
+ every swarm, and the coordinator may be anyone's node. A stamp's history is all its
+ node had seen, so the stamps a base must hold bring with them what a third of the
+ voters' nodes had seen once the epoch was due: a base made of one's own changes, or
+ long past, doesn't pass. Every node reads that from the base alone, so none follows
+ where another doesn't. What a base still leaves out loses nothing: every node brings
+ along what it holds beyond the base, with what it held of it (below). A node that
+ lacks the base syncs it from a peer that keeps the epoch.
* **By its result.** Every node builds the snapshot itself from the base, and follows
only where it gets the epoch ID the remake was committed for (Continuum changing
under a swarm).
@@ -2014,11 +2019,12 @@ a write is refused only by what its own history holds, and counts from the start
which every node holds and judged itself, and holds whatever can still count: the next
epoch resolves at its root as the base did, and nothing it leaves out could have
counted again (For good, under Cuts). What a node holds beyond the base comes along
-with what it held of it, by its switch record, whatever base the coordinator chose: an
-honest node witnesses there as its changes would have. Lengths of time go on from the
-stamps the snapshot lists. So a remake from any base, by any node, at any time, moves
-nothing that counts; and of two, every node goes to the one with the lower ID, which
-counts nobody's nodes.
+with what it held of it, by its switch record, whatever base the coordinator chose of
+those that pass: an honest node witnesses there as its changes would have, and a base
+holds what a third of the voters' nodes had seen once the epoch was due. Lengths of
+time go on from the stamps the snapshot lists. So a remake from any base, by any node,
+at any time, moves nothing that counts; and of two, every node goes to the one with
+the lower ID, which counts nobody's nodes.
**Unvouching** takes away no more than its signer could have kept from seeing: what
the unvouched user signed stays if a node of the unvoucher or of a root committed a
@@ -2435,72 +2441,73 @@ Decisions and remakes:
| 89 | The voters decide a policy that covers a user's names no more; another user writes over what is uncovered; a third of the voters stamp to drop it at once | It doesn't count where the policy holds, and shows aside. Only its user takes it away, nobody changes it; it is dropped once seen there for `uncovered` | not promised | unit: `what_a_policy_no_longer_covers`, `uncovered_is_only_taken_away` |
| 90 | The voters decide a policy that stops keeping names for their users | A kept name its user claimed stays its claim. One it didn't is the first comer's | not promised | unit: `a_kept_name_claimed` |
| 91 | Runs most of the alive nodes: commits remakes from bases of its choosing, as often as it may; serves a snapshot of its own | Nothing that counts changes: every node builds the snapshot itself, brings along what it holds beyond the base, and follows a remake only once its base holds `remakeChanges` changes or `remakeWriters` writers. Each costs every node a snapshot | 2; not promised (how often) | sim: `every_node_builds_the_snapshot`, `remakes_no_sooner_than_the_changes` |
-| 92 | As a remake's coordinator, commits a base that leaves out a claim settled minutes before, and holds its accomplice's rival | The nodes that held the claim carry it over with what they held of it: a root's node's switch record has the rival late against it, as its change would have | 5 | sim: `a_base_that_leaves_out` |
-| 93 | Commits a remake of another kind (`replace`, `import`, `strict`), with content of its own | No node follows it: a federated swarm compacts only | 3 | unit: `compaction_only` |
-| 94 | A name is claimed and settled after a remake's base; after the switch a pretender signs a claim of it "in the epoch before" | A root's node named the real claim in its switch record, before it took anything in the new epoch: the pretender's claim is late against it | 5 | unit: `a_switch_record_witnesses`; sim: `a_pretender_after_a_remake` |
-| 95 | Hands in, weeks into an epoch, envelopes of the epoch before that no node carried: a value its user since replaced, a statement its user never sent | Taken from any node, as within an epoch: a value brought along has no word against one its user signed in the new epoch, and is left out where another brought along replaces it; a claim is late against what a root's node's record named; a number orders only among what is brought along | 3 | unit: `brought_along_from_any_node`, `the_new_epoch_has_the_last_word` |
-| 96 | Signs after the switch, as of the epoch before, statements and a proposal with numbers of its choosing | Brought along comes after what the snapshot holds and before what the new epoch signs: such a number orders only its signer's statements among what is brought along, and the proposal outranks none of the new epoch | 6, 7 | unit: `brought_along_in_between` |
-| 97 | Writes a switch record naming what it likes, or several, or one of its own after taking from peers | One a node and epoch. What it names is its node's word, as a change of that node would have been: a contest where it is a root's or the claimant's, no more | 5 | unit: `one_switch_record_a_node` |
-| 98 | Signs a claim on a branch of its own, retires the key that signed it from before the claim, and shows both together; another claims the name in sight of both; then cuts off the key that retired | The first comes back over nothing: no root's node saw it hold. The two are ordered by the roots' nodes alone, which had the later one standing and the first down: the first is late, for good, and its claimant's own old stamps count for nothing | 5 | unit: `a_claim_in_sight_past_a_cut_by_the_roots_alone` |
-| 99 | Unvouched a user, then has a node of its own stamp, weeks later, a change that has the user's claim and not the unvouch, to bring the claim back over one made in sight of it | The two are ordered by the roots' nodes alone: the unvoucher's own node counts for nothing. A root's node doing so, on old heads, makes the later claim late against the first, in the open: a root's word, until the claim is final; where another root's node had the later one standing and not the first, the two contest | 5 | unit: `a_witness_after_the_fact` |
-| 100 | Cuts its own device key off from before a user's creation it signed, to take the user's final name | The creation stops counting as its signer's unvouch would, from where the retirement was signed: what the user signed before counts, and its claim of its own name, with its own key, holds the name on. Without another vouch the user is out, its names waiting, final ones too, until it is gone or a vouch comes | 5 | unit: `a_users_own_name_by_its_own_key` |
-| 101 | Creates a user nobody else vouches for, lets it claim names until they are final, then cuts off the key it created it with from before the creation, to take the names | The creation stops counting as its signer's unvouch would, from where the retirement was signed: the user is out from there, its names wait, final ones and its own name too, and it is gone after `gone` unless a vouch comes. Nobody claims them meanwhile | 5 | unit: `a_creation_cut_off_puts_its_user_out` |
-| 102 | Creates a user, lets it settle names, then cuts the creation's key off from before it with a retirement that says it saw little, its own nodes silent, so that nothing the user signed counts through the creation, and an accomplice claims its names | The roots' nodes witness past a cut, as against an unvouch: what the user signed that a root's node had in its history counts, its settled names hold, and it is out from the retirement, its names waiting | 5 | unit: `a_cut_keeps_the_roots_witnesses` |
-| 103 | Cuts the creation's key off from before it on old dependencies, then claims the user's settled names, or creates a user of its name, in a change whose history holds the user's claims and the cut and nothing else | Where the user's claim didn't stand there only by the cut, the two are ordered as claims out of each other's sight, over all the changes, with the roots' nodes alone as witnesses: they had the user's claim count first, so the new claim is late, for good, and the user keeps its names | 5 | unit: `a_claim_in_sight_past_a_cut_is_ordered_by_lateness` |
-| 104 | A root cuts off the key it created users with, from before the creations, to take their names, final ones too, where only the roots create users; or a thief of a root's key gives a moved-in user first keys | A root's creation another root's node had seen stays the claim of the name, and its first keys, past a cut the root or a thief sets: a turned root takes back only what the other roots hadn't seen, never a settled or final name; the only root, all it created. The voters' cut of a stolen root key takes back what it created outside the cut, whoever saw it: one decision | 5; not promised (one root) | unit: `a_roots_creation_outlasts_its_cut_where_another_root_saw_it`, `the_voters_cut_takes_a_roots_creations` |
-| 105 | A root's node, beside a thief, commits with a fresh writer on heads without the retirement a change holding what the thief's sock signed, to keep it in past the cut | A root's node witnesses past a cut, as against an unvouch: the sock stays in by it, in the open, shown with the root (`GET /registry/users/<name>`). An accomplice's vouch keeps it in too | not promised | unit: `a_cut_has_its_signers_witnesses` |
-| 106 | A node that held only the older of two values its user wrote since the base carries it beside the newer one | Of several brought along to one place, one that another replaces is left out | 3 | unit: `a_replaced_value_is_left_out` |
-| 107 | Signs a claim "in the epoch before" of a name the snapshot holds | It is late against the snapshot's claim where that was settled at the base, or where a node of its side had that standing; else the two contest, as claims out of each other's sight do | 5 | unit: `brought_along_against_the_snapshot` |
-| 108 | Hands in again what a remake left out: a stolen laptop's `node` and `key` statements, retired since | Refuse: its user's floor for its kind is at its number or above; a value names in its `prev` one that is gone | 3 | unit: `what_a_remake_dropped_stays_out` |
-| 109 | Commits a remake from a base a month old | Every node goes there, and its switch record names what it holds beyond the base and what it held of it (who saw what first, decisions since); each envelope comes once. A key retired since keeps what its list names. Lengths of time go on from the stamps the snapshot lists, each node's record saying what it saw broken | 2 | sim: `a_remake_from_an_old_base`; unit: `a_retirement_lists_what_it_keeps` |
-| 110 | Commits a second remake of an epoch beside another, its ID ground lower; or many | Every node goes to the one with the lower ID that it builds, bringing along what it holds, envelopes of the other among them: nothing is lost, and no count of nodes decides. Each costs every node a snapshot, lowest ID first, until one comes out | 2; not promised (how often) | sim: `two_remakes_go_to_the_lower` |
-| 111 | A thief's statements are in the base of a remake | They are as they were: the snapshot holds them with their signatures, and a cut set after takes them back as it would have. A remake makes nothing final | 3 | unit: `a_cut_reaches_across_a_remake` |
-| 112 | Releases a user's claim with a stolen key, and an accomplice claims; the user cuts the key off two months later | What was seen given up for `final` has stopped counting for good: the release stands, as the accomplice's claim does, final by then. A remake or none changes nothing of it | not promised (protection from a stolen key) | unit: `stopped_counting_for_good` |
-| 113 | Tells a node that was away of an epoch that isn't the swarm's | The node rejoins no epoch that peers advertise: it finishes the old one from archives and builds the next itself, or takes the ID its operator gave | 1 | sim: `away_over_a_remake`, `back_by_an_id` |
-| 114 | A node back after several remakes offers what its user signed epochs ago | Taken, from however many remakes back, unless its user's floor for its kind refuses it: then quarantined, for the user to sign again | 3 | unit: `brought_along_any_number_of_remakes` |
-| 115 | A version builds another snapshot from a remake's base | Its node gets another ID than the remake was committed for, stays, and says so: two IDs for one base show | 2 | sim: `a_remake_by_its_result` |
-| 116 | A decision on the roots names its proposer the only root, or leaves a root out; the root left out signs on as one, and its node witnesses on | The voters see whom a proposal names before they vote for it. A root is one where the decision naming it holds, read where each thing it did was done: what it signs after it is left out is an ordinary user's, its node's changes after witness as no root's, and it is out unless someone vouches for it | 7 | unit: `roots_by_a_decision`, `a_root_where_it_is_one` |
-| 117 | With the keys of two thirds of voters since replaced, stolen later, makes up a decision of then; or a list of voters of its own, with the number of the one that replaced them and a lower digest | What voters that others replaced decide counts only in sight of the proposal that replaced them: the first decides nothing. The second holds only until the list it would replace is final: no decision of its matter proposed out of sight of a final one holds | 7; not promised before final | unit: `the_voters_before`, `a_final_decision` |
-| 118 | Two thirds of the voters turn on the rest | They name the roots and who votes, set any number (a share of the voters that lets one decide for all), change the policy, give a user's first keys to another, deal with the names of a user that is out, and say whose a contested name is: a name taken, in the open. They forge no signature and move nobody to other rules; the rest refuse, or fork | not promised | argued (Going apart, Refusing a decision) |
-| 119 | Offers a statement signed on the other side of a fork | Refuse: it names its branch | 3 | unit: `signed_for_its_user_id_and_branch` |
-| 120 | A fork naming its proposer the only voter and root | A node follows only by its operator's word, which names the proposal; what that says shows | 7 | sim: `a_fork_by_choice` |
-| 121 | A decision breaks a node's bounds: the voters let one of them decide for all | The node refuses it and moves to the epoch built without it, the same for every node that refuses, with what it held: they go on together | 7 | unit: `bounds_on_the_numbers`; sim: `those_who_refuse_meet` |
-| 122 | Proposes saying it saw only the epoch's root, so that those who refuse carry the whole epoch over | No honest node takes up a proposal that says it saw less than the node held a window before: it isn't decided | 7 | unit: `a_proposal_says_it_saw_enough` |
-| 123 | Says it refuses a decision, or hands out the ID of an epoch without it, to draw nodes there | A node goes there by its own bounds or its operator's word only | 1 | unit: `refusing_is_ones_own` |
+| 92 | Commits remake after remake on bases of its own changes, the epoch's root and a chain of its own, so that nothing honest enters a snapshot | No node follows: a base must hold stamps of nodes of more than a third of the voters written once the epoch was due, and with them what those nodes had seen. What a base that passes leaves out is brought along | 2 | unit: `a_base_holds_a_third_of_the_voters_stamps` |
+| 93 | As a remake's coordinator, commits a base that leaves out a claim settled minutes before, and holds its accomplice's rival | The nodes that held the claim carry it over with what they held of it: a root's node's switch record has the rival late against it, as its change would have | 5 | sim: `a_base_that_leaves_out` |
+| 94 | Commits a remake of another kind (`replace`, `import`, `strict`), with content of its own | No node follows it: a federated swarm compacts only | 3 | unit: `compaction_only` |
+| 95 | A name is claimed and settled after a remake's base; after the switch a pretender signs a claim of it "in the epoch before" | A root's node named the real claim in its switch record, before it took anything in the new epoch: the pretender's claim is late against it | 5 | unit: `a_switch_record_witnesses`; sim: `a_pretender_after_a_remake` |
+| 96 | Hands in, weeks into an epoch, envelopes of the epoch before that no node carried: a value its user since replaced, a statement its user never sent | Taken from any node, as within an epoch: a value brought along has no word against one its user signed in the new epoch, and is left out where another brought along replaces it; a claim is late against what a root's node's record named; a number orders only among what is brought along | 3 | unit: `brought_along_from_any_node`, `the_new_epoch_has_the_last_word` |
+| 97 | Signs after the switch, as of the epoch before, statements and a proposal with numbers of its choosing | Brought along comes after what the snapshot holds and before what the new epoch signs: such a number orders only its signer's statements among what is brought along, and the proposal outranks none of the new epoch | 6, 7 | unit: `brought_along_in_between` |
+| 98 | Writes a switch record naming what it likes, or several, or one of its own after taking from peers | One a node and epoch. What it names is its node's word, as a change of that node would have been: a contest where it is a root's or the claimant's, no more | 5 | unit: `one_switch_record_a_node` |
+| 99 | Signs a claim on a branch of its own, retires the key that signed it from before the claim, and shows both together; another claims the name in sight of both; then cuts off the key that retired | The first comes back over nothing: no root's node saw it hold. The two are ordered by the roots' nodes alone, which had the later one standing and the first down: the first is late, for good, and its claimant's own old stamps count for nothing | 5 | unit: `a_claim_in_sight_past_a_cut_by_the_roots_alone` |
+| 100 | Unvouched a user, then has a node of its own stamp, weeks later, a change that has the user's claim and not the unvouch, to bring the claim back over one made in sight of it | The two are ordered by the roots' nodes alone: the unvoucher's own node counts for nothing. A root's node doing so, on old heads, makes the later claim late against the first, in the open: a root's word, until the claim is final; where another root's node had the later one standing and not the first, the two contest | 5 | unit: `a_witness_after_the_fact` |
+| 101 | Cuts its own device key off from before a user's creation it signed, to take the user's final name | The creation stops counting as its signer's unvouch would, from where the retirement was signed: what the user signed before counts, and its claim of its own name, with its own key, holds the name on. Without another vouch the user is out, its names waiting, final ones too, until it is gone or a vouch comes | 5 | unit: `a_users_own_name_by_its_own_key` |
+| 102 | Creates a user nobody else vouches for, lets it claim names until they are final, then cuts off the key it created it with from before the creation, to take the names | The creation stops counting as its signer's unvouch would, from where the retirement was signed: the user is out from there, its names wait, final ones and its own name too, and it is gone after `gone` unless a vouch comes. Nobody claims them meanwhile | 5 | unit: `a_creation_cut_off_puts_its_user_out` |
+| 103 | Creates a user, lets it settle names, then cuts the creation's key off from before it with a retirement that says it saw little, its own nodes silent, so that nothing the user signed counts through the creation, and an accomplice claims its names | The roots' nodes witness past a cut, as against an unvouch: what the user signed that a root's node had in its history counts, its settled names hold, and it is out from the retirement, its names waiting | 5 | unit: `a_cut_keeps_the_roots_witnesses` |
+| 104 | Cuts the creation's key off from before it on old dependencies, then claims the user's settled names, or creates a user of its name, in a change whose history holds the user's claims and the cut and nothing else | Where the user's claim didn't stand there only by the cut, the two are ordered as claims out of each other's sight, over all the changes, with the roots' nodes alone as witnesses: they had the user's claim count first, so the new claim is late, for good, and the user keeps its names | 5 | unit: `a_claim_in_sight_past_a_cut_is_ordered_by_lateness` |
+| 105 | A root cuts off the key it created users with, from before the creations, to take their names, final ones too, where only the roots create users; or a thief of a root's key gives a moved-in user first keys | A root's creation another root's node had seen stays the claim of the name, and its first keys, past a cut the root or a thief sets: a turned root takes back only what the other roots hadn't seen, never a settled or final name; the only root, all it created. The voters' cut of a stolen root key takes back what it created outside the cut, whoever saw it: one decision | 5; not promised (one root) | unit: `a_roots_creation_outlasts_its_cut_where_another_root_saw_it`, `the_voters_cut_takes_a_roots_creations` |
+| 106 | A root's node, beside a thief, commits with a fresh writer on heads without the retirement a change holding what the thief's sock signed, to keep it in past the cut | A root's node witnesses past a cut, as against an unvouch: the sock stays in by it, in the open, shown with the root (`GET /registry/users/<name>`). An accomplice's vouch keeps it in too | not promised | unit: `a_cut_has_its_signers_witnesses` |
+| 107 | A node that held only the older of two values its user wrote since the base carries it beside the newer one | Of several brought along to one place, one that another replaces is left out | 3 | unit: `a_replaced_value_is_left_out` |
+| 108 | Signs a claim "in the epoch before" of a name the snapshot holds | It is late against the snapshot's claim where that was settled at the base, or where a node of its side had that standing; else the two contest, as claims out of each other's sight do | 5 | unit: `brought_along_against_the_snapshot` |
+| 109 | Hands in again what a remake left out: a stolen laptop's `node` and `key` statements, retired since | Refuse: its user's floor for its kind is at its number or above; a value names in its `prev` one that is gone | 3 | unit: `what_a_remake_dropped_stays_out` |
+| 110 | Commits a remake from a base a month old | Every node goes there, and its switch record names what it holds beyond the base and what it held of it (who saw what first, decisions since); each envelope comes once. A key retired since keeps what its list names. Lengths of time go on from the stamps the snapshot lists, each node's record saying what it saw broken | 2 | sim: `a_remake_from_an_old_base`; unit: `a_retirement_lists_what_it_keeps` |
+| 111 | Commits a second remake of an epoch beside another, its ID ground lower; or many | Every node goes to the one with the lower ID that it builds, bringing along what it holds, envelopes of the other among them: nothing is lost, and no count of nodes decides. Each costs every node a snapshot, lowest ID first, until one comes out | 2; not promised (how often) | sim: `two_remakes_go_to_the_lower` |
+| 112 | A thief's statements are in the base of a remake | They are as they were: the snapshot holds them with their signatures, and a cut set after takes them back as it would have. A remake makes nothing final | 3 | unit: `a_cut_reaches_across_a_remake` |
+| 113 | Releases a user's claim with a stolen key, and an accomplice claims; the user cuts the key off two months later | What was seen given up for `final` has stopped counting for good: the release stands, as the accomplice's claim does, final by then. A remake or none changes nothing of it | not promised (protection from a stolen key) | unit: `stopped_counting_for_good` |
+| 114 | Tells a node that was away of an epoch that isn't the swarm's | The node rejoins no epoch that peers advertise: it finishes the old one from archives and builds the next itself, or takes the ID its operator gave | 1 | sim: `away_over_a_remake`, `back_by_an_id` |
+| 115 | A node back after several remakes offers what its user signed epochs ago | Taken, from however many remakes back, unless its user's floor for its kind refuses it: then quarantined, for the user to sign again | 3 | unit: `brought_along_any_number_of_remakes` |
+| 116 | A version builds another snapshot from a remake's base | Its node gets another ID than the remake was committed for, stays, and says so: two IDs for one base show | 2 | sim: `a_remake_by_its_result` |
+| 117 | A decision on the roots names its proposer the only root, or leaves a root out; the root left out signs on as one, and its node witnesses on | The voters see whom a proposal names before they vote for it. A root is one where the decision naming it holds, read where each thing it did was done: what it signs after it is left out is an ordinary user's, its node's changes after witness as no root's, and it is out unless someone vouches for it | 7 | unit: `roots_by_a_decision`, `a_root_where_it_is_one` |
+| 118 | With the keys of two thirds of voters since replaced, stolen later, makes up a decision of then; or a list of voters of its own, with the number of the one that replaced them and a lower digest | What voters that others replaced decide counts only in sight of the proposal that replaced them: the first decides nothing. The second holds only until the list it would replace is final: no decision of its matter proposed out of sight of a final one holds | 7; not promised before final | unit: `the_voters_before`, `a_final_decision` |
+| 119 | Two thirds of the voters turn on the rest | They name the roots and who votes, set any number (a share of the voters that lets one decide for all), change the policy, give a user's first keys to another, deal with the names of a user that is out, and say whose a contested name is: a name taken, in the open. They forge no signature and move nobody to other rules; the rest refuse, or fork | not promised | argued (Going apart, Refusing a decision) |
+| 120 | Offers a statement signed on the other side of a fork | Refuse: it names its branch | 3 | unit: `signed_for_its_user_id_and_branch` |
+| 121 | A fork naming its proposer the only voter and root | A node follows only by its operator's word, which names the proposal; what that says shows | 7 | sim: `a_fork_by_choice` |
+| 122 | A decision breaks a node's bounds: the voters let one of them decide for all | The node refuses it and moves to the epoch built without it, the same for every node that refuses, with what it held: they go on together | 7 | unit: `bounds_on_the_numbers`; sim: `those_who_refuse_meet` |
+| 123 | Proposes saying it saw only the epoch's root, so that those who refuse carry the whole epoch over | No honest node takes up a proposal that says it saw less than the node held a window before: it isn't decided | 7 | unit: `a_proposal_says_it_saw_enough` |
+| 124 | Says it refuses a decision, or hands out the ID of an epoch without it, to draw nodes there | A node goes there by its own bounds or its operator's word only | 1 | unit: `refusing_is_ones_own` |
Nodes and syncing:
| # | The adversary | Honest nodes | Promise | Shown by |
|---|---|---|---|---|
-| 124 | Sends different changes to different peers, each under its own number | Take all: changes made at once | 2 | sim: `two_histories_merge` |
-| 125 | Forks its node's writer | The nodes that took each split; one offered both holds proof and refuses the node; a side drops by its operator's choice | not promised | sim: `a_forked_actor_is_proven`, `a_side_drops_a_fork` |
-| 126 | Holds changes back, or passes on some | They come by other nodes; a joiner caught up with it syncs on | 6 | sim: `withheld_changes_arrive` |
-| 127 | Places its nodes around a victim by choosing their keys | The victim's node keeps its seeds and its user's other nodes as neighbours; a claim not settled for long shows. It costs time, not names | 5, 6 | sim: `around_a_victim` |
-| 128 | Hands a joining node another root change, or changes from before the policy | Refuse the handshake; there is no before | 1 | sim: `a_joiner_takes_its_root_only` |
-| 129 | Signs a token for any user with its node's key | Taken only by a node whose operator named the signing node | 3 | unit: `a_token_of_ones_party` |
-| 130 | Logs in on another party's node with a key of the registry; has a name in the registry that the node's own users have | Keys in the registry give nothing on anyone's node by themselves: whom a node lets in is its operator's, and what a user may write is in its signature | 3 | unit: `registry_keys_open_no_node` |
-| 131 | Lies in its member entry (ready, reached, stable); publishes a short window there to make every node stamp hourly; writes an entry of any size | Sync and trees bend; nothing gets in that way. How often nodes stamp is the policy's; an entry has a shape and a size, or the change is refused | 6 | unit: `an_entry_has_a_shape`, `stamps_by_the_policy`; argued (Reaching the others) |
-| 132 | Sends envelopes that don't check, without end | Refuse each (a signature costs about 30 µs to check *(docs)*); the node is refused as a whole after the first of its own | 6 | sim: `a_refused_node_costs_little` |
-| 133 | Writes its own member entry without end; signs and gives up without end; fills the waiting changes; sends changes that say they saw little, each to be judged far back | Take them no faster than a budget per party (changes, bytes and operations an hour): put off, never refused; a share of the waiting each | 6 | sim: `a_party_past_its_budget_waits` |
-| 134 | Starts a writer with every change: each costs every node memory in proportion to the document's history | Past `limits.writers` a user and epoch, every node puts off the changes that start more of the nodes whose writers count for it: a node's, for the user its member entry names. Nothing is refused; what reaches a node within others' histories is held, and a remake leaves it out. A user below a root costs the root nothing, and one beside others on a node costs them nothing, but where the node's entry names it | 6; not bounded | sim: `writers_past_their_limit_wait` |
-| 135 | One of the users a node carries for, besides the node's own, starts writers past its limit, from nodes of its own | The node's writers count for the user its member entry names, over a remake too, and nothing of it is put off for the others: the users beside it write on | 6 | sim: `writers_count_for_the_user_an_entry_names_beside_others` |
-| 136 | Signs its `node` statement naming another party's node again and again until its digest is the lowest, so that the node's writers count for it after a remake, then starts writers past its limit | A node's writers count for the user its member entry names, the node's own word, brought along across a remake; the digest decides only where the entry names none | 6 | unit: `writers_count_for_the_user_an_entry_names` |
-| 137 | Sends a node a change of the node's own writer, another value, to make it start a writer | Refused as forged; the node switches only where its own key signed it (a copy of its files) | 6 | unit, exists: `another_writing_as_this_node` |
-| 138 | Crafts a first change of another node's writer, authored as a third node, to sort before the writer's own in a batch, so that screening judges the writer's changes as the third node's | Screening names a change's node by its own author, or that of its actor's first change in its own history, never by another change of the batch: the writer's changes are vouched for by their own node's signature, and the crafted one, a second first change of the writer, is refused as forged | 1, 2 | unit, exists: `a_committer_from_its_own_history` |
-| 139 | Sends a change of a few bytes that holds a million operations | Taken, at the cost of applying it, against its party's budget, which counts operations: the party's next changes wait until it is paid | 6; not promised (a bound on what an epoch's document costs) | argued; sim: `a_party_past_its_budget_waits` |
-| 140 | Claims and releases a name a minute, by many users, to have every root's node write for each | A root's node writes once a `witness` at most, for all claims that reached it meanwhile, and takes the party's claims at its budget's pace | 6 | unit: `a_root_witnesses_once_a_witness` |
-| 141 | Crafts a change Automerge won't take, or that writes in an object nowhere to be found | Refuse *(checked: the rules refuse the second today)*; only the message that brought it fails | 1 | unit: `a_change_writing_nowhere` |
-| 142 | Crafts a change Automerge takes and shouldn't: bytes it wouldn't encode itself, operations numbered against its dependencies', a gap in its actor's changes, an operation named that is elsewhere or outside its history, an operation Automerge's transactions never write (an element written over naming the one inserted after it, an insert that replaces, a deletion or an increment inserted, a deletion named as replaced), a table written into, a value written at a mark's begin | Refuse before Automerge sees it, by the change and its own history alone: applied, such a change makes a node panic, save a document that doesn't load, or part from nodes it reached in another order | 1, 2 | unit, exist: `bytes_automerge_wouldnt_encode_are_refused`, `operations_numbered_against_their_dependencies_are_refused`, `a_gap_in_an_actors_changes_is_refused`, `operations_named_at_the_wrong_place_are_refused`, `operations_outside_a_changes_history_are_refused`, `only_what_transactions_write_passes`, `only_what_holds_a_value_is_replaced`, `no_table`, `no_mark`, `what_passes_leaves_automerge_sound`, `a_batch_is_checked_against_itself`, `a_change_refused_after_its_check_stands_in_for_nothing` |
+| 125 | Sends different changes to different peers, each under its own number | Take all: changes made at once | 2 | sim: `two_histories_merge` |
+| 126 | Forks its node's writer | The nodes that took each split; one offered both holds proof and refuses the node; a side drops by its operator's choice | not promised | sim: `a_forked_actor_is_proven`, `a_side_drops_a_fork` |
+| 127 | Holds changes back, or passes on some | They come by other nodes; a joiner caught up with it syncs on | 6 | sim: `withheld_changes_arrive` |
+| 128 | Places its nodes around a victim by choosing their keys | The victim's node keeps its seeds and its user's other nodes as neighbours; a claim not settled for long shows. It costs time, not names | 5, 6 | sim: `around_a_victim` |
+| 129 | Hands a joining node another root change, or changes from before the policy | Refuse the handshake; there is no before | 1 | sim: `a_joiner_takes_its_root_only` |
+| 130 | Signs a token for any user with its node's key | Taken only by a node whose operator named the signing node | 3 | unit: `a_token_of_ones_party` |
+| 131 | Logs in on another party's node with a key of the registry; has a name in the registry that the node's own users have | Keys in the registry give nothing on anyone's node by themselves: whom a node lets in is its operator's, and what a user may write is in its signature | 3 | unit: `registry_keys_open_no_node` |
+| 132 | Lies in its member entry (ready, reached, stable); publishes a short window there to make every node stamp hourly; writes an entry of any size | Sync and trees bend; nothing gets in that way. How often nodes stamp is the policy's; an entry has a shape and a size, or the change is refused | 6 | unit: `an_entry_has_a_shape`, `stamps_by_the_policy`; argued (Reaching the others) |
+| 133 | Sends envelopes that don't check, without end | Refuse each (a signature costs about 30 µs to check *(docs)*); the node is refused as a whole after the first of its own | 6 | sim: `a_refused_node_costs_little` |
+| 134 | Writes its own member entry without end; signs and gives up without end; fills the waiting changes; sends changes that say they saw little, each to be judged far back | Take them no faster than a budget per party (changes, bytes and operations an hour): put off, never refused; a share of the waiting each | 6 | sim: `a_party_past_its_budget_waits` |
+| 135 | Starts a writer with every change: each costs every node memory in proportion to the document's history | Past `limits.writers` a user and epoch, every node puts off the changes that start more of the nodes whose writers count for it: a node's, for the user its member entry names. Nothing is refused; what reaches a node within others' histories is held, and a remake leaves it out. A user below a root costs the root nothing, and one beside others on a node costs them nothing, but where the node's entry names it | 6; not bounded | sim: `writers_past_their_limit_wait` |
+| 136 | One of the users a node carries for, besides the node's own, starts writers past its limit, from nodes of its own | The node's writers count for the user its member entry names, over a remake too, and nothing of it is put off for the others: the users beside it write on | 6 | sim: `writers_count_for_the_user_an_entry_names_beside_others` |
+| 137 | Signs its `node` statement naming another party's node again and again until its digest is the lowest, so that the node's writers count for it after a remake, then starts writers past its limit | A node's writers count for the user its member entry names, the node's own word, brought along across a remake; the digest decides only where the entry names none | 6 | unit: `writers_count_for_the_user_an_entry_names` |
+| 138 | Sends a node a change of the node's own writer, another value, to make it start a writer | Refused as forged; the node switches only where its own key signed it (a copy of its files) | 6 | unit, exists: `another_writing_as_this_node` |
+| 139 | Crafts a first change of another node's writer, authored as a third node, to sort before the writer's own in a batch, so that screening judges the writer's changes as the third node's | Screening names a change's node by its own author, or that of its actor's first change in its own history, never by another change of the batch: the writer's changes are vouched for by their own node's signature, and the crafted one, a second first change of the writer, is refused as forged | 1, 2 | unit, exists: `a_committer_from_its_own_history` |
+| 140 | Sends a change of a few bytes that holds a million operations | Taken, at the cost of applying it, against its party's budget, which counts operations: the party's next changes wait until it is paid | 6; not promised (a bound on what an epoch's document costs) | argued; sim: `a_party_past_its_budget_waits` |
+| 141 | Claims and releases a name a minute, by many users, to have every root's node write for each | A root's node writes once a `witness` at most, for all claims that reached it meanwhile, and takes the party's claims at its budget's pace | 6 | unit: `a_root_witnesses_once_a_witness` |
+| 142 | Crafts a change Automerge won't take, or that writes in an object nowhere to be found | Refuse *(checked: the rules refuse the second today)*; only the message that brought it fails | 1 | unit: `a_change_writing_nowhere` |
+| 143 | Crafts a change Automerge takes and shouldn't: bytes it wouldn't encode itself, operations numbered against its dependencies', a gap in its actor's changes, an operation named that is elsewhere or outside its history, an operation Automerge's transactions never write (an element written over naming the one inserted after it, an insert that replaces, a deletion or an increment inserted, a deletion named as replaced), a table written into, a value written at a mark's begin | Refuse before Automerge sees it, by the change and its own history alone: applied, such a change makes a node panic, save a document that doesn't load, or part from nodes it reached in another order | 1, 2 | unit, exist: `bytes_automerge_wouldnt_encode_are_refused`, `operations_numbered_against_their_dependencies_are_refused`, `a_gap_in_an_actors_changes_is_refused`, `operations_named_at_the_wrong_place_are_refused`, `operations_outside_a_changes_history_are_refused`, `only_what_transactions_write_passes`, `only_what_holds_a_value_is_replaced`, `no_table`, `no_mark`, `what_passes_leaves_automerge_sound`, `a_batch_is_checked_against_itself`, `a_change_refused_after_its_check_stands_in_for_nothing` |
Rules, and the swarm as it is:
| # | The adversary | Honest nodes | Promise | Shown by |
|---|---|---|---|---|
-| 143 | A rule differs between versions (a bug) | Each side refuses what the other takes, or their stamps name two digests for the same changes: each logs and shows it. A node that finds itself apart from the nodes of more than two thirds of the other voters at its first start with a version writes nothing. One side upgrades and drops | not promised | sim: `a_side_drops_and_comes_back`, `two_digests_one_history`; unit: `a_node_checks_itself` |
-| 144 | Stamps a wrong digest, to keep the nodes that upgrade from writing; one of three voters does | A node stops only where it differs from the nodes of more than two thirds of the other voters; from fewer it shows it and goes on | 6 | unit: `one_wrong_digest_stops_nobody`, `of_three_voters` |
-| 145 | A policy version a node doesn't know: in the root, or decided | It doesn't sync, and takes no such proposal up: a policy is decided only with two thirds of the voters' nodes knowing it | 1 | unit: `no_sync_under_an_unknown_policy`, `an_unknown_policy_isnt_taken_up` |
-| 146 | A partition, for any length of time | A side decides only with nodes of two thirds of all the voters on it. Where a third of them have nodes and votes on both sides, both may: every node then acts on the higher number | 7 | sim: `one_side_decides`; unit: `the_last_holds` |
-| 147 | None: a swarm that isn't federated | Everything as today | Optional | the existing tests, untouched; `bench_screening` |
+| 144 | A rule differs between versions (a bug) | Each side refuses what the other takes, or their stamps name two digests for the same changes: each logs and shows it. A node that finds itself apart from the nodes of more than two thirds of the other voters at its first start with a version writes nothing. One side upgrades and drops | not promised | sim: `a_side_drops_and_comes_back`, `two_digests_one_history`; unit: `a_node_checks_itself` |
+| 145 | Stamps a wrong digest, to keep the nodes that upgrade from writing; one of three voters does | A node stops only where it differs from the nodes of more than two thirds of the other voters; from fewer it shows it and goes on | 6 | unit: `one_wrong_digest_stops_nobody`, `of_three_voters` |
+| 146 | A policy version a node doesn't know: in the root, or decided | It doesn't sync, and takes no such proposal up: a policy is decided only with two thirds of the voters' nodes knowing it | 1 | unit: `no_sync_under_an_unknown_policy`, `an_unknown_policy_isnt_taken_up` |
+| 147 | A partition, for any length of time | A side decides only with nodes of two thirds of all the voters on it. Where a third of them have nodes and votes on both sides, both may: every node then acts on the higher number | 7 | sim: `one_side_decides`; unit: `the_last_holds` |
+| 148 | None: a swarm that isn't federated | Everything as today | Optional | the existing tests, untouched; `bench_screening` |
## The registry on it
```
@@ -2557,7 +2564,7 @@ it trusts for that.
## Stages
Each leaves the system working, and is a few patches with its tests, which leave
-their vectors. At every stage the existing tests pass untouched (147).
+their vectors. At every stage the existing tests pass untouched (148).
1. **A federated swarm's frame.** `--genesis-policy` (a file, written into the genesis
change with the roots, the voters and the users it starts with); a federated node
@@ -2565,7 +2572,7 @@ their vectors. At every stage the existing tests pass untouched (147).
yet, takes tokens and logins by key as its operator says, keeps ended sessions to
itself, stamps as the policy says, and writes a member entry of the policy's shape
and size. What the genesis change sets for the swarm as a whole is read from the
- policy. Tests: 128 to 131, 138, 142, 145, 147, and the policy's existing tests
+ policy. Tests: 129 to 132, 139, 143, 146, 148, and the policy's existing tests
under a policy from the genesis change. Those of a crafted change, and of a crafted
committer, exist already: screening refuses those in every swarm.
2. **Statements.** The users' registers (`create`, `key`, `node`, `vouch`, `release`);
@@ -2587,21 +2594,21 @@ their vectors. At every stage the existing tests pass untouched (147).
read from the stamps; final. `GET /registry/claims` with what makes a claim late;
values marked in `GET /store`. A node keeps its seeds and its user's other nodes as
neighbours, leaves out members that name another epoch, and shows a claim long
- unsettled. Tests: 8, 10, 11, 14, 15, 17, 18, 38, 40, 41, 45 to 48, 51, 54, 55, 124,
- 126, 127.
+ unsettled. Tests: 8, 10, 11, 14, 15, 17, 18, 38, 40, 41, 45 to 48, 51, 54, 55, 125,
+ 127, 128.
6. **Cuts.** `retire` and the keys above, a node that stops, a cut never reaching its
own statement, what a cut takes back, what doesn't count left out, the value before
read again, what stopped counting for good, the client listing what stopped
- counting. Tests: 16, 22, 49, 50, 53, 56 to 60, 67, 68, 112.
+ counting. Tests: 16, 22, 49, 50, 53, 56 to 60, 67, 68, 113.
7. **Unvouching.** `unvouch`, a vouch or a creation cut off as by an unvouch, a user
giving itself up, one that another vouched for staying, those brought in going with
it, the names of a user that is out waiting, gone, nothing taken from an unvouched
user's nodes, what comes back with a vouch. Tests: 24, 26 to 31, 33, 34, 61 to 64,
- 66, 98 to 105.
+ 66, 99 to 106.
8. **Coming back.** The drop an operator asks for, a forked writer proven and shown
with what the roots' nodes hold, the budget and the share per party, the writers
counted per user, for the one a node's member entry names, a node keeping its
- writer over a clean stop. Tests: 125, 132 to 137, 139 to 141.
+ writer over a clean stop. Tests: 126, 133 to 138, 140 to 142.
9. **The registry.** Import, export, and a federated swarm of the simulations with the
registry's kinds and a few hundred hosts. From here it can be tried: users, hosts,
names, a root that settles, names that become final. It isn't to be relied on yet.
@@ -2615,10 +2622,10 @@ their vectors. At every stage the existing tests pass untouched (147).
contested name is, a name the rules leave to the voters; a decision of the voters
before counted only in sight of the list that replaced them; a final decision. The
simulations start from a root change naming several voters. Tests: 25, 65, 69 to
- 88, 116, 117, 146.
+ 88, 117, 118, 147.
11. **Versions.** The digest with every stamp, a node checking itself before it
writes; for every swarm, a node that speaks the wire version before its own, and a
- handshake that says which epochs its node keeps. Tests: 143, 144.
+ handshake that says which epochs its node keeps. Tests: 144, 145.
12. **Remakes.** Compaction only; a node proposing and acking by `remakeChanges` and
`remakeWriters`, and following such a remake only, by its result; the snapshot
every node builds, with whatever can still count and how far each length of time
@@ -2628,14 +2635,14 @@ their vectors. At every stage the existing tests pass untouched (147).
retirement's list as its cut; decisions over a remake; lengths of time going on;
two remakes of an epoch, to the lower ID. A node keeping the epochs it left on
disk, peers answering for them and saying which; a node walking them, or rejoining
- by an ID its operator gave, and by none that peers advertise. Tests: 91 to 97, 106
- to 111, 113 to 115.
+ by an ID its operator gave, and by none that peers advertise. Tests: 91 to 98, 107
+ to 112, 114 to 116.
13. **The policy by a decision.** The policy as a matter, a node that doesn't know it,
what it no longer covers: shown aside, taken away by its user only, dropped after
- a time, moved at a remake. Tests: 32, 52, 89, 90, 145.
+ a time, moved at a remake. Tests: 32, 52, 89, 90, 146.
14. **Going apart, and refusing.** A fork followed by an operator's word, with who
votes and who the roots are on its side. Refusing a decision: a node's bounds, the
- epoch without the decision, what a node takes along. Tests: 118 to 123. From here
+ epoch without the decision, what a node takes along. Tests: 119 to 124. From here
it can be relied on: the rules change by decisions.
## What was checked, and what is assumed