diff options
| author | tv <tv@krebsco.de> | 2026-11-16 14:20:33 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-16 15:26:30 +0100 |
| commit | 486be5434c654a74656faa040fba4771ff04d4f1 (patch) | |
| tree | b59f4ced1d20f7d6759ddc5a70a9e806b32b8c52 | |
| parent | 891a5ab58036ee977acf0037cee51b840d39bce4 (diff) | |
docs/store: merges, forks at heads of several stores
A fork's root may be a checkpoint at heads of several stores, which merges them: it
keeps what its fold takes of each. A node holding the history up to all those heads
builds it and checks it, and one that doesn't takes it on its operator's word, as with
any fork; neither the fork nor the stores it came from take each other's events.
| -rw-r--r-- | docs/store.md | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/docs/store.md b/docs/store.md index dbe2f59..9b81ac1 100644 --- a/docs/store.md +++ b/docs/store.md @@ -41,7 +41,7 @@ once it holds its 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. A root without heads starts a store anew; one at another store's heads starts a +store's. A root without heads starts a store anew; one at heads of other stores 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. @@ -153,12 +153,14 @@ same read the same. ## 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 store it came from takes after -those heads, the fork never takes; nor does that store take what the fork takes, as no +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 @@ -323,7 +325,7 @@ crafted changes. *Sim*: a simulation. *Bench*: measured, not judged. | 6 | An event the fold refuses, beside others in one change | Refused, with everything built on it; every node puts the others again | unit | | 7 | A change by a node that isn't a member at its history, the events it puts added | Refused | unit | | 8 | Bytes that are none of the fold's events, or a root other than the store's | Refused | unit | -| 9 | A fork's events brought to the store it came from, or the other way | Never taken: their history lacks the root | unit | +| 9 | A fork's events brought to a store it came from, or the other way | Never taken: their history lacks the root | unit | | 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 | @@ -361,7 +363,7 @@ What the tests check of the store, with a fold made for them: it forgot, are the events it took, and its state is that of a store given those events alone. * **Bytes.** Fixed vectors, byte for byte: events and their IDs, checkpoints, a genesis - change, a fork's, a snapshot. + change, a fork's, a merge's, a snapshot. ## Roads not taken |
