aboutsummaryrefslogtreecommitdiffstats
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
* docs: the store at a node's API is builttv17 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 APItv17 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 builttv18 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 issuedtv18 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 ↵tv18 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 oftv18 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-2tv20 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.
* federation: voters back checkpoint heads that leave out nothing they held ↵tv22 hours2-7/+15
| | | | | | | | | | | | | | | | for a while A version that only moves the store on refuses what isn't above its heads, which its proposer chooses: heads built on little, just after the latest version event, would take back what was written since, a key set dropping a stolen key among it, and the stolen key would count again; a node following a `true` on checkpoints, or a voter checking only the version's fields, would back it unseen. So a party's client and a node voting by itself back a checkpoint only where everything they held for a while before it was proposed is among its heads, in their history, or above them, and a node shows what the heads lack, as for a fork. It is the voter's rule, by its own clock; nothing more is judged. A row for the attack table, and the property of votes a node casts by itself, say so.
* federation: groups that parted come together as parties come in, not by mergestv22 hours3-85/+57
| | | | | | | | | | | | | 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.
* docs: the store and the federation say what of them is builttv22 hours3-17/+18
| | | | | store.md, federation.md and federation-tests.md said none of them was built; the store held in memory is, with a fold made for its tests and their properties.
* federation: a node starting from a checkpoint judges the version naming ittv23 hours1-1/+4
| | | | | | | A node starting from a checkpoint its operator pins holds neither the checkpoint before it nor the events between, so it can't check that the version naming its checkpoint names heads after the one current at that version, at which that one is current too. It takes that on its operator's word, and so takes the version, as every node did.
* federation: checkpoint heads at which the current checkpoint is current tootv23 hours1-7/+10
| | | | | | | | A version names checkpoint heads after the current checkpoint, and now heads at which that checkpoint is current too: the version naming it is among them or in their history. Without that, the version naming the current checkpoint could be after the next one's heads: every node that moved there holds it, and one starting from that checkpoint, which can't check heads before its own, couldn't judge it as they did.
* store: what is above some heads names nothing before themtv23 hours2-9/+8
| | | | | | | | | 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.
* federation: the feature, and the store's foldtv23 hours2-10/+15
| | | | | | | | | | | | `federation`, a feature of its own, builds what `docs/federation.md` and `docs/store.md` design, stage by stage; without it continuum builds and behaves as it does. The aliases build with it, and `docs/development.md` says so. Its first part is the store's: an event's ID, the SHA-256 of its bytes written as 64 lower-case hex digits and read back only so, and the `Fold` trait as `docs/store.md` gives it. The trait reads a checkpoint's parts too, the heads it was built at and the events it keeps, which a node taking a pinned checkpoint needs; the design names it. Nothing uses either yet, but a test.
* docs/federation: a checkpoint's version, the current checkpoint, and joiningtv24 hours1-11/+15
| | | | | | | | A checkpoint holds its version itself, the object, as a root without heads needs. The current checkpoint at a history, which a version's checkpoint heads are judged against, is the one named by the last version of that history's chain that names one, or else the root: a question of the history alone. A node still joining is one continuum's lifecycle has as `Joining`, until its first sync is done.
* docs/federation: following a nay on any proposaltv24 hours1-4/+5
| | | | | | | | A proposal kept alive to hold back automatic checkpoints is seldom a version that only moves to one, so followers who followed only such versions stayed silent when the party they follow voted it `false`. By default a node now follows a `false` on any proposal, which can only end one, and a `true` only on a version that only moves to a checkpoint; following a `true` on any version stays its operator's choice.
* docs/store: an epoch ID ground below the honest onetv24 hours1-0/+1
| | | | | | | As any member may decide a compaction, and the lower of two epochs for one is followed, a member can grind a remake's ID until its epoch's is lower, and have every node on the honest epoch rejoin, once a generation. No event is lost, as a node that rejoins puts again what it held; the attack table says so.
* docs/store: the changes every node buildstv24 hours1-11/+19
| | | | | | | | | | | An epoch's first change, and a fork's changes after it, carry no node's signature, so the rule that a change carries one now sets them aside. Their writer, derived from the root or from the remake, is one anyone can compute, so it writes exactly the changes every node builds, and any other change under it is refused: nobody commits a change of that writer and number before the one every node builds, and parts the nodes. The genesis change writes the policy (a map, keys sorted), the swarm's ID (a string) and the root, in that order; a fork's kept events fill its later changes in the order of their IDs, each up to 1 MiB of events.
* docs/federation-tests: one document for honest nodestv24 hours1-1/+2
| | | | | As the document judges structure alone, the store on Automerge is also checked for honest nodes holding one document, whatever each takes from it.
* docs/federation: what a party's client keeps, and checkpoints held backtv24 hours1-11/+22
| | | | | | | | | | With each `true` it casts, a party's client keeps the votes that made its party's earlier proposal dead, so that once a checkpoint left them out, nothing names its party as voting twice; and a party votes from one client, as two backing two proposals at once is voting twice. A node proposing a checkpoint by itself waits only for proposals that can still pass, and one that nobody but its party backs is ended by the nays of the party a node follows and its followers. Stage 3 builds the client: signing events, keeping its votes and the nays that freed it, and signing again what a move refused.
* docs/federation: what a fork's root can be checked for, and merges by IDtv24 hours1-14/+16
| | | | | | | | | | Nothing in a fork's root says who started it, so its version is no longer held to naming anew the node lists of the parties that start it; its founders name theirs, so that their nodes are members. A merge's kept events are in none of each other's histories, so a place its party wrote on two sides counts the lower ID, whatever either side's history held, alike for nodes that check the root and nodes that take it on their operator's word. What the federation asks of the store says forks of one store or several, as the store does.