| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 `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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
|
|
|
| |
One check (`client::backable`) decides what a party's client proposes and
what it votes `true` on: a version, changing the current one as a version
must, whose checkpoint, where it names one, names none of the heads of
the current version's checkpoint, as a version naming those again is
never written. A proposal nobody may back is refused before it is
signed, saying why.
|
| |
|
|
|
|
|
|
|
|
| |
`keys` and `nodes` alone (`--list`) show the party's key set or node
list as it counts at the node, one a line, without a key. `--set` writes
it whole, none twice, in place of the arguments that did; `--add` and
`--remove` change it as it counts. A set or list left empty, whichever
way (`--set` with none, `--remove` of the last), is written with
`--force` only: none of the party's writes count without keys, nor its
nodes as members without a list.
|
| |
|
|
|
|
| |
A vote or a proposal is signed with a key the current version names for
the party, as a key set and a node list are: the client checks it before
it signs, and records nothing where the key isn't one.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
`keys` and `nodes` write the party's key set or node list whole, or, with
`--add` and `--remove`, the set or list as it counts at the node with
those added or taken off, each of which must change it; the client says
what it writes. Node IDs are checked as the federation spells them.
A set or list is signed with a key the current version names for the
party: the client checks that first, and where it isn't one, or the
party is none of the version, says that only a version naming the
party's keys or list anew changes them, which a party proposes and the
parties pass.
|
| |
|
|
|
| |
`propose` says the proposal's hash, the version's, which `vote` takes;
with `--yes`, it votes `true` on it too, by the record, as `vote` does.
|
| |
|
|
|
|
| |
The client proposes a version only where it changes the current one as a
version must (its number, the hash it names, each `since`), and says why
it doesn't otherwise: no other can pass.
|
| |
|
|
|
|
|
| |
`next` prints the current version numbered on, naming its hash as the
version it changes, and without the checkpoint it names, whose heads are
behind: what a party changes and proposes. The guides begin a version
with it.
|
| |
|
|
|
| |
The client signs one event at a time and does nothing else meanwhile,
and an agent may wait for its user as long as that takes.
|
| |
|
|
|
|
|
|
|
| |
`--key` gives a public key itself, an `authorized_keys` line, as well as
a file of them: of a file of several, the first signs, with a warning
naming it, and another is given itself to sign with it. An agent that
doesn't hold the key given signs nothing, and the client stops before it
records or puts what it would have signed, saying which key it asked
for.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
A key held in hardware is never a file: only an ssh-agent signs with it. Given a public
key as `--key` (a `.pub` file, `ssh-ed25519` or `ecdsa-sha2-nistp256`), the client asks
the agent at `SSH_AUTH_SOCK` to sign what SSHSIG signs (a sign request with the key's
blob, no flags) and writes the blob around the agent's signature as `ssh-keygen -Y sign`
does. An ECDSA signature the agent gives with a high `s` is made low, the other of its
two spellings, which the federation takes. What it makes is checked before it is used.
A private key file signs as it did.
A test starts `ssh-agent`, adds an ECDSA and an Ed25519 key to it and deletes their
files, signs through it, and has both continuum and `ssh-keygen -Y verify` check each
signature, one of an agent's high-S answers among them. Without OpenSSH it asks nothing.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A party's keys may be held where no file has them, in a Secure Enclave or a phone, and
those are ECDSA keys on NIST P-256. Everywhere a party's key counts (a version's keys, a
key set, the key an event is signed with) such a key is taken beside an Ed25519 one,
spelled as `ssh-keygen` writes it, without a comment: `ecdsa-sha2-nistp256`, a space,
and the base64 of its SSH encoding, its point uncompressed and on the curve.
Its signature is SSHSIG as an Ed25519 one is, hashed with `sha512`, its inner signature
over SHA-256 as SSH signs with such a key. ECDSA signatures are malleable: of `s` and
the curve's order less `s`, both check. So the federation takes one spelling alone: `s`
low, at most half the order, `r` and `s` each SSH's shortest mpint, and the blob reading
back to itself as an Ed25519 one does. What anyone makes of a party's signature is then
none, as before.
The vectors are a key `ssh-keygen -t ecdsa -b 256` made, a first version naming it, and
a write and a key set `ssh-keygen -Y sign` signed with it, each taken; the signature's
high-S twin, which checks as ECDSA, and its `r` spelled longer are none. Ed25519 keys and
signatures are spelled and checked as they were.
|
| |
|
|
|
|
|
|
|
| |
`continuum-party` takes its options (`node`, `token`, `key`, `record`:
`config::PARTY_OPTIONS`) on the command line and in configuration files of the node's
format: `--config`, repeatable, arguments winning, `--unset`, includes and imports. The
configuration's loader takes the options it reads as a table (`config::with_options`,
`config::merged`, `file::load_with`), the node's or the client's, and a key naming
none of them is an error in either; `node` and `token` are secrets, never logged.
|
| |
|
|
|
|
|
|
| |
`continuum-party proposals` lists the proposals on the current version at the node,
each with whether it passed or is dead and the parties voting `true` and `false`, as
`GET /events/counts` names them, and what its version changes of the current one, read
from an event proposing it, its signature checked: each field whose value differs, and
of `keys` and `nodes` each party's (`client::changes`).
|
| |
|
|
|
|
| |
The federation spells a key without a comment, so a key set holding a line's comment is
none. `continuum-party keys` takes each key as an `authorized_keys` line, one argument
each, and writes it as the federation spells it.
|
| |
|
|
|
|
|
|
|
|
| |
A record casts nothing on the version current when it began, as a `true` sent before
may be held back somewhere. A federation's first version is current from its start, so
a record begun at a node casts nothing on it, and with every party's begun so, no
proposal on it can pass. `continuum-party init PARTY --root FILE` begins a record from
the file the store's swarm starts from, for a party that never voted in it
(`Record::before`): nothing was sent before it, and it casts on every version, the
first too. A node voting by itself takes such a record as its `--store-vote-record`.
|
| |
|
|
|
|
|
|
|
|
| |
A node voting by itself, and a party's client, signed a vote on the heads
the node held: where those held what is beside a checkpoint's heads (a
party's writes made while the swarm was parted, say), the vote wasn't above
them, and a version event written on it was refused, so the checkpoint
never moved, though it passed. Both now vote on the events proposing what
they vote on, and a node proposes a checkpoint on the heads it names: so
their votes are above those heads wherever the proposal is.
|
| |
|
|
|
|
|
|
| |
`root FILE`: the root of the federation whose first version the file holds, as the
file its founders start its swarm from (`--store-root`). `fork FILE HEAD...`: the root
of the fork at those heads by the version the file holds, with the events it keeps, as
a node holding the federation builds it (`POST /admin/events/fork`). `check FILE`: what
a node finds of the fork whose root the file holds (`POST /events/fork`).
|
| |
|
|
|
|
|
| |
A party that has a node vote by itself votes by hand only through that node:
`continuum-party vote PROPOSAL yes|no --through` asks the node to cast it
(`POST /admin/events/vote`), by the record the node keeps, without a key or record of
the client's own.
|
|
|
A second binary, behind the `federation` feature: a party's client, which signs its
party's events with one of its keys (`--key`, an OpenSSH private key file), puts them
through a node's API (`--node`, its user and password in the URL, or `--token`), and
keeps its party's record (`--record`), by which it votes, written before a vote is
sent (`federation::party`, run by `continuum::party`):
* `init PARTY` begins a record of `PARTY` on the version current now;
* `write PATH VALUE`, `keys KEY...`, `nodes NODE...` and `propose FILE` sign events on
the node's heads, recorded, and put;
* `vote PROPOSAL yes|no` votes on the proposal of that hash on the current version, by
the record: with a `true`, the votes on its party's earlier proposal, from the node,
checked, kept as the nays that freed it;
* `again` signs again, of the latest event it signed at each place, its key set and its
node list, what the node refuses as not above its checkpoint's heads, or as built on
one it refuses;
* `twice RECORD...` names, from the records of parties' clients, a party that voted
twice.
The feature brings reqwest along, the client's HTTP.
|