| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
What a set hands the node to read was read in the document's place;
it is read over it now (view::Listed): at a path, what the set's tree
holds, else what the document does, and maps of both as one. A node on
a set alone reads the same as before, its document being empty; one
holding its store in both, to come, reads the members of both.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
It gets what the others' checkpoint forgot, which their sets keep a
while, builds the checkpoint itself, and reads what they read; one with
nothing and the checkpoint pinned begins from it by its name.
|
| | |
|
| |
|
|
|
|
|
|
| |
What a node speaks is mostly known a moment after it proved where it
is, and its HELLO goes as it proves: one in the oldest version, which
can't say a kind other than Automerge's, didn't go. Such a seed is
tried again after a quarter of a second, four times, before the wait
that grows; it was five seconds each time a node on a set started.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
The swarm reads its members, their addresses, aliases, parties, tiers
and links, at _continuum/members of the document the node holds. Where
the node's document keeps them apart and hands them over as a tree
(AppState::entries: a set of events, Holding::entries), they are read
of that (view::members_of): by the topology, the node's registration,
stability, working links, the state file's seeds, reach, and the API's
aliases, dashboards and tier. No node's document does so yet but one
whose store a set carries, which none starts as.
|
| |
|
|
|
|
| |
Its failing was logged as retried, and nothing retried it: a node that
is no neighbour yet gets no HELLO again from the peer worker. The seed
now stays with those still to reach, tried again as they are.
|
| |
|
|
|
|
|
| |
A HELLO in version 52 says no kind, and is read as of an Automerge
document: a node holding another kind would be refused for it. Such a
handshake is not written in a version before 53 (WireError::OtherKind),
and waits for the peer to say what it speaks.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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).
|
| |
|
|
|
|
| |
view::Tree: maps of maps down to values, behind Read and Write. For a
kind that keeps what the node reads at paths otherwise, and hands it
over so.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Two nodes that each hold a set of names find what the other holds and
they don't (document::ranges): a range's fingerprint, the same and it is
done, else its parts' fingerprints or its names where few. Names added
up modulo 2^256 with their number, hashed; 16 parts a step; a message
answered by reading it once, with nothing kept between messages; no more
names in a message than asked.
Used by nothing yet: the set of events catches up so, and merged state
and the document ordered by clocks (docs/document.md).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
document::passing: a Mark, where a document stood, by which what
changed since and the node's own units since are told (changed_since,
own_since: the change publisher, the sync worker); and of where a peer
says it stands, what the document lacks, whether the peer holds what
the document held, a pull of what is lacking, and what it has counting
as sent no more (lacking, peer_holds, pull, heard: the relay,
keepalives). The published stamp gives its summary and its mark.
|
| |
|
|
|
|
|
|
|
| |
document::UnitId: the name of a unit of a document as its kind has it,
an Automerge change's hash. What the swarm announces, forwards along
trees, tells a peer it refused and drops is named so (the
dissemination, relay, refusals, AppState::drop_taken), and the session
is told so what a peer gets from another; a change's hash it is where
the document is asked, and on the wire.
|
| |
|
|
|
|
|
| |
document::passing::take_bulk: the changes a peer offered as a blob,
fetched, judged and applied with their signatures, and all the heads
offered held after. swarm::sync keeps the fetch, the epoch check, and
what is counted and noted of the peer.
|
| |
|
|
|
|
|
|
|
|
|
| |
document's
document::passing: received (a message read, inflated where it was
deflated), take (the changes it carries screened and applied, the rest
given to the session) and settle (what the peer lacks asked for again,
the signatures waiting offered, whether an answer is due, what came and
whose). swarm::sync keeps the epoch check, what is noted of the peer,
the wait for its answer, the throughput, and what is counted.
|
| |
|
|
|
|
|
|
|
| |
document::passing::next: the next message for a peer, by the session
with it: changes as they are along a tree, a sync message, or an offer
of the changes as a blob where a message would be too large, with the
signatures of what it carries, and whether it is taken as delivered.
swarm::sync keeps whose tree a message is along, the epoch it is of,
the envelope, and what is counted of it.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
document::view: Read (the value at a path, plain, typed, a map's keys)
and Write (a value written, one deleted), which Automerge's documents,
writes in progress and documents as they were all are. The member
registry, the users, access control's reads and rules, the topology,
forgetting and bootstrap read and write through them, and name neither
Automerge's ReadDoc and Transactable nor document::store, which is what
an Automerge document can do beyond.
How a swarm holding a store judges what a change writes is handed to
the rules (rules::judge_seen), being its kind of document's to say.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
document::dropping: a change a document holds and all that builds on it
(Tainted), and the document left without them, with what this node's
own writes among them touched and the others' changes (Dropped). The
walk of the history, the fork and the fresh actor were the node's, in
AppState::drop_taken, which keeps what is its own: whether a drop waits
for a second member's word, the quarantine, the refused.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Automerge's
rules::judge_seen is the rules: given a unit (who made it, for whom,
what it writes where) and the document as its writer saw it, to read,
why they refuse it. rules::judge keeps what is Automerge's of judging a
change: an epoch's root, by the change's hash, and the document at the
change's heads, by which it also keeps what was read there (Reads over
Seen). A swarm holding a store is judged alike (holding::judge), a
founding change told by the unit's name.
|
| |
|
|
|
|
|
|
|
| |
The actors a node writes or wrote with in its current document
(document::own::OwnWriters, AppState::own_writers) were kept by the
remake state, which signing, the document file, sync and a dropped
change read them from. They are the engine's: a document of a kind
without writers of this sort has none, and needs no remake state for
them.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
Where the values set make none of what layer::read reads them into, its
error names the option and where it was set, which serde doesn't: the
first that alone makes none, as continuum found it for its settings;
or, where what is read needs more than one option, the first without
which the others make one.
continuum reads its settings by it, and a party's client's options are
named alike.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|