aboutsummaryrefslogtreecommitdiffstats
path: root/docs/store.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/store.md')
-rw-r--r--docs/store.md32
1 files changed, 26 insertions, 6 deletions
diff --git a/docs/store.md b/docs/store.md
index 3192389..b598539 100644
--- a/docs/store.md
+++ b/docs/store.md
@@ -114,6 +114,8 @@ A fold says, of its events:
its group ([Members](#members));
* where it needs to, **what a node refuses that its history takes**, by what the node
took before ([A node's own](#a-nodes-own));
+* where it needs to, **what a node can't judge** that it would take: an event only a fold
+ knowing more reads, where the node stops ([A node's own](#a-nodes-own));
* where it needs to, **what an event writes that others may write alike**, so that a node
dropping it refuses them all (the federation: a version event's version).
@@ -126,10 +128,16 @@ pub trait Fold {
const LARGEST: usize;
/// What the event builds on; `None` where its bytes are none of this fold's events.
fn dependencies(event: &[u8]) -> Option<Vec<Id>>;
- /// Whether the event is taken where its history reads as `at`.
+ /// Whether the event is taken where its history reads as `at`, as far as it reads it.
fn judge(at: &Self::State, id: &Id, event: &[u8]) -> Result<(), Refused>;
/// Adds the event, whose dependencies are added already.
fn add(state: &mut Self::State, id: &Id, event: &[u8]);
+ /// Why a node whose store reads as `now` can't judge an event its history doesn't
+ /// refuse, that it would take, where it can't: the store stops at it.
+ fn stops(_at: &Self::State, _now: &Self::State, _id: &Id, _event: &[u8])
+ -> Option<String> {
+ None
+ }
/// Whether a node whose store reads as `now` takes an event its history takes.
fn keeps(_now: &Self::State, _id: &Id, _event: &[u8]) -> bool {
true
@@ -169,10 +177,10 @@ which its tests check ([Tests](#tests)).
## What is promised
1. **Every node takes an event or none**, but for what a fold has a node refuse by what
- it took, what an operator has its node drop ([A node's own](#a-nodes-own)), and what
- moving to a checkpoint refuses. An event is judged at its history, which its ID fixes,
- so every node judges it alike, whenever and from whomever it comes. An event refused is
- refused with everything built on it.
+ it took, what an operator has its node drop, what a node stops at
+ ([A node's own](#a-nodes-own)), and what moving to a checkpoint refuses. An event is
+ judged at its history, which its ID fixes, so every node judges it alike, whenever and
+ from whomever it comes. An event refused is refused with everything built on it.
2. **Nodes that hold the same checkpoint and the same events after it read the same
state**, whatever order the events came in, and whatever carried them.
3. **Nothing underneath adds an event or takes one away.** What a node holds is what it
@@ -203,6 +211,16 @@ so, and its operator's drops, in a file of its own, across restarts. No peer's
word moves a node; its operator's does. A node that refuses what another took holds other
events, and reads its own state from them; two that hold the same read the same.
+A fold may have a node **stop** at an event it can't judge, that it would take: one only
+a fold knowing more reads (the federation's node: a version event writing a version
+that passed, which its continuum doesn't read,
+[Changing the federation](federation.md#changing-the-federation)). The node takes
+nothing and refuses nothing from then on: it holds back whatever comes, that event first,
+keeps none of it across a restart, where it stops there again, and reports it, until it
+runs a continuum that reads the event, or its operator has it drop the event, or one it
+builds on. Then it refuses it, as dropped or as built on what was, with everything built
+on it, and judges what it held back. What it took before it stopped, it holds as it did.
+
## Forks
A **fork** is a store whose root is a checkpoint at heads of another, which its maker
@@ -335,7 +353,9 @@ coordinator): two remakes at one base are two epochs.
checkpoint forgot, and events nobody takes, leave the document here. A node that moved
to a later checkpoint since the base builds the snapshot as one that didn't, as both
read the document; 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.
+ keys that voted twice, in the federation, or a node that stopped, holding back what
+ the others took: [A node's own](#a-nodes-own)) 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