aboutsummaryrefslogtreecommitdiffstats
path: root/docs/store.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/store.md')
-rw-r--r--docs/store.md34
1 files changed, 16 insertions, 18 deletions
diff --git a/docs/store.md b/docs/store.md
index 1531fa4..aef814a 100644
--- a/docs/store.md
+++ b/docs/store.md
@@ -44,7 +44,7 @@ dependencies, so it holds every event's history back to its checkpoint.
A store's first checkpoint is its **root**, taken without judging, whose ID is the
store's: its bytes are a checkpoint's, which no fold reads as an event, so the store
takes it as its own before the fold sees any event. A root without heads starts a store
-anew; one at heads of other stores starts a fork (Forks). Its events build on the root
+anew; one at heads of another store starts a fork (Forks). Its events build on the root
itself, whatever heads it was built at: until the store moves to a later checkpoint, the
root's ID is the one head they all have in their history.
@@ -89,8 +89,8 @@ A fold says, of its events:
the state of a node's store, and the state at an event's history, which judging reads;
* **the checkpoint at some heads**: what of the history before them it keeps, and what
it says of the rest; and when the store moves to one;
-* **a fork's root**, from the states at heads of one store or of several, and what makes
- the fork (the federation: its version);
+* **a fork's root**, from the state at heads of another store, and what makes the fork
+ (the federation: its version);
* **the store's members**, the nodes that carry it, at a state, each with the name of
its group (Members);
* where it needs to, **what a node refuses that its history takes**, by what the node
@@ -117,8 +117,8 @@ pub trait Fold {
fn parts(checkpoint: &[u8]) -> Option<(Vec<Id>, Vec<Id>)>;
/// The state a checkpoint reads as, with the events it keeps.
fn start(checkpoint: &[u8], kept: &[(Id, Vec<u8>)]) -> Result<Self::State, Refused>;
- /// The root of a fork at `heads` of the stores reading as `at`, made by `spec`.
- fn fork(at: &[&Self::State], heads: &[Id], spec: &[u8])
+ /// The root of a fork at `heads` of the store reading as `at`, made by `spec`.
+ fn fork(at: &Self::State, heads: &[Id], spec: &[u8])
-> Result<(Vec<u8>, Vec<Id>), Refused>;
/// The heads of a later checkpoint, where a store reading as `now` moves to one.
fn moves_to(now: &Self::State) -> Option<Vec<Id>>;
@@ -177,18 +177,16 @@ the same read the same.
## Forks
-A **fork** is a store whose root is a checkpoint at heads of another, or of several,
-which its maker chooses, with what the fork's fold says there (the federation: the
-fork's version). A fork at heads of several stores **merges** them: its root keeps what
-its fold takes of each (the federation: what counted on each side, as the fork's version
-has it). A node holding the history up to all those heads builds the root and checks it;
-one that doesn't takes it on its operator's word, which names the fork anyway. The fork
-takes only events with its root in their history: what the stores it came from take
-after those heads, the fork never takes; nor do they take what the fork takes, as no
-store takes another's root, nor anything built on it. A node's own refusals are its
-store's. What a fork's root holds, and who makes one, is its fold's: the federation
-builds one byte for byte from its version and its heads, so that one version and one set
-of heads make one fork ([`federation.md`](federation.md), Forks).
+A **fork** is a store whose root is a checkpoint at heads of another, which its maker
+chooses, with what the fork's fold says there (the federation: the fork's version). A
+node holding the history up to those heads builds the root and checks it; one that
+doesn't takes it on its operator's word, which names the fork anyway. The fork takes
+only events with its root in their history: what the stores it came from take after
+those heads, the fork never takes; nor do they take what the fork takes, as no store
+takes another's root, nor anything built on it. A node's own refusals are its store's.
+What a fork's root holds, and who makes one, is its fold's: the federation builds one
+byte for byte from its version and its heads, so that one version and one set of heads
+make one fork ([`federation.md`](federation.md), Forks).
## On Automerge
@@ -412,7 +410,7 @@ What the tests check of the store, with a fold made for them
those a store given the same events alone takes, and honest nodes hold the same
document whatever each takes from it.
* **Bytes.** Fixed vectors, byte for byte: events and their IDs, checkpoints, a genesis
- change, a fork's, a merge's, a snapshot.
+ change, a fork's, a snapshot.
## Roads not taken