aboutsummaryrefslogtreecommitdiffstats
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
* docs: the federation's test plan, built to stage 5tv11 hours1-5/+5
|
* federation: votes build on the events proposing what they vote ontv13 hours1-14/+16
| | | | | | | | | | A node voting by itself, and a party's client, signed a vote on the heads the node held: where those held what is beside a checkpoint's heads (a party's writes made while the swarm was parted, say), the vote wasn't above them, and a version event written on it was refused, so the checkpoint never moved, though it passed. Both now vote on the events proposing what they vote on, and a node proposes a checkpoint on the heads it names: so their votes are above those heads wherever the proposal is.
* docs: the vectors of the changes founding a swarm are fixedtv14 hours1-5/+5
|
* docs: the forks' tests are built, but for the genesis changes' vectorstv15 hours1-2/+2
|
* api: a fork's root made, and what a node finds of onetv15 hours1-0/+99
| | | | | | | | | `POST /admin/events/fork`: the root of the fork at the heads named by the version given, as the node's store builds it, with the events it keeps, as the file the fork's founders start its swarm from (`--store-root`). `POST /events/fork`: what the node finds of the fork whose root the body holds: whether it builds that root at its heads, and why not; what it holds that those heads lack; and the parties whose keys the fork's version gives otherwise than they had there (`federation::fork`).
* federation: a rule voting `false` on a checkpoint proposed beside one a node ↵tv15 hours1-2/+4
| | | | | | | | | | backs `--store-nay-beside`, for a node voting by itself: where its party backs a proposal on the current version that can still pass, by its record or by what it votes now, it votes `false` on every other proposal there that only moves to a checkpoint and can still pass, once. So, of two checkpoints proposed at once, the one it doesn't back dies, and its backers are free (`docs/federation.md`, Votes a node casts by itself).
* docs: the store's tests on Automerge are built, but for the genesis changes' ↵tv17 hours1-7/+8
| | | | | | | vectors `docs/federation-tests.md` says so, and that each attack table has a test of its own checking that every row has its test.
* docs: votes a node casts by itself are builttv17 hours1-4/+6
| | | | | | The federation's design says that votes a node casts by itself are built: following parties and proposing checkpoints, backing a checkpoint by the voters' rule, and its party voting by hand through it.
* api: a vote by hand, through the node that votes for its partytv17 hours1-0/+40
| | | | | | | | | | A party that has a node vote by itself votes by hand only through that node, which keeps its one record (`docs/federation.md`, Votes a node casts by itself): `POST /admin/events/vote`, `{"proposal": <hash>, "yes": <bool>}`, by the record and, with a `true`, by the voters' rule; signed with the party's key the node keeps, recorded, and put. Refused (`422`) where the record or the rule forbids it, or the node votes for no party. Putting an event through the API puts it into the document as the node's own votes are put (`held::write`).
* node: votes it casts by itself, for its partytv17 hours1-0/+14
| | | | | | | | | | | | | | | | | | | | | | A node may vote and propose for its party by itself, by its operator's rules (`docs/federation.md`, Votes a node casts by itself; `federation::vote`): * `--store-vote-key`: the party's key it signs with, an OpenSSH private key file, one the party's version names, kept on the node; * `--store-vote-record`: its party's one record of its votes, which it votes by, written before each vote is sent, begun where there is none on the version current then; * `--store-follow`, `--store-follow-any`: the parties it follows, by default only on a version that only moves to a checkpoint; * `--store-propose-events`, `--store-propose-every`: when it proposes a checkpoint, once it holds so many events beyond its checkpoint, or so long after its store moved there; * `--store-held-for` (10 minutes): how long it holds an event before it holds it for a while, for the heads it proposes and the voters' rule. Its store keeps when, by the node's own clock, it took each event, and when it moved to its checkpoint. Whenever the worker reads the store, the node decides what to sign (`Holding::act`), records it, writes the record, offers it to its store, and puts it into the document (`held::write`). A vote by hand through the node, by the record and the voters' rule, is `Holding::vote_by_hand`.
* docs: what of the federation is builttv18 hours1-7/+11
| | | | | | | The federation's design says what of it is built: the store in a swarm's document, members by the federation and the store at a node's API, as the store's design says; and a party's client, which signs its party's events, votes by its record, signs again what a move refused, and names a party that voted twice.
* api: what the store refused, by kindtv18 hours1-2/+9
| | | | | | `GET /events/refused` says of each refusal its kind (`none`, `judged`, `builtOn`, with the event it builds on, or `notAbove`), apart from why: a party's client signs again what a move refused, which it tells so.
* api: what counts names the proposals on the current version, and their votestv18 hours1-2/+18
| | | | | | | 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`).
* continuum is a librarytv18 hours2-2/+3
| | | | | | | | Everything the node is moves from the binary into a library (`src/lib.rs`), so that other binaries can use it: a party's client of a federation next. The node's binary (`src/main.rs`) runs it (`continuum::run`), which wires things together as `main` did. The library's doc comments are prose, not examples to test (`doctest = false`); its tests are the library's, as `cargo quick` and `cargo sim` run them.
* docs: the store at a node's API is builttv18 hours1-10/+12
| | | | | The store's design says that the store at a node's API is built: putting events, and showing what counts, what it refused, and its operator's drops.
* api: a swarm holding a store at a node's APItv18 hours1-0/+230
| | | | | | | | | | | | | | | | | | | | | | Behind the `federation` feature, a node of a swarm holding a store has, at its API (`docs/store.md`, Members; `docs/openapi.yaml`, Events): * `GET /events`: its store's ID, its checkpoint's, its heads, and how many events it took after its checkpoint; * `POST /events`: an event put, whoever signed it, offered to the store and written into the document at its ID unless the store refuses it (`422`, with why): taken, held, or waiting for what it builds on; * `GET /events/{id}`: an event the store holds, or its checkpoint, as its bytes; * `GET /events/counts`: what counts as the store reads now: the current version, each party's keys and nodes, the values at places, the members; * `GET /events/refused`: what the store refused, its own refusals apart, its operator's drops, and the rest with why; * `POST /admin/events/drop` and `/admin/events/allow`: its operator has it drop what it took, and take it back. The events' endpoints are anyone's this node lets in, as the store's are; dropping and taking back need `write` on `_continuum`, as what operators do. While a node holds no store, they answer `404`.
* docs: members by the fold are builttv19 hours1-10/+12
| | | | | | The store's design says that members by the fold are built: each node of the party its operator names, syncing with members only, its neighbours among them and some among its own party's and those its operator names, and taking no token another node issued.
* api: in a swarm holding a store, a node takes no token another issuedtv19 hours1-1/+2
| | | | | | | | At its API, a node of a swarm holding a store takes no token another node issued (`docs/store.md`, Members): whoever its operator lets in may use it, and its operator lets in nobody through another node. A token every node of a swarm takes would let whoever another operator let in in here too. `token::issued_here` refuses such a token (`ElsewhereIssued`), behind the `federation` feature.
* topology: neighbours among the members of a node's own party, and of parties ↵tv19 hours1-0/+5
| | | | | | | | | | named A node of a swarm holding a store keeps some of its neighbours among the members of its own party and of the parties its operator names (`--store-neighbour-parties`), so that a party listing many nodes can't be all of them (`docs/store.md`, Members): its neighbours by the shared graph among those members alone, each as its entry names it, which every node of its party computes alike, with those among all members.
* node: the party a node of a swarm holding a store is oftv19 hours1-0/+5
| | | | | | | | | A node's group is its operator's, in its configuration (`docs/store.md`, Members): `--store-party NAME`, which `--store-root` and `--store-id` need, a party's name as the federation spells one. The node keeps it with its store (`Holding::party`), to name it in its entry and its handshakes. The options of a node of a swarm holding a store (`--store-file`, `--store-checkpoint`, `--store-party`) set without either are refused together.
* docs: what of the store on Automerge is builttv19 hours1-9/+14
| | | | | | | | The store's design says what of it is built: on Automerge, a swarm holding a store, started from its root or joined by its ID, each change judged by what it writes, and the store a node reads from its document, by what is its own, putting again what the document lacks, from a pinned checkpoint where there is one; not yet members by the fold, the store at the API, and remakes, of which such a swarm takes no records or acks.
* federation: a pinned checkpoint, found in the documenttv19 hours1-0/+6
| | | | | | | | | | | Once a store moved to a checkpoint, a node reading it from the root could take what was grown anew from the root since, by keys of versions long replaced: so its operator pins the checkpoint (`--store-checkpoint`, by its ID), and the node reads its store from there whenever it starts (`docs/store.md`, Pinned checkpoints). It finds it in its document: at heads a proposal's version names, built from their history read from the root, as any node builds the checkpoint it moves to (`Store::checkpoint_at`), the one whose ID is pinned. Until the document holds it, the node holds no store, and says so once.
* federation: the store read from the documenttv19 hours2-2/+8
| | | | | | | | | | | | | | | | 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.
* node: a swarm holding a store, started from its root or joined by its IDtv19 hours2-1/+9
| | | | | | | | | | | | | | | | | | | | Behind the `federation` feature, two options: * `--store-root PATH` starts a swarm holding a store, or goes on with one, from the store's root, as bytes in the file, which the federation must take as a root. With no document to start on, the node builds the genesis change from it, as every node given the root does, and is ready at once; a document to start on must be of the root's swarm. * `--store-id ID` joins one through seeds by its ID, the root's SHA-256 in hex. An empty document of the first epoch takes as its root only that store's genesis change, built again from the root it holds (`document::events::is_genesis`), whatever peers name: the root pin doesn't wait for seeds, nor is disputed. Either names the swarm the node joins, which a state file must remember too, and can't be combined with the other, nor with what makes a new swarm's first change (`--genesis`, `--bootstrap-users`, `--bootstrap-keys`, `--bootstrap-policy`, `--remake`, `--genesis-root`). The root is read as a file of its own kind (`store`), counted among the node's files.
* docs: the federation's fold is builtfederation-2-stage-2tv21 hours3-19/+21
| | | | | store.md, federation.md and federation-tests.md say what of them is built: beside the store held in memory, the federation as its fold, with its byte formats, and their tests.
* federation-tests: vectors for JCS's order of names, and for the sizestv22 hours1-4/+7
| | | | | | | | JCS sorts an object's names by their UTF-16 units, not by their bytes or code points; the two differ for a name from U+E000 to U+FFFF beside one beyond U+FFFF. Names in events and versions are ASCII, but a value is any JSON: a vector with two such names catches a builder sorting strings as Rust does. And vectors at federation 1's sizes and just past them.
* store: a fork's later change ends once its events reach 1 MiBtv22 hours1-4/+5
| | | | | | | | | An event went into the change being filled unless it would take the events there past 1 MiB: whether a change was full hung on the next event. A node taking the root on its operator's word couldn't tell a change cut short, sent first, from the one every node builds, and by then held a change of that writer and number. Events now go into a change until their bytes there reach 1 MiB, and the next event begins the next change: each change is judged whole by itself.
* store: documents parted by a writer's two changes come together at the next ↵tv22 hours1-2/+4
| | | | | | | | remake The text said such documents "remake apart". By its own rules they come together at the next remake: one side decides, and the other rejoins its epoch; both decide, and of the two, the lower ID.
* store: grinding epoch IDs moves the nodes again for each lower onetv22 hours1-1/+1
| | | | | | | The row said nodes rejoin the lower epoch once a generation. Each lower ID found moves them again: of N tries, about ln N are lower than all before, so a billion hashes of a small snapshot make some twenty rejoins of the whole swarm, each node putting again what the new document lacks. Still slow, not wrong.
* store: a node follows no epoch with another policy, and reads nothing closed ↵tv22 hours1-8/+10
| | | | | | | | | in one An epoch's first change, which a rejoining node can't build, holds a snapshot: a made-up one may hold another policy, or what is closed in a swarm holding a store (users, bans, the topology). A node follows no epoch whose policy isn't its swarm's, and reads nothing closed in one it follows.
* store: the fold says how large an event may be, and the document judges by ittv22 hours1-2/+6
| | | | | | | | 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.
* store: where a pinned checkpoint comes from, and what a node keeps across a ↵tv22 hours1-8/+16
| | | | | | | | | | | | | | | | restart A pin is an ID, and the document holds a checkpoint only at `_continuum/checkpoint`, which only an epoch's first change writes: a swarm that moved once, and never remade, held its checkpoint nowhere, and a node told to join from a pinned one had nothing to start from. It finds it in its document: the document's checkpoint, or one the fold moves to at the history of an event the document holds, built at those heads from what the document holds, as the ID fixes its bytes whoever builds them. The document holds what that takes, as no remake leaves it out. And across a restart, a node reads its store from its document anew, from the document's checkpoint or the one its operator pinned, by its own refusals and drops, which it keeps in its file; it keeps nothing else of the store.
* store: a node follows no epoch whose snapshot holds an earlier checkpointtv22 hours1-8/+12
| | | | | | | | | Two listed nodes advertising a newer epoch make a ready node rejoin it, and a made-up epoch's snapshot may hold the root and nothing else. A node keeping its own checkpoint reads what is above it, but the new document then holds events whose history nobody puts again, and no node joining or restarting from it reaches the checkpoint the swarm holds. A node follows an epoch only where the snapshot's checkpoint is its document's, one it builds from that document, or one its operator pins; a row for the attack table.
* store: one rule for putting events againtv22 hours1-24/+29
| | | | | | | | | | | | | | | | | Events were put again by three rules: of a change continuum refused, every event of it and of what was built on it; after a switch, what a node held beyond the base that the new document lacked; after a rejoin, what it held. Between them an event could go: at a remake whose base came before a checkpoint, switched after nodes moved to it, the events between the base and its heads that the checkpoint didn't keep were in no node's store and left the document, and a store starting at the snapshot's checkpoint could reach the nodes' no more, pinned or not. One rule now: a node puts again every event its document lacks that a store starting at the document's checkpoint would take, but for its own refusals and drops, and that it has: one it holds, one in a change it refused, or one the document it left held. So no remake leaves out what a store starting at the new document's checkpoint takes, and the document holds what a node forgot until a remake whose snapshot holds that checkpoint or a later one.
* store: the snapshot is the store read from the document up to the basetv22 hours2-9/+11
| | | | | | | | | | The snapshot held the store "as the node reads it at the base". A node that moved to a later checkpoint since the base forgot what came before it, and reads the store at the base no more; one that didn't move yet still does: the two built different snapshots from one base, and the checkpoint the swarm held could leave the document with no node able to give it back. The snapshot is the store a node reads from the document up to the base, starting at the document's checkpoint, by its own refusals and drops: every node holding the base builds the same, whenever it moved.
* federation: a client writes its record of votes before it sends onetv22 hours1-6/+8
| | | | | | | A party's client votes by what it keeps, never by what a node shows, but nothing said what one that lost its record does. It can't go by a node: a `true` it sent through one may be held back there. So it writes its record before it sends a vote, and one that lost its record casts nothing on the current version.
* federation: an event whose history holds two versions changing one is refusedtv22 hours1-1/+2
| | | | | | No node takes such a history, as each refuses one of the two, but judging, and a model reading every history anew, are given it, and must say the same of it: it is refused, as no version is current there.
* federation: what a checkpoint keeps is read as written under its versiontv22 hours1-2/+5
| | | | | | | | An event doesn't name the version it was written under, and a node starting from a checkpoint holds none of the kept events' histories. It works out, but `start` has to assume it, and the text didn't say: a node reads what a checkpoint keeps as written under its version, as each was written under that one or an earlier and counts there, a kept proposal is on it, and a later `since` that leaves one out is past it.
* federation: a node is still joining until it synced with every seedtv22 hours1-5/+7
| | | | | | | | | Of two versions changing one, a node still joining takes neither. Continuum's lifecycle has a node `Joining` only until its first sync, with one peer, its catch-up source: one node of the adversary's answering first showed it one chain alone, which it took, and refused the other from everyone else. For this, a node is still joining, from its start or a rejoin, until it has synced with every seed its operator named; and what isn't promised is a node joining whose seeds are all the adversary's.
* federation: whether a checkpoint passed is the operator's to knowtv22 hours1-5/+6
| | | | | | Once a checkpoint passed, a node joins from a pinned one; but a node started from the root can't tell that one passed, as a chain old keys grew need name none. It is its operator's to know, not the node's to refuse.
* federation: every event's shape, and the fold's nametv22 hours2-11/+16
| | | | | | | | `keys`, `nodes` and `proposal` events had no shape written, a vote's was written as if it were the event, and the fold had no name, though the genesis change is built byte for byte from the policy naming it. Each field an event may have is written with what it holds, a version's hash as an ID is, and the fold is named `federation`: `{"version": 2, "store": "federation"}`.
* federation: keys in versions and key sets, and node IDs, are spelled one waytv22 hours1-31/+34
| | | | | | | | | | An event's `key` was spelled out; the keys a version and a key set name, and node IDs, weren't, and whether a version is one hung on it: a key's base64 not canonical, a comment, 32 bytes that are no Ed25519 key, a key twice in a set, a node ID in capitals or twice. Keys are spelled as `key` is, with no comment, their 32 bytes an Ed25519 public key; node IDs as continuum spells them, `continuum:` and 64 lower-case hex digits; and none of either twice in a list. The example version loses its keys' comments.
* federation: a signature's blob holds an empty reserved fieldtv22 hours1-3/+4
| | | | | | | | The design named the blob's hash and key, and said a signature is checked as continuum checks a user's, which takes `sha256` beside `sha512`, and any reserved field. Only the signer can vary that field, as it is signed, but one builder asked it empty and another didn't. It is empty, as `ssh-keygen` writes it, and the hash `sha512`, beyond what continuum's check asks.
* federation: how deep an event may nesttv22 hours1-0/+1
| | | | | | 256 KiB hold arrays some hundred thousand deep. A JSON reader stops at a depth of its own, or none, or falls over: two builders' nodes parted on such an event. An event nests objects and arrays up to 32 deep, its own object the first.
* federation: numbers are integers anywhere in an event, not in values onlytv22 hours1-2/+2
| | | | | | | | Integers were asked of values alone. A proposal holding `1.5` or `1e21` is good JCS, so to judge it a builder needed all of ECMAScript's number printing, for this alone, and one reading integers only took it for no event. Numbers anywhere in an event are integers from −2⁵³ to 2⁵³, and strings anywhere are whole Unicode characters: floats, and the hardest part of JCS with them, go.
* federation: what makes an event none, and what makes a version nonetv22 hours1-12/+12
| | | | | | | | | | | The sizes federation 1 allows listed a party's keys "in its version or its set" among what makes an event none, while a proposal is taken whatever version it holds: a proposal giving a party 17 keys was no event to one builder, and a proposal that is no version to another, who parted at the first event with it in its history. The list now says what of an event makes it none (its size and dependencies, a key set's keys, a node list's nodes, a write's path, its values), and a version is none where it gives a party more keys than a key set may hold, more nodes than a node list, or a rule a longer path than a write's.
* federation: a vote on a checkpoint isn't judged against its headstv22 hours1-5/+6
| | | | | | | | | | A vote on a version naming a checkpoint was taken only where it was above the heads. It follows from the version event's being above them: the version event is taken only there, and with it every vote it is written on, as everything in the history of an event above some heads that isn't in theirs is above them. Two rules are left: the proposal is a version only where it is above the heads, and a version event writing it is taken only where it is above them. A vote cast beside them binds its party as any yes does, until the move refuses it; an honest client builds only on what is above them.
* federation: a node follows on checkpoints only, by default, a `false` as a ↵tv22 hours1-10/+10
| | | | | | | | | | | | | | | `true` By default a node followed a party's `false` on any proposal. Where that party and its followers are more than a third of the parties, one key, the one kept on a node, ended every proposal, the one naming that key anew among them. By default a node now follows only on a version that only moves to a checkpoint, both ways, and following on any version, `false` among it, is its operator's choice. The follower's `false` was also how a proposal nobody else backs stopped holding back automatic checkpoints. Instead, a node proposing a checkpoint goes ahead beside a proposal it wouldn't back that nobody backs but its proposer; it still waits for any it would back, or that others back.
* federation: a node follows a party's `true`, not its proposaltv22 hours1-7/+9
| | | | | | | A node following a party backed a proposal that party proposed, but a proposal binds its proposer to nothing: its followers were bound by their yes, and the party it followed was free to back another. A node follows a `true` only, and one proposing a checkpoint backs it, so that the nodes following its party back it too.
* federation: a party that has a node vote by itself votes by hand through ittv22 hours1-3/+6
| | | | | | | | A party votes from one client, and may have one node vote by itself, but nothing put the two together: a node following a party's `false` on a proposal, and its operator backing the same proposal from a client, is a party voting twice, honestly. So such a party votes by hand only through that node, which keeps the party's one record of its votes and refuses a vote the record forbids.