aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* continuum-party status: IDs and hashes wholetv2 days2-22/+15
| | | | | | | | Now that `status` gives each thing a line of its own, there's no line to keep short: the store's ID, its checkpoint's and the version's hash are written whole, as node IDs and proposals' hashes were already; so are the proposals' hashes in what a vote's guard says. Keys still go by their fingerprints.
* continuum-party: a record held against the node's votes, a wait, restoretv2 days5-17/+423
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A party votes from one record; a second record voting beside it, or one begun anew after a loss, can make the party vote twice. The client votes by its record, never by what a node shows, and still should look. Before a vote (`consistent`, `unrecorded`), the party's votes on the current version that the node shows (each proposal's yes and no) are held against the record's (Record::votes_cast): one the node shows that the record lacks refuses the vote, naming it and `restore`; one the record holds that the node doesn't show is said, as on its way or held back. Where they agree, nothing is said. What may keep a vote from the node is said too (`cut_off`, from counts' `heard`): the party's own nodes the node hasn't heard from in five minutes, through which another vote of it may have gone; and the parties none of whose nodes it heard from lately, where they are a third of those with nodes or more: a part of the swarm cut off. Then it waits (--wait SECONDS, 5 unless given, on vote and propose) and asks the node again: a vote cast elsewhere just before arrives first. A version passing meanwhile ends it, as the proposal lapsed. `restore` takes the party's votes on the current version, as the node holds them, into its record, or a new one of --party (Record::restore, checking each vote's signature, its party and version, none twice); a record begun on the current version casts on it then. Best effort: a vote on its way from elsewhere isn't among them, and what `again` signs anew, and the nays that freed an earlier `true`, it doesn't learn.
* events/counts: when this node last heard from each listed nodetv2 days2-4/+51
| | | | | | | | | Each party in GET /events/counts gives `heard` now: by node ID, how many seconds ago this node last heard from each node the party lists (its peer state's last_seen), 0 for itself, left out where it never heard from it since it started. A party's client reads from it whether nodes are cut off, where a vote may be held back, and a party's session, which reads no /peers, has it.
* continuum-party get: what counts, as JSON, a path at a timetv2 days5-9/+174
| | | | | | | | | | | | | | | What counts is kept by place, each place's value whole: `values` showed it so, a place a line, and `--json` as one object keyed by places. An application holds it as one tree. `get [PATH]` reads it so (tree, at): each place's value at its path, the maps on its way made, so that `get home/tv` is one object of everything under it, and `get home/tv/hosts/laptop/ip6` reaches into a place's value, a list's items by their index. Where a place lies under another's value, the deeper place is the later word there (merge). Nothing at a path is an error. `-r` writes a string as it is, as jq -r does; other values as JSON. Bash completes it with places and the paths on their way.
* continuum-party status: a key, a node, a party a line, nodes by their namestv2 days6-61/+169
| | | | | | | | | | | | | | | | `status` said each party's keys and nodes in one line, separated by commas, nodes by their IDs alone. Now each goes on a line of its own, indented beneath its heading (party_lines): the keys the version names, which sign votes, proposals, the key set and node list; those of the key set as it counts, which sign writes, or `the same`; `--key`'s marked, and said where it is none of them; and the nodes, each with the name it gave itself (`--alias`) where it did, as the dashboard names nodes. The store and the version are a heading each too, the parties one a line. The names come from GET /events/counts, which gives each party's `names` now (by node ID, of the nodes that gave themselves one), so that a party's session, which reads no /peers, has them. Bash completion reads the parties from the new layout.
* continuum-party --party: the party it reads as, without a recordtv2 days5-26/+115
| | | | | | | | | | | | | A record is what votes go by, and what `again` signs anew from; for logging in as the party, and for `status`, it only named the party. So someone who only reads needed a record, begun with `init`, which should never vote beside the party's own. `--party NAME` (an option as node, key and record are, so party.toml holds it too) names the party where no record does (working_as): `init` the one it begins a record of, else the record's, else --party; --party naming another than these is an error. Commands that sign still take a record.
* continuum-party: logs in as its party by its key, with no user of the nodetv2 days4-11/+87
| | | | | | | | | | Where --node names no user and no --token is given, the client logs in to the node as its party (Node::log_in): a challenge, signed with --key (a file's, or through the ssh-agent) for continuum-login, for POST /auth/login/party, whose token goes with every request then. The party is the one its record names, or, for `init`, the one it begins a record of. A party's people need a node's address and a key of their party's, nothing of its operator's.
* federated nodes: a party's keys log in as the party, for federation worktv2 days10-99/+414
| | | | | | | | | | | | | | | | | | | | | | | | A party's people work with the federation by signing as the party, with a key of its set; what they need of a node is to read and to put events, which a node's users, its operators, may do with every power besides. POST /auth/login/party takes a challenge (POST /auth/challenge) signed with one of the keys that sign for the party (fold::State::signing_keys: those its current version names, and its key set as it counts), for the namespace continuum-login, armored or as the federation spells a signature (keys::signer, keys::verifies_in: the federation's checks, but for the namespace), and answers a token as the party. Logins by key are counted per party as per user (challenge::take_with, shared with logging in by a registry's keys). The token names the key (Claims::party). Such a session does federation work alone (api::access::federated): what --store-readers do, and POST /events; anything else is 403. Every request checks that the key still signs for the party: once a version or the party's key set drops it, 401. A build from before reads no token naming a key, as its claims deny fields they don't know, so never takes a party's session for a user's; and only the node that issued it takes it, as every token in a federated swarm.
* federated nodes: users who read the federation alone (--store-readers)tv2 days9-4/+123
| | | | | | | | | | | | | | On a federated node, every user its htpasswd or proxy lets in may do everything: put events, have it drop what it took, vote through it with its party's key, make fork roots, read the document. An application or someone watching needn't act for the node. `--store-readers USER,...` names users who read the federation and do nothing else (`api::access::federated`, before the registry's checks): GET and HEAD of the events API (/events and below), checking a fork (POST /events/fork), and keeping a session (whoami, refresh, logout); anything else is 403, saying so. Its other users are its operators, as all were: a node setting nothing changes nothing.
* party: the change test without the rule the harness gives alreadytv2 days1-5/+2
| | | | | Spec::first begins every first version with home/{party}/**; the test gave it again, so the version had four rules, not the three it counted.
* docs/guides/federation: led by the new commandstv2 days5-50/+49
| | | | | | | | | | | Getting started lets makefu in with `propose admit`, lass seeing what it votes on before it casts, and reads with `values` and `status`; the upgrades guide proposes a revision with `propose revision`, the checkpoints guide a checkpoint with `propose checkpoint`, the keys guide names keys anew with `propose keys` and writes a namespace again from `values --json`; the troubleshooting guide points at `status` and at forks by what they are for. The JSON and `next` stay where a version is written by hand.
* continuum-party keys: files of keys tootv2 days3-26/+28
| | | | | | | | `keys --add`, `--remove` and `--set` took authorized_keys lines alone, each one argument, so a .pub file went in as "$(cat phone.pub)". They take files of such lines too now, as `propose admit` and `propose keys` do (keys_given, of which key_lines is the one asking for a key at least), and bash completes files there.
* share/bash-completion: continuum-partytv2 days4-1/+260
| | | | | | | | | | | | | | | | | A hand-written completion, where distributions package it: share/bash-completion/completions/continuum-party, read by bash-completion when first needed (it uses _init_completion and _filedir where they are, plain compgen else). It completes the commands, the intents of `propose` and `fork` (`fork` without `checkpoint`, with `proposal`), the options of each, files where one is taken, `--federation` from ~/.config/continuum/federations (or $XDG_CONFIG_HOME's), and `--revision` and `propose revision` from the features `--version` names. From the node, asked with the options given before the command: the proposals on the current version by hash (`proposals`), for vote, show and fork proposal; the parties (`status`), for remove, give, keys and nodes; and the places holding a value (`values`), for write and values.
* continuum-party found: a federation's first version from its partiestv2 days3-14/+232
| | | | | | | | | | | | The founders wrote the first version as JSON by hand. `found PARTY=KEY|FILE...` writes it: each party with its keys, an authorized_keys line or a file of them, again for more, since 0; --nodes PARTY=NODE,... their node lists, empty where not given; --rule PATH=WRITER the rules in order, `nobody` for false, and without any, each party writing under home/{party}/; --revision FEATURE a later revision. It is checked as a first version (Version::read, changes_validly), and goes to standard output, for `root` to make the root of. The feature lookup is shared with `next` (adding).
* continuum node-id: a node key's ID, without starting the nodetv2 days5-8/+65
| | | | | | | | | The founders name each node by its ID in the first version, before the federation starts; getting it meant starting a node once with --node-key-create and reading its log. `continuum node-id FILE` prints the node ID of the key FILE holds and exits, `--create` making the key there first where there is none (saying so on standard error). Logs are off for it, as for --print-config: the ID goes to standard output alone.
* continuum-party: status and valuestv2 days4-29/+287
| | | | | | | | | | | | | | | | | `status` says at a glance where the party and its node stand, from the node's /events, /events/counts and /events/refused and the party's record where there is one: the store, its checkpoint and heads; the current version, its federation, revision and parties, and how many pass a change; the party's keys (by fingerprint) and nodes as they count, and whether the version names --key; the node's party, whether it votes by itself, and its stop; each proposal on the current version as `show` begins (ballot_line, shared with it); the versions the node refused of its own; and how many of the party's events a move refused, which `again` signs again. `values [PATH]` shows the values that count, all or under a place, each with who writes there by the current version's rules; --json as one object, by place.
* continuum-party: forks by what they are for, by a proposal, at the node's headstv2 days3-24/+246
| | | | | | | | | | | | | | | `fork` took a version written by hand and every head by name. Now: * fork FILE [HEAD...]: the heads the node shows where none are named; * fork proposal PROPOSAL: by the version of a proposal on the current version, as a fork's version is usually one that didn't pass; * fork admit, remove, give, take, keys, nodes, revision: by the next version changed as they say, as propose does (not checkpoint: a fork is at heads of its own); each subcommand taking --at HEAD... and --founder PARTY=NODE,..., which names a party's node list anew in the fork's version, so that the nodes its founders run it on are members there.
* continuum-party: propose admit, remove, give, take, keys, nodes, checkpoint, ↵tv2 days4-81/+621
| | | | | | | | | | | | | | | | | | | | | | | | | | | revision The changes made most no longer go through `next`, jq and a file: each is a subcommand of `propose`, which writes the next version changed so (Intent, intended) and proposes it. * admit PARTY --keys KEY|FILE... [--nodes NODE...]: its keys and node list named anew since the new number; a party already, or no party's name, refused. * remove PARTY: its keys, node list and the rules giving it places go. * give PATH PARTY|{party}: a rule first; one of that path before goes. * take PATH: the rule of that path goes, and where another rule may still give one of its places (overlaps), a rule giving them to nobody goes first. * keys PARTY KEY|FILE..., nodes PARTY NODE...: named anew. * checkpoint: at the heads the node shows. * revision FEATURE: as `next --revision`. Keys are authorized_keys lines, or files of them. Every proposal, a file's too, now says what its version does first (version_lines, shared with `show`) and asks on a terminal; with --yes the one question covers the vote, which then says and asks nothing more. A version changing only its number isn't proposed. --print writes the version instead, to change by hand and propose as a file.
* rustfmt.toml: inittv2 days1-0/+1
|
* scripts/wire-check: a swarm of the last release and this treetv2 days4-3/+178
| | | | | | | | | | | | | | | | Four nodes on this host over libp2p on loopback, two of a release tag's build and two of this tree's, in turns, each seeded with the one before. Where the two builds' wire versions meet, each node writes, and the check is that every node reads what each wrote and that none logs a peer of another wire version. Where they don't, that the tag's nodes log this tree's as such, so their operators know to upgrade. scripts/release runs it against the last release, after saying from the two builds' --version how the release upgrades: so a release that says it rolls out node by node has been seen to. docs/development.md says how a change to the wire format is made: a new version beside the ones spoken already, the older kept frozen.
* transport: wire versions spoken side by sidetv2 days15-103/+481
| | | | | | | | | | | | | | | | | | | | | | | | | | | A build speaks wire versions OLDEST to VERSION and writes each node the newest both speak (wire::choose), as the node's SPEAKS says; the oldest until it says. The identity layer keeps that per address (Book::speaks): a SPEAKS from an address sets it for the address, and for every address of the node proven there, and a new address of a node takes it over. Paths encodes each message for an address in its version (Transport::encode_in; Transport::encode is the newest). So that two nodes know what the other speaks once they have proven themselves to each other, before any other message goes between them, a SPEAKS goes ahead of every WHO and ME, and WHO and ME are read in every version from 52 on (wire::PROOFS): their tags and layout never change. Without that, a node whose oldest version is past the other's couldn't read its proofs, and the two would never get to the handshake that says what each speaks. A SPEAKS naming no version this build speaks is logged as a message of another version is, naming the node to upgrade, the versions as ranges. A 0.0.1 node takes a SPEAKS from an address not yet proven for any other message from there: it drops it, and asks WHO. This build speaks 52 alone, so nothing it sends changes but the SPEAKS ahead of the proofs. A release adding a version encodes and decodes the older ones from their own, frozen, types.
* scripts/release: a release checked, said how it upgrades, committed and taggedtv2 days3-0/+218
| | | | | | | | | | | | | | | | | | | | | | | | Releases were made by hand: a commit, a tag, and whatever one remembered to check. `scripts/release [--dry-run] X.Y.Z` makes one: 1. the tree clean, notes under Unreleased in CHANGELOG.md, the version later than the last v* tag's; 2. the version set in Cargo.toml and Cargo.lock (and the --version example in operations.md), then `cargo quick`, `cargo sim` and scripts/federation-check, stopping at the first that fails and leaving the tree as it was; 3. this build's `continuum --version` against the last release's, built in a cache of its own: node by node where their wire versions meet and Automerge is the same, every node together where they don't share one, which from 1.0.0 on it refuses but in a major release; Automerge changed, no remake until every node runs it; 4. the Unreleased notes become the release's, headed by what it found; the commit `release X.Y.Z`, tagged vX.Y.Z with that, what the build speaks and knows, and the notes; and federation-<F>.<R> too where the build knows a later revision than the last release. It pushes nothing. With --dry-run it checks and prints what it would write. docs/development.md says how releases are made.
* Cargo.toml: Automerge pinned to exactly 0.12.0tv2 days3-2/+10
| | | | | | | | | | Nodes build remakes' snapshots and a federation's founding changes byte for byte, as Automerge encodes them: a build with another Automerge rejoins instead of switching, and could build another genesis change. `automerge = "0.12"` let `cargo update`, or a distribution building without the lock, take any 0.12.x. It names exactly 0.12.0 now, which the lock holds already, so that moving it is a change made on purpose, said in the change log.
* continuum-party: show, a proposal in words before a votetv2 days6-74/+459
| | | | | | | | | | | | | | | | | | | | | | | | | | A party saw a proposal as its version's JSON changed field by field (`keys.makefu: - -> {"keys":[…],"since":4}`), and voted with nothing more before it. `continuum-party show PROPOSAL` now says what a party votes on, in words (`client::described`): * whether it passed or is dead, who voted what, and how many more `true` pass it; * who proposed it, and the version's number; * the parties it lets in or takes out, with their keys by fingerprint, as `ssh-keygen -l` gives them, and their nodes; the keys and node lists it names anew, with what it adds and drops; * the rules it adds and drops, each where it is among the rules, a rule moved being dropped at one place and added at another; * the checkpoint it moves the store to, and what moving there refuses of what the node took (`beside`); the revision it moves to, and the nodes not known to know it; * the places holding a value whose writer it changes, and why no client backs it, where none does. `proposals` says each proposal so. `vote`, through the node too, says it before anything is cast, then its warnings, and on a terminal asks: `y` casts, anything else casts nothing. Without a terminal, as in a script, it asks nothing.
* events: what moving to a proposed checkpoint refuses, showntv2 days6-24/+95
| | | | | | | | | | | | | | federation.md, and row 68, said a node shows, for a proposed checkpoint, what it holds that its heads lack; no node did. `GET /events/counts` now shows, of each proposal whose version names a checkpoint, the writes, key sets and node lists the node took that moving there refuses (`beside`; null for another version): neither among its heads, in their history, nor above them, as the move has it, which their parties sign again. Proposals and votes lapse with the move, and merge events count for nothing: they are left out. `Store::beside` finds them in one pass, as the move itself does: the two share `Store::above`, which the move computed inline.
* continuum-party: a directory for each federation, the only one used unaskedtv2 days5-10/+213
| | | | | | | | | | | | | | | | | | | A party named its node, key and record on every command, or a file of them with --config; one voting in several federations kept files apart by hand. Without --config, the client now reads a federation's own directory, `continuum/federations/NAME` in $XDG_CONFIG_HOME or ~/.config: its `party.toml` of the client's options, its record (`record`) and, where there, its key (`key`); options on the command line, or `record` and `key` in `party.toml`, win. `--federation NAME` chooses one; where there is only one, it is used without being named; where there are several, the client says which there are and asks for one. `root`, `judge` and `twice`, using no options, read none. `init --federation NAME` begins a federation's directory, only its owner reading it, its `party.toml` holding the options given on the command line with it (`node`, `token`, `key`, the key's path made absolute; the node's default left out), and the record in it.
* continuum-party: hashes named by their prefixes, the shortest markedtv2 days4-8/+157
| | | | | | | | | | | | | | | The guides wrote `vote 8d02… yes`, and the client took a whole hash only. It takes a proposal's hash by a prefix of four digits or more that no other proposal on the current version starts with (`client::named`), and says which proposals a prefix names where it names several; a whole hash is itself, as before. Heads given to `fork` are named so too, among the heads the node shows. Four digits at least, so that a prefix read a moment ago doesn't come to name a proposal made since, as one or two soon would. Where it shows a proposal's hash (`proposals`, `propose`), the client marks the shortest prefix that names it, in bold, on a terminal unless NO_COLOR is set; elsewhere the hash is printed as it was.
* wire: a peer on another version is named older or newer, with what to upgradetv2 days3-13/+55
| | | | | | | | | | | A node meeting messages of a wire version it doesn't speak logged `Peer speaks another wire version (another build)`, with the versions as fields only. It says now, in the message, which build is the newer and which node to upgrade: this one, where the peer's is newer (`upgrade this node to talk with it`), else the peer's (`upgrade that node`), with the peer's version and the ones this build speaks. Its fields are the peer's version and the oldest and newest this build speaks.
* CHANGELOG.md: notable changes by release, from 0.0.1tv2 days2-0/+33
| | | | | | | | From 0.0.1 on, notable changes are logged as they come, under Unreleased until the next release, each with links to its docs and code; fixes and internal work that change nothing anyone relies on are left out. 0.0.1's entry says what the first release to keep it holds. The README points to it.
* Cargo.toml: version 0.0.1v0.0.1tv2 days3-2/+8542
| | | | | | | The version said 1.0.0, a placeholder, while the only release is 0.0.0: `continuum --version` and libp2p's agent version said 1.0.0 of every build. 0.0.1 is the release to come; adding Cargo.lock. The --version example in operations.md says so too.
* federation.md: a checkpoint after every version by default, forks followed ↵tv2 days1-5/+7
| | | | | | | | | | | | by k of m Two places the text lagged behind: a node voting by itself proposes a checkpoint after every version that changes more than moving to one, unless its operator says otherwise, where the text had it after so many versions as its operator sets; and Roads not taken turned down a node following a party's word on which fork it went to, while the attack table now names following where k of m parties went as not yet built: it says that a single party's word is what was turned down.
* federation.md: what the attack table's answers lack yet, and what won't cometv2 days1-8/+21
| | | | | | | | | | | | | | | | | | | | | | Reviewers read the design, not the plans kept apart from it. The attack table says now, where a row's answer isn't the best there could be, what would answer it better and isn't built (*Not yet*): * voting twice (12): nodes keeping the two votes, and forks announced in the swarm, followed where k of m named parties go; * parties that never vote (18): parties that write and don't vote; * a stolen key a version names (23): keys for some acts only, and acts taking two of a party's keys; * one first version, two federations (37): a salt in the first version; * joining from the root (63): a join asking its operator every time, not a restart; * a party named into another's zone (72): names of one label; * writing without bound (73): limits the parties set, perhaps per rule; * a followed party's key, stolen (78): following k of m; * more than 96 parties (79): votes gathered beneath the version event. Roads not taken says why a `true` isn't taken back, nor moved once its proposal is far short, and why no event says a party would back one.
* docs: purges in rounds, a version's size, a thief asking, one spellingtv2 days3-2/+21
| | | | | | | | | | | | | | | | | What the docs left unsaid, each with a row of the attack table: * two thirds are of the current version's parties, so taking parties out in rounds leaves fewer to decide: of nine, four alone after two rounds; those taken out fork (row 75); * a version is one event, its parties and rules with it, within 256 KiB: a federation giving each name a rule of its own holds a few thousand names (federation.md, the rules guide); * a thief holding a key a version names can ask for the party's keys to be named anew as well as the party, and the others tell them apart by other means than the key (row 76, the keys guide); * rules match spellings, so `7` and `07` are two places, which two rules may give to two parties; the application takes one spelling of each (row 77, the rules guide).
* vote: a second `true` builds on the nays that freed its partytv2 days6-20/+128
| | | | | | | | | | | | | | | | | | | | | | | The federation takes a party's `true` only where, at its history, every other proposal it backed on that version is dead. A party's client, and a node voting by itself, built a vote on the events proposing what it votes on alone. A proposal made while the party's first `true` was alive, at a history holding it, holds that `true` in its history, and not the nays that ended the first proposal later: the party's `true` on it was refused, though its record cast it. The compromise case: five back X, Y is proposed, X dies, its backers back Y. A vote now builds on one event proposing what it votes on, and on the nays that freed its party (`client::building`), so the first proposal is dead at its history too. One event proposing it is enough, so many proposing it again don't push a vote past the dependencies an event may name. A checkpoint's vote builds on its proposal alone: one of those nays in the history of its heads, named, would put the vote beside them. A party freed only after the heads were named backs that checkpoint not, and its client says so before casting; it backs one proposed after. Row 74 is tested (`federation_attack_74`); federation.md and the guides say so.
* config: store-propose-versions is 1 unless set, in the settings tootv2 days2-2/+8
| | | | | | | | The option's help said 1 unless set, but the setting itself stayed unset, so a node proposed no checkpoint after a version unless told, and `options_and_settings_agree` failed: `default of store-propose-versions`, 1 against null. The setting is a count now, 1 unless set, and 0 has the node propose none after versions.
* docs: how large checkpoints grow, joining before the first, counting supporttv2 days4-2/+58
| | | | | | | | | | | | | | | | | | | | What the docs left unsaid: * A checkpoint names every event that counts, 32 bytes each, and has no size limit, unlike an event; nothing bounds what a party writes where its rules let it, so every node, snapshot and fork's root holds as much as it writes. A party writing more than the others will hold is taken out by a version, or the others fork. Row 73 says so, and the rules guide. * Before the first checkpoint passed, a node joins from the root and nobody pins anything: a chain of old keys needs keys a version replaced, and a node voting by itself proposes a checkpoint after every version that changes more; until that passes, a joining node takes the first of two versions it judges, as row 63 has it. * A `true` binds; what binds nobody is said outside the votes. The voting guide shows how parties count their support first by plain writes, at a place a rule gives each (`intents/{party}/**`), read at `values` in GET /events/counts.
* continuum-party: which places a proposal gives another writertv2 days8-10/+109
| | | | | | | | | | | | | | | Rules go by first match, and `{party}` matches only the names of the version's parties: admitting a party named as a segment of a place, or changing the rules or their order, moves who writes the places below it, and what their writer wrote there counts no more once the version passes. Nothing said so: a proposal showed only its fields' changes. `client::writers` names, of the places holding a value, those whose writer a version changes, as `place: before -> after` (`nobody` where no rule gives it one). `continuum-party proposals` prints them under each proposal's changes (`who writes …`), and a fork's check does for the fork's version (`writers` in POST /events/fork). The guides and federation.md say so; row 72 is tested (`federation_attack_72`).
* fork: a fork's check says what its version changes, rules among ittv2 days6-16/+61
| | | | | | | | | | | | | | | A node holding the history up to a fork's heads said whether it builds the root, what it holds that those heads lack, and which parties' keys the fork's version gives otherwise. A founder could change the rules, or only their order, which says who writes where, and nobody joining was shown it. The check now says what the fork's version changes of the version current at those heads, a line each as a proposal's are shown (`client::changes`): `changes` in POST /events/fork, and `continuum-party check` prints them. federation.md and the forking guide say so, and that a fork's ID is compared whole: a founder trying versions can steer its first few digits.
* vote: a checkpoint after every version that changes more, unless told otherwisetv2 days6-18/+15
| | | | | | | | | | | | | | | After a close vote, one key voting twice passes a rival version at a history from before the version that followed, the votes cast before counting with its own, any time until a checkpoint above that version: nodes that took the version refuse it, but one lagging behind, or joining from the root, may take it. A node voting by itself proposed a checkpoint after a version only where its operator set `--store-propose-versions`; now it does unless told otherwise (1 unless set; 0 never so). Versions that change more than moving to a checkpoint are rare, so the cost is a checkpoint each. A default set, store-propose-versions no longer asks for store-vote-key, as store-held-for and store-back-after don't.
* vote: the version that moved the store counts not toward the next checkpointtv2 days6-18/+41
| | | | | | | | | | | | | `--store-propose-versions` counted the versions since the checkpoint's version, the one current at its heads. The version that moved the store there is written after its heads, so it counted: with 1, a node proposed a checkpoint again as soon as it backed one (`--store-back-after` after the move), and the next one, and so on, every ten minutes for good. It counts the versions written since that change more than moving to a checkpoint now (`State::changed_since_checkpoint`): with 1, one checkpoint after every other version, and none after a checkpoint. The test goes on past the move.
* federation.md: a client builds on the heads it holds, a proposal or nottv2 days1-4/+5
| | | | | | | | | | | | | federation.md said a client writing once a checkpoint is proposed builds only on what is above its heads. No client does: a party's client builds on the heads its node shows, and a node voting by itself on its own, whatever is proposed. Doing so would let any proposal, which costs one signature and binds nobody, steer where honest clients build: heads that never pass, or two proposals beside each other that can't both be obeyed. A proposer names the heads it holds as it proposes, so what is written after is above them unless built on an event beside them: written as it proposed, or on old history; the move refuses that, and its party's client signs it again.
* peers: what each peer said it speaks and knows, in GET /peerstv2 days6-50/+111
| | | | | | | | | | | | | | | | GET /peers shows, of each peer, what it said with its handshakes (SPEAKS): its `knows`, the wire versions it speaks, the oldest and the newest, and the newest revision of the federation it knows; null where it said nothing, a build from before SPEAKS or no handshake from it since the node started. `localKnows` is the node's own. So every swarm, federated or not, shows which builds its nodes run, as far as each heard. `swarm::speaking::shown` shapes it, for GET /events/counts too, whose `knows` is the same; docs/openapi.yaml has it once, as `Knows`. Without the federation feature, a revision reads as one this continuum doesn't know. `Speaking::of` is now used in every build, not only federated ones, which warned of it as dead code.
* release: --version says what decides which builds work togethertv2 days6-0/+88
| | | | | | | | | | | | | | | | `continuum --version` and `continuum-party --version` say, after the release, the wire versions the build speaks, the federation and the revisions of it it knows (with the `federation` feature), and the Automerge version it makes documents with: continuum 1.0.0 wire versions 52 to 52 federation 1: the base revision, revision 1 (merge-events) automerge 0.12.0 `-V` says the release alone, as before; continuum-party had no version at all. The Automerge version is the one the crate itself reports (`document::engine_version`), so it follows Cargo.lock.
* docs: what a release's version says of upgrading to ittv2 days3-14/+35
| | | | | | | | | | | | | | | | | | | A release is tagged v<version>, and its version says, from the operator's side, how to upgrade to it from the release before: a patch one node at a time, fixes only (a fix to what the federation judges comes as a revision); a minor one node at a time still, adding to the API or bringing a revision the parties then pass; a major one every node close together, a flag day: no wire version both releases speak, a document, change or snapshot built otherwise, files the node can't restart with, the API or continuum-party changed other than by adding, or a new federation. Before 1.0.0 any release may be a flag day, and its tag's message says whether it is. operations.md and the federation's upgrades guide say so; a node speaking one wire version, every change of the format is a major release. architecture.md said wire formats grow by appending so that a swarm upgrades node by node, which no build does: every change bumps the version, and builds tell each other apart instead.
* federation: which nodes know a revision, in counts and before a `true`tv2 days10-25/+260
| | | | | | | | | | | | | | | | | | `GET /events/counts` says, of each node a party lists, what it said it speaks and knows (`knows`, by node ID): the wire versions, the oldest and the newest, and the newest revision of the federation it knows, by number and ID and as people read it, its number null where this continuum doesn't know it; null where it said nothing, a build from before SPEAKS or one the node didn't hear from; the node's own as it is. So the nodes still to upgrade before a revision passes show, every party's, where before a party's operators could check only their own. A party's client, backing a proposal that moves to another revision, warns of every node of any party not known to know it, a line a party naming each and what it said: once it passes, those stop at it till upgraded. `next` warns alike, of the revision it moves to, or of the later one it suggests. A warning, not a refusal: what a node heard is no proof, and a node not heard from may well be upgraded.
* transport: SPEAKS, which wire versions a node speaks and what it knowstv2 days13-13/+182
| | | | | | | | | | | | | | | | | | | | | | | Before each HELLO and each HELLO_REPLY, a node sends SPEAKS: the oldest and the newest wire version it speaks, and the ID of the newest revision of the federation it knows. It stands outside the wire versions, its first byte 0, which no version is, laid out as no build changes: that byte, the oldest, the newest, then 32 bytes of the revision's ID where there is one; a reader takes those and leaves whatever follows, which a later build may add. So a peer on another build reads it too, and nodes on different builds can say what they run, which a rollout needs. A build from before it takes it for a message of another wire version and logs that once of the peer (version=0), reading the rest of the peer's messages as before: SPEAKS rolls out node by node, with no change of VERSION. The node keeps what each peer said last (`swarm::speaking`, at most 4096 peers). It counts as `hello` traffic. `OLDEST`, the oldest version this build reads, is `VERSION` for now: a range for a later build to widen. operations.md also says what is so of the other-version warning now: every transport logs it once per peer at warn, not Mycelium alone.
* federation: checked against the release a federation-<F>.<R> tag namesfederation-1.1tv3 days6-337/+167
| | | | | | | | | | | | | | | | | | | A corpus of generated histories, committed, said what this code made of them, right or not, and held hundreds of kilobytes a revision; generated from code that changes, it could only be checked, never written again. Each release that makes a revision is tagged `federation-<F>.<R>`, the federation's number and the revision's (`federation-1.1`, revision 1 of federation 1). `scripts/federation-check` writes histories from this tree (`write_histories`, an ignored test): of each revision it knows and each kind the properties generate, those of a few seeds from a random one it says, and the attack tests' crafted ones, as each test offered them where nothing but offers made them. It judges them with `continuum-party judge` here and with the continuum the latest such tag names (or one given), built in a worktree and kept between runs, leaves out those whose root the tagged one reads as none, and says where the two differ. Run before a release, not by `cargo quick`. The corpus and its test are gone; the test plan and `federation.md` say how a release is checked.
* attacks: the histories they offer, recorded while asked totv3 days1-20/+159
| | | | | | | | | | | The attack rows' tests craft histories and assert what the design says becomes of each event: worth judging by later releases too, as they were judged when the tests passed. Their stores are made and offered through the harness (`Fed::new`, `Fed::offer`), and while `recording` runs a test, each of them is recorded: its root, the events offered in order, and whether nothing but offers made it what it became (an operator's drop doesn't). A test that fails records nothing. `TESTS` names every attack test, which a test checks against the file.
* federation: continuum-party judge, a store's verdicts in a format releases keeptv3 days3-0/+205
| | | | | | | | | | | | | | To check that a release judges histories as an earlier one did, under every revision that one knows, each must say what its store makes of the same histories, in the same words. `continuum-party judge` reads histories from its input, each `case <label>`, `root <hex>` and `event <hex>` for each event in the order offered, and prints for each what became of every event by kind (`became <ID> <kind>`, never a refusal's words) and what the store reads after (`reads <JSON>`): its checkpoint, the current version, the values at places, the members, and the event it stopped at; `root none` where the root reads as none, as one of a revision this continuum doesn't know (`federation::judge`). The format is never to change: an earlier release prints it too.
* properties: votes mostly on the earliest proposal, a stop sought past the casestv3 days1-39/+85
| | | | | | | | | | | | | `the_store_judges_and_reads_as_the_model` asks that some history stop a store, where two thirds pass a version this continuum doesn't read. Merge events in the generator shifted every seeded history, and of the 64 cases with such versions none stopped; the corpus's scan found stopping seeds only past them (279, 314, 330 and others). Of the proposals a party knows, it now votes on, and writes the version event of, the earliest on the version current where it writes more often than not, so that parties vote alike and versions pass. And where none of the cases stopped a store, the test scans later seeds of those kinds till one does, up to 1000, and checks it too: a stop is checked whatever the generator's luck.