| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
On a federated node, every user its htpasswd or proxy lets in may do
everything: put events, have it drop what it took, vote through it with
its party's key, make fork roots, read the document. An application or
someone watching needn't act for the node.
`--store-readers USER,...` names users who read the federation and do
nothing else (`api::access::federated`, before the registry's checks):
GET and HEAD of the events API (/events and below), checking a fork
(POST /events/fork), and keeping a session (whoami, refresh, logout);
anything else is 403, saying so. Its other users are its operators, as
all were: a node setting nothing changes nothing.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A hand-written completion, where distributions package it:
share/bash-completion/completions/continuum-party, read by
bash-completion when first needed (it uses _init_completion and
_filedir where they are, plain compgen else).
It completes the commands, the intents of `propose` and `fork` (`fork`
without `checkpoint`, with `proposal`), the options of each, files where
one is taken, `--federation` from ~/.config/continuum/federations (or
$XDG_CONFIG_HOME's), and `--revision` and `propose revision` from the
features `--version` names. From the node, asked with the options given
before the command: the proposals on the current version by hash
(`proposals`), for vote, show and fork proposal; the parties (`status`),
for remove, give, keys and nodes; and the places holding a value
(`values`), for write and values.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
| |
The founders name each node by its ID in the first version, before the
federation starts; getting it meant starting a node once with
--node-key-create and reading its log. `continuum node-id FILE` prints
the node ID of the key FILE holds and exits, `--create` making the key
there first where there is none (saying so on standard error). Logs are
off for it, as for --print-config: the ID goes to standard output alone.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Four nodes on this host over libp2p on loopback, two of a release tag's
build and two of this tree's, in turns, each seeded with the one before.
Where the two builds' wire versions meet, each node writes, and the
check is that every node reads what each wrote and that none logs a
peer of another wire version. Where they don't, that the tag's nodes
log this tree's as such, so their operators know to upgrade.
scripts/release runs it against the last release, after saying from
the two builds' --version how the release upgrades: so a release that
says it rolls out node by node has been seen to.
docs/development.md says how a change to the wire format is made: a new
version beside the ones spoken already, the older kept frozen.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A build speaks wire versions OLDEST to VERSION and writes each node the
newest both speak (wire::choose), as the node's SPEAKS says; the oldest
until it says. The identity layer keeps that per address (Book::speaks):
a SPEAKS from an address sets it for the address, and for every address
of the node proven there, and a new address of a node takes it over.
Paths encodes each message for an address in its version
(Transport::encode_in; Transport::encode is the newest).
So that two nodes know what the other speaks once they have proven
themselves to each other, before any other message goes between them, a
SPEAKS goes ahead of every WHO and ME, and WHO and ME are read in every
version from 52 on (wire::PROOFS): their tags and layout never change.
Without that, a node whose oldest version is past the other's couldn't
read its proofs, and the two would never get to the handshake that says
what each speaks. A SPEAKS naming no version this build speaks is logged
as a message of another version is, naming the node to upgrade, the
versions as ranges.
A 0.0.1 node takes a SPEAKS from an address not yet proven for any other
message from there: it drops it, and asks WHO.
This build speaks 52 alone, so nothing it sends changes but the SPEAKS
ahead of the proofs. A release adding a version encodes and decodes the
older ones from their own, frozen, types.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Releases were made by hand: a commit, a tag, and whatever one remembered
to check. `scripts/release [--dry-run] X.Y.Z` makes one:
1. the tree clean, notes under Unreleased in CHANGELOG.md, the version
later than the last v* tag's;
2. the version set in Cargo.toml and Cargo.lock (and the --version
example in operations.md), then `cargo quick`, `cargo sim` and
scripts/federation-check, stopping at the first that fails and
leaving the tree as it was;
3. this build's `continuum --version` against the last release's,
built in a cache of its own: node by node where their wire versions
meet and Automerge is the same, every node together where they don't
share one, which from 1.0.0 on it refuses but in a major release;
Automerge changed, no remake until every node runs it;
4. the Unreleased notes become the release's, headed by what it found;
the commit `release X.Y.Z`, tagged vX.Y.Z with that, what the build
speaks and knows, and the notes; and federation-<F>.<R> too where the
build knows a later revision than the last release.
It pushes nothing. With --dry-run it checks and prints what it would
write. docs/development.md says how releases are made.
|
| |
|
|
|
|
|
|
|
|
| |
Nodes build remakes' snapshots and a federation's founding changes byte
for byte, as Automerge encodes them: a build with another Automerge
rejoins instead of switching, and could build another genesis change.
`automerge = "0.12"` let `cargo update`, or a distribution building
without the lock, take any 0.12.x. It names exactly 0.12.0 now, which
the lock holds already, so that moving it is a change made on purpose,
said in the change log.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
A node meeting messages of a wire version it doesn't speak logged
`Peer speaks another wire version (another build)`, with the versions
as fields only. It says now, in the message, which build is the newer
and which node to upgrade: this one, where the peer's is newer
(`upgrade this node to talk with it`), else the peer's
(`upgrade that node`), with the peer's version and the ones this build
speaks. Its fields are the peer's version and the oldest and newest this
build speaks.
|
|
|
From 0.0.1 on, notable changes are logged as they come, under
Unreleased until the next release, each with links to its docs and
code; fixes and internal work that change nothing anyone relies on are
left out. 0.0.1's entry says what the first release to keep it holds.
The README points to it.
|