| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Automerge writes no put of the value a key holds already, so the test can't have a node
write one: it judges such a change made by hand, a put of the event's bytes at its key,
at a history holding it.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
A node puts again, in changes of its own, every event its store holds that its
document lacks (`docs/store.md`, What the store takes from the document): one it took
from the document it left, at a drop or a rejoin, or from a change it refused, whose
events the store is offered as from anywhere (`Holding::look`, every few seconds, of the
changes screening keeps). It puts each after its dependencies, what the checkpoint keeps
first, then what the store took after it in the order taken, up to 1 MiB of events a
change, once a wait of its own has passed: random, between one and ten seconds after
the document first lacked them, so that not every node puts the same, and none another
node put meanwhile, as it looks again when it writes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A node of a swarm holding a store holds the store, read from its document
(`docs/store.md`, What the store takes from the document): `federation::held`. Whenever
the document changes, a worker reads the events it holds that the store wasn't offered
from it, under the document's lock, and offers them to the store without it, each taken
as from anywhere: once its dependencies are held, judged at its history. Another
document (a drop, a rejoin) is read as it comes, the store going on.
The node reads its store anew from its document whenever it starts, from the root, by
what is its own of it: the events it refused by what it took before, and those its
operator had it drop, which it keeps in a file (`--store-file`), written whenever that
changes, so that a store read anew in another order refuses what it refused before. A
file that doesn't read stops the node from starting; without one, a restart may take
what it refused.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Every node judges a change of a swarm holding a store by what it writes, at its history
(`docs/store.md`, What a change writes), in place of rules by path: `access::holding`.
It writes events, each at `_continuum/events/<ID>` the bytes whose SHA-256 that is, no
larger than the fold allows (the federation's 256 KiB), at a key held nowhere at the
change's history; and its node's entry, with the member list's map where there is none.
Everything else is refused, as closed: values outside `_continuum`, the policy, the
swarm's ID, users, bans, the topology, remakes and their acks. Nothing deletes or
replaces an event. A change names its node; the genesis change's writer names none, so
no change under it is taken but the genesis change.
In a swarm not holding a store, a change writing a policy naming one is refused: a swarm
holds a store from its genesis change, or not at all.
The inspector tells a put of bytes apart (`Action::PutBytes`), with the bytes, for the
events' check. All of it behind the `federation` feature.
|
| |
|
|
|
|
|
|
|
|
|
| |
`{"version": 2, "store": "<fold>"}` at the policy's place is a swarm holding a store of
that fold (`docs/store.md`, What the document holds). Behind the `federation` feature, a
node reads it as `Policy::Store` where the fold is one it has (`federation`) and nothing
else is written there: changes judged, and signed, as required; not strict. Its `store`
reads so only where it is a string, as `values` of a strict policy. A swarm holds a store
from its genesis change only, so `--bootstrap-policy` takes none.
Without the feature, a policy of version 2 stays one the node doesn't know.
|
|
|
A swarm holding a store starts from its genesis change, which every node builds from the
store's root alike, so that one root makes one swarm (`docs/store.md`, What the document
holds). `document::events` builds it: it writes the policy naming the fold, the swarm's
ID (the root's) and the root at its ID, as bytes, each making the maps on its way, under
the writer made of the root ID's first 16 bytes, at time 0, without a message.
`is_genesis` tells such a change by building it again from the root it holds; `started`
is a document holding it, written to under a writer of its own; `ids` and `bytes` read
the events a document holds at `_continuum/events`. All of it behind the `federation`
feature.
|