| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A key a version names, stolen, could write its party's node list at a history from
before the version that named the party's keys anew: written under the version before,
it counted, as naming keys anew leaves a list's `since` alone, and beside the list the
party wrote under the new version the lower ID won. The thief signed a few, kept the
lowest, and did so again after every list the party wrote.
Of a party's key sets, and of its node lists, those written under the latest version now
come first, then what no other has in its history, then the lowest ID; the model alike.
A list the party writes under the version that replaced the key stays, as `federation.md`
says. Key sets were safe already, by their `since`; one rule serves both.
This changes what counts where two of a party's lists, written under different
versions, are beside each other: nodes read them alike only once all run it.
Row 69 is tested (`federation_attack_69`).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
`GET /events/counts` gives each proposal on the current version `none`: why a party's
client backs it not (`client::backable`), where it is no version as this node reads it,
none changing the current one, or one naming the heads of the current one's checkpoint;
else `null`. So a node shows that a proposal is none, and why, before it passes: one that
passes all the same is never written, or, no version here, the node stops at its version
event. The dashboard shows it with the proposal, and `continuum-party proposals` says it
by the federation the client knows.
Row 48's test checks what a node shows of the proposal.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Of two versions changing the one it reads, a node takes the first it judges, joining or
not, and reports the other: its operator chooses, by dropping and allowing. No rule
holds a joining node back until it has synced with every seed: it learns of the other
members as it syncs, and its seeds may go away.
federation.md drops the joining rule from Changing the policy, and says so in what
isn't promised and in row 63; the guides say what a joining node takes. Row 63 is
tested (`federation_attack_63`): from the root, either side first, the operator
switching sides; and pinned at a later checkpoint, the chain old keys grew never taken.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A version event writing a proposal passed on the version a node reads, which doesn't
read as a version there (of a later federation, using what a later continuum takes, or
none at all), the node can't judge: `Fold::stops`. The store stops at it: it takes
nothing and refuses nothing from then on, holding back whatever comes, that event first
(`Offered::Stopped`), and keeps none of it across a restart, where it stops there again.
One beside the version the node reads is refused of its own, as any other.
Its operator has it drop that event (`POST /admin/events/drop`), or one it builds on:
it is refused as dropped, or as built on what was, any version event writing that
version with it, kept in the store file; the node judges what it held back and goes on
under the version before. Allowed again, it stops there once more.
The node logs the stop and its end; `GET /events` names the event, why, and how many it
holds back (`stopped`); a put answers `stopped`, written into the document all the same;
a node voting by itself casts nothing while stopped. The test fold's eras tagged `new`
stop a store.
Row 39 is tested (`federation_attack_39`); of rows 9, 10 and 48, a node stops at the
version event.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
A fold may say what an event writes that others may write alike
(`Fold::writes`): of the federation, a version event's version. A node
whose operator has it drop such an event drops the taken events writing
the same with it, and refuses any writing it from then on, whoever wrote
it anew: of a version, it takes no other version event naming it and
writes none itself, though it holds the votes that passed it. The node
keeps what each dropped event writes in its store file, across restarts;
allowing one of them takes them all back.
Row 51 of the federation's attacks has its test, and waits no more.
|
| |
|
|
|
|
|
|
|
|
|
| |
The check that every attack row of the federation has its test looks
beside the code a row is about too: a node's (`held`), a party's client's
(`client`), and a node voting by itself (`vote`). Rows 45 (a version
written on the side a node doesn't read, refused as its own and reported
apart, the change that put it taken), 58 (a node following on
checkpoints only, unless its operator chose any version) and 65 (a
client keeping the nays that freed its `true`) have their tests there,
and wait no more.
|
| |
|
|
|
|
|
| |
Row 62 names an ECDSA signature's twins, `s` high (the order less `s`)
and `r` or `s` with zeros more in front, each none. Its test offers the
ECDSA vector's write with each (`keys::respelled`) to a store whose root
names that key, and has it take the write as it was signed.
|
| |
|
|
|
|
|
|
|
| |
`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::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.
|
| |
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
`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.
|
|
|
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.
|