diff options
Diffstat (limited to 'docs/store.md')
| -rw-r--r-- | docs/store.md | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/docs/store.md b/docs/store.md index 02dc896..3192389 100644 --- a/docs/store.md +++ b/docs/store.md @@ -113,7 +113,9 @@ A fold says, of its events: * **the store's members**, the nodes that carry it, at a state, each with the name of 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)). + took before ([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). In Rust, roughly: @@ -132,6 +134,10 @@ pub trait Fold { fn keeps(_now: &Self::State, _id: &Id, _event: &[u8]) -> bool { true } + /// What the event writes that other events may write alike, where it writes such. + fn writes(_event: &[u8]) -> Option<Id> { + None + } /// The checkpoint at `heads`, read as `at`: its bytes, and the events it keeps. fn checkpoint(at: &Self::State, heads: &[Id]) -> (Vec<u8>, Vec<Id>); /// The heads a checkpoint was built at, and the events it keeps. @@ -191,8 +197,9 @@ moves to a checkpoint as it takes a version naming one ([`federation.md`](federa events it took after its checkpoint; not what the checkpoint keeps or holds by ID, as every event after it builds on that. A node undoes a move only by taking a checkpoint its operator pins. Either way the node refuses the event and everything built on it, from -whoever brings it, until its operator says otherwise, and reports it; it keeps what it -refuses so, and its operator's drops, in a file of its own, across restarts. No peer's +whoever brings it, until its operator says otherwise, and reports it; a drop takes with it +whatever writes what a dropped event writes, as its fold says. It keeps what it refuses +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. |
