| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
A node on a set alone, hearing peers of both kinds on a later epoch,
rejoined it, and filled the Automerge document it holds beside its set
with the snapshot: a set has no epochs, and that document stays empty.
A simulation of a compaction while a swarm is on its way to sets: the
nodes on the document and of both kinds switch, the node on a set stays,
and events go on between them through the node of both.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Two nodes of both kinds say an Automerge document in their handshakes,
and synced that alone: what only sets hold, the entries of the nodes on
sets, stopped at the first node of both it reached, so that in a swarm
larger than its neighbour count the nodes on sets never came to read
each other's entries. A node of both now says where its set stands
beside each STATUS to a peer on a document; one of both that hears it
passes its set on in turn, one on the document alone drops it.
A simulation of nine nodes, three of each kind, two neighbours each.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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 federation starts on sets (--store-document); what is of the Automerge
document alone (the store file, putting again, remakes, a pinned
checkpoint found in the document) is said apart, for federations that
keep their store there until they moved.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Three nodes of two parties over libp2p on loopback: on the Automerge
document, each started again of both kinds, then on its set alone, then
all at once from their sets' files, and a fourth joining with the
store's ID alone. After each start a value written through the party's
client at one node is read at every node, with all written before; no
node logs an error.
|
| | |
| |
| |
| |
| | |
operations.md says how, step by step; document.md what is built of it;
the change log that it is there.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From version 53 on, beside Automerge's (SyncBody::Kind,
HeadsSummary::Kind): a SYNC's body is one more of its shapes, another
kind's bytes; a STATUS's stamp is another kind's bytes after a byte no
Automerge stamp begins with. Nothing version 53 said changes, and
version 52 says neither (WireError::OtherKind). Two stamps of another
kind are the same where their bytes are.
A node holding an Automerge document passes over a body of another
kind: a peer holding one isn't let near it.
|
| |/
|
|
|
|
|
| |
A placeholder may be written $(env:NAME), $(file:PATH) or $(cmd:COMMAND),
ending at the parenthesis matching its own: the same as with braces,
nesting and all. A configuration written in Nix, or passed through a
systemd unit, needs no escapes so.
|
| | |
|
| |
|
|
|
|
|
| |
on Automerge after
How long a node keeps what its checkpoint forgot is its operator's to
set. The stages in the order they are built: the set of events first.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Spoken beside 52 (OLDEST), so a swarm upgrades node by node: a node
writes each peer the newest version both speak.
From 53 on (wire::KINDS, wire::kinds), what is a document's kind's goes
as bytes the wire carries and doesn't read: a SYNC's body, with whether
it is taken as delivered, and what vouches for what it carries; where a
STATUS says its sender stands; what a BLOB request asks for in bulk; a
BLOB is of a unit or of what is offered in bulk, by their names.
Automerge's bytes are what 52 carries in the messages' own fields.
HELLO and HELLO_REPLY say the kind of the sender's document
(document::KIND, automerge) from 53 on; one in 52 says none and is of
that kind. A peer whose document is of another kind is refused in the
handshake, saying so.
The bytes of 52 stay as golden_bytes has them; golden_bytes_of_kinds has
those of 53. scripts/wire-check v0.0.1: its nodes and this tree's talk.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Not built. What of passing a document on is the swarm's for every kind
and what is a kind's; the three names above the seam (a stamp, a unit's
name, a writer) and what a kind's session with a peer is asked; a wire
version in which what is a kind's is bytes, spoken beside the one now;
and the same as a document of merged state without a history would
give it.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
control's
access::screen becomes document::screen: reading received bytes as
changes, putting them in order, keeping those that wait or are refused,
vouching by signatures and applying is all Automerge's shape, and has
each change judged by the rules (access::rules) before it applies it.
|
| |
|
|
|
|
|
|
|
| |
A design: what the rest of the node asks of its document today, by what
asks it; which of that is Automerge's shape and which any document's;
what users and the wire see of the engine; the seam, around a kind of
document with its passing on, its units and their judging, and its
disk; the kinds (Automerge, merged state without a history, a set of
events); and the stages.
|
| |
|
|
|
|
|
|
|
|
|
| |
The report moves to the crate, as it was (report::report, Reports,
Values): each option of a schema with its value, by the settings in
effect given as JSON by option name, and where it came from; imported
values and secrets left out. And the argument a program prints it by
(arguments::with_print_config, prints_config).
continuum gives its settings and what it loaded to it; --print-config
and GET /admin/config say what they said.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
file+raw:, cmd+raw: and env+raw:, and format = "raw" in a table, give
what is there byte for byte (Imported::Raw): no line break removed at
its end, and what is no text taken, as a key or a certificate needs.
Text and JSON still must be UTF-8, and say +raw where they aren't.
A placeholder gives text; in a +raw importer one may be +raw too, and
its bytes go in as they are, into a name, a path, an argument or a
shell's positional parameter. Into text none does: not into a text or
JSON importer, nor into text with placeholders.
continuum takes a +raw value as one text, read as nothing else; one
that is no UTF-8 it refuses, an option being text.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A name, a path, a command and each argument of an importer may hold
placeholders of their own. There only ${env:, ${file: and ${cmd: begin
one, $${ is a ${, and every other $ stays: a command's are its shell's.
What a placeholder gives is never run. Into a name, a path and an
argument it goes as text, an argument staying one. A shell command gets
it as a positional parameter, the placeholder becoming a reference to
it, "${1}", or ${1} inside double quotes: no part of the script,
whatever it holds. import::Shell tells where in a script a place is,
as far as that reference needs; where it can't be written as one word
(single quotes, backquotes, $((…)), the shell's ${…}, after a backslash
or a here-document), the command is refused. What it gets wrong can
refuse a reference or have the shell split it, never run it.
An importer has its directory itself (Importer::dir), a file's path
joined with it when read, so that a path may hold placeholders.
|
| |
|
|
|
|
|
|
|
|
|
| |
Importers and placeholders (env:, file:, cmd:, ${…}, +json, $$, the
tables) move from config::import to the crate config, crates/config, as
its module import, as they were, public: the crate is for what a
program's configuration is made of, from its files and its arguments,
and other programs make theirs with it.
The repository is a workspace of the node and that crate, both default
members, so that cargo quick, cargo sim and clippy take in both.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
A seed that named no root, joining itself, names it once ready, but only
from this build on: a 0.0.1 seed never shakes hands again, and its joiner
waited for ever. scripts/wire-check hit that, d of this tree joining
through c of 0.0.1, their handshake 6 ms before c was ready.
So the joiner does its half too: where a seed it still waits for named
none, a STATUS saying the seed became ready has it shake hands with the
seed again (seed_ready), which then names its root.
|
| |
|
|
|
|
|
|
|
| |
Of 0.Y.Z, a flag day raises Y, a release one node at a time raises Z:
the first part that isn't 0 is the major one, so releases before 1.0.0
practise the same kinds of bumps as those after. scripts/release refuses
a flag day that doesn't raise it (leading), where before 1.0.0 it took
any. The docs' examples release 0.1.0 next: 0.0.2 would read as a flag
day after 0.0.1.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
A joiner takes no root before each of its seeds named one, and a seed
names its root only in a handshake. A seed that shook hands while
joining itself named none, and never again: its joiner waited for ever.
scripts/wire-check hit that (b joining a, c through b, d through c):
b's reply to c came 2 ms before b had its document.
Now a node notes the peers its handshakes named no root to, and once
ready, shakes hands with them again, naming it. Older joiners take it
too: it's a handshake as before.
|
| |
|
|
|
|
|
|
| |
Every feature but tokio-console, so that development names one set of
features everywhere: the aliases, checks and single tests, so none
rebuilds what another built. Not cargo's --all-features, which would
take tokio-console too (it needs tokio_unstable), hence not "all". Not
a default.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a sync
A node that stopped cleanly writes on as the writer of before, as
`--keep-actor` had it, now by default: an epoch gathers a writer per node
and per crash, drop or rejoin, not per start. `keep-actor = false`, in a
configuration file, has a node write as a fresh writer each start; a
node without a document file has nothing to keep, which is no longer an
error.
Writing on as the writer of before, a node holds its writes (`mutate_doc`
and the API's through it) until it synced once with a ready neighbour,
level with it, or 10 seconds passed (`AppState::hold_writes`,
`KEPT_WRITER_WAIT`): a neighbour holding later changes of that writer,
which a copy of the node's files made (a backup restored, a disk rolled
back), hands them over first, and the node takes a fresh writer then, as
it did. A node that reaches no neighbour within the wait writes on.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mycelium holds its node's lock for as long as a request for the inbox
waits for a message, and every other request waits for that lock, the
messages we send among them: with two polls of up to five minutes, a
node with nothing coming in sent nothing until a message came in (each
send timing out after ten seconds), so two idle nodes never reached each
other, a node joining a federation whose only node was its founder's
among them.
The inbox is waited for by one request, and only while nothing else is
asked of the daemon: a send, or a seed's lookup, takes a turn (`Turn`),
which drops the waiting request, freeing the daemon's lock as its API
drops a request whose client went away. While turns are under way, the
poller takes what is there without waiting, again as each begins or
ends; then it waits again. It waits peeking, the message left in the
inbox, and pops it after without waiting, so a request dropped while it
waited takes nothing with it. Nothing is asked of the daemon again and
again: an idle node has one request waiting there, for up to five
minutes.
The warnings about the daemon's API name the error's causes, not only
which request failed.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
A value not JSON is taken as a string with -r, as `get -r` prints one;
without it, the error says so.
|
| |
|
|
|
|
|
|
|
|
| |
`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`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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.
|