aboutsummaryrefslogtreecommitdiffstats
path: root/src/federation
Commit message (Collapse)AuthorAgeFilesLines
* federation: a node on a set begins anew from another checkpoint its operator ↵tv10 hours3-7/+98
| | | | | | | | | | | | | pins A pin counted only while the node had no file of its set, so a node behind for longer than the others keep what a checkpoint forgot, or one undoing a move, had to start without its file, and lost what it refused of its own and what its operator had it drop. The file now says which checkpoint was pinned when the set began: with another pinned, and not the one the store is at, the node gathers its set anew from that one, its store refusing what the one in the file refused. A node of both kinds makes its set of its document then, where it finds the pin.
* federation: a stopped node on a set passes on what it holds backtv16 hours3-13/+120
| | | | | | | | | A store that stopped at an event it can't judge holds back what comes after, and its set gave none of it to others: what was put through such a node reached nobody, and a restart lost it. The set now names what its store holds back among what it gives, passes it on at once as it does what it took, and keeps it in its file; once the store takes again, it gives of it what the store took, or refused of its own.
* A node of both kinds, for a swarm to move to sets by (--store-both)tv18 hours1-14/+64
| | | | | | | | | | | | | | | | | | | With store-document, store-both has the node hold its store in the Automerge document too, and sync with nodes of either kind: * it says to each peer the kind that peer holds, and passes its set on to those that hold sets (swarm::set::holds_a_set), the Automerge document to the others; * what its set takes of the document goes on to the peers on sets (Holding::unpassed), and what its set takes of them is put into the document, as events it lacks are (Holding::lacking); * its entry in the document is put as its entry in the set (swarm::set::mirror_entry), and it reads the members of both; * without the set's file yet, its set is made of the store as it reads it of its document, with what store-file kept of its own. A simulation: two nodes on the Automerge document, one on a set, one of both between them; an event put on either side reaches all four.
* swarm: a node says to each peer the kind that peer holds, of those it holdstv18 hours1-6/+27
| | | | | | | | | A node holds one kind of document, or, to come, its store in both (Holding::kinds, of_both). The kind a peer's handshakes say is kept with the peer, where the node holds it too, and is what the node says to it in turn; to a peer that said none yet, a node of more than one kind says each in turn, HELLO by HELLO, until one is answered. A node of one kind says and takes that one, as before.
* A node joins a swarm of sets with nothing but the store's IDtv20 hours2-11/+239
| | | | | | | | | | | | | Given store-id and store-document, no file yet and no root, or a checkpoint pinned (store-checkpoint), a node starts with nothing of its store (held::Begun::Start, passing::Start): it asks the members whose handshake it took for the checkpoint named by the store's ID, its root, or by the pin, then for the events that one keeps, each taken only as what its name says; begins its set from them; and is ready, catching up as any node behind. A set gives the checkpoint its store holds by its name (passing::Unit::Checkpoint). A simulation: a node given the ID alone joins two that hold a write.
* federation: what a set hands the node to read is as a store's documenttv21 hours1-4/+23
| | | | | | | | | Beside its members' entries, the policy of a swarm holding a store and the swarm's ID (Holding::entries): what reads a document for them reads the same of a node on a set. Tokens are checked against it (api::login): their issuer's entry is there, and a node takes none another issued, as the policy says; read of the empty Automerge document beside, every token was refused.
* A node of a swarm holding a store, on a set of events (--store-document)tv21 hours1-1/+63
| | | | | | | | | | | | | | | | | With store-root or store-id, store-document names the file of the store's own document, a set of events: the node holds its store there and nothing in the Automerge document, syncs with nodes holding a set and no others, and goes on from the file when started again. Without a file yet it begins from the root (StoreStart::set); joining by the ID alone needs a file. What a checkpoint forgot is kept for store-keeps-forgotten (30 days). The file stands for store-file, and no checkpoint is pinned. The set is written to its file where it changed, every five seconds with the store's worker and as the node stops (Holding::save), what a checkpoint forgot longer ago let go of first. Simulations: a node behind catches up; a node goes on from its file.
* swarm: a node whose store a set of events carriestv21 hours1-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | Such a node (Holding::carrying) holds an Automerge document with nothing in it, which nothing passes on, and its set is its document: * swarm::set passes the set on. Where it stands goes in the node's STATUSes as another kind's stamp, and a peer's is given to the set; what the set says besides goes as a SYNC's body; what the set took, of a peer or of the node itself, goes on to the node's other neighbours. What compares stamps for an Automerge document's sake is handed the node's own, and finds nothing to do; the Automerge sync isn't begun. * The node writes its own entry (AppState::mutate_set): what writes protocol data through a view writes to the members' entries as a tree, and what the node's own reads as after is put as its next entry, signed and passed on. Anything else is refused, and so is a write to an Automerge document as such. * An event the node writes (held::write) is offered to the set and passed on; a set lacks nothing of its store to put again. * The node's swarm is its store's, said at its start. A simulation: three such nodes of two parties register, and each holds the others' entries; events put on two of them reach all three, and they come to stand alike, the documents they hold beside empty.
* swarm: a node says the kind of the document it holdstv22 hours1-4/+14
| | | | | | In its handshakes, and checks a peer's against it (AppState::kind): a set of events where one carries its store (Holding::of_a_set), else Automerge's, as it was for every node.
* federation: a set's entries as a document's memberstv44 hours1-0/+61
| | | | | | Holding::entries: where a set of events carries the store, its members' entries as a tree, each at _continuum/members/<node ID>, which is where the swarm reads members of a document (swarm::members).
* federation: a node's store carried by a set of eventstv45 hours1-0/+90
| | | | | | | | | | Holding::carrying: the node's store is a set's, read from no document. What the API and the node's own voting do with the store, they do with it as before; Holding::kind says which kind of document carries it, and with_set and change_set give the set to what passes it on, the node's members read anew after. No node starts so yet.
* federation: what carries a node's store, a document or a set of eventstv45 hours1-3/+47
| | | | | | | Holding's store is read from a document, as it was, or is a set of events' (held::Carried): what offers to it, drops from it and allows again goes through whichever carries it. Nothing makes one carried by a set yet.
* federation: a set keeps where its store stands, and its entries' namestv46 hours2-15/+56
| | | | | | | | Saying where a set stands read the store's heads anew, which costs its events, and finding an entry by its name hashed every entry: both for every message. A set now keeps the one, read anew where its store changed, and the other as entries come and go; in tests both are compared with what is read anew.
* federation: a set keeps its names as it changes, in runs with their sumstv46 hours2-39/+178
| | | | | | | | | | | | | | | | | | | | | A set built the names it gives to others anew for every message, and a range's fingerprint cost its names. Now ranges::Names holds names in order in runs of up to 512, each with what it adds up to, so a range's fingerprint costs its ends and a sum per run between; and a set keeps one, adding and taking out as its store takes and lets go, entries come and go, and what it holds beside goes. In tests the names kept are compared with those read anew. A node splits a range where a number of its own says (ranges::answer's salt, from the system's randomness in store::passing), so that nobody knows beforehand which ranges it compares. Who is a member, which is the fold's to say of the store's state, a set asks only where its store changed, and once for the events of one message (Set::offer_all): asked for every event offered, it was what made catching up slow. A set's store has no more than 1024 events wait.
* federation: a store tells what it took, and has no more wait than askedtv46 hours1-5/+63
| | | | | | | | | | | Beside what it lets go of (Store::telling): what it took, in the order taken (took), and what a move to a checkpoint left beside the heads (Gone::NotAbove), so that what carries it follows what it holds without reading it all again. Store::waiting_no_more_than: past that many events waiting for what they build on, the one waiting longest goes, as if it had never come. A store not asked has any number wait, as before.
* federation: passing a set of events ontv46 hours3-0/+445
| | | | | | | | | | | | | | | | | What two nodes say to each other of their sets (store::passing), with nothing kept of a peer between messages: where a node stands, its store's checkpoint and heads and the fingerprint of all its names; ranges (document::ranges, whose messages serialize), where fingerprints differ; its heads, where they differ and the fingerprints don't; the names it lacks and would have; events and entries, no more than 1 MiB a message. What comes is offered to the store or put as an entry, and for what the store then waits on and doesn't hold (Store::lacks) the node asks in turn. Sets that wrote apart come to hold the same, over seeds; what a node refuses of its own reaches others through it. Used by nothing yet: no node carries a set.
* federation: a set of events as its file holds ittv46 hours1-0/+217
| | | | | | | | | | Set::save and load (continuum-events/1, then MessagePack): the store's checkpoint and what it keeps, what it took in the order taken, what its node refuses of its own and its operator dropped, what the document holds beside the store, of what a checkpoint forgot how long ago, and the members' entries. Read back, every event is offered to a store anew and every entry checked. What waits for what it builds on isn't saved: it comes again.
* federation: a member's entry in a set of eventstv46 hours5-2/+412
| | | | | | | | | | | | | | What a node says of itself (store::entry::Entry): a JSON map of no more than 16 KiB, with its count, signed with its node key for its store. A set holds each member's newest (Set::put_entry): the highest count, of two of one count the lower name; none of a node the store doesn't name a member as it reads now, and those it held go with their node. Their names are among the set's, to catch up by; and a set says what of a peer's names it would have (Set::wants, Store::knows), which leaves out what its store refused, waits for or forgot, and a stranger's entry until who is a member changes. The store's test fold names members, by what counts at node:<node ID>.
* federation: a set of events, the store's own documenttv47 hours2-0/+394
| | | | | | | | | | | | The kind events (docs/document.md, A set of events), as far as holding goes (store::set::Set): a store, and beside it what the store lets go of and its node still gives to others: what its history takes and the node doesn't; what builds on that, unjudged, no more than 1024 events or 16 MiB, the oldest first to go; what a checkpoint forgot, for a time its operator sets. What the fold refuses is held by nobody. Its names, to catch up by (document::ranges). Used by nothing yet: no member's entry, no file, no passing on.
* federation: a store tells what it lets go of, where askedtv47 hours1-6/+83
| | | | | | | | | With the bytes, and why (Store::telling, let_go, Gone): what a move to a checkpoint forgot, the heads it holds by name alone among it; what its history takes and the node doesn't, by what it took before or by its operator's drop; what builds on something refused, unjudged. For what carries the store, to pass on or keep a while; a store that isn't asked keeps none of it, as before.
* state: plain writes take a view to write, Automerge's are asked for as suchtv2 days1-18/+23
| | | | | | | | | | | AppState::mutate_doc, mutate_doc_registering and mutate_doc_by hand what they are given a document::view::Write: the member registry, the users, sessions, forgetting and bootstrap write through them, and take whatever kind of document gives it. AppState::mutate_doc_for is for what asks more of an Automerge document than values at paths (the store's API, a remake's host, a store's events), and gives the heads after the write. What reads a view takes one of any size (dyn Write among them).
* config: files, arguments and layers, by a program's own optionstv2 days1-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | What reads a configuration moves to the crate config, as it was, so that other programs read theirs alike: * option: Kind, OptionSpec, and Schema: a program's options, those that can't be combined, and those that are gone; * file: TOML and JSON files, their includes and unsets; * arguments: the options as arguments, --config and --unset, and files and arguments put together (merged); * layer: values and where they came from, a later source over the earlier ones (overlay), what a value was made of (Sources); * units: durations and sizes as operators write them, which continuum keeps under crate::units. Each takes the schema it reads by, where continuum's code went by its own tables: the node's is config::SCHEMA, a party's client's config::PARTY. Whether a value is shown goes by the schema read by, so an option of the node is no secret for being one of the client's. continuum keeps its options, the settings they make, their checks and the report; its tests of files and layers stay, by the node's options, and the crate has one by a schema of its own.
* federation: properties of nodes voting by themselves getting ontv6 days1-4/+670
| | | | | | | | | | | | | | | | | | | | The properties were all of safety. Three of getting on, over generated histories gone on with (gone_on): nodes vote by themselves, time passing for them, parties vote by hand, some proposing a checkpoint at heads no version may name, or again beside its heads, and backing it there, and after each step a node writes what passed. * What a node's rules cast, its own store takes, and it backs the checkpoint it proposes. * What its rules back is written once it passes by votes a version event may be written on. * Where some votes make a version event a store takes, State::version_event returns one it takes: every choice of a true of each party is tried. Each fails where vote::decide asks no vote::builds_on, where vote::backs_checkpoint asks no State::may_name, or where State::version_event takes votes beside a checkpoint's heads.
* store: a party's next event builds on its last, past 64 headstv6 days2-15/+81
| | | | | | | | | | | | | Where a store holds more heads than an event names, a new event builds on the earliest. A party's write may then lack its last one in its history: of two neither in the other's the lower ID counts, not the later, and a key set written so is written under an older version, and ranks below one written under the latest. building_on_with names a head holding each event it is asked to hold, beside the one holding what the fold judges by; GET /events?party=NAME asks it for that party's last write, key set or node list (latest_of), and continuum-party signs on the heads for its party.
* continuum-party vote: asks its node first whether a true is takentv6 days2-14/+84
| | | | | | | | | | | | | | | A party's client recorded its vote, sent it, and only warned where its node refused it: a true every node refuses, its party's earlier one not dead where it builds, stayed in the record and bound the party, though no node held it. Taking it back out on the node's word would let a node that lies have its party vote twice. So it asks before it signs: POST /events/back names the party, the proposal and the events the vote would build on, and a node answers by what it asks itself before it casts one (vote::takes_true). Nothing signed is sent, so a node gets nothing it could pass on. Told it isn't taken, the client casts and records nothing; a node that doesn't answer, one before this, it says so of, and goes on as it did.
* federation: a node votes false by no rule: --store-nay-beside is gonetv6 days1-137/+0
| | | | | | | | | | | | | | | | | | | A node following a party copies no false, so a followed key voting twice finds nobody to end the first of its two checkpoints. With --store-nay-beside its followers cast that false by rule: it showed each checkpoint to some of them, voted false on one itself, had them end it and move to the other, and passed the first with the rest. Two checkpoint versions on one, by one key, in a federation of any size. The rule was there for two checkpoints proposed at once, which a node's wait before it proposes makes rare. Where they stay proposed, neither with two thirds, their parties end one by hand: the checkpoints guide says how (Two proposed at once). Row 59 says so, and its simulation has the one two thirds back pass, with no false cast. An option that is gone is named so, with what to do (config::GONE), on the command line and in a configuration file, where "unknown option" would leave an operator guessing.
* store: a new event builds on a head holding what it is judged bytv6 days4-1/+80
| | | | | | | | | | | | | | A new event builds on the heads taken earliest, 64 at most. Where a store holds more, and those all come from before the current version was written, an event on them is written under the version before: a merge event, under one without merge events, was refused, so the backlog of heads a revision was passed to merge stayed, and with more heads than a checkpoint may name, no node proposed one. The fold now says which events a new one is to have in its history (Fold::judged_by; the federation: those writing the current version), and building_on names the earliest head holding one, in place of the last of the others.
* federation: a second true on the nays that end the first, no moretv6 days1-4/+71
| | | | | | | | | | | | | | A party's true after one that died builds on the nays that freed it, and an event builds on 64 at most. may_vote kept every vote it was given, once for each earlier true: a node gives it all on the version, a client all on the proposals its party backed. A proposal all of 64 parties voted on was past that already, and below, one party signed its false 64 times on other dependencies, each of which the fold takes: by hand the vote failed, a node skipped it and said nothing. Now it keeps, for each earlier true, one false of each party, of the lowest ID, of the first parties by name, as many as end the proposal: a third of the parties and one (ending).
* federation: a checkpoint proposed a random wait after it is duetv6 days1-9/+131
| | | | | | | | | | | | | | | Every node voting by itself proposed a checkpoint as soon as one was due, after a version say, at the heads it held then, and backed its own. Nodes whose heads differed at that moment made different proposals, each party's one true on its own: nothing ended that but nays by hand from more than a third. Chance did it in a busy store, and a party on purpose, sending each node another fresh write with the passing vote. Now a node acting by itself only notes a checkpoint to propose (Holding::proposes), and its worker has it proposed a random wait later (Holding::propose), a sixtieth to a sixth of the keepalive interval, as it waits before merging: by then it holds another node's proposal, and proposes none beside one it would back.
* federation: a node casts no true its own store refusestv6 days3-42/+133
| | | | | | | | | | | | | | | | A node recorded each vote, saved the record, offered the vote to its store, and didn't look at the answer. A party freed by nays cast after a checkpoint's heads were named, with its earlier true in their history, votes on that checkpoint on its proposal alone, as a checkpoint's vote leaves the nays out: there the earlier proposal isn't dead, and every store refuses the vote. Recorded all the same, it bound the party by a vote no node held; and deciding on it each round, the node proposed no checkpoint of its own. The fold's rule for a party's second true is State::may_back now, which a node asks at the history its vote would build on (vote::builds_on), as it decides, by itself or by hand, and as it signs: a vote refused at its own history counts nowhere, so none is cast, and none recorded.
* federation: a new proposal's grace by the party first proposing ittv6 days1-8/+34
| | | | | | | | | | | | A proposal held for less than a while holds back checkpoints unless its proposer has an older one on the version. Its proposers were every party that proposed its hash: a party with an older proposal proposed a newcomer's version again, byte for byte, and the newcomer's grace was gone, so the next checkpoint due, or a followed key's, lapsed it before anyone had read it. Now it goes by the party of the event proposing it that the node held first (Proposed::first; of several held as long, the lowest ID).
* federation.md: row 68 as built, with its testtv6 days2-3/+3
| | | | | | | | | | | The row, and Checkpoints, had a party's client back a checkpoint by the voters' rule, as a node does. A client voting on its own checks no heads, as the checkpoints guide says: it shows what moving there refuses before it asks. The rule is the node's, voting by itself or by hand through it, and covers what it held when it started. The row's test is the voters' rule's (federation_attack_68, in vote.rs): it waits no more.
* federation: what a node held when it started, it held before any proposaltv7 days2-8/+103
| | | | | | | | | | | | | | | | | | | | | A node keeps when it took each event in memory, by its own clock: after a start, everything its document held was stamped at once, a checkpoint's proposal with the writes it leaves out. The voters' rule asks what was held for a while before the proposal, which was nothing then, and once --store-back-after had passed the node backed it, whatever its heads left out. A followed key left such a proposal pending and gathered its followers' votes as they restarted, as all do to roll out a revision. Now what the store holds as the node first reads it counts as held before any proposal (Inner::from_start, Seen::from_start): the node backs no checkpoint leaving any of it out. One proposed just before a restart at heads that left out the writes then under way isn't backed by that node either; the next one is. a_node_votes_above_the_heads_of_the_checkpoint_it_votes_on read write, proposal and vote into a fresh node at once, which is this case: its node runs before they come now, and a second one, started on all of it, casts nothing.
* federation: no true on a checkpoint at heads no version may nametv7 days2-15/+83
| | | | | | | | | | | | | | | A version event is refused where the heads its version names for a checkpoint have one in another's history, or aren't after the current checkpoint (may_move). Neither the voters' rule nor what a node tells clients asked that: votes on such a proposal are taken, no version event on them ever is, so nothing lapses, and every party that voted true stays bound until others' nays end it. A followed key proposing one bound all its followers; with two thirds of the parties so, nothing passed on that version again. may_move's part about the heads is may_name now, which backs_checkpoint asks before a true, and GET /events/counts says as none, so that a party's client backs no such proposal either.
* store: what heads leave out is what a move to them refusestv7 days2-10/+52
| | | | | | | | | | | | | | | left_out, the voters' rule's and a fork's check, took an event for above the heads where it had them all in its history. A move asks more: each of its dependencies among the heads or above them (above, beside). So an event built on the heads and on something beside them passed the rule, and the move refused it, with all built on it. A followed key used that: it signs what will be its heads and a proposal beside them, clients build on both as on every head they hold, and a checkpoint proposed there later leaves out nothing by the rule, and refuses every write, key set and node list since. Now left_out asks what the move asks.
* federation: a checkpoint's version event on the votes above its headstv7 days1-1/+37
| | | | | | | | | | | | | version_event took each party's true of the lowest ID, of the first parties by name that pass a proposal. Of a version naming a checkpoint, a true built beside its heads counts, but a version event built on it is refused (may_move): with such a vote among those taken, every node wrote the same event, every node refused it, and the version was never written; its backers stayed bound. One party did that by casting its true on an event beside the heads, where its name came early enough. Now it takes only votes above the heads, so the event it names is one a store takes wherever two thirds voted above them.
* continuum-party found: a random name at revision 2 where none is giventv11 days1-7/+43
| | | | | | | | | | At a revision that gives a name, `found` without `--name` names the federation at random, 16 hex digits, and says so on standard error: so every first version it writes at revision 2 or later has a name in its root, and a rehearsal is another federation even where nobody named it. `found` then writes another federation each run, and its founders share the file it wrote, as they do. Without `--name` and `--revision`, the base revision and no name, as before.
* continuum-party found: the name optional, recommendedtv11 days1-20/+36
| | | | | | | | | Without `--name`, `found` writes a first version without a name, at the base revision or the one `--revision` names, as before names: such a federation differs from another by its parties, keys, nodes and rules alone, as two of one name do, and still founds where nodes don't know revision 2 yet. With it, revision 2 as before. The guide keeps `--name` in its example and recommends it.
* continuum-party: found by a name, propose name, the name in statustv11 days2-27/+109
| | | | | | | | | `found` takes the federation's name (`--name`, required), and founds at revision 2, the first that gives one, unless `--revision` names a later one; one naming an earlier is an error. `propose name NAME` (and `fork name`) names the federation anew, the next version following revision 2 too where the current one doesn't, which the preview says. `status` says the name its current version gives beside the store's ID.
* federation: revision 2, the federation's nametv11 days5-10/+121
| | | | | | | | | | | | | | | A version may give its federation a name (`name`, spelled as a party's), under a revision that has names: `federation-name`, revision 2. The first version's is in the root, so a rehearsal named otherwise is another federation, though its parties, keys, nodes and rules are the same; a later version changes the name as anything else, which changes what the federation is called, not which it is. A version giving a name under an earlier revision is none. What a version does says so, in words: it names the federation, renames it, or drops its name. Half the generated histories begin at the newest revision now, their versions naming the federation anew now and then; those of the revisions before are generated as they were.
* continuum-party read: what `get` was, beside writetv11 days2-4/+4
| | | | | | The client reads and writes, as the federation's words have it (a write, what counts): `get` is `read` now, before any release had it; `write` stays as 0.0.1 named it.
* continuum-party: nodes by their names wherever it shows themtv11 days3-28/+81
| | | | | | | | | A node goes by the name it gave itself (`--alias`), as `names` in `GET /events/counts` shows it, in what a proposal does (`show`, `proposals`, `status`, before a vote), among the nodes not known to know a revision, and at the head of `status`'s section on the node it asks, which now names that node by its ID too. A node no party lists yet has no name there: only members' entries reach the node.
* continuum-party write -r: a string as it istv11 days1-5/+39
| | | | | A value not JSON is taken as a string with -r, as `get -r` prints one; without it, the error says so.
* continuum-party status: this node by its ID, not by being heard 0 s agotv12 days1-9/+23
| | | | | | | | | | `status` took a node heard from 0 seconds ago for the node it asked, as counts give 0 for that one; another node heard from within the second was called `this node` too. GET /events says the node's ID now (`node`), and `status` marks the node of that ID (`here` in --json), and no other, as `this node`; another heard from within the second is `heard 0 s ago`.
* continuum-party status: everything but the values, in colour, and as JSONtv12 days2-323/+914
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `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.
* continuum-party status: IDs and hashes wholetv12 days1-14/+5
| | | | | | | | 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.
* continuum-party: a record held against the node's votes, a wait, restoretv12 days2-5/+372
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* continuum-party get: what counts, as JSON, a path at a timetv12 days1-0/+127
| | | | | | | | | | | | | | | 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.
* continuum-party status: a key, a node, a party a line, nodes by their namestv12 days1-56/+120
| | | | | | | | | | | | | | | | `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.
* continuum-party --party: the party it reads as, without a recordtv12 days1-23/+93
| | | | | | | | | | | | | 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.