| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
A writer's changes are its first change's author's, so a node writing in a
test after another under the same writer wrote as that one: a decision by
another than the coordinator was taken as the coordinator's. Another node
now writes under a fresh writer. The proposal written again differs, as one
written the same makes no change.
|
| |
|
|
|
|
|
|
|
|
|
| |
A change of a swarm holding a store may write its node's own protocol data
a remake needs (`docs/store.md`, What a change writes): its acks, a
remake's record and proposal, where there is none, of a compaction it
coordinates, and, as the coordinator, its decision, or the record of the
remake that made the epoch, carried into it whole; and the maps holding
them, where there are none. An abort asked for by another than the
coordinator stays closed, as does any other kind of remake. Rows 14 and 21
are judged here.
|
| |
|
|
|
|
|
|
|
|
|
| |
for byte
A change of a swarm holding a store naming no node is taken where it is one of those
founding the swarm (`events::is_founding`): built from the root its document holds and
the events the root keeps, those at its history and those it puts, by the fold
(`access::holding`). A change of the genesis change's writer waits for no signature,
as every node builds it and nobody signs it (`screen::built_by_every_node`); judged, it
is refused unless it is one of them.
|
| |
|
|
|
|
|
|
|
|
|
| |
it keeps
A fork's root keeps events (`docs/store.md`, On Automerge): they follow its genesis
change in changes of the same writer, built the same way, filled in the order of their
IDs, events going into a change until their bytes there reach 1 MiB, the next event
beginning the next change (`events::founding`). A swarm holding a store starts from all
of them (`events::started`, given the events the root keeps; none for a federation's
root).
|
| |
|
|
|
|
| |
Picked where the path goes, rustc 1.95 takes the pick's type from that place, a slice
of strings, and refuses the paths offered: picked by itself, as `rng.pick(&KEYS)` is,
it is one of the paths, which goes where a slice of strings does.
|
| |
|
|
|
|
| |
The closed paths a generated write picks one of are an array of their own, and the
events a node put a slice: picked from an array written in place, a path's type is
left to be inferred from where it goes, which some compilers don't.
|
| |
|
|
|
|
|
|
|
| |
Three nodes write at random: events at their IDs, larger than the fold allows or not,
again, or at other keys; strings and maps under the events; deletions; their entries
or others'; and what is closed. Each now and then catches up with a node that takes
their changes as it receives them (`screen::apply_bytes`). What it takes leaves at
every key under `_continuum/events` the bytes whose ID it is, the root's among them;
its document saves and loads; and another node, given all it took, takes it all.
|
| |
|
|
|
|
|
|
|
| |
Each row of `docs/store.md`, Attacks, marked unit has its test,
`store_attack_<row>`: where it is judged (`access::holding`, `access::token`), where
the store held in memory meets it (`federation::store::memory`), and where a node reads
its store from its document (`federation::held`). Tests that checked a row already take
its name; a check reads the doc's rows and fails on a unit row without its test, but for
rows 21 and 22, which the remakes bring.
|
| |
|
|
|
|
| |
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.
|
|
|
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.
|