aboutsummaryrefslogtreecommitdiffstats
path: root/docs/document.md
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-12-01 02:45:46 +0100
committertv <tv@krebsco.de>2026-12-01 02:45:46 +0100
commit34bfcb661ed74bf40809576bbb388362cb7ffaa1 (patch)
tree8422db7db396dd4ae83403837cd954a94f882a7a /docs/document.md
parent34434f7fd5a6bab1884a63c96679f48045f4bffd (diff)
parent6a06bc4a955cdf2b5a183c9ff21e25c79a4e5d9f (diff)
Merge remote-tracking branch 'events'HEADmaster
Diffstat (limited to 'docs/document.md')
-rw-r--r--docs/document.md63
1 files changed, 59 insertions, 4 deletions
diff --git a/docs/document.md b/docs/document.md
index 17dca62..07d3420 100644
--- a/docs/document.md
+++ b/docs/document.md
@@ -336,6 +336,14 @@ upgrades node by node. A node that speaks 52 alone says no kind, and is of the k
there was then; nodes of different kinds refuse each other in the handshake, saying so,
and sync nothing.
+What another kind says goes in the same two messages (`SyncBody::Kind`,
+`HeadsSummary::Kind`): a SYNC's body is one of Automerge's, or another kind's bytes; a
+STATUS's stamp is Automerge's heads, or another kind's bytes after a byte no Automerge
+stamp begins with. Version 52 says neither. What a SYNC and a STATUS say beside, that
+the sender is ready, when it sent, whose tree a push is along, whom it reaches, is for
+every kind; the epoch, a body taken as delivered, heads announced and what vouches for
+changes are Automerge's, and a node of another kind says one epoch and leaves the rest.
+
### As merged state without a history would give it
To see that what is asked isn't Automerge's in other words:
@@ -626,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. A node
+is of it where its operator says so ([As built](#as-built), below), and a swarm on
+Automerge moves to it node by node
+([From an Automerge document to this](#from-an-automerge-document-to-this)). 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
@@ -656,7 +667,9 @@ held; and where the fold takes it at its history, which every node judges alike.
the fold refuses there is held by nobody. One whose history takes it and that the node
itself refuses or doesn't read (a node's own: what it took before, its operator's
drops, where it stopped) is held and passed on all the same, as the document holds it
-today: so that what one node doesn't read still reaches the nodes that do.
+today: so that what one node doesn't read still reaches the nodes that do. A node that
+stopped holds back what comes after, as it can't tell which of it will be taken, and
+passes that on alike, until it takes again: then it holds of it what it took.
What builds on such an event, the node can't judge: it holds no history to judge it
at. Where nodes took different ones of two versions that changed the same, or an
@@ -721,6 +734,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
@@ -729,8 +770,22 @@ without a new federation and without a vote, by **a node of both kinds for a whi
release whose node can hold the store in both at once, a member of both, and takes into
each what the other holds, as it puts events again today. Operators move their nodes
one at a time; once none is of the old kind, the next release drops it for a swarm
-holding a store. From the release that has this kind, no swarm holding a store is
-started on Automerge: one that runs there runs on, until it has moved.
+holding a store.
+
+Built: a node given `--store-both` beside `--store-document` holds its store in the
+Automerge document and in a set ([`swarm/set.rs`](../src/swarm/set.rs),
+`Holding::of_both`). It takes handshakes of either kind and says to each peer the kind
+that peer holds; passes the Automerge document on to the ones and its set to the
+others; puts into the document what its set took of peers on sets, and passes on to
+them what its set took of the document; and writes its entry in both. Its set, without
+a file yet, is made of the store as the node reads it of its document, so it begins
+where the document does, a checkpoint a remake left among it. Nodes on the document
+alone and nodes on a set alone take none of each other's handshakes: what goes between
+them goes through the nodes of both
+([`operations.md`](operations.md), [Moving to sets of events](operations.md#moving-to-sets-of-events)).
+
+Not built: that no swarm holding a store is started on Automerge any more. One that
+runs there runs on, until it has moved.
## What others do