| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
backs
`--store-nay-beside`, for a node voting by itself: where its party backs a proposal on
the current version that can still pass, by its record or by what it votes now, it
votes `false` on every other proposal there that only moves to a checkpoint and can
still pass, once. So, of two checkpoints proposed at once, the one it doesn't back
dies, and its backers are free (`docs/federation.md`, Votes a node casts by itself).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A node may vote and propose for its party by itself, by its operator's rules
(`docs/federation.md`, Votes a node casts by itself; `federation::vote`):
* `--store-vote-key`: the party's key it signs with, an OpenSSH private key file, one
the party's version names, kept on the node;
* `--store-vote-record`: its party's one record of its votes, which it votes by, written
before each vote is sent, begun where there is none on the version current then;
* `--store-follow`, `--store-follow-any`: the parties it follows, by default only on a
version that only moves to a checkpoint;
* `--store-propose-events`, `--store-propose-every`: when it proposes a checkpoint, once
it holds so many events beyond its checkpoint, or so long after its store moved there;
* `--store-held-for` (10 minutes): how long it holds an event before it holds it for a
while, for the heads it proposes and the voters' rule.
Its store keeps when, by the node's own clock, it took each event, and when it moved to
its checkpoint. Whenever the worker reads the store, the node decides what to sign
(`Holding::act`), records it, writes the record, offers it to its store, and puts it
into the document (`held::write`). A vote by hand through the node, by the record and
the voters' rule, is `Holding::vote_by_hand`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
Everything the node is moves from the binary into a library (`src/lib.rs`), so that
other binaries can use it: a party's client of a federation next. The node's binary
(`src/main.rs`) runs it (`continuum::run`), which wires things together as `main` did.
The library's doc comments are prose, not examples to test (`doctest = false`); its
tests are the library's, as `cargo quick` and `cargo sim` run them.
|