aboutsummaryrefslogtreecommitdiffstats
path: root/src/federation/store/memory.rs
Commit message (Collapse)AuthorAgeFilesLines
* store: the checkpoint at heads a store holds, as it builds one moving theretv21 hours1-10/+33
| | | | | | `checkpoint_at` builds the checkpoint at heads the store took, its bytes and the events it keeps, as the store does moving to a checkpoint, which now goes through it: so a node can build one at heads it reads, to tell whether it is the one its operator pins.
* store: a store read anew refuses what its node refused of its owntv21 hours1-0/+54
| | | | | | | | A node refuses some events by what it took before (the federation: a second version changing the one it reads), and others as its operator has it drop them; read anew, its store would take events in another order, and so maybe the other one. `own` lists what the store refused so, and `refusing` has a store starting out refuse them from the start, whatever order the events then come in (`docs/store.md`, A node's own).
* store: a fork refuses what the store it came from builds on what its root keepstv24 hours1-1/+2
| | | | | | | The test of forks expected an event the store it came from took after the fork's heads to wait in the fork, but it builds on the put the fork's root keeps, which comes before the root, its one head: the fork refuses it, not above its root, as it refuses an event built on what a checkpoint keeps.
* store: the fold says how large an event may be, and the document judges by ittv24 hours1-1/+9
| | | | | | | | The document took any bytes that hash to their key, while the fold bounds events (the federation: 256 KiB): one change of any size filled every node until the next remake. How large an event may be is a question of the change alone, so the fold says it (`Fold::LARGEST`), the document refuses a change putting a larger one, and the store takes such bytes as none.
* federation: groups that parted come together as parties come in, not by mergestv24 hours1-47/+22
| | | | | | | | | | | | | A merge, a fork at heads of several stores, named every party's keys anew, so that a party wrote its key set again before anything a key of its set signed counted there; and kept each side's values side by side, so that a value a party replaced on one side came back where the other side's write had the lower ID. Letting the other side's parties in, by a version or a fork naming them, who sign again what they keep as a party's client signs again what a move refused, does the same with nothing new. So a fork is at heads of one store: the fold makes its root from that store's state, and the store from its own heads (`Store::fork`). Merges' rows go, those after them move up, and Roads not taken says why, with merging in place.
* store: what is above some heads names nothing before themtv25 hours1-0/+9
| | | | | | | | | An event above some heads has each of its dependencies among them or above them, not only them all in its history. The store holds after its checkpoint only events whose dependencies are its heads and the events after them, and so it holds every event above them: one naming an event before them as well is refused by a node that moved, and never taken by one starting from the checkpoint, which never held what it names. Tests show it for an event offered after the move and one taken before it.
* store: forks and mergestv25 hours1-0/+87
| | | | | | | | The fold makes a fork's root from the states at heads of one store, or of several, which merges them, and what makes the fork; the store gives it the states, and the events the root keeps, from the stores holding them. A node holding those heads checks a root by building it. A fork and the stores it came from take nothing of each other: what each writes after builds on what the other doesn't hold.
* store: moving to a checkpoint, and starting from a pinned onetv25 hours1-7/+229
| | | | | | | | | | | | | Once the fold names heads of a later checkpoint (events after the store's, none in another's history), the store builds the checkpoint at them, keeps what the fold keeps, forgets what came before them, and refuses every event not above them, with what waits on such an event. What it forgot is held as accounted for: brought again, it is held, and an event built on it isn't above the heads. A store starts from a checkpoint its operator pins, its events building on the heads the checkpoint was built at. A node starting from a checkpoint must judge the event that named it as every node does; the fold for the tests counts the heads of the checkpoint a state starts from as after the checkpoint current at them, so that it does.
* store: a node's own refusals, and its operator's dropstv25 hours1-0/+126
| | | | | | | | | | Where its history takes an event but the fold has the node refuse it by what it took before (the federation's second version changing one), the store refuses it as its own. An operator may have the node drop events taken after its checkpoint, with everything built on them, and refuse them from then on; what the checkpoint keeps, or holds by ID, isn't dropped, as every event after it builds on that. The operator takes either back by allowing it, and what was refused for being built on it, to be offered again. The fold for the tests shows both with its eras.
* store: a store held in memory, and a fold for its teststv25 hours1-0/+426
A store starts from its root, with the events the root keeps, and holds the events taken after it. An event offered is taken once the store holds its dependencies, where it is above the store's heads (built on an event after them, or on all of them) and the fold takes it at its history: the state its history reads as, folded from the checkpoint. An event waits for what it builds on, and is taken when that comes; one built on a refused event, or whose bytes are none of the fold's, is refused, with what waits for it. The fold made for the tests judges by history (a put refused where its key is locked), reads by what counts (a key's latest put, then the lowest ID), refuses by what a node took before (two eras of one number), and moves to checkpoints (cuts), as the federation does, so that the later stages' tests have something to exercise.