aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/store.md68
1 files changed, 36 insertions, 32 deletions
diff --git a/docs/store.md b/docs/store.md
index cfa6d2a..6ccba27 100644
--- a/docs/store.md
+++ b/docs/store.md
@@ -199,7 +199,7 @@ A change of a swarm holding a store writes nothing but:
nowhere at the change's history;
* **its node's own protocol data**: its entry, its acks, a remake's record and proposal,
and, as a remake's coordinator, its decision or its abort; or, an epoch's first
- change, epochs, the swarm's ID and the checkpoint.
+ change, epochs, the swarm's ID, the policy and the checkpoint.
Everything else is closed, a write at, within or above it refused: whatever isn't under
`_continuum`, users, bans, logouts, sessions, forgotten nodes, `_continuum/access` with
@@ -256,33 +256,37 @@ every swarm: acks tell an honest coordinator when to commit, and bind nobody. A
holding a store takes compaction only, whose snapshot is a function of its base and its
record (its ID, its coordinator): two remakes at one base are two epochs.
-* **The snapshot** holds the store as it is at the base: its checkpoint, where it isn't
- the root, the events it keeps and those after it, each at its ID; and of continuum's
- protocol data what a compaction carries, but the entries of nodes that aren't members
- at the base. What a checkpoint forgot leaves the document here.
-* **A node follows a decision** only where the fold names its coordinator a member, as
- the node reads it when it switches. It builds the snapshot itself, from a base it
- holds, syncing what it lacks of the base from peers that keep the old epoch, and
- checks it against the committed epoch, as continuum's node builds a compaction's
- *(checked: `remake::switch`)*. A remake's decision is its coordinator's alone, and so
- is its abort. A node that holds two decisions for one epoch, from a coordinator that
- wrote two or from remakes decided at once, follows neither, says so, and leaves it to
- its operator, who names one; a decision whose coordinator isn't a member, as the node
- reads it, is none of them.
-* **After it switches**, a node puts again every event it holds beyond the base, each
- after its dependencies, and, while it keeps the old epoch, syncs it with nodes still
- on it and puts again what it takes there. Each event is taken again as it was: its
- history is in the new epoch too. A node that moved to a later checkpoint since the
- base keeps its own, and reads none of what the snapshot holds that its checkpoint
- forgot, as it read none of it in the old document.
-* **A node with an empty document**, or one that can't build a remake as no peer keeps
- its base, takes the epoch its peers give it, or the one its operator pins, where the
- snapshot's checkpoint is one it can build, one before its own, the root its operator
- names, or one its operator pins (Pinned checkpoints); it judges every event after it,
- and puts again what it held. Where it refuses an event the snapshot holds, by its own
- refusals or its operator's drops, it stays where it is; what a checkpoint of its own
- forgot, it reads none of. A made-up epoch can withhold events from it, and keep it
- apart from the others, but make it take nothing it wouldn't.
+* **The snapshot** holds the store as the node reads it at the base: its checkpoint,
+ where it isn't the root, the events it keeps and those after it, each at its ID; the
+ policy; and of continuum's protocol data what a compaction carries, but the entries of
+ nodes that aren't members at the base. What a checkpoint forgot, and events nobody
+ takes, leave the document here. Nodes that read the store differently at the base (the
+ sides of keys that voted twice, in the federation) build different snapshots, and part
+ here.
+* **A node follows a decision** whichever node coordinated it: a decision reaches it
+ only through a member, which could decide one itself, and a remake changes no event.
+ It builds the snapshot itself, from a base it holds, and checks it against the
+ committed epoch, as continuum's node builds a compaction's and checks it *(checked:
+ `remake::switch`)*; a node that lacks the base rejoins (below). A remake's decision is
+ its coordinator's alone, and so is its abort. **Of two epochs decided for one**, by a
+ coordinator that wrote two decisions or by remakes decided at once, a node follows the
+ one with the lower ID, and a node on the other rejoins it.
+* **After it switches**, a node puts again what it holds beyond the base that the new
+ document lacks, each event after its dependencies, once a short wait of its own has
+ passed, random, so that not every node puts the same. Each event is taken again as it
+ was: its history is in the new epoch too. A node that moved to a later checkpoint
+ since the base keeps its own, and reads none of what the snapshot holds that its
+ checkpoint forgot, as it read none of it in the old document.
+* **A node that rejoins**, as it was away, lacks the base, or is on the higher of two
+ epochs, takes the epoch its peers give it, or the one its operator pins, as
+ continuum's node rejoins. It keeps its own checkpoint and reads from the new document
+ what is above its heads, judging every event; a later checkpoint the snapshot holds,
+ which it can't build from what it holds, it takes only where its operator pins it
+ (Pinned checkpoints). It puts again what it held. What its own refusals and its
+ operator's drops refuse, it reads none of. A node with an empty document does the
+ same, from the root its operator names or a checkpoint its operator pins. A made-up
+ epoch can withhold events from it, and keep it apart from the others, but make it take
+ nothing it wouldn't.
So a remake changes no event a node holds, only which document carries them, which the
fold never sees. A swarm that never remakes holds what one that remakes all the time
@@ -336,15 +340,15 @@ crafted changes. *Sim*: a simulation. *Bench*: measured, not judged.
| 10 | A writer forked: two changes, one number | The documents part, the events reach both sides, the state is the same | sim |
| 11 | A snapshot holding another checkpoint, or other events, than its base's | Not followed: a node builds its own and checks it against the epoch | sim |
| 12 | Events written beyond a base, on nodes that switch and on nodes that don't yet | Put again in the new epoch: the same events, the same state | sim |
-| 13 | A coordinator shows one of two decisions for an epoch to some nodes, the other to the rest | Each follows the one it holds; a node holding both follows neither; their operators bring them together | sim |
-| 14 | A decision or abort written by a node not its coordinator; a decision whose coordinator isn't a member | Refused; none | unit |
+| 13 | A coordinator shows one of two decisions for an epoch to some nodes, the other to the rest | Nodes on the higher epoch rejoin the lower: no operator needed | sim |
+| 14 | A decision or abort written by a node not its coordinator | Refused | unit |
| 15 | A node with an empty document handed a made-up epoch | It takes its checkpoint only where it builds it, or its operator named or pinned it, and judges every event after it: the epoch withholds, at worst | sim |
-| 16 | A node away while the others switch | It syncs the rest of the base from a peer that keeps the old epoch, builds, and switches; or takes an epoch as a node with an empty document does | sim |
+| 16 | A node away while the others switch | It rejoins: reads what is above its checkpoint, judging every event, and puts again what it held; a later checkpoint it can't build it takes where its operator pins it | sim |
| 17 | A token from another node | Refused: a node takes only its own | unit |
| 18 | A node writing another node's entry, or under `_continuum` where this doesn't say | Refused | unit |
| 19 | A group naming many nodes, to be every node's neighbours | Each node keeps some among its own group's and those its operator names | sim |
| 20 | A node whose operator had it drop an event is sent it again, in another change, before or after a restart | Not taken, with everything built on it, until its operator says otherwise | unit |
-| 21 | A node no longer a member writes changes at a history where it was one | Taken where valid there: their events count by who signed them, and nobody follows a remake it decides | unit |
+| 21 | A node no longer a member decides a remake, its decision brought by a member | Followed as any decision: a remake changes no event | unit |
| 22 | A checkpoint a node can't build, handed to it by peers | Taken only where its operator pinned it | unit |
| 23 | An event not above the heads of the checkpoint a node moved to | Not taken; the change that carries it is, and stays in the document until the next remake | unit |
| 24 | A node away while the others moved to a checkpoint and forgot what came before | It builds the checkpoint from what a peer kept, or takes it where its operator pins it | sim |