From 076f3885c9243de9b4ccc577e52d7f9303fc5b61 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 14 Nov 2026 12:21:31 +0000 Subject: federation: no party sets the pace of remakes One user reached `remakeWriters` in two hours with its sixteen creations' writers, or `remakeChanges` within a day at its budget, and did it again in every epoch: a remake every two hours, an archive each, a snapshot each on every node. Writers now count per party, as the budget does, so creating users starts no more of them; no remake comes before the epoch has been seen for `remakeAfter` (recommended 7 days); and the budget recommended is 60 changes, 1 MiB and 10 000 operations a party an hour, plenty for a registry. --- docs/federation.md | 259 +++++++++++++++++++++++++++-------------------------- 1 file changed, 133 insertions(+), 126 deletions(-) (limited to 'docs') diff --git a/docs/federation.md b/docs/federation.md index ccf62f0..f6415f5 100644 --- a/docs/federation.md +++ b/docs/federation.md @@ -172,10 +172,9 @@ What is not promised: shows, under its nodes' signatures. * **How often the swarm remakes, and from what.** The alive peers commit a remake as in every swarm, and a party that runs most of the alive nodes has them. It changes - nothing that counts, and comes no sooner than `remakeChanges` and `remakeWriters` - allow; but each - remake of an epoch a node is offered costs it a snapshot, the lowest ID first, - until one comes out to the ID it was committed for. + nothing that counts, and comes no sooner than `remakeAfter`, then as `remakeChanges` + and `remakeWriters` allow; but each remake of an epoch a node is offered costs it a + snapshot, the lowest ID first, until one comes out to the ID it was committed for. * **A swarm that never splits.** A node that forks its own writer (two changes with one number) splits the honest nodes that took one from those that took the other, until one side drops its own (Partitions; Automerge: one change a number). It is @@ -255,6 +254,7 @@ value: | `uncovered` | 90 days | how long what a policy no longer covers stays aside before it is dropped; none: until its user takes it away | | `archiveRetention` | 90 days | how long a node answers for an epoch it left, at least | | `stamp` | 1 day | how often a node that is up renews its alive stamp | +| `remakeAfter` | 7 days | how long an epoch is seen before a remake | | `remakeChanges` | 10000 | changes an epoch's history holds beyond its root change before a remake | | `remakeWriters` | 1000 | writers an epoch's changes start before a remake | | `witness` | 1 minute | how long a root's node lets a claim wait before it writes | @@ -264,7 +264,7 @@ value: | `limits.users` | 16 | users a user created that stand; a root: no limit | | `limits.vouches` | 64 | vouches of a user that stand | | `limits.proposals` | 8 | proposals of a user that are open | -| `limits.writers` | 64 | writers a user's nodes start in an epoch before more are put off | +| `limits.writers` | 64 | writers a party's nodes start in an epoch before more are put off | | `limits.name` | 255 | bytes of a name | | `limits.entry` | 4096 | bytes of a node's member entry | | a kind's `limit` | none | names of the kind a user holds by a claim | @@ -373,32 +373,34 @@ grows. A statement is signed by one user and says one thing: nothing *(checked: `access::screen`)*. Every writer costs every node memory while the epoch lasts, in proportion to the document's history (Automerge: writers). So a federated node keeps its writer over a clean stop, and each node counts the writers - each user's nodes start in the epoch: past `limits.writers`, a change that starts - another is put off by every node that would take it from that user's nodes, until a - remake. A node's writers count for one user: the one its member entry names, of - those it carries for, where each writer starts (a writer counts for the user it was - counted for, until a cut leaves it out), its own word, brought along across a remake - with the entry; naming none of them, the user of the `node` statement naming it with - the lowest digest, of those that count there, so that its operator names one to - choose. So a user past its limit puts off the nodes whose writers count for it, and - no other that carries for it too. It is never refused: put off is each node's doing, - its operator may take what it puts off (`POST /admin/put-off/take`, naming the - user), and a change that reaches a node within another's history is taken. Writers a - node started outside a cut it was stopped with count for nobody: a thief's node - costs its victim nothing once cut off, and where the count falls back below the - limit so, every node takes what it put off for that user, read again from the - changes, nobody acting: late, with what was built on it. A writer is a run, not a - write: 64 are a node restarting weekly for more than a year. Each costs every node 4 - bytes for every change of the epoch, those before it started too *(measured - upstream)*: 64 cost some 2.5 MB at `remakeChanges` changes. Where epochs last long - (few nodes, writing little), a user whose nodes restart often reaches it first: such - a swarm sets it higher. A node whose writers count for a user past it is put off as - a whole, with what it carries for others and its records of proposals, until a - remake or its operator takes what is put off; how many a user's nodes started shows - (`GET /registry/users`), for a remake to come first. + each party's nodes start in the epoch (A party's budget, below): past + `limits.writers`, a change that starts another is put off by every node that would + take it from that party's nodes, until a remake, so that creating users starts no + more. A node's writers count for one user, and so for its party: the one its member + entry names, of those it carries for, where each writer starts (a writer counts for + the user it was counted for, until a cut leaves it out), its own word, brought along + across a remake with the entry; naming none of them, the user of the `node` + statement naming it with the lowest digest, of those that count there, so that its + operator names one to choose. So a party past its limit puts off the nodes whose + writers count for a user of it, and no other that carries for one too. It is never + refused: put off is each node's doing, its operator may take what it puts off + (`POST /admin/put-off/take`, naming the party's head), and a change that reaches a + node within another's history is taken. Writers a node started outside a cut it was + stopped with count for nobody: a thief's node costs its victim nothing once cut off, + and where the count falls back below the limit so, every node takes what it put off + for that party, read again from the changes, nobody acting: late, with what was + built on it. A writer is a run, not a write: 64 are a node restarting weekly for + more than a year. Each costs every node 4 bytes for every change of the epoch, those + before it started too *(measured upstream)*: 64 cost some 2.5 MB at `remakeChanges` + changes. Where epochs last long (few nodes, writing little), a party whose nodes + restart often reaches it first: such a swarm sets it higher. A node whose writers + count for a party past it is put off as a whole, with what it carries for others and + its records of proposals, until a remake or its operator takes what is put off; how + many a party's nodes started shows (`GET /registry/users`), for a remake to come + first. * **A party's budget.** A node takes changes from a party's nodes no faster than a budget, its own setting (`--party-budget`): changes, their bytes and their - operations an hour, recommended 600 changes, 4 MiB and 100 000 operations a party. + operations an hour, recommended 60 changes, 1 MiB and 10 000 operations a party. What is over waits, and nothing is refused for it: a change larger than what is left of the hour is taken once nothing of its party waits before it, and the party's next changes wait until the hour it overdrew is paid. For a budget a party is a user with @@ -1094,14 +1096,15 @@ envelopes are brought along as they were signed (below). * **Compaction only.** A node follows a remake of the kind `compact` alone: `replace`, `import` and `strict` put content nobody signed, and start a new swarm. -* **When.** A node proposes a remake by itself once the epoch's history holds - `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, 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. +* **When.** A node proposes a remake by itself once the epoch has been seen for + `remakeAfter` (its root change at two stamps that far apart, as Lengths of time + reads it) and its history holds `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, 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 @@ -1752,8 +1755,9 @@ takes along those of the nodes that carry for a user it holds. * `POST /admin/refused/drop`, naming the peer whose word it takes (Partitions). * `POST /admin/check/accept`: write again after a check of itself that differed (Continuum changing under a swarm). - * `GET /admin/put-off`: what the node put off, by user; `POST /admin/put-off/take`, - naming a user: take what was put off for the writers past its limit (Users). + * `GET /admin/put-off`: what the node put off, by party; `POST /admin/put-off/take`, + naming a party's head: take what was put off for the writers past its limit + (Users). * **Who may connect** is outside this design. Today it is the swarm key, a secret all nodes share: it keeps those who aren't parties from connecting and reading, as far as every party keeps it, and is no boundary between the parties. Nothing here @@ -1775,7 +1779,7 @@ with the epoch (Automerge: writers, history). | a statement | under a KiB; 32 B in each retirement's list that keeps it, in each switch record that names it | | a value | its envelope, a few hundred bytes for a host; kept replaced while not stopped counting for good | | a node | its member entry, `limits.entry` at most; a stamp each `stamp`, some 350 B; a writer a run; a record a proposal it takes up; a switch record a remake | -| a user at its limits | some 470 statements standing (keys, nodes, users created, vouches, proposals, a kind's claims), under half a MiB, and `limits.writers` writers | +| a user at its limits | some 470 statements standing (keys, nodes, users created, vouches, proposals, a kind's claims), under half a MiB; and, for its party, `limits.writers` writers | | a claim | its statement; while it has a rival, what each witness had seen, kept as the node goes; until it is final, a length watched for each voter's node | | a cut | 32 B for each statement and value it keeps | | a root's node | a change a `witness` at most while claims reach it | @@ -1787,10 +1791,12 @@ What bounds it: * **Changes.** Stamps: nodes × days, at the recommended `stamp`. What users sign: what stands by each user's limits, and what is signed and given up without end by each party's budget at every node. A root's node's witness: one change a `witness`, 1 440 - a day with a minute, whatever the parties do. An epoch: `remakeChanges`. -* **Writers.** A user's by `limits.writers`, a party's by its budget, an epoch's by - `remakeWriters`. With them, an epoch's heap stays under 10 000 × (0.2 KB + 4 B × - 1 000), some 42 MB, on every node. + a day with a minute, whatever the parties do. An epoch: `remakeChanges`, and no + remake before `remakeAfter`, within which a party adds its budget's some 10 000 + changes a week at most. +* **Writers.** A party's by `limits.writers`, an epoch's by `remakeWriters`. With + them, an epoch remade as its changes come stays under 10 000 × (0.2 KB + 4 B × 1 + 000), some 42 MB of heap, on every node. * **What it doesn't bound.** What reaches a node within others' histories (statements past a limit, writers past theirs, a change that holds a million operations) is held until a remake; a remake of an epoch, and every other a party commits of it, costs @@ -1821,8 +1827,8 @@ the design recommends; who acts, and how. A node shows each where it waits on it | Signal | Act when | What to do | |---|---|---| | the epoch's changes × writers × 4 B, beside the node's memory | over a quarter of it | ask the voters for lower `remakeChanges` or `remakeWriters`, or give the node memory | -| the writers of a user the node carries for (`GET /registry/users`) | half of `limits.writers` | find the node that restarts in a loop | -| what the node put off, by user (`GET /admin/put-off`) | anything | take it (`POST /admin/put-off/take`), or leave it to the next remake | +| the writers of a party the node carries for (`GET /registry/users`) | half of `limits.writers` | find the node that restarts in a loop | +| what the node put off, by party (`GET /admin/put-off`) | anything | take it (`POST /admin/put-off/take`), or leave it to the next remake | | what waits by a party's budget, by party | waiting an hour | a party that writes without end, or a budget too small | | a claim of a user the node carries for, not settled (`GET /registry/claims`) | ten times `witness` | its neighbours and seeds; the roots' nodes' last change | | the age of the last change of the roots' nodes the node holds | twice `stamp` | its seeds; tell the roots | @@ -2475,82 +2481,83 @@ Decisions and remakes: | 88 | A user is out and stays out: what of its names? | A decision frees them, or gives them to another, whatever `gone` says | 7 | unit: `a_decision_frees_or_gives` | | 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 | Proposes a remake the moment the epoch is due, gathers the acks, and never decides; or its coordinator dies | It expires, and any node aborts it a grace after, which frees the acks: the next remake comes. One committed is followed whatever abort came beside it | 6 | sim: `an_expired_remake_is_aborted_by_any_node` | -| 93 | 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` | -| 94 | 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` | -| 95 | 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` | -| 96 | 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` | -| 97 | 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` | -| 98 | 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` | -| 99 | 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` | -| 100 | 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` | -| 101 | 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` | -| 102 | 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` | -| 103 | 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` | -| 104 | 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` | -| 105 | 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` | -| 106 | 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` | -| 107 | 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/`). An accomplice's vouch keeps it in too | not promised | unit: `a_cut_has_its_signers_witnesses` | -| 108 | 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` | -| 109 | 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` | -| 110 | 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` | -| 111 | 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 and what began after the base | 2 | sim: `a_remake_from_an_old_base`; unit: `a_retirement_lists_what_it_keeps` | -| 112 | Has a remake committed from a base before a claim became final, a user gone, a decision final, a thing dropped | Each voter's node's switch record names the lengths that began for it after the base, from the stamp they began at: final, gone, dropped and stopped counting for good stay so | 5 | unit: `lengths_begun_after_the_base` | -| 113 | Hands a root's node a claim at the switch, so that it writes before it holds the envelopes its switch record names, with the snapshot's rival standing and the claim not there | Every change a node commits after its switch record reads what the record names as in its history: the claim it named was there, and what it held standing with no rival stays so | 5 | unit: `after_a_switch_record` | -| 114 | A decision is decided after a remake's base, and the nodes that took it up are gone before they could take it up again | Their switch records hold their records, judged against the votes brought along: the decision comes along as it was | 7 | unit: `records_in_switch_records` | -| 115 | Commits a second remake of an epoch beside another, its ID ground lower; or many | Every node goes to the one whose epoch holds switch records of nodes of more than a third of the voters, else the lower ID, 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` | -| 116 | Keeps an epoch as an archive, and a month into the next commits a second remake of it, its ID ground lower; serves it to nodes walking the archives | The epoch the swarm went to holds switch records of nodes of more than a third of the voters, the late one none: no node moves, and a node walking the archives reads the same from the two new epochs | 2 | sim: `a_late_second_remake_moves_nobody` | -| 117 | 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` | -| 118 | 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` | -| 119 | 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` | -| 120 | 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` | -| 121 | 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` | -| 122 | 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` | -| 123 | A root the voters left out signs creations, and has its node commit witness changes, each saying it saw nothing of the decision | What a root left out signed, and what its nodes committed, is a root's only in sight of the decision's proposal, or where another root's node had it without the decision: the creations are an ordinary user's, within its limit, and the witness changes witness for no root | 3, 5 | unit: `a_root_left_out_backdates_nothing` | -| 124 | 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. Of decisions on who votes made by one list, the first decided holds, as the roots' nodes witness it: the second is late, a decision of voters already replaced. Once a decision is final, none of its matter proposed out of its sight holds | 7; not promised against the roots before final | unit: `the_voters_before`, `who_votes_by_the_roots_witness`, `a_final_decision` | -| 125 | Proposes a list of voters, and has it decided months later, so that the voters before lose every decision made meanwhile | No node takes up a proposal that says it saw less than the node held a window before it takes it up: it is proposed again, and the voters before lose a window's decisions at most | 7 | unit: `taken_up_within_a_window` | -| 126 | 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) | -| 127 | 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` | -| 128 | 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` | -| 129 | 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` | -| 130 | 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` | -| 131 | 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` | +| 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, and the epoch was seen for `remakeAfter`. Each costs every node a snapshot | 2; not promised (how often) | sim: `every_node_builds_the_snapshot`, `remakes_no_sooner_than_the_changes` | +| 92 | Starts writers under many users of its own, and writes at its budget's pace, to have the swarm remake every two hours | Writers count per party, and its users are of its party; and no remake comes before the epoch was seen for `remakeAfter` | 6 | unit: `writers_count_per_party`, `no_remake_before_its_time` | +| 93 | Proposes a remake the moment the epoch is due, gathers the acks, and never decides; or its coordinator dies | It expires, and any node aborts it a grace after, which frees the acks: the next remake comes. One committed is followed whatever abort came beside it | 6 | sim: `an_expired_remake_is_aborted_by_any_node` | +| 94 | 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` | +| 95 | 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` | +| 96 | 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` | +| 97 | 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` | +| 98 | 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` | +| 99 | 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` | +| 100 | 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` | +| 101 | 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` | +| 102 | 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` | +| 103 | 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` | +| 104 | 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` | +| 105 | 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` | +| 106 | 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` | +| 107 | 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` | +| 108 | 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/`). An accomplice's vouch keeps it in too | not promised | unit: `a_cut_has_its_signers_witnesses` | +| 109 | 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` | +| 110 | 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` | +| 111 | 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` | +| 112 | 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 and what began after the base | 2 | sim: `a_remake_from_an_old_base`; unit: `a_retirement_lists_what_it_keeps` | +| 113 | Has a remake committed from a base before a claim became final, a user gone, a decision final, a thing dropped | Each voter's node's switch record names the lengths that began for it after the base, from the stamp they began at: final, gone, dropped and stopped counting for good stay so | 5 | unit: `lengths_begun_after_the_base` | +| 114 | Hands a root's node a claim at the switch, so that it writes before it holds the envelopes its switch record names, with the snapshot's rival standing and the claim not there | Every change a node commits after its switch record reads what the record names as in its history: the claim it named was there, and what it held standing with no rival stays so | 5 | unit: `after_a_switch_record` | +| 115 | A decision is decided after a remake's base, and the nodes that took it up are gone before they could take it up again | Their switch records hold their records, judged against the votes brought along: the decision comes along as it was | 7 | unit: `records_in_switch_records` | +| 116 | Commits a second remake of an epoch beside another, its ID ground lower; or many | Every node goes to the one whose epoch holds switch records of nodes of more than a third of the voters, else the lower ID, 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` | +| 117 | Keeps an epoch as an archive, and a month into the next commits a second remake of it, its ID ground lower; serves it to nodes walking the archives | The epoch the swarm went to holds switch records of nodes of more than a third of the voters, the late one none: no node moves, and a node walking the archives reads the same from the two new epochs | 2 | sim: `a_late_second_remake_moves_nobody` | +| 118 | 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` | +| 119 | 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` | +| 120 | 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` | +| 121 | 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` | +| 122 | 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` | +| 123 | 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` | +| 124 | A root the voters left out signs creations, and has its node commit witness changes, each saying it saw nothing of the decision | What a root left out signed, and what its nodes committed, is a root's only in sight of the decision's proposal, or where another root's node had it without the decision: the creations are an ordinary user's, within its limit, and the witness changes witness for no root | 3, 5 | unit: `a_root_left_out_backdates_nothing` | +| 125 | 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. Of decisions on who votes made by one list, the first decided holds, as the roots' nodes witness it: the second is late, a decision of voters already replaced. Once a decision is final, none of its matter proposed out of its sight holds | 7; not promised against the roots before final | unit: `the_voters_before`, `who_votes_by_the_roots_witness`, `a_final_decision` | +| 126 | Proposes a list of voters, and has it decided months later, so that the voters before lose every decision made meanwhile | No node takes up a proposal that says it saw less than the node held a window before it takes it up: it is proposed again, and the voters before lose a window's decisions at most | 7 | unit: `taken_up_within_a_window` | +| 127 | 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) | +| 128 | 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` | +| 129 | 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` | +| 130 | 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` | +| 131 | 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` | +| 132 | 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 | |---|---|---|---|---| -| 132 | Sends different changes to different peers, each under its own number | Take all: changes made at once | 2 | sim: `two_histories_merge` | -| 133 | 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` | -| 134 | 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` | -| 135 | 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` | -| 136 | 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` | -| 137 | 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` | -| 138 | 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` | -| 139 | 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) | -| 140 | 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` | -| 141 | 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` | -| 142 | 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` | -| 143 | 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` | -| 144 | 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` | -| 145 | 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` | -| 146 | 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` | -| 147 | 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` | -| 148 | A newcomer a root created writes at the budget's pace, to stall the root's witness at every node | A user a root created heads a party of its own, and waits on its own budget; a root is its own party, and its node's witness changes draw on none | 5, 6 | unit: `a_party_below_the_roots` | -| 149 | 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` | -| 150 | 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` | -| 151 | 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` | +| 133 | Sends different changes to different peers, each under its own number | Take all: changes made at once | 2 | sim: `two_histories_merge` | +| 134 | 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` | +| 135 | 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` | +| 136 | 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` | +| 137 | 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` | +| 138 | 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` | +| 139 | 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` | +| 140 | 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) | +| 141 | 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` | +| 142 | 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` | +| 143 | Starts a writer with every change: each costs every node memory in proportion to the document's history | Past `limits.writers` a party 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` | +| 144 | 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` | +| 145 | 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` | +| 146 | 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` | +| 147 | 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` | +| 148 | 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` | +| 149 | A newcomer a root created writes at the budget's pace, to stall the root's witness at every node | A user a root created heads a party of its own, and waits on its own budget; a root is its own party, and its node's witness changes draw on none | 5, 6 | unit: `a_party_below_the_roots` | +| 150 | 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` | +| 151 | 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` | +| 152 | 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 | |---|---|---|---|---| -| 152 | 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` | -| 153 | 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` | -| 154 | 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` | -| 155 | 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` | -| 156 | None: a swarm that isn't federated | Everything as today | Optional | the existing tests, untouched; `bench_screening` | +| 153 | 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` | +| 154 | 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` | +| 155 | 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` | +| 156 | 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` | +| 157 | None: a swarm that isn't federated | Everything as today | Optional | the existing tests, untouched; `bench_screening` | ## The registry on it ``` @@ -2607,7 +2614,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 (156). +their vectors. At every stage the existing tests pass untouched (157). 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 @@ -2615,7 +2622,7 @@ their vectors. At every stage the existing tests pass untouched (156). 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: 136 to 139, 146, 151, 154, 156, and the policy's existing tests + policy. Tests: 137 to 140, 147, 152, 155, 157, 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`); @@ -2637,21 +2644,21 @@ their vectors. At every stage the existing tests pass untouched (156). 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, 132, - 134, 135. + unsettled. Tests: 8, 10, 11, 14, 15, 17, 18, 38, 40, 41, 45 to 48, 51, 54, 55, 133, + 135, 136. 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, 118. + counting. Tests: 16, 22, 49, 50, 53, 56 to 60, 67, 68, 119. 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, 100 to 107. + 66, 101 to 108. 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: 133, 140 to 145, 147 to 150. + counted per party, for the user a node's member entry names, a node keeping its + writer over a clean stop. Tests: 134, 141 to 146, 148 to 151. 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. @@ -2665,10 +2672,10 @@ their vectors. At every stage the existing tests pass untouched (156). 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, 122 to 125, 155. + 88, 123 to 126, 156. 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: 152, 153. + handshake that says which epochs its node keeps. Tests: 153, 154. 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 @@ -2678,14 +2685,14 @@ their vectors. At every stage the existing tests pass untouched (156). 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 99, 108 - to 117, 119 to 121. + by an ID its operator gave, and by none that peers advertise. Tests: 91 to 100, + 109 to 118, 120 to 122. 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, 154. + a time, moved at a remake. Tests: 32, 52, 89, 90, 155. 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: 126 to 131. From here + epoch without the decision, what a node takes along. Tests: 127 to 132. From here it can be relied on: the rules change by decisions. ## What was checked, and what is assumed -- cgit v1.3.1