aboutsummaryrefslogtreecommitdiffstats
path: root/docs/document.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/document.md')
-rw-r--r--docs/document.md41
1 files changed, 24 insertions, 17 deletions
diff --git a/docs/document.md b/docs/document.md
index 77fa0bd..addc396 100644
--- a/docs/document.md
+++ b/docs/document.md
@@ -4,12 +4,14 @@ A design, built stage by stage ([Stages](#stages), below). So far: what is writt
the node as it is; and of the second stage, what was the engine's in other modules on
the engine's side (`document::own`, `dropping`, `screen`), the rules judging a unit
at the state its writer saw (`access::rules::judge_seen`), values read and written
-through a view any kind gives (`document::view`, `AppState::mutate_doc`), and what goes
-to a peer next and what is made of what it sent on the document's side, as the wire
-carries it now (`document::passing`). The node's document is an Automerge document, and
-that is all it can be; this says what the rest of the node asks of it, which of that is
-Automerge's shape and which is continuum's, and where the seam goes behind which a
-swarm's document may be of another kind (a *kind* of document, a kind for short).
+through a view any kind gives (`document::view`, `AppState::mutate_doc`), what goes to a
+peer next and what is made of what it sent on the document's side
+(`document::passing`), and a wire version in which what is a kind's is bytes, with the
+kind said in handshakes (`transport::wire`, 53). The node's document is an Automerge
+document, and that is all it can be; this says what the rest of the node asks of it,
+which of that is Automerge's shape and which is continuum's, and where the seam goes
+behind which a swarm's document may be of another kind (a *kind* of document, a kind for
+short).
Why: every write to an Automerge document is a change kept forever, and what Automerge
does grows with their number, so a swarm takes no frequent writing; only a remake, which
@@ -243,7 +245,10 @@ named where nodes meet, and nodes of different kinds refuse each other saying so
## Passing on
-Not built: how a document of any kind is passed on, and what the wire carries of it.
+How a document of any kind is passed on, and what the wire carries of it. Built: the
+node asking Automerge's side for it (`document::passing`), and the wire version below.
+Not built: the names above the seam as a kind's own in the node's memory, where a stamp,
+a message's body and an offer in bulk are still Automerge's types.
### Whose it is
@@ -292,25 +297,26 @@ rules (`access::rules::judge_seen`).
### On the wire
-A wire version beside the one spoken now, in which what is a kind's is bytes:
+Wire version 53, beside 52, in which what is a kind's is bytes (`transport::wire`,
+`kinds`):
-| Message | Now | Then |
+| Message | In 52 | In 53 |
|---|---|---|
| SYNC | an Automerge sync message, or changes with heads, or a delta's heads; signatures of changes; `delivered` | the kind's bytes; what vouches, the kind's bytes |
| STATUS | heads, or a digest and some of them | a stamp, the kind's bytes, no more than a keepalive may carry |
| BLOB | a change by its hash, a delta by its heads, content by its hash | a unit by its name, something offered in bulk by its name with what the kind says of it, content by its hash |
-| REFUSALS | changes by their hashes | units by their names |
-| HELLO | the root's hash | the same, and the kind |
+| REFUSALS | changes by their hashes | units by their names: the same bytes |
+| HELLO | the root's hash | the same, and the kind (`document::KIND`) |
What stays as it is: the epoch in every message, `ready`, the writer a push is along
whose tree, when a message was sent, PRUNE and GRAFT, and everything that is no
document's.
-Automerge's bytes are what the version spoken now carries, so a node speaks both to its
-peers as each can (`transport::wire`, versions side by side): a swarm of Automerge
-documents upgrades node by node. A node that speaks the older version alone is of that
-kind, and one of another kind tells it so, by the release that knows it, and syncs
-nothing.
+Automerge's bytes are what 52 carries in its messages' own fields, so a node speaks both
+to its peers as each can (versions side by side): a swarm of Automerge documents
+upgrades node by node. A node that speaks 52 alone says no kind, and is of the kind
+there was then; nodes of different kinds refuse each other in the handshake, saying so,
+and sync nothing.
### As merged state without a history would give it
@@ -336,7 +342,8 @@ To see that what is asked isn't Automerge's in other words:
a document or a transaction take a view to read or to write; passing on is asked of
a kind ([Passing on](#passing-on)), first in the node, then on the wire; remakes
become something a kind can do. Each step leaves the tests as they are.
-3. **The kind named** where nodes meet, with one kind to name.
+3. **The kind named** where nodes meet, with one kind to name: built, with the wire
+ version (`HelloRequest::kind`).
4. **Merged state without a history**, as a second kind, with what is written often as
its test.
5. **A WireGuard mesh** as its first use: each node's key and where it is reached,