diff options
Diffstat (limited to 'docs/document.md')
| -rw-r--r-- | docs/document.md | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/docs/document.md b/docs/document.md index 13d6cd9..dd1a942 100644 --- a/docs/document.md +++ b/docs/document.md @@ -634,7 +634,10 @@ among nodes that don't trust each other, no cut by time holds. ## A set of events -Not built: a kind, `events`, for a swarm holding a store ([`store.md`](store.md)). The +A kind, `events`, for a swarm holding a store ([`store.md`](store.md)): built, but for +the node of both kinds a running swarm moves by +([From an Automerge document to this](#from-an-automerge-document-to-this)); a node +is of it where its operator says so ([As built](#as-built), below). The store asks nothing of what carries its events, and what makes an Automerge document carry them is most of what a swarm holding a store has to get right ([On Automerge](store.md#on-automerge)): the changes that may write an event, the @@ -729,6 +732,34 @@ What the store promises ([What is promised](store.md#what-is-promised)) it promi now; "nothing underneath adds an event or takes one away" is then true by what the document is, not by what is put again. +### As built + +A node holds its store in a set of events where it is given `--store-document`, the +set's file, beside `--store-root` or `--store-id`. It then says `events` for its kind +in its handshakes, and syncs with nodes that say so and no others. + +* **The set** ([`federation/store/set.rs`](../src/federation/store/set.rs)): the store, + and beside it what the store lets go of and the node still gives; the members' + entries ([`entry.rs`](../src/federation/store/entry.rs)); its names, kept as it + changes; its file, written where it changed, every five seconds and as the node + stops. +* **Passing on** ([`federation/store/passing.rs`](../src/federation/store/passing.rs), + [`swarm/set.rs`](../src/swarm/set.rs)): where the node stands goes in its STATUSes, + the checkpoint's and the heads' digest with the fingerprint of all its names; the + rest in SYNCs' bodies: ranges ([`document/ranges.rs`](../src/document/ranges.rs)), + heads, the names it wants, events and entries. What it took goes on to its other + neighbours at once. Nothing is kept of a peer between messages. +* **Starting**: from the file; without one, from the root, where given and no + checkpoint is pinned; else with nothing, asking the members it reaches for the + checkpoint named by the store's ID or by `--store-checkpoint`, and for the events + that one keeps, each taken as what its name says. +* **The node's own entry** is what `swarm::members` writes of a member, put as the + node's next entry; its other writes of protocol data are refused. What reads + members, the policy and the swarm's ID of a document reads them of the set + (`Holding::entries`). +* **The document the node holds beside** is an Automerge document with nothing in it: + nothing syncs it, remakes it or writes to it, and the API's `/store` holds nothing. + ### From an Automerge document to this A store is its root and its events, whatever carries them: a node of this kind reads |
