aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/federation.md162
1 files changed, 84 insertions, 78 deletions
diff --git a/docs/federation.md b/docs/federation.md
index aa30ad3..d6fac80 100644
--- a/docs/federation.md
+++ b/docs/federation.md
@@ -1098,10 +1098,13 @@ envelopes are brought along as they were signed (below).
* **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).
-* **Two remakes of one epoch**, both committed: every node goes to the one with the
- lower ID, a node in the other moving to it as one that comes back does (Coming back
- after remakes), with what it holds there. No count of nodes decides, which a party
- running many nodes would have.
+* **Two remakes of one epoch**, both committed: the one whose new epoch holds switch
+ records of nodes of more than a third of the voters (a node counted for one voter)
+ comes first; between two that do, or two that don't, the one with the lower ID.
+ Every node goes to the first, a node in the other moving to it as one that comes
+ back does (Coming back after remakes), with what it holds there. So a remake
+ committed late, beside one the swarm went to, moves nobody, and no count of nodes
+ decides, which a party running many nodes would have.
* **The snapshot holds** the registry as it resolves at the base, and with it whatever
something signed later could still change:
* the policy that holds, with its numbers, and the decision that holds of each
@@ -1231,13 +1234,14 @@ in one of two ways:
operator says, and every epoch on a node kept as an archive. Peers say in the
handshake which epochs they keep. From such a peer the node syncs the rest of the
epoch it is in, judging every change; sees the remake committed (of two, the one
- with the lower ID); builds the snapshot itself; and is in the next epoch, whose ID
- is the snapshot's hash. So on, epoch by epoch, as far as peers keep them: with an
- archive within reach, from any epoch to the swarm's, and for a node that joins,
- from the genesis change. Where the walk ends short of the epoch the node's peers
- are in (an archive can keep a remake's commit back), the node stops and shows it,
- for its operator to give it the ID (below). Keeping an archive is an application's;
- continuum answers for what a node keeps.
+ that comes first, as Remakes orders them, from the new epochs' switch records);
+ builds the snapshot itself; and is in the next epoch, whose ID is the snapshot's
+ hash. So on, epoch by epoch, as far as peers keep them: with an archive within
+ reach, from any epoch to the swarm's, and for a node that joins, from the genesis
+ change. Where the walk ends short of the epoch the node's peers are in (an archive
+ can keep a remake's commit back), the node stops and shows it, for its operator to
+ give it the ID (below). Keeping an archive is an application's; continuum answers
+ for what a node keeps.
2. **By an ID, on its operator's word.** Where no peer keeps the epoch any more, the
node can't check how the swarm got from there to here. Its operator gives it the
ID of the epoch to go to (`POST /admin/epochs/rejoin`), from a party it trusts:
@@ -1259,8 +1263,8 @@ Either way, what follows:
* **As a voter or a root** the user is what the decisions that hold there name it.
* **Its old document** goes to the archive, as today.
-A node in the other of two remakes of one epoch moves the same way, to the one with
-the lower ID: it holds the epoch both came from, builds the snapshot from that base,
+A node in the other of two remakes of one epoch moves the same way, to the one that
+comes first: it holds the epoch both came from, builds the snapshot from that base,
and brings along what it holds, envelopes signed in the epoch it leaves among them
(What every node judges). To any other epoch a node moves only by its operator's word
(`POST /admin/epochs/rejoin`, `POST /admin/fork`).
@@ -1635,8 +1639,7 @@ same holder, or contested. The users see it and one releases; nobody drops anyth
**Two epochs**, after a fork or a decision some refuse, are apart for good: each node
is where its operator put it (by word or by bounds), and moves to the other side by
being told to (it builds that side's snapshot from the base it holds, and brings along
-what it holds). Two remakes of one epoch both committed are no such thing: every node
-goes to the one with the lower ID (Remakes).
+what it holds).
**Changes one side refuses** are a partition nobody chose. A node is cut off from the
others when it holds a change they refuse, as everything it writes after builds on
@@ -2031,8 +2034,9 @@ with what it held of it, by its switch record, whatever base the coordinator cho
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.
+at any time, moves nothing that counts; and of two, every node goes to the one the
+switch records of nodes of a third of the voters chose, else the lower ID: a remake
+committed late moves nobody.
**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
@@ -2171,7 +2175,8 @@ far as the roots' nodes' witness.
does.
* **Following the epoch most nodes are on**, as a swarm that isn't federated does
where two remakes of one epoch were committed: a party runs as many nodes as it
- likes. The lower ID counts nobody.
+ likes. Switch records count voters' nodes, a node for one voter, and the ID decides
+ only between equals.
* **A remake that makes final what its base holds**, a cut reaching no further back:
how far a cut reaches would depend on when the swarm last remade, and remakes come
as the document grows. What stopped counting for good is what was seen so for
@@ -2247,17 +2252,17 @@ keeps its seeds and its user's other nodes as neighbours, keeps the document of
epoch it left on disk and answers for it, keeps when it received each change (for
`window`, over a restart), keeps a quarantine on disk that holds envelopes, commits
its switch record after a remake and writes again what the epoch lacks, takes compact
-remakes only, by `remakeChanges` or `remakeWriters`, and of two the lower ID, rejoins
-no epoch because peers advertise it, and refuses what its bounds say. For every swarm:
-the wire's version, with a handshake that says which epochs its node keeps, and a node
-that speaks the wire version before its own too. [`trust.md`](trust.md),
-[`access.md`](access.md), [`remakes.md`](remakes.md) and the glossary get the
-federated case: party, statement, in sight of, line, root, the seats', voter, claim,
-cut, late, giving way, contested, settled, final (of a claim, and of a decision),
-stopped counting for good, out, gone, uncovered, seen for, taking a proposal up, a
-decision that holds, what hangs, the voters before, brought along, a switch record, a
-party (for a budget), refusing a decision, bounds, the numbers; and continuum's own,
-as the design names them: the alive peers, and their acks.
+remakes only, by `remakeChanges` or `remakeWriters`, and of two the one Remakes orders
+first, rejoins no epoch because peers advertise it, and refuses what its bounds say.
+For every swarm: the wire's version, with a handshake that says which epochs its node
+keeps, and a node that speaks the wire version before its own too.
+[`trust.md`](trust.md), [`access.md`](access.md), [`remakes.md`](remakes.md) and the
+glossary get the federated case: party, statement, in sight of, line, root, the
+seats', voter, claim, cut, late, giving way, contested, settled, final (of a claim,
+and of a decision), stopped counting for good, out, gone, uncovered, seen for, taking
+a proposal up, a decision that holds, what hangs, the voters before, brought along, a
+switch record, a party (for a budget), refusing a decision, bounds, the numbers; and
+continuum's own, as the design names them: the alive peers, and their acks.
## Continuum changing under a swarm
@@ -2471,54 +2476,55 @@ Decisions and remakes:
| 111 | 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` |
| 112 | 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` |
| 113 | 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` |
-| 114 | 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` |
-| 115 | 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` |
-| 116 | 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` |
-| 117 | 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` |
-| 118 | 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` |
-| 119 | 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` |
-| 120 | 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` |
-| 121 | 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` |
-| 122 | 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) |
-| 123 | 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` |
-| 124 | 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` |
-| 125 | 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` |
-| 126 | 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` |
-| 127 | 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` |
+| 114 | 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` |
+| 115 | 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` |
+| 116 | 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` |
+| 117 | 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` |
+| 118 | 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` |
+| 119 | 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` |
+| 120 | 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` |
+| 121 | 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` |
+| 122 | 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` |
+| 123 | 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) |
+| 124 | 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` |
+| 125 | 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` |
+| 126 | 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` |
+| 127 | 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` |
+| 128 | 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 |
|---|---|---|---|---|
-| 128 | Sends different changes to different peers, each under its own number | Take all: changes made at once | 2 | sim: `two_histories_merge` |
-| 129 | 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` |
-| 130 | 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` |
-| 131 | 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` |
-| 132 | 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` |
-| 133 | 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` |
-| 134 | 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` |
-| 135 | 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) |
-| 136 | 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` |
-| 137 | 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` |
-| 138 | 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` |
-| 139 | 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` |
-| 140 | 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` |
-| 141 | 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` |
-| 142 | 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` |
-| 143 | 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` |
-| 144 | 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` |
-| 145 | 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` |
-| 146 | 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` |
+| 129 | Sends different changes to different peers, each under its own number | Take all: changes made at once | 2 | sim: `two_histories_merge` |
+| 130 | 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` |
+| 131 | 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` |
+| 132 | 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` |
+| 133 | 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` |
+| 134 | 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` |
+| 135 | 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` |
+| 136 | 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) |
+| 137 | 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` |
+| 138 | 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` |
+| 139 | 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` |
+| 140 | 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` |
+| 141 | 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` |
+| 142 | 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` |
+| 143 | 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` |
+| 144 | 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` |
+| 145 | 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` |
+| 146 | 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` |
+| 147 | 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 |
|---|---|---|---|---|
-| 147 | 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` |
-| 148 | 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` |
-| 149 | 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` |
-| 150 | 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` |
-| 151 | None: a swarm that isn't federated | Everything as today | Optional | the existing tests, untouched; `bench_screening` |
+| 148 | 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` |
+| 149 | 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` |
+| 150 | 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` |
+| 151 | 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` |
+| 152 | None: a swarm that isn't federated | Everything as today | Optional | the existing tests, untouched; `bench_screening` |
## The registry on it
```
@@ -2575,7 +2581,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 (151).
+their vectors. At every stage the existing tests pass untouched (152).
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
@@ -2583,7 +2589,7 @@ their vectors. At every stage the existing tests pass untouched (151).
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: 132 to 135, 142, 146, 149, 151, and the policy's existing tests
+ policy. Tests: 133 to 136, 143, 147, 150, 152, 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`);
@@ -2605,12 +2611,12 @@ their vectors. At every stage the existing tests pass untouched (151).
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, 128,
- 130, 131.
+ unsettled. Tests: 8, 10, 11, 14, 15, 17, 18, 38, 40, 41, 45 to 48, 51, 54, 55, 129,
+ 131, 132.
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, 116.
+ counting. Tests: 16, 22, 49, 50, 53, 56 to 60, 67, 68, 117.
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
@@ -2619,7 +2625,7 @@ their vectors. At every stage the existing tests pass untouched (151).
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: 129, 136 to 141, 143 to 145.
+ writer over a clean stop. Tests: 130, 137 to 142, 144 to 146.
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.
@@ -2633,10 +2639,10 @@ their vectors. At every stage the existing tests pass untouched (151).
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, 120, 121, 150.
+ 88, 121, 122, 151.
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: 147, 148.
+ handshake that says which epochs its node keeps. Tests: 148, 149.
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
@@ -2647,13 +2653,13 @@ their vectors. At every stage the existing tests pass untouched (151).
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 98, 107
- to 115, 117 to 119.
+ to 116, 118 to 120.
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, 149.
+ a time, moved at a remake. Tests: 32, 52, 89, 90, 150.
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: 122 to 127. From here
+ epoch without the decision, what a node takes along. Tests: 123 to 128. From here
it can be relied on: the rules change by decisions.
## What was checked, and what is assumed