| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
A program names what it uses of the crate:
* clap: the command line (arguments);
* serde: what the values set are read into (layer::read), and
durations and sizes as fields (units::duration_option, …);
* toml: configuration files in TOML; without it a .toml file is
refused, saying so, and files are JSON;
* tracing: what a source replaces of an earlier one's, logged.
continuum names all four.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
| |
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 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
cargo quick and cargo sim build with most; federation-check and release
built this tree again with federation,mycelium, and wire-check with
federation,libp2p: each a build of its own, about two of a release's
four minutes, against some 12 s of judging and 20 s of wire-check.
Now this tree builds with most throughout, and a tag with most where it
has it, else with what most stands for (dashboard, federation, libp2p,
mycelium, tor), the same in each script, so its builds are one too.
CONTINUUM_FEATURES and CONTINUUM_WIRE_CHECK_FEATURES, where given, still
set both.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
upgrade dialled with PeerCondition::NotDialing: while hole punching's
dial went, the direct one didn't, and came only once that dial failed,
which where packets are dropped is when it times out. Hole punching
dials the address the relay saw, which may not answer where the peer's
listen addresses do (a host with several, a port mapped otherwise).
a_relayed_connection_is_upgraded_where_one_side_can_be_dialled hit
that now and then: identify told b where a listens 1 ms after dcutr's
dial began, and b didn't dial a within the test's 5 s.
Now it dials regardless. Where both dials connect, the slower is closed
after DUPLICATE_GRACE, as of any two. The retry on a failed dial goes:
nothing waits on another dial any more; the next try comes as before
(identify, mDNS, a send to the peer), UPGRADE_RETRY after the last.
|