| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`status` becomes the one place to look (party/status.rs): everything
about the federation at the node but the values, which `get` and
`values` read.
* the store: its ID, checkpoint, heads, what it took, its stop;
* the node: its party, whether it votes by itself, the revisions it knows;
* the version: number, hash, federation, revision, how many pass a change;
* every party: the keys its version names and its key set, --key's
marked, and its nodes, each with its name, how long ago the node heard
from it, and what it runs (wire versions, newest revision);
* every proposal on the current version: how it stands, who voted what
and who not yet, who proposed it and what it does (version_lines, as
`show` says it), what moving to its checkpoint refuses, why no client
backs it;
* what the node refused of its own;
* the party the client works as: its --key, its record held against the
node's votes, what `again` signs again;
* the warnings of what may keep votes away (cut_off).
It is built as one JSON object (`model`), which `--json` writes, its
`format` (FORMAT, 1) raised where it changes otherwise than by more
members; what people read is rendered from it (`render`), and may change
from release to release. On a terminal, in colour (Paint): true colour
where COLORTERM says so, 256 where TERM does, else the basic eight; none
with NO_COLOR, TERM=dumb, or off a terminal. What is fine is green, what
needs a look yellow, what is wrong red; headings and the shortest prefix
naming a proposal bold.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
`--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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An operator moving the federation to a revision had nothing to say which revisions a
node knows, nor which one the current version follows, and a hash where a name would do.
`GET /events` lists the revisions the node's continuum knows, each its number, its ID,
the feature it adds and what that adds, and as people read it ("revision 1
(merge-events)"); `GET /events/counts`, the current version's. `continuum-party next
--revision FEATURE` begins a version following the revision adding it, never an earlier
one than the current version's, and `next` says so where the node knows a later one.
`proposals` shows a change of revision as people read it, a revision this continuum
doesn't know so said. A client backs a version moving to a revision only where its node
knows it, and says why otherwise: once passed, a node that doesn't stops there.
The upgrades guide walks through moving to a revision: upgrade every node, propose, vote,
and what follows; the proposing guide lists `revision`, and the API's spec the rest.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A node proposed a checkpoint at the heads of what it held for a while: every event
written in that while, and every one built on an event beside those heads, as one party
writing now and then on something old makes them, was beside them, and refused once the
store moved. A voter whose while was shorter backed none, one whose while was longer
backed it and lost those.
It proposes at the heads its store holds, sorted: what was written before is in their
history, and only what is written while the vote takes its course may be beside them. It
proposes none where they are more than an event may name: under a revision with merge
events, it merges them first; otherwise, what is written after does. `--store-held-for`
keeps the voters' rule and how long a new proposal holds back a checkpoint.
`federation.md`, the guides and the options say so.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Past 64 heads, no event is above them all, and what is written builds on the earliest
64 alone: where nobody writes, heads apart stay apart, and a checkpoint naming them is
never written.
Under a revision with merge events, a node its party lists signs merge events with its
node key where its store holds more heads than an event may name, each on as many as it
may, the earliest taken first, until no more are left (`Holding::merge`). The worker does
so a random wait after the heads first were too many, as it puts again what the document
lacks, so that of the members few do at once.
`federation.md` says so under Nodes, and the guides say what a node writes by itself and
what its log says.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
What every node must agree on was named by the federation's number alone, and a change
that only took more kept it: a party could use it before every node ran it, and nodes
not upgraded refused what followed and parted from the others.
A version now names the revision it follows by its ID (`"revision": "<ID>"`), the
SHA-256 of the JCS list of the features it adds to the base revision federation 1 began
with (`federation::revision`); a version naming none follows the base revision, ECDSA
keys among it, so the versions written so far read as they did. A version names the base
revision only by leaving `revision` out, and a revision no earlier than the one of the
version it changes. A continuum that doesn't know a revision, another build's among
them, can't read a version naming it: it stops at a version event writing one, and says
which revision and what it knows. There are no revisions yet but the base revision.
`federation.md` says how a revision is rolled out, then passed, and what a later
continuum may leave out; the upgrades guide, and the one on a node stopped, alike.
|
| |
|
|
|
|
|
|
| |
A `true` holds its party until its proposal passes or is dead, and only other parties'
nays make it dead: where the parties yet to vote are too few, one of them staying quiet
binds the party on that version for good. The client says so before it casts such a
`true` (`client::binding`): where ending the proposal would take every party yet to vote,
or more, and those are a third of the parties or fewer.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The votes cast before count at a history from before too: a proposal that died, or a
rival, needs there only the votes it lacked, and after a close vote one key voting twice
is enough, at any time until a checkpoint above the version that followed. Nodes that
took that version refuse it; one lagging behind, or joining from the root, may take it.
`federation.md` said it took the keys of two thirds of the parties.
A node voting by itself proposes a checkpoint once so many versions were written since
its store's (`--store-propose-versions`), as the design lists: with 1, after every
version, so that what keys voting twice grow beside a version ends at a checkpoint above
it. `federation.md` says how little a rival version takes, row 20 too, and the guides the
option.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A node voting by itself proposes no checkpoint beside a proposal that holds it back, as
the checkpoint would lapse it, and a follower backs none so. A proposal held one back
where someone but its proposer backed it: two parties, or one and a stolen key, kept a
junk proposal alive, and no automatic checkpoint came while it lived, ending it taking
nays from more than a third each round. And one new, its proposer alone backing it, was
lapsed at once by a checkpoint its writes brought about.
A proposal that can still pass holds back now where a third of the parties back it,
someone but its proposer among them; or where it is new, held for less than a while
(`--store-held-for`), and its proposer has none older on the version: so it is heard
before a checkpoint lapses it, once a version for each proposer. Row 67 says so, and a
test of nine parties checks it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A node following a party (`--store-follow`) handed it more than the text said:
* it copied the party's `false`: one party's nay freed bound followers, and its `true`
shown to some and its `false` to the rest passed a checkpoint at one history and made it
dead at another. It copies the `true` alone now, on any version too;
* a checkpoint lapses every other proposal: the followed party ended any proposal it
disliked by passing one. A node follows a checkpoint only where no proposal that changes
more can still pass that someone but its proposer backs;
* nothing bounded how often the store moved, so fresh events could be left out of every
checkpoint; and a node just started held nothing for a while, so the voters' rule kept
nothing. A node backs, and proposes, a checkpoint only once its store held its
checkpoint, or ran, for a while (`--store-back-after`, ten minutes unless set), by itself
or by hand.
`federation.md` says what following hands over, and row 58 what a follower on any
version copies; the guides and the example say the rest.
|
| |
|
|
|
|
|
|
|
|
|
| |
No event is above more heads than it may name dependencies (64): a version naming more
for its checkpoint is never written. A node voting by itself proposed one at whatever
heads it held for a while, however many; it now proposes none past 64, as what is
written merges them, and a party's client backs none such (`client::backable`).
A version event names the votes passing a proposal, two thirds of its version's
parties: past 96 parties, more than an event may name. A version names at most 96 now
(`version::PARTIES`).
|
| |
|
|
|
|
|
|
|
|
|
| |
A party's client builds on the heads its node shows (`GET /events`), and a node on its
own heads; an event names at most 64 dependencies. With more heads than that, where many
write at once and nothing merges, every event built on them was none.
`Store::building_on` gives the heads, as many as an event may name
(`Fold::DEPENDENCIES`, the federation's 64), the earliest taken first, so that what is
written merges what stayed apart the longest; `GET /events` shows those, and a node
voting by itself builds on them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Anyone could propose a checkpoint's version again, by an event beside its heads. A node
voting by itself, and a party's client, built a vote on every event proposing what it
voted on, so every vote was beside the heads, and no version event written on them was
taken: the checkpoint could never move the store. And the voters' rule refused it once
that event was held for a while, as the heads left it out.
They vote on the events proposing it that are above the heads it names
(`State::proposing`), which `GET /events/counts` lists as `proposals`; where there are
none, `none` says so, the node casts nothing and the client says why. The voters' rule
leaves proposals and votes aside, as they lapse with the move.
Row 70 is tested (`federation_attack_70`).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`).
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
`Version::read` names what makes a version none: the field it lacks, or the one more it
has, that this continuum doesn't know (of the version, a party's keys or node list, a
rule), the federation it names beside the one this continuum knows, how many keys or
nodes a party has against how many it may, the node ID that is none, and of a key why it
is none (`keys::spelled`): its type, its point, or its spelling. A node that stops at a
version says so in `stopped` (`GET /events`) and its log; a party's client in what it
won't propose or back.
The guide to a node that stopped says what `why` tells.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A store that stopped can't tell which of what it holds back will be taken, nor which of
what waits: `Store::held_back` gives both, each after what it builds on. A node leaves
out none of it: it puts it again where its document lacks it (`Holding::lacking`), a
remake's snapshot holds it (`Holding::at_base`), and after a switch or a rejoin it puts
again what of it the document it left held (`Holding::left`). A remake while nodes are
stopped no longer drops what was put since the stop, nor the event they stopped at.
Tested: a node keeps what it holds back, what waited among it, through a snapshot, and a
store read anew from that stops there again; and a simulation: a swarm stopped at a
version compacts, a node away meanwhile rejoins and one started again with nothing reads
the new epoch, each stopping there, holding back what came after, until their operators
have them drop that event.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|