aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* The document file is written after the document changed, not on a ticktv12 hours1-5/+21
| | | | | | | | Its worker looked every append interval whether something was due. It now writes that long after the document changed, so changes close together go together, and sleeps otherwise; while the node isn't ready or rejoins, when what it writes isn't told by a change of its document alone, it looks every interval as before.
* federation: the store's worker looks when something changed, not every five ↵tv12 hours3-5/+72
| | | | | | | | | | seconds Every five seconds it looked at the changes screening refused, wrote its set of events to its file, and read its store anew. It now looks where screening refuses a change, writes the set five seconds after it changed, and wakes for what the set is to let go of. A node voting by itself still looks every five seconds: its rules count time.
* transport: the path probe wakes when a path is due, not every five secondstv12 hours1-10/+91
| | | | | | | | | | The task that pings paths looked every five seconds for paths due. It now sleeps until the next is: a PING out long enough to count as unanswered, a path in use rested, one unused for long to forget; no more often than every five seconds, so paths due close together go together. What changes when the next is due (a path coming into use, a PING sent with a keepalive or to a suspect path, one that failed) has it look that up anew. With no path, it waits for one.
* remake: the switch worker looks when something changed, not every secondtv13 hours8-5/+114
| | | | | | | | | | 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.
* remake: a node on a set of events follows no epochtv14 hours2-0/+91
| | | | | | | | | | 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.
* simtest: keys voting twice part nodes of sets, tootv15 hours1-15/+99
| | | | | | | | | 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.
* federation: nodes of both kinds pass their sets on to each other, tootv15 hours6-9/+169
| | | | | | | | | | | | 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.
* federation: a node on a set begins anew from another checkpoint its operator ↵tv15 hours6-15/+142
| | | | | | | | | | | | | pins A pin counted only while the node had no file of its set, so a node behind for longer than the others keep what a checkpoint forgot, or one undoing a move, had to start without its file, and lost what it refused of its own and what its operator had it drop. The file now says which checkpoint was pinned when the set began: with another pinned, and not the one the store is at, the node gathers its set anew from that one, its store refusing what the one in the file refused. A node of both kinds makes its set of its document then, where it finds the pin.
* federation: a stopped node on a set passes on what it holds backtv21 hours4-13/+192
| | | | | | | | | 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.
* remake: a node on a set of events says there is nothing to remaketv21 hours1-0/+10
| | | | | A proposal there answered 500, failed to write the proposal: the set refuses what isn't an event or the node's own entry.
* continuum node-id needs none of a node's configurationtv23 hours2-16/+20
| | | | | | | | 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).
* simtest: a swarm moves to sets of events node by nodetv23 hours1-0/+135
| | | | | | | 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.
* A node of both kinds, for a swarm to move to sets by (--store-both)tv23 hours9-54/+280
| | | | | | | | | | | | | | | | | | | With store-document, store-both has the node hold its store in the Automerge document too, and sync with nodes of either kind: * it says to each peer the kind that peer holds, and passes its set on to those that hold sets (swarm::set::holds_a_set), the Automerge document to the others; * what its set takes of the document goes on to the peers on sets (Holding::unpassed), and what its set takes of them is put into the document, as events it lacks are (Holding::lacking); * its entry in the document is put as its entry in the set (swarm::set::mirror_entry), and it reads the members of both; * without the set's file yet, its set is made of the store as it reads it of its document, with what store-file kept of its own. A simulation: two nodes on the Automerge document, one on a set, one of both between them; an event put on either side reaches all four.
* swarm: members read of a set's entries over the document'stv23 hours14-22/+171
| | | | | | | | 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.
* swarm: a node says to each peer the kind that peer holds, of those it holdstv23 hours6-22/+74
| | | | | | | | | 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.
* simtest: a node of a set away across a move to a checkpointtv25 hours1-0/+91
| | | | | | 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.
* simtest: a node no party lists gets nothing of a settv26 hours1-0/+49
|
* swarm: a seed whose HELLO failed is said HELLO again soon, a few timestv26 hours1-5/+19
| | | | | | | | 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.
* A node joins a swarm of sets with nothing but the store's IDtv26 hours7-55/+416
| | | | | | | | | | | | | Given store-id and store-document, no file yet and no root, or a checkpoint pinned (store-checkpoint), a node starts with nothing of its store (held::Begun::Start, passing::Start): it asks the members whose handshake it took for the checkpoint named by the store's ID, its root, or by the pin, then for the events that one keeps, each taken only as what its name says; begins its set from them; and is ready, catching up as any node behind. A set gives the checkpoint its store holds by its name (passing::Unit::Checkpoint). A simulation: a node given the ID alone joins two that hold a write.
* federation: what a set hands the node to read is as a store's documenttv26 hours3-17/+39
| | | | | | | | | Beside its members' entries, the policy of a swarm holding a store and the swarm's ID (Holding::entries): what reads a document for them reads the same of a node on a set. Tokens are checked against it (api::login): their issuer's entry is there, and a node takes none another issued, as the policy says; read of the empty Automerge document beside, every token was refused.
* A node of a swarm holding a store, on a set of events (--store-document)tv26 hours5-3/+348
| | | | | | | | | | | | | | | | | With store-root or store-id, store-document names the file of the store's own document, a set of events: the node holds its store there and nothing in the Automerge document, syncs with nodes holding a set and no others, and goes on from the file when started again. Without a file yet it begins from the root (StoreStart::set); joining by the ID alone needs a file. What a checkpoint forgot is kept for store-keeps-forgotten (30 days). The file stands for store-file, and no checkpoint is pinned. The set is written to its file where it changed, every five seconds with the store's worker and as the node stops (Holding::save), what a checkpoint forgot longer ago let go of first. Simulations: a node behind catches up; a node goes on from its file.
* swarm: a node whose store a set of events carriestv26 hours9-0/+369
| | | | | | | | | | | | | | | | | | | | | | | | Such a node (Holding::carrying) holds an Automerge document with nothing in it, which nothing passes on, and its set is its document: * swarm::set passes the set on. Where it stands goes in the node's STATUSes as another kind's stamp, and a peer's is given to the set; what the set says besides goes as a SYNC's body; what the set took, of a peer or of the node itself, goes on to the node's other neighbours. What compares stamps for an Automerge document's sake is handed the node's own, and finds nothing to do; the Automerge sync isn't begun. * The node writes its own entry (AppState::mutate_set): what writes protocol data through a view writes to the members' entries as a tree, and what the node's own reads as after is put as its next entry, signed and passed on. Anything else is refused, and so is a write to an Automerge document as such. * An event the node writes (held::write) is offered to the set and passed on; a set lacks nothing of its store to put again. * The node's swarm is its store's, said at its start. A simulation: three such nodes of two parties register, and each holds the others' entries; events put on two of them reach all three, and they come to stand alike, the documents they hold beside empty.
* swarm: members read of where the node's document keeps themtv26 hours13-42/+112
| | | | | | | | | | | 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.
* swarm: a seed whose first HELLO failed is said HELLO againtv26 hours1-0/+12
| | | | | | 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.
* wire: a handshake of another kind doesn't go in a version that says nonetv26 hours1-1/+14
| | | | | | | 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.
* swarm: a node says the kind of the document it holdstv27 hours4-8/+28
| | | | | | In its handshakes, and checks a peer's against it (AppState::kind): a set of events where one carries its store (Holding::of_a_set), else Automerge's, as it was for every node.
* federation: a set's entries as a document's memberstv2 days1-0/+61
| | | | | | Holding::entries: where a set of events carries the store, its members' entries as a tree, each at _continuum/members/<node ID>, which is where the swarm reads members of a document (swarm::members).
* document: a tree of JSON, read and written as any documenttv2 days1-0/+179
| | | | | | 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.
* wire: what another kind of document says, in a SYNC's body and a STATUS's stamptv2 days5-4/+123
| | | | | | | | | | | | 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.
* federation: a node's store carried by a set of eventstv2 days1-0/+90
| | | | | | | | | | Holding::carrying: the node's store is a set's, read from no document. What the API and the node's own voting do with the store, they do with it as before; Holding::kind says which kind of document carries it, and with_set and change_set give the set to what passes it on, the node's members read anew after. No node starts so yet.
* federation: what carries a node's store, a document or a set of eventstv2 days1-3/+47
| | | | | | | Holding's store is read from a document, as it was, or is a set of events' (held::Carried): what offers to it, drops from it and allows again goes through whichever carries it. Nothing makes one carried by a set yet.
* federation: a set keeps where its store stands, and its entries' namestv2 days2-15/+56
| | | | | | | | Saying where a set stands read the store's heads anew, which costs its events, and finding an entry by its name hashed every entry: both for every message. A set now keeps the one, read anew where its store changed, and the other as entries come and go; in tests both are compared with what is read anew.
* federation: a set keeps its names as it changes, in runs with their sumstv2 days3-171/+574
| | | | | | | | | | | | | | | | | | | | | A set built the names it gives to others anew for every message, and a range's fingerprint cost its names. Now ranges::Names holds names in order in runs of up to 512, each with what it adds up to, so a range's fingerprint costs its ends and a sum per run between; and a set keeps one, adding and taking out as its store takes and lets go, entries come and go, and what it holds beside goes. In tests the names kept are compared with those read anew. A node splits a range where a number of its own says (ranges::answer's salt, from the system's randomness in store::passing), so that nobody knows beforehand which ranges it compares. Who is a member, which is the fold's to say of the store's state, a set asks only where its store changed, and once for the events of one message (Set::offer_all): asked for every event offered, it was what made catching up slow. A set's store has no more than 1024 events wait.
* federation: a store tells what it took, and has no more wait than askedtv2 days1-5/+63
| | | | | | | | | | | Beside what it lets go of (Store::telling): what it took, in the order taken (took), and what a move to a checkpoint left beside the heads (Gone::NotAbove), so that what carries it follows what it holds without reading it all again. Store::waiting_no_more_than: past that many events waiting for what they build on, the one waiting longest goes, as if it had never come. A store not asked has any number wait, as before.
* federation: passing a set of events ontv2 days4-3/+449
| | | | | | | | | | | | | | | | | What two nodes say to each other of their sets (store::passing), with nothing kept of a peer between messages: where a node stands, its store's checkpoint and heads and the fingerprint of all its names; ranges (document::ranges, whose messages serialize), where fingerprints differ; its heads, where they differ and the fingerprints don't; the names it lacks and would have; events and entries, no more than 1 MiB a message. What comes is offered to the store or put as an entry, and for what the store then waits on and doesn't hold (Store::lacks) the node asks in turn. Sets that wrote apart come to hold the same, over seeds; what a node refuses of its own reaches others through it. Used by nothing yet: no node carries a set.
* federation: a set of events as its file holds ittv2 days1-0/+217
| | | | | | | | | | Set::save and load (continuum-events/1, then MessagePack): the store's checkpoint and what it keeps, what it took in the order taken, what its node refuses of its own and its operator dropped, what the document holds beside the store, of what a checkpoint forgot how long ago, and the members' entries. Read back, every event is offered to a store anew and every entry checked. What waits for what it builds on isn't saved: it comes again.
* federation: a member's entry in a set of eventstv2 days5-2/+412
| | | | | | | | | | | | | | What a node says of itself (store::entry::Entry): a JSON map of no more than 16 KiB, with its count, signed with its node key for its store. A set holds each member's newest (Set::put_entry): the highest count, of two of one count the lower name; none of a node the store doesn't name a member as it reads now, and those it held go with their node. Their names are among the set's, to catch up by; and a set says what of a peer's names it would have (Set::wants, Store::knows), which leaves out what its store refused, waits for or forgot, and a stranger's entry until who is a member changes. The store's test fold names members, by what counts at node:<node ID>.
* federation: a set of events, the store's own documenttv2 days2-0/+394
| | | | | | | | | | | | The kind events (docs/document.md, A set of events), as far as holding goes (store::set::Set): a store, and beside it what the store lets go of and its node still gives to others: what its history takes and the node doesn't; what builds on that, unjudged, no more than 1024 events or 16 MiB, the oldest first to go; what a checkpoint forgot, for a time its operator sets. What the fold refuses is held by nobody. Its names, to catch up by (document::ranges). Used by nothing yet: no member's entry, no file, no passing on.
* federation: a store tells what it lets go of, where askedtv2 days1-6/+83
| | | | | | | | | With the bytes, and why (Store::telling, let_go, Gone): what a move to a checkpoint forgot, the heads it holds by name alone among it; what its history takes and the node doesn't, by what it took before or by its operator's drop; what builds on something refused, unjudged. For what carries the store, to pass on or keep a while; a store that isn't asked keeps none of it, as before.
* document: catching up by ranges of names and their fingerprintstv2 days2-0/+554
| | | | | | | | | | | | 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).
* wire: version 53, what is the document's as bytes, and the kind in handshakestv3 days6-35/+588
| | | | | | | | | | | | | | | | | | | | 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: where a document stands, and a peer, is the document's to comparetv3 days8-79/+148
| | | | | | | | | | 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: a unit's name, which the swarm passes on bytv3 days12-50/+108
| | | | | | | | | 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: taking changes fetched as a blob is the document'stv3 days2-37/+91
| | | | | | | 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: taking a peer's message, and settling the session after, are the ↵tv3 days2-105/+217
| | | | | | | | | | | 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: what goes to a peer next is the document's to saytv3 days3-174/+225
| | | | | | | | | 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.
* swarm: the member registry is read of any view, not of an Automerge documenttv3 days3-13/+12
|
* state: plain writes take a view to write, Automerge's are asked for as suchtv3 days22-103/+159
| | | | | | | | | | | 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: values read and written through a view any kind of document givestv3 days18-210/+338
| | | | | | | | | | | | | 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.
* document: screening what is received is the document's, the rules access ↵tv3 days23-49/+49
| | | | | | | | | 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.