aboutsummaryrefslogtreecommitdiffstats
path: root/src/federation/fold.rs
Commit message (Collapse)AuthorAgeFilesLines
* api: what counts names the proposals on the current version, and their votestv19 hours1-0/+49
| | | | | | | A party's client votes by the record it keeps, and keeps the votes that made its party's earlier proposal dead; it reads them from a node, and checks them itself, as each is signed. `GET /events/counts` names the proposals on the current version, by their hash, each with the events proposing it and the votes on it, by ID (`State::ballots`).
* federation: events offered to a node's store, and its operator's dropstv19 hours1-1/+1
| | | | | | | | | | A node's store takes events from elsewhere than its document too: one put at its API is offered to it first (`Holding::offer`), to say what became of it. Its operator has it drop events it took after its checkpoint, with everything built on them (`Holding::drop_taken`), and takes them back (`Holding::allow`), the document's events then offered again (`docs/store.md`, A node's own). After each, what the node keeps of its own is written to its file where it changed, and the members are as the store reads now.
* store: a fold names itselftv21 hours1-0/+2
| | | | | | A swarm holding a store names its fold in its policy, `{"version": 2, "store": "<fold>"}`: the fold's name is a constant of the fold, `federation` for the federation and `test` for the fold made for the store's tests.
* federation: the federation as the store's foldtv23 hours1-0/+935
`Federation` is the store's fold for `docs/federation.md`. The state judging reads is the state of an event's history, which the store builds from the checkpoint and that history alone; so the version current there is the state's, the highest-numbered one written, and a history holding two versions of one number is refused. * A signed event's party is a party of the version current at its history. A write is signed by a key among its party's (those of its key set that counts, else those its version names) where a rule gives its party the place; a key set, node list, proposal or vote by a key its version names. * A vote is on the version current at its history, for a proposal proposed on it; a `true` only where every other proposal its party backs on that version is dead. Passing and dead go by the parties voting each way, a party with both counting for both. * A version event writes a proposal on the version current at its history, passed there, which is a version changing that one; one naming a checkpoint names heads after the current checkpoint at which it is current too, none in another's history, the version event above them. A node keeps a version event only where it changes the version it reads, or writes one it took. * What counts is read by the current version: of each party's writes at a place it may write, signed by a key among its party's, and of its key sets and node lists written under a version at least their `since`, the latest, then the lowest ID. A checkpoint keeps what counts at its heads and the proposals and votes on the version current there; a fork's root what counts at its heads by its version; the members are the nodes each party's node list names. Tests take a federation through writes, a key set, a proposal passing, one yes at a time, two versions changing one, a checkpoint and a node starting from it, and a fork. Events are read with their signature checked once, where they are judged.