aboutsummaryrefslogtreecommitdiffstats
path: root/src/federation/attacks.rs
Commit message (Collapse)AuthorAgeFilesLines
* simtest: a fork whose root doesn't read as its heads do, found by who holds themtv19 hours1-3/+2
| | | | | | | | | `federation_attack_33`: beside the fork a node holding the history makes, one whose root leaves out tv's write, which counts at its heads. b, holding the history, builds the one and not the other (`fork::check`). Each fork's founder starts its swarm from its root and the events it keeps, and a node of lass joins each by its ID, taking it on its operator's word, and reads what the root keeps: tv's write in the one, carried by the changes founding its swarm, nothing in the other.
* federation: a fork's root made, and checked by a node holding its historytv19 hours1-3/+45
| | | | | | | | | | `federation::fork`: a node holding a federation's history makes the root of a fork at heads it holds by a version, with the events the root keeps, as the file the fork's founders start its swarm from (`make`, `root_file`, which `--store-root` reads); and checks a fork's root it is given (`check`): whether it builds that root at its heads, byte for byte, what it holds that those heads lack, and, party by party, the keys the fork's version gives where they aren't those the party had there. The attack rows 35 and 36 have their tests.
* simtest: two checkpoints proposed at once, the one not backed dying by the naystv19 hours1-2/+2
| | | | | | | | `federation_attack_59`: a for tv and b for lass, apart, each propose a checkpoint once their stores took six events, and back it; c votes for makefu, following tv; each votes `false` on a checkpoint beside the one it backs (`--store-nay-beside`). a and b, together, vote `false` on each other's: the votes split. With c, tv's passes and every node moves there; lass's is dead by the nays of tv and makefu, which their records hold.
* federation: each attack table checked whole, its rows marked sim tootv19 hours1-42/+14
| | | | | | | | | One check of an attack table (`harness::every_row_has_its_test`), for the federation's and the store's: every row has its test among the sources of its kind, unit tests or the simulations (`simtest::holding`), but for the rows whose tests wait for later; a row marked `—` has none; no test names a row that isn't there, nor two tests one row. The rows waiting: forks, the remakes, flooding, what a node, a client or a tool does that isn't built yet, and a rule for two checkpoints proposed at once.
* federation: the tests' harness builds a federation's roottv20 hours1-16/+7
| | | | | `Spec::root`: the root whose first version a spec spells out, built in one place for the tests of the attacks, of the store read from a document, and the properties.
* federation: a test for each attack marked unittv25 hours1-0/+1182
Each row of `docs/federation.md`'s attacks marked unit that the fold and the store in memory answer has its test, named by its row (`federation_attack_12`), with events made for it by the harness: keys that aren't their party's, bytes that are none, events of another federation or a fork, writes where a party held or holds no place, key sets and keys stolen or dropped, votes cast twice, at once, split, or at a history from before, versions that are none or written again late, two versions changing one in every order, forks and roots, checkpoints, events not above their heads, and heads a version may not name. `every_row_marked_unit_has_its_test` reads the table and this file, and checks that every row marked unit has its test, or waits for a later stage (what a node, a party's client or a tool does, and what a node tells of a fork), and that no test names a row that isn't there.