aboutsummaryrefslogtreecommitdiffstats
path: root/docs/federation-tests.md
Commit message (Collapse)AuthorAgeFilesLines
* federation: checked against the release a federation-<F>.<R> tag namesfederation-1.1tv9 hours1-16/+22
| | | | | | | | | | | | | | | | | | | 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.
* corpus: cases chosen by what they show, merges by nodes their party liststv17 hours1-3/+7
| | | | | | | | | | | | | | The corpora written from four seeds of each kind showed little: of 32 histories, 4 versions written, no move and no stop, and every merge event refused, as the generator signed them with any of ten node keys, so the corpus of revision 1 judged as the base revision's did. A generated merge event is signed by a node its party lists there, more often than not. Of each kind, the corpus keeps the histories of the first two seeds, and of the next 400 those showing what the ones kept don't (`shows`: of each kind of event, what became of one; a version written, a move, a stop), eight at most. The check asks that together a revision's cases show a version written, a move to a checkpoint, a stop, and a merge event taken where the revision has merge events, else refused.
* federation: a corpus per revision, judged alike by every later continuumtv17 hours1-3/+16
| | | | | | | | | | | | | | | | Nothing checked that judging under a revision stays what it was: a change to the fold that alters what an earlier revision takes, refuses or reads parts nodes running it from nodes that don't, and the tests regenerate their expectations with the code. For each revision this continuum knows, a file in `src/federation/corpus/` holds histories generated at that revision, of every kind the properties generate, each event's bytes with what became of it, by kind and never by a refusal's words, and what the store reads after; its first line names the revision by its ID. It is written once, as the revision is made (`write_the_corpus`, an ignored test run by hand), and never edited after; every later continuum judges it alike (`every_revision_judges_as_its_corpus_says`), which fails where a revision has no corpus yet, saying how to write it. The test plan describes it.
* federation: merge events, the first revisiontv17 hours1-2/+3
| | | | | | | | | | | | | | | | | | What builds on many heads merges them, but only an event a party writes: in a quiet federation, heads beside each other stay so, and past 64 no event is above them all. Revision 1 (`merge-events`) adds merge events: `{"merge": true}`, signed with a node's own key, the `key` its Ed25519 key, for the party whose node list names it. One counts for nothing, and only gathers what it builds on into the history of what builds on it. Under the base revision, signed by a node its party doesn't list, or by a party's key, it is refused; the model alike. Generated federations begin at either revision, and their nodes merge. A node voting by itself backs no version changing the revision, on any version neither: its party's operators vote on that one, once their nodes run a continuum that knows it. `federation.md` lists the revisions, says what a merge event is, and row 71 is tested (`federation_attack_71`).
* model: stops at a version it doesn't readtv25 hours1-5/+6
| | | | | | | | | | | | | The model stops where `federation.md` says a node does: at a version event whose proposal passed at its history, isn't a version as this continuum reads it, and changes the version the model reads, it takes and refuses nothing more (`Verdict::Stopped`); beside that version, such an event is refused, as the node refuses it of its own. The property checking the store against the model runs on histories where parties propose such versions too (a field this continuum doesn't know): written in order, events come after what they build on, so both must stop at the same event, having taken the same before it, the adversary's two versions changing one among them. A check that some history stopped keeps the property from passing vacuously.
* docs: references to another document's section linked to ittv33 hours1-2/+2
| | | | | | | | Where a document names a section of another after linking to it ("([`store.md`](store.md), Pinned checkpoints)"), the name links to that section too, by the id both GitHub and cgit's about filter give its heading; paragraphs that grew past the width are wrapped anew, links and code kept on one line each.
* docs: references to a section of the same document linked to ittv33 hours1-6/+6
| | | | | | | | Where a document names one of its own sections in parentheses ("(What counts, 5)", "(Joining, below)"), the name links to the section by its GitHub-style ID; paragraphs that grew past the width are wrapped anew, links and code kept on one line each. References to another document's sections stay as they are.
* keys: signing through an ssh-agent tested wherever tests runtv34 hours1-1/+1
| | | | | | The test fails without OpenSSH on the machine testing, rather than passing without asking anything. Its directory is a scratch directory, removed when the test ends, the agent stopped before it.
* federation.md, federation-tests.md: ecdsa-sha2-nistp256 keys, their ↵slopulus2 days1-2/+5
| | | | | | | | signature low-S A key is `ssh-ed25519` or `ecdsa-sha2-nistp256`, spelled alike; an ECDSA signature is over SHA-256, its `s` low and `r` and `s` SSH's shortest mpints, so that it is spelled one way. The vectors and the agent test, among the harness's.
* federation.md, federation-tests.md: the stages end with remakesdesigns/federation-1-stage-5tv2 days1-1/+0
| | | | | | What a federation is used for is read and written through a node's API: kartei's entries are signed in by their parties and read from what counts there, with no stage of their own.
* docs: the federation's test plan, built to stage 5tv3 days1-5/+5
|
* docs: the vectors of the changes founding a swarm are fixedtv3 days1-5/+5
|
* docs: the forks' tests are built, but for the genesis changes' vectorstv3 days1-2/+2
|
* docs: the store's tests on Automerge are built, but for the genesis changes' ↵tv3 days1-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: the federation's fold is builtdesigns/federation-1-stage-2tv3 days1-5/+5
| | | | | 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 sizestv3 days1-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.
* federation: voters back checkpoint heads that leave out nothing they held ↵tv3 days1-1/+1
| | | | | | | | | | | | | | | | 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 mergestv3 days1-12/+10
| | | | | | | | | | | | | 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 builttv3 days1-2/+2
| | | | | 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.
* docs/federation-tests: one document for honest nodestv3 days1-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-tests: how the store and the federation are testedtv3 days1-0/+149
A plan, the contract the code is built to: the fold and the store tested as pure code, events in and verdicts and states out; a model written plainly from the design, which the store is checked against; every rule by its smallest scenarios; every attack row a test named by its table and number, and a test that every row has one; the promises as properties over generated histories, every order for small ones and seeded ones beyond, cut down before they are printed; the store on Automerge checked against the store in memory; simulations with an adversary node; fixed vectors for every encoding; fuzzing and mutants in longer runs. All of it behind the `federation` feature, by stage.