| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
It read the remake records and its peers' epochs once a second, whatever
happened. It now looks when the records change, within a second of a
peer saying another epoch than this node's, and when a vote is due; and
by itself, once a second, only while something waits on time: a remake
of this epoch open or committed, a rejoin, a catch-up, a member on
another epoch. What it keeps for a time, an archived document or a
remake's content, it wakes for when that is due.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
The simulation of keys that voted twice, the nodes holding their stores
in sets of events: each keeps the version the other side took beside
its store, and b's operator has it drop its own and take that one; or,
where the versions named checkpoints, each refuses the other side's as
not above its own, and b begins its set anew from the checkpoint the
others moved to, as a node given another pin does.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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 proposal there answered 500, failed to write the proposal: the set
refuses what isn't an event or the node's own entry.
|
| |
|
|
|
|
|
|
| |
It was answered after the node's configuration was read and checked,
which asked for htpasswd, a node key file and the rest: what a party's
founders don't have yet as they ask for their nodes' IDs, and the
guides tell them to run it alone. It is answered before now
(config::asked_node_id).
|
| |
|
|
|
|
|
| |
Two nodes on the Automerge document; each started again of both kinds
on its document, with a file for its set; each started again on its set
alone, from that file. What was put is held throughout, and what is put
at each step reaches the other.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|