aboutsummaryrefslogtreecommitdiffstats
path: root/src/access/holding.rs
Commit message (Collapse)AuthorAgeFilesLines
* holding: the tests' other nodes write under writers of their owntv12 hours1-1/+18
| | | | | | | | 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.
* holding: a node writes its acks and the compactions it coordinatestv12 hours1-28/+197
| | | | | | | | | | | 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.
* access: the changes founding a fork's swarm taken, unsigned, as built byte ↵tv15 hours1-5/+41
| | | | | | | | | | | 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.
* document: the changes founding a fork's swarm, built from its root and what ↵tv15 hours1-1/+1
| | | | | | | | | | | 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).
* access: a generated change's closed path, picked by itselftv17 hours1-1/+2
| | | | | | 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.
* access: what a generated change picks from, given its typetv17 hours1-7/+6
| | | | | | 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.
* access: what a node of a swarm holding a store takes leaves its events soundtv17 hours1-0/+143
| | | | | | | | | 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.
* store: a test per attack row marked unittv17 hours1-23/+83
| | | | | | | | | 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.
* access: a put at an event's key held already, judged as made by handtv19 hours1-8/+18
| | | | | | 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.
* access: what a change of a swarm holding a store writestv19 hours1-0/+282
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.