aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/federation.md360
1 files changed, 206 insertions, 154 deletions
diff --git a/docs/federation.md b/docs/federation.md
index 41eabfe..9dd71fb 100644
--- a/docs/federation.md
+++ b/docs/federation.md
@@ -132,7 +132,7 @@ What is not promised:
* **A name through a long partition.** A user unvouched on one side of a partition
that outlasts `gone` is gone, though someone vouched for it in time on the other.
Two claims that each became final on a side of one that outlasts `final` are
- contested.
+ contested, until one is released or the voters say whose the name is.
* **That everyone follows a decision.** A party refuses one it won't bear, and goes
on without it, with those who think alike: two epochs, by choice (Refusing a
decision).
@@ -156,11 +156,11 @@ What is not promised:
starts anew after it. What became gone, final or dropped after a remake's base
stays so where the nodes of a third of the voters carried it over (Remakes).
* **A bound on what an epoch's document costs.** What is valid as written every node
- holds until a remake: statements past a limit, and writers started beyond what a
- party's budget takes, each of which costs memory in proportion to the history. A
- budget bounds how fast a node takes them from the party itself, not how many
- reach it as part of others' histories; who did it shows, under its nodes'
- signatures.
+ holds until a remake: statements past a limit, writers started past
+ `limits.writers`, a change of a few bytes that holds a million operations. Each
+ costs memory and time, and nothing bounds how many reach a node as part of
+ others' histories: a limit and a party's budget bound how fast a node takes them
+ from the party itself. Who did it shows, under its nodes' signatures.
* **A swarm that never splits.** A node that forks its own actor (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). It is found, proven and named; it isn't
@@ -223,7 +223,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` | 1024 | writers a party's nodes start in an epoch before more are put off |
+| `limits.writers` | 1024 | writers a user'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 |
@@ -282,9 +282,15 @@ grows. A statement is signed by one user and says one thing:
It may be there without keys (a registry moved in from elsewhere): then it is in,
has its name and what the root change holds in its name, and nobody signs for it,
until a root's `create` for that name gives it its first keys. That is no other
- user. It is taken only where the user has no keys, and two of them signed out of
- each other's sight are two claims of one thing: neither gives keys until one is
- released.
+ user. Such creations are claims of one thing, ordered as claims of a name are
+ (Two claims): one signed in sight of another that stands is refused, one late
+ against another is late for good, and of two that contest each other neither gives
+ keys until one is released or the voters say which. So a root that comes later
+ than another to give keys gives none.
+* **A user's own name, by its own key.** A user claims its own name as a name of the
+ kind `user`, signed with its own key: a claim of what it has already. It counts
+ toward no limit, and holds the name on where its creation no longer does (its
+ creator's key cut off: Cuts). Clients make it right after a creation.
* **Keys form a tree.** A user's first keys are those its creation names. A `key`
statement adds one, signed with a key the user has, which is **above** the new one,
as are the keys above itself. Any number over time; at once as many as
@@ -306,22 +312,28 @@ grows. A statement is signed by one user and says one thing:
its place. It names nodes of more than one party where it can: each records for it,
so no one of them alone keeps it from counting, nor chooses the day.
* **Writers.** A node writes as a writer (an Automerge actor), a fresh one each time
- it starts, rejoins or drops *(docs)*. Every writer costs every node memory while the
- epoch lasts, in proportion to the document's history: about 4 bytes per change
- *(measured upstream)*. So a federated node keeps its writer over a clean stop, and a
- party's budget (below) counts the writers its nodes start: past `limits.writers` in
- an epoch, a change that starts another is put off by every node that would take it
- from the party's own nodes, until a remake. It is never refused: put off is each
- node's doing, 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. A writer is a run, not a write: with a
- thousand, three nodes each crash or rejoin daily for most of a year. How many a
- party started shows (`GET /registry/users`), for a remake to come first.
+ it starts, rejoins or drops *(docs)*, and when a change of its own writer that it
+ didn't make reaches it signed with its own key: a copy of its files writes as it
+ too. Unsigned, such a change is anyone's forgery, and switches nothing *(checked:
+ `access::screen`)*. Every writer costs every node memory while the epoch lasts, in
+ proportion to the document's history: about 4 bytes per change *(measured
+ upstream)*. 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 carrying for several users counts its writer
+ for each. It is never refused: put off is each node's doing, its operator may take
+ what it puts off, 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. A writer is a run, not a
+ write: with a thousand, three nodes each crash or rejoin daily for most of a year.
+ A user past it is put off as a whole, its records of proposals too, until a remake
+ or its nodes' operators take what is put off; how many a user'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: what is over waits, and nothing is refused for it. For a
budget a party is a user with the users below it that no line reaches but through
- it: creating users makes no second budget. A node carrying for several users
- draws on each.
+ it, as the graph stands where the node reads it: creating users makes no second
+ budget. A node carrying for several users draws on each.
* **Past a limit.** A user's statements of one kind are counted from the first: each
has, and states, the number after the highest of those it was signed in sight of,
and of two with one number the one with the lower digest comes first. A statement is
@@ -461,10 +473,10 @@ exactly:
* **What it did before stays done.** Releases it signed stand, and so does what
others built on them.
* **Out of sight.** What the user signs saying it saw nothing of the unvouch, or on
- the far side of a partition, is valid as written, so nodes hold it; it is past
- the point, and doesn't count. A node takes changes of an unvouched user's nodes only
- as part of another party's history, never from those nodes, so they can't make it
- work.
+ the far side of a partition, is valid as written, so nodes hold it; it is past the
+ point, and doesn't count. A node takes changes of an unvouched user's nodes only as
+ part of another party's history, never from those nodes, so they can't make it work;
+ but for their records of proposals, where the user is a voter (Decisions).
So whoever relied on a user that is out has that long to find another who vouches:
for itself, and for those it brought in. Until then nothing it holds is taken, but
@@ -568,20 +580,25 @@ is refused by every node.
**In sight of a claim that didn't stand.** A claim is taken where it was committed.
The registry asks again, among all the changes a node holds, whether the other stood
where the claim was signed: in the history of what the claim says its signer saw,
-with the decisions there, and with every witness that has the other count though
-that history lacks it (an unvouch reaches only as far as its signer's nodes and the
-roots' hadn't seen: Unvouching). If it stood, the claim gives way, as if it had been
-refused. If it didn't, the other gives way, for good: whatever has it count or stand
-again later (a vouch that brings its user back with what it signed meanwhile, a
-limit raised, a rule that lets its user again) doesn't bring it back over the claim.
+with the decisions there, and with the witnesses there that have it count though
+the claim's carrier left them out (an unvouch reaches only as far as its signer's
+nodes and the roots' hadn't seen: Unvouching). If it stood, the claim gives way, as
+if it had been refused. If it didn't, the other gives way, for good: whatever has it
+count or stand again later (a vouch that brings its user back with what it signed
+meanwhile, a limit raised, a rule that lets its user again, a witness made after)
+doesn't bring it back over the claim. One exception: a root's node that had the
+other count and the claim not there, in a change outside that history, makes the two
+contest each other, and neither gives way: a root's word, in the open, as against a
+claim out of its sight.
One thing does bring an earlier claim back over a later one: it was down only by a
-release, or a cut, that a cut has taken back since, and a root's node had seen it
-hold the name before it went down. It is then read as never down, and the later one
-gives way, unless it is final (below). That is what a user has against a thief who
-released its names; a claim that was cut off before anyone saw it hold, to wait for
-someone to claim the name, comes back over nothing. The registry shows such a later
-claim as held while a release, or a cut, stands.
+release, by a cut, or by statements past which it fell (its limit) that a cut has
+left out since, and a root's node had seen it hold the name before it went down. It
+is then read as never down, and the later one gives way, unless it is final (below).
+That is what a user has against a thief who released its names, or claimed before
+them to push them past their limit; a claim that was cut off before anyone saw it
+hold, to wait for someone to claim the name, comes back over nothing. The registry
+shows such a later claim as held while a release, or a cut, stands.
A claim says nothing else. What the name is for is in the namespace: a host's entry
names its addresses and names, and they count while its user holds them.
@@ -654,7 +671,7 @@ What this gives:
before it. Final takes no root: a claim nobody contested for that long is final
though no root ever saw it. A final claim gives way to none and is late against
none, but for another final one: two final claims of one name contest each other,
- however they came to be.
+ however they came to be, until one is released or the voters say whose it is.
* **A name a root keeps contested** never becomes final by time: final takes holding
the name. The voters say whose it is (Decisions), name by name; or they end all of
that root's contests at once, by giving its first keys to someone who stops its
@@ -692,10 +709,13 @@ it is doesn't depend on who asks or when: a change's history is fixed by its has
change's history holds): rotating, not rewriting. No key retires one beside or above
it, so a stolen device key can't cut off the keys above it, nor undo what it signed
before.
-* **What a cut keeps, it names.** Beside the cut, a `retire` lists by digest what
- the key signed within it since the epoch's root change, and every node checks the
- list where the statement is taken, as it checks a number. So what a retirement
- keeps holds also where the changes its cut names aren't there: after a remake.
+* **What a cut keeps, it names.** Beside the cut, a `retire` lists by digest what the
+ key signed within it since the epoch's root change, and every node checks the list
+ where the statement is taken, as it checks a number. So what a retirement keeps
+ holds also where the changes its cut names aren't there: after a remake. A node's
+ stop lists what its cut keeps the same way, and so does a decision's cut of a user's
+ first keys. A list is 32 bytes for each statement and value kept, since the root
+ change: what a remake resets.
* **A node that stops carrying** is named with a cut the same way, by the key that
named it or one above: what it committed outside the cut is nobody's, as a witness
or as a carrier.
@@ -716,8 +736,9 @@ it is doesn't depend on who asks or when: a change's history is fixed by its has
and as the claim of the user's name; not as the user. Its ID and first keys are
what the creation names, and a vouch names a user by its ID: with another vouch
standing, the user stays in, with its keys, its claims and the users it brought
- in, and without a name, as a user that lost its name. Its namespace doesn't count
- until it has one: it comes to one by being created anew.
+ in. Its name it keeps where it claimed it with its own key (Users), that claim
+ ordered from where it was signed; else it is without a name, as a user that lost
+ its name, and its namespace doesn't count until it has one.
What stops counting stays in the document, and every node holds the same. It is left
out when resolving. In a namespace, where a value that doesn't count replaced one
@@ -798,11 +819,13 @@ remake because a remake is what puts the votes of before out of reach (below).
`limits.proposals` of one voter's at most. A proposal is open until it is decided,
its proposer releases it, or one of its matter with a higher number is decided.
2. Voters **vote** for it: each a statement signed by the user, saying when the vote
- runs out, `window` from signing unless the user says sooner; a node counts no
- vote for longer than `window` from when it first held it. A voter has one vote
- on a matter at a time; `release` takes one back, as far as it gets there first:
- a node that holds the vote without its release counts it, and a proposal may be
- decided with a vote whose release was on its way. A vote is meant when signed.
+ runs out, `window` from signing unless the user says sooner; a node counts no vote
+ for longer than `window` from when it first held it. A voter has one vote on a
+ matter at a time; `release` takes one back, as far as it gets there first: a node
+ that holds the vote without its release counts it, and a proposal may be decided
+ with a vote whose release was on its way. A vote is meant when signed. A vote for a
+ remake is otherwise: it names its base, runs while the epoch lasts, and isn't
+ released (Remakes).
3. A node that carries for a voter **takes the proposal up** once it holds votes for
it by more than two thirds of all the voters (`fractions.decide`), none released,
each still running by the node's clock, and the proposal says its signer saw all
@@ -896,8 +919,9 @@ clocks. A window of days bears clocks that are minutes apart.
count toward its limit. A user that is vouched for again has back what no decision
dealt with. What another claimed in sight of the claim while it didn't stand (the
user was gone meanwhile) stays the other's, as with anything that comes back.
-* **Whose a contested name is.** The proposal names one of its claims: decided, that
- claim is final.
+* **Whose a name is**, where it is contested, by two final claims too. The proposal
+ names one of its claims: decided, every other claim of the name gives way to it,
+ final or not, and it is final.
* **A name the rules leave to the voters** (`"{voters}"`): given to a user, who holds
it as by a claim and releases it like one; it doesn't count toward its limit.
Released, it is given anew.
@@ -918,27 +942,31 @@ which every node works out itself.
* **The proposal** lists the voters of the next epoch by their IDs, names its roots
(those there are, unless it names others; and for a root it leaves out, which root
has each name a rule gives a root), and names the node of its proposer that is to be
- its **coordinator**. It is voted on like anything else.
-* **The base.** Once the coordinator holds the votes it names the base in its
- record: the base is that record's history.
-* **One base an epoch.** A voter's node takes a remake up with its base: once the
- votes are there, and the base holds all that the node held `baseAge` before the base
- reached it (the remake's own records aside), so that a remake can't leave out what
- the swarm has. It builds the snapshot first, and records the ID of the epoch it got
- (Continuum changing under a swarm). Having recorded one, it records no other for its
- epoch, ever: not another base, nor other voters or roots. A later proposal for the
- epoch's remake is taken up only where it names that base, those voters and those
- roots, however old the base is by then. So an epoch's remakes aren't numbered
- against each other, and of two with two bases both are decided only where the nodes
- of a third of the voters recorded both, which no honest node does.
-* **A remake that hangs**, short of records, is tried again by voting for the same
- base again; once the nodes of a third of the voters took a remake up, the epoch's
- remake is that one or none. A record that comes late decides what the swarm was
- waiting for, or what nothing else could be decided against. No node, having
- switched, moves again by itself: where it finds another remake of the epoch it
- left decided, it shows it, and its operator says.
-* **A coordinator that names two bases, or none**, may get no remake for the epoch
- where the nodes split over the two. Those left go apart (Going apart).
+ its **coordinator**.
+* **The base.** The coordinator names the base in its record of the proposal, by its
+ heads, at once.
+* **Taking the base up.** A voter's node takes the base up (records it, with the ID of
+ the epoch it built from it: Continuum changing under a swarm) where the base holds
+ all that the node held `baseAge` before the base reached it, so that a remake can't
+ leave out what the swarm has; or, however old, where records of that base count
+ for a third of the voters, of whom one at least is honest. A node takes up one base
+ an epoch, and no other.
+* **The votes name the base.** A voter votes for a remake once a node of its took the
+ base up, and its vote names the base. It has one such vote an epoch, never
+ released. A record counts for a voter only where that voter's vote names the
+ record's base. So two bases are both decided only where more than a third of the
+ voters signed votes for both, which no honest voter does: a coordinator that names
+ two bases, to two nodes of each voter, gets one decided or none, and shows.
+* **Decided** for a base and an ID, once a change has in its history records of
+ them and votes naming the base that, together, count for more than two thirds of
+ the voters. A record of a remake is written when its node takes the base up, before
+ the votes: they are read beside it, not in its history.
+* **A remake that hangs**, short of votes or records, ends once they come: every node
+ takes up a base a third took up. No node, having switched, moves again by itself:
+ where it finds another remake of the epoch it left decided, it shows it, and its
+ operator says. Where the voters who signed for a base that is never taken up by a
+ third are fewer than a third, the rest decide another; else those left go apart
+ (Going apart).
* **Every node builds the snapshot** itself once the remake is decided, from the base
as it holds it, and switches after the switch delay, as today. The snapshot holds
the registry as it resolves at the base:
@@ -1243,8 +1271,9 @@ A change is valid if, in the document at its dependencies:
a new entry under its own digest. Under `_continuum/decisions/<proposal>`: only the
node's own record, once, of a proposal that is there, with votes for it in the
change's history by more than `fractions.decide` of the voters, none released
- there. Under `_continuum/carried`: only the node's own carry record, once an
- epoch. Nothing replaced, nothing deleted, nor anything that holds a register.
+ there; of a remake, its base and the ID built, one base a node and epoch. Under
+ `_continuum/carried`: only the node's own carry record, once an epoch. Nothing
+ replaced, nothing deleted, nor anything that holds a register.
5. A `create`: its name is one the kind `user` takes, has no creation there that
stands, a rule of the kind lets the signer, and the signer isn't past its limit
there; or it is a root's, for a user the root change holds, that has no keys there.
@@ -1254,7 +1283,8 @@ A change is valid if, in the document at its dependencies:
itself as said under Cuts, the cut in the change's history, and its list what the
key signed within it. `release`: by the user of what it releases; of the user
itself, with a first key.
-6. A `claim`: the kind is declared, the name is one of it, a rule lets the signer,
+6. A `claim`: of the kind `user`, only by the user of that name, of its own name.
+ Else the kind is declared, the name is one of it, a rule lets the signer,
the signer isn't past the kind's limit there, and no claim of that name stands
there. One that doesn't count there doesn't stand there.
7. In a namespace: at a listed depth, an envelope by a user of that name, replacing
@@ -1264,7 +1294,8 @@ A change is valid if, in the document at its dependencies:
8. `propose`, `vote`: by a voter, with a key the document has for it (a fork: proposed
by any user that isn't gone there); a proposal not past its user's limit there (a
fork: the only one of its user that is open); a vote where the user has none on
- that matter that isn't released.
+ that matter that isn't released; for a remake, naming a base a record names, and
+ the voter's only one in the epoch.
9. `_continuum/access`, the swarm ID, the epochs, and what the root change sets for
the swarm as a whole: never.
@@ -1317,21 +1348,26 @@ the steps before:
itself up. It is **gone** once seen out for `gone`, or where a decision freed its
name; and gone it stays, whatever is vouched or cut off after.
3. **Users' names.** A creation stands while it counts, isn't released, its user isn't
- gone, and a rule of the kind `user` lets its signer. Of the creations of a name
- that stand: the one that remains (Two claims) has the name, or has it wait while
- it is out.
+ gone, and a rule of the kind `user` lets its signer; a user's claim of its own name
+ stands with it, and on where the creation doesn't. Of what stands for a name: the
+ one that remains (Two claims, as in step 4) has the name, or has it wait while it
+ is out. Of a root's creations giving keys to a user the root change holds, the one
+ that remains gives them.
4. **Names.** A claim stands the same way, where a rule of the policy that holds lets
its user: anyone who isn't gone where the rule says `"*"`, a root where it says
- `"{root}"`, else the user that has the name the rule gives; and a name the
- voters gave stands as its decision says while the rule says `"{voters}"`. A claim
- that is late against another, and not the other against it, doesn't stand. For
- each two claims of a name that stand, one question is asked, the first that fits:
+ `"{root}"`, else the user that has the name the rule gives; and a name the voters
+ gave stands as its decision says while the rule says `"{voters}"`. A claim that is
+ late against another, and not the other against it, doesn't stand. For each two
+ claims of a name that stand, one question is asked, the first that fits:
+ * one named by the decision that holds on whose the name is: the other gives way;
* both final: neither gives way, and they contest each other;
* one final: the other gives way;
* one carried over, the other held by the snapshot: the one carried over gives
way;
* one signed in sight of the other: it gives way if the other stood where it was
- signed, or is read as never down (Claims); else the other gives way;
+ signed, or is read as never down (Claims); else, where a root's node witnessed
+ against it outside that history, they contest each other; else the other gives
+ way;
* neither in sight of the other: each stands, late against the other or not.
Those that give way to none remain: one, and its user holds the name, or has it
@@ -1596,8 +1632,8 @@ a write is refused only by what its own history holds, and counts from the start
Who votes next and who the roots are is in the proposal, for all to see before
they vote for it. What a node holds beyond the base it carries over itself, by its
carry record, so what any honest node held comes along. And a
- node records one base for its epoch: two are both decided only where the nodes of
- a third of the voters recorded both.
+ voter's vote names its base, once an epoch: two bases are both decided only where
+ more than a third of the voters signed for both.
* *Nobody is moved.* A node refuses any decision by its operator's word or bounds,
and follows a fork by its operator's word alone.
* *With other fractions.* Write d for `fractions.decide` and s for `fractions.seen`.
@@ -1731,6 +1767,11 @@ back, so the point only moves forward as more of them show up.
be the higher, and be decided after the swarm switched to the other: then it
undoes the epoch the swarm is in, on a day one voter chooses. One base an epoch,
recorded once by each node, leaves nothing to undo.
+* **One base an epoch, kept by each node**: a voter counted through any node of its,
+ and a coordinator handing two bases to two nodes of each voter has both decided.
+ The voter's own vote names the base. **Nor a base refused for good by nodes that
+ saw it late**: an ordinary partition at the base would end the epoch's remakes. A
+ base a third took up every node takes up, however old.
* **Saying what was held by the order of a node's first changes** after a remake: an
order says one thing, and what a node held of a claim, an unvouch and a value are
three. The node states them.
@@ -1812,7 +1853,8 @@ what its signer saw; a node is given its root change, syncs under no policy it d
know, takes tokens and logins by key as its operator says, writes no sessions into the
document, keeps its writer over a clean stop, stamps as often as the policy says,
keeps its seeds and its user's other nodes as neighbours, keeps the document of an
-epoch it left on disk and answers for it, keeps a quarantine on disk that holds
+epoch it left on disk and answers for it, keeps when it received each change (for
+`baseAge` and `window`, over a restart), keeps a quarantine on disk that holds
envelopes, commits its carry record after a remake and writes again what the epoch
lacks, takes no remake but one its voters decided, rejoins no epoch because peers
advertise it, and refuses what its bounds say. For every swarm: the wire's version,
@@ -1821,7 +1863,8 @@ 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, out, gone, uncovered, seen for, taking a proposal up, a decision that
-holds, what hangs, carried over, refusing a decision, bounds, the numbers.
+holds, what hangs, carried over, a carry record, a party (for a budget), refusing a
+decision, bounds, the numbers.
## Continuum changing under a swarm
@@ -1867,11 +1910,12 @@ author remembered to say. So the design goes by what nodes compute:
and every version passes all of them: a rule changed without a policy fails there,
before it is released.
-What can't change under a swarm, whatever is decided: how an envelope is read and
-what its signature covers (a snapshot carries envelopes as they were signed, from
-epoch to epoch); a statement's digest; a change's hash, and what Automerge makes of
-the same changes; a snapshot's bytes for the same base and policy. A new form of any
-of them comes beside the old one, under a policy.
+What can't change under a swarm, whatever is decided: how an envelope is read and what
+its signature covers (a snapshot carries envelopes as they were signed, from epoch to
+epoch); a statement's digest; a change's hash, and what Automerge makes of the same
+changes; the bytes Automerge encodes a change to (screening refuses a change whose
+bytes its own Automerge wouldn't write); a snapshot's bytes for the same base and
+policy. A new form of any of them comes beside the old one, under a policy.
What changes freely: everything a node does for itself. Its API, its storage, how it
syncs and with whom. The wire is between two nodes, not the swarm's: a version
@@ -1903,7 +1947,7 @@ Statements and users:
| 4 | Offers a statement again; or an envelope signed for another swarm, epoch, path or user ID | Nothing where it is there under its digest; refuse elsewhere | 3 | unit, exists for swarm and path: `what_an_envelope_must_be`; `signed_for_its_user_id_and_epoch` |
| 5 | Commits a statement a second time, in a change with other dependencies, to move it | A statement is where it says its signer was (`seen`), whoever carries it and how often: nothing moves | 2 | unit: `a_statement_carried_twice` |
| 6 | Creates a user listing a victim's public key beside its own | The victim's envelopes name the victim's ID: they count for no other | 3 | unit: `a_key_in_two_creations` |
-| 7 | A second root signs a `create`, with keys of its own, for a user the root change holds | Refuse where the user has keys. Of two signed out of each other's sight neither gives keys, until one is released | 3 | unit: `first_keys_once` |
+| 7 | A second root signs a `create`, with keys of its own, for a user the root change holds, saying it saw nothing of the first | Refuse where the user has keys. Out of sight the two are ordered as claims are: the later one, late against what a root's node saw, gives no keys | 3 | unit: `first_keys_by_claim_order` |
| 8 | Users vouch for each other in a ring away from the roots; a user vouches for its creator | None is vouched for by it | 3 | unit, resolve: `no_line_no_user` |
| 9 | Creates a name in sight of its creation | Refuse | 4 | unit: `a_name_created_once` |
| 10 | Creates a name another has, saying it saw nothing of it | Hold both; late once a root saw the first. Before: contested, or the first is late where a root's node got the other first | 4, 5 | unit: `a_backdated_creation_is_late` |
@@ -1911,7 +1955,7 @@ Statements and users:
| 12 | Creates many users, each claiming many names (sybils); creates them out of each other's sight to pass the limit | Refuse past the limits in sight; out of sight, those past them don't count. A limit bounds how many each user brings in itself, not how many come in below it: each shows below its creator, for all to see, and goes with it when it is unvouched | 6 | unit: `limits_on_creating`, `past_a_limit_out_of_sight` |
| 13 | Adds keys, nodes or statements without end; signs and gives up without end (vouch and unvouch, claim and release, key and retire) | Refuse past the limits. What is given up counts toward none: it is taken no faster than a budget per party (row of the budget, stage 8), and a remake leaves it out | 6 | unit: `limits_on_a_register` |
| 14 | Signs more than its limit out of each other's sight; another claims a name that so doesn't count; then gives the earlier ones up | What comes to count later than it was signed gives way to what was claimed in sight of it meanwhile | 5 | unit: `counting_late_gives_way` |
-| 15 | With a stolen key, signs statements that come before its user's own (keys, creations, claims), to push those past their limits | Until the key is cut off they do. What a cut leaves out comes before nothing: the user's own count again, and what was claimed in sight of them meanwhile gives way where a root's node had seen them hold | 3 | unit: `cut_off_comes_before_nothing` |
+| 15 | With a stolen key, signs statements that come before its user's own (keys, creations, claims), to push those past their limits; an accomplice claims the names that so show free | Until the key is cut off they do. What a cut leaves out comes before nothing: the user's own count again, and a claim of theirs that a root's node had seen hold is read as never down, so the accomplice's gives way | 3, 5 | unit: `cut_off_comes_before_nothing`, `down_by_a_limit_comes_back` |
| 16 | Names another party's node as one that carries for it; offers that node a token of its own | A node carries only once it committed the statement naming it; an honest node takes tokens only from nodes its operator named | 3 | unit: `a_node_carries_by_its_own_word`, `a_token_of_ones_party` |
Unvouching:
@@ -1959,7 +2003,7 @@ Claims:
| 45 | A limit is lowered and raised again, or a policy uncovers and covers again; someone claims in between a name that so showed free | The claim made in sight of one that didn't stand keeps the name: the other gives way, though a root's node had seen it first | 5 | unit: `sight_decides_alone` |
| 46 | Every root that saw a claim stops its node with a cut from before, and a rival is handed in | A final claim holds. One that isn't is as before the roots saw it: contested, or late | 5 once final; not promised before | unit: `final_against_the_roots` |
| 47 | Stamps its nodes `final` apart at once, to make a claim final that doesn't hold, or holds only as it sees it | Final takes a third of the voters, each having held the claim as the holder at both stamps and between | 5 | unit: `final_by_a_third_of_the_voters` |
-| 48 | Keeps honest voters' nodes apart for longer than `final`, a claim of one name on each side | Both are final: contested, until one releases or the voters say | not promised | sim: `two_finals` |
+| 48 | Keeps honest voters' nodes apart for longer than `final`, a claim of one name on each side | Both are final: contested, until one releases or the voters say whose it is | not promised | sim: `two_finals` |
Keys:
@@ -2000,63 +2044,67 @@ Decisions and remakes:
| 76 | A decision lowers a limit; a user signs on saying it saw nothing of the decision. Or a decision lowers a limit for a day, and raises it again. Or it sets a number that makes no sense | Valid as written, and resolved by the limit that holds: what is past it doesn't count. Names claimed in sight of what fell past it are their claimants' for good. The number has the result it has | 6; not promised | unit: `a_lowered_limit_leaves_out_the_last` |
| 77 | Opens proposals without end | Refuse past `limits.proposals` | 6 | unit: `limits_on_proposals` |
| 78 | A proposal gives away the name of a user that is out; the user is gone and another claims the name before it is decided | The claim was made in sight of one that didn't stand: it doesn't give way to what the decision gives | 5 | unit: `given_too_late` |
-| 79 | Contests a name, then asks the voters for it | It takes two thirds of them; the claim they name is final | not promised | unit: `whose_a_contested_name_is` |
+| 79 | Contests a name, then asks the voters for it; or two claims of it are final | It takes two thirds of them; every other claim gives way to the one they name, final or not | not promised | unit: `whose_a_contested_name_is` |
| 80 | Claims `wiki.r`, which the rules leave to the voters; holds on to it against a later decision | Refuse the claim. The name is whose the decision that holds says | 4, 7 | unit: `a_name_by_the_voters` |
| 81 | 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` |
| 82 | 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` |
| 83 | 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` |
| 84 | Names a base for a remake that leaves out what the swarm holds | No honest voter's node takes it up | 7 | sim: `a_stale_base_is_not_taken_up` |
-| 85 | A remake's coordinator names two bases, or none; a voter's nodes record two IDs | A node records one base for its epoch, and such a voter counts for neither: one is decided, or none, and then those left go apart | 7 | sim: `two_bases_no_remake` |
+| 85 | A remake's coordinator names two bases, each to one of two nodes of every voter | A record counts for a voter only where its vote names the record's base, and a voter signs one such vote an epoch: one base is decided, or none, and the coordinator shows | 7 | sim: `two_bases_one_remake` |
| 86 | Runs most of the nodes; serves a snapshot of its own | Nothing reads a count of nodes; every node builds the snapshot itself | 7 | sim: `every_node_builds_the_snapshot` |
| 87 | 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 carry record, before it took anything in the new epoch: the pretender's claim is late against it | 5 | unit: `a_carry_record_witnesses`; sim: `a_pretender_after_a_remake` |
| 88 | 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 | Refuse what no carry record names. A node that holds such an envelope can still name it in its own record: then a value carried over has no word against one its user signed in the new epoch, and a claim is late against what a root's node's record named | 3 | unit: `only_what_a_carry_record_names`, `the_new_epoch_has_the_last_word` |
| 89 | Signs after the switch, as of the epoch before, statements and a proposal with numbers of its choosing | Carried over 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 carried over, and the proposal outranks none of the new epoch | 6, 7 | unit: `carried_over_in_between` |
| 90 | Writes a carry 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_carry_record_a_node` |
-| 91 | A node that held only the older of two values its user wrote since the base carries it beside the newer one | Of several carried over to one place, one that another replaces is left out | 3 | unit: `a_replaced_value_is_left_out` |
-| 92 | Signs a claim "in the epoch before" of a name the snapshot holds | It gives way to what the snapshot holds | 5 | unit: `the_snapshot_comes_first` |
-| 93 | Hands in again what a remake left out: a stolen laptop's `node` and `key` statements, retired since | Refuse: the root change lists the digests of the statements the base held | 3 | unit: `what_a_remake_dropped_stays_out` |
-| 94 | Keeps the last record of a remake back, and shows it a month later | Every node goes to that base. Its carry record names what it holds and what it held of it (who saw what first, decisions since), and each envelope comes once. A key rotated since keeps what its retirement lists. What a third of the voters' nodes held as gone, final or dropped stays so; other lengths start anew | not promised | sim: `a_remake_decided_late`; unit: `a_retirement_lists_what_it_keeps` |
-| 95 | Has a second remake of an epoch taken up beside one that hangs, and decides it after the swarm switched to the first | A node records one base for its epoch, and takes a later proposal up only for that base, those voters and roots: a second is decided only where the nodes of a third of the voters recorded both. No node that switched moves again by itself | 7 | sim: `one_base_an_epoch` |
-| 96 | A thief's statements are in the base of a remake | They stand: a remake makes final. The vote's days are the time to cut the key off | not promised | unit: `a_cut_reaches_to_the_snapshot` |
-| 97 | 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` |
-| 98 | A node back after several remakes offers what its user signed epochs ago | Refuse: an envelope is taken in its epoch and the next. Quarantined, for the user to sign again | 3 | unit: `carried_over_one_epoch_only` |
-| 99 | A version builds another snapshot from a remake's base | Its node records another ID. The remake is decided for the ID two thirds got; the node stays, and says so | 7 | sim: `a_remake_by_its_result` |
-| 100 | A remake names its proposer the only root, or leaves a root out; the root left out signs on as one | The voters see whom a remake names before they vote for it. A root is one in the epoch that names it: what it signs after is an ordinary user's, and it is out unless someone vouches for it | 7 | unit: `roots_are_the_remakes`, `a_root_for_its_epoch` |
-| 101 | Two thirds of the voters turn on the rest | They remake, 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) |
-| 102 | Offers a statement signed on the other side of a fork | Refuse: it names its epoch | 3 | unit: `signed_for_its_user_id_and_epoch` |
-| 103 | 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` |
-| 104 | 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` |
-| 105 | 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` |
-| 106 | 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 | 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 | Whether the claim stood is read where the later one was signed, with the witnesses there: one made after brings nothing back. A root's node doing so makes the two contest, in the open | 5 | unit: `a_witness_after_the_fact` |
+| 92 | Cuts its own device key off from before a user's creation it signed, to take the user's final name | The user claimed its name with its own key: that claim holds the name on | 5 | unit: `a_users_own_name_by_its_own_key` |
+| 93 | A node that held only the older of two values its user wrote since the base carries it beside the newer one | Of several carried over to one place, one that another replaces is left out | 3 | unit: `a_replaced_value_is_left_out` |
+| 94 | Signs a claim "in the epoch before" of a name the snapshot holds | It gives way to what the snapshot holds | 5 | unit: `the_snapshot_comes_first` |
+| 95 | Hands in again what a remake left out: a stolen laptop's `node` and `key` statements, retired since | Refuse: the root change lists the digests of the statements the base held | 3 | unit: `what_a_remake_dropped_stays_out` |
+| 96 | Keeps the last record of a remake back, and shows it a month later | Every node goes to that base. Its carry record names what it holds and what it held of it (who saw what first, decisions since), and each envelope comes once. A key rotated since keeps what its retirement lists. What a third of the voters' nodes held as gone, final or dropped stays so; other lengths start anew | not promised | sim: `a_remake_decided_late`; unit: `a_retirement_lists_what_it_keeps` |
+| 97 | Has voters vote for a second remake of an epoch, beside one that hangs | A voter signs one remake's vote an epoch, never released: two bases are both decided only where more than a third of the voters signed for both. No node that switched moves again by itself | 7 | sim: `one_base_an_epoch` |
+| 98 | A partition at the base: the nodes of a third of the voters take it up, the rest see it after they held more than it has | Every node takes up a base whose records count for a third of the voters, however old, and the remake is decided | 7 | sim: `a_base_seen_late` |
+| 99 | A thief's statements are in the base of a remake | They stand: a remake makes final. The vote's days are the time to cut the key off | not promised | unit: `a_cut_reaches_to_the_snapshot` |
+| 100 | 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` |
+| 101 | A node back after several remakes offers what its user signed epochs ago | Refuse: an envelope is taken in its epoch and the next. Quarantined, for the user to sign again | 3 | unit: `carried_over_one_epoch_only` |
+| 102 | A version builds another snapshot from a remake's base | Its node records another ID. The remake is decided for the ID two thirds got; the node stays, and says so | 7 | sim: `a_remake_by_its_result` |
+| 103 | A remake names its proposer the only root, or leaves a root out; the root left out signs on as one | The voters see whom a remake names before they vote for it. A root is one in the epoch that names it: what it signs after is an ordinary user's, and it is out unless someone vouches for it | 7 | unit: `roots_are_the_remakes`, `a_root_for_its_epoch` |
+| 104 | Two thirds of the voters turn on the rest | They remake, 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) |
+| 105 | Offers a statement signed on the other side of a fork | Refuse: it names its epoch | 3 | unit: `signed_for_its_user_id_and_epoch` |
+| 106 | 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` |
+| 107 | 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` |
+| 108 | 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` |
+| 109 | 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 |
|---|---|---|---|---|
-| 107 | Sends different changes to different peers, each under its own number | Take all: changes made at once | 2 | sim: `two_histories_merge` |
-| 108 | Forks its node's actor | 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` |
-| 109 | 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` |
-| 110 | 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` |
-| 111 | 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` |
-| 112 | 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` |
-| 113 | 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` |
-| 114 | 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) |
-| 115 | 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` |
-| 116 | 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: put off, never refused; a share of the waiting each | 6 | sim: `a_party_past_its_budget_waits` |
-| 117 | 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, taking none from the party's own nodes. Nothing is refused; what reaches a node within others' histories is held, and a remake leaves it out | 6; not bounded | sim: `writers_past_a_budget_wait` |
-| 118 | Sends a change of a few bytes that holds a million operations | Taken, at the cost of applying it: nothing bounds a change's operations | not promised | argued |
-| 119 | 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` |
-| 120 | 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 | 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` |
+| 110 | Sends different changes to different peers, each under its own number | Take all: changes made at once | 2 | sim: `two_histories_merge` |
+| 111 | Forks its node's actor | 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` |
+| 112 | 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` |
+| 113 | 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` |
+| 114 | 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` |
+| 115 | 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` |
+| 116 | 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` |
+| 117 | 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) |
+| 118 | 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` |
+| 119 | 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: put off, never refused; a share of the waiting each | 6 | sim: `a_party_past_its_budget_waits` |
+| 120 | 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 of that user's nodes that start more. 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 | 6; not bounded | sim: `writers_past_their_limit_wait` |
+| 121 | 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` |
+| 122 | Sends a change of a few bytes that holds a million operations | Taken, at the cost of applying it: nothing bounds a change's operations | not promised (a bound on what an epoch's document costs) | argued |
+| 123 | 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` |
+| 124 | 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 | 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` |
Rules, and the swarm as it is:
| # | The adversary | Honest nodes | Promise | Shown by |
|---|---|---|---|---|
-| 121 | 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` |
-| 122 | 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` |
-| 123 | 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` |
-| 124 | 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. A remake is taken up on one side only by a voter's honest nodes, which record one base | 7 | sim: `one_side_decides`; unit: `the_last_holds` |
-| 125 | None: a swarm that isn't federated | Everything as today | Optional | the existing tests, untouched; `bench_screening` |
+| 125 | 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` |
+| 126 | 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` |
+| 127 | 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` |
+| 128 | 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` |
+| 129 | None: a swarm that isn't federated | Everything as today | Optional | the existing tests, untouched; `bench_screening` |
## The registry on it
```
@@ -2113,7 +2161,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 (125).
+their vectors. At every stage the existing tests pass untouched (129).
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
@@ -2121,7 +2169,7 @@ their vectors. At every stage the existing tests pass untouched (125).
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: 111 to 114, 120, 123, 125, and the policy's existing tests under a
+ policy. Tests: 114 to 117, 124, 127, 129, and the policy's existing tests under a
policy from the genesis change. Those of a crafted change exist already: screening
refuses those in every swarm.
2. **Statements.** The users' registers (`create`, `key`, `node`, `vouch`, `release`);
@@ -2143,18 +2191,19 @@ their vectors. At every stage the existing tests pass untouched (125).
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: 10, 11, 25, 31, 33, 34, 38 to 41, 44, 47, 48, 107, 109, 110.
+ unsettled. Tests: 10, 11, 25, 31, 33, 34, 38 to 41, 44, 47, 48, 91, 110, 112, 113.
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, the client listing what stopped counting. Tests: 15, 42, 43, 46, 49 to
- 53, 57, 59 to 61.
+ 53, 59 to 61, 92.
7. **Unvouching.** `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: 17, 19 to 24, 26, 27, 54 to 56.
+ Tests: 17, 19 to 24, 26, 27, 54 to 57.
8. **Coming back.** The drop an operator asks for, a forked actor proven and shown
- with what the roots' nodes hold, the budget and the share per party, the writers it
- counts, a node keeping its writer over a clean stop. Tests: 108, 115 to 119.
+ with what the roots' nodes hold, the budget and the share per party, the writers
+ counted per user, a node keeping its writer over a clean stop. Tests: 111, 118 to
+ 123.
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.
@@ -2166,25 +2215,26 @@ their vectors. At every stage the existing tests pass untouched (125).
holds, what hangs; `GET /registry/decisions`. What is decided: a number, a user's
first keys, the names of a user that is out, whose a contested name is, a name the
rules leave to the voters. The simulations start from a root change naming several
- voters, as a remake's does. Tests: 18, 58, 62, 65 to 81, 124.
+ voters, as a remake's does. Tests: 18, 58, 62, 65 to 81, 128.
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: 121, 122.
+ handshake that says which epochs its node keeps. Tests: 125, 126.
12. **Remakes.** The proposal with its list of voters, its roots and its coordinator;
- the base, one an epoch, taking a remake up by its result, the snapshot every node
- builds, what it leaves out and what can't be written again; carrying over: every
- node's carry record, then each envelope once, in its order, with the new epoch's
- word last on values; a retirement's list as its cut; decisions and what was seen
- for long, over a remake; what becomes final. A node keeping the epochs it left on
+ the base, taken up by a node once an epoch, however old where a third took it up;
+ votes naming it; taking a remake up by its result, the snapshot every node builds,
+ what it leaves out and what can't be written again; carrying over: every node's
+ carry record, then each envelope once, in its order, with the new epoch's word
+ last on values; a retirement's list as its cut; decisions and what was seen for
+ long, over a remake; what becomes final. 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: 63, 64, 84 to
- 100.
+ 90, 93 to 103.
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: 82, 83, 123.
+ a time, moved at a remake. Tests: 82, 83, 127.
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: 101 to 106. From here
+ epoch without the decision, what a node takes along. Tests: 104 to 109. From here
it can be relied on: the rules change by decisions.
## What was checked, and what is assumed
@@ -2296,8 +2346,10 @@ Assumed, to be shown as it is built:
* The digest of the registry as it resolves is cheap enough to make with every stamp
at a registry's size, and to make at another node's stamp now and then.
* A version can speak the wire version before its own.
-* The writers a user's nodes started in a change's history are counted cheaply
- enough: a count kept per user.
+* A node can keep, with the document, when it received each change, at a registry's
+ size.
+* A node counts the writers each user's nodes started in the epoch as it takes their
+ changes, cheaply enough: a count kept per user.
* What is asked of a change before Automerge sees it keeps out every change
it applies and shouldn't. Crafted changes were tried by hand against Automerge
alone; no fuzzer was run over them.