aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm/peer
Commit message (Collapse)AuthorAgeFilesLines
* federation: nodes of both kinds pass their sets on to each other, tootv8 hours2-6/+12
| | | | | | | | | | | | 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.
* A node of both kinds, for a swarm to move to sets by (--store-both)tv16 hours2-9/+20
| | | | | | | | | | | | | | | | | | | 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: a node says to each peer the kind that peer holds, of those it holdstv17 hours2-8/+32
| | | | | | | | | 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.
* swarm: a node whose store a set of events carriestv20 hours2-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | 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: a node says the kind of the document it holdstv20 hours2-4/+4
| | | | | | 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.
* wire: version 53, what is the document's as bytes, and the kind in handshakestv2 days2-0/+16
| | | | | | | | | | | | | | | | | | | | 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 comparetv2 days1-16/+9
| | | | | | | | | | 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.
* swarm: the member registry is read of any view, not of an Automerge documenttv2 days1-3/+2
|
* document: values read and written through a view any kind of document givestv2 days1-4/+5
| | | | | | | | | | | | | 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.
* roots: a joiner shakes hands again with a seed that says it's readytv9 days1-0/+2
| | | | | | | | | | | A seed that named no root, joining itself, names it once ready, but only from this build on: a 0.0.1 seed never shakes hands again, and its joiner waited for ever. scripts/wire-check hit that, d of this tree joining through c of 0.0.1, their handshake 6 ms before c was ready. So the joiner does its half too: where a seed it still waits for named none, a STATUS saying the seed became ready has it shake hands with the seed again (seed_ready), which then names its root.
* roots: a seed joining itself names the root once it has ittv10 days1-2/+2
| | | | | | | | | | | | A joiner takes no root before each of its seeds named one, and a seed names its root only in a handshake. A seed that shook hands while joining itself named none, and never again: its joiner waited for ever. scripts/wire-check hit that (b joining a, c through b, d through c): b's reply to c came 2 ms before b had its document. Now a node notes the peers its handshakes named no root to, and once ready, shakes hands with them again, naming it. Older joiners take it too: it's a handshake as before.
* transport: SPEAKS, which wire versions a node speaks and what it knowstv12 days2-1/+18
| | | | | | | | | | | | | | | | | | | | | | | Before each HELLO and each HELLO_REPLY, a node sends SPEAKS: the oldest and the newest wire version it speaks, and the ID of the newest revision of the federation it knows. It stands outside the wire versions, its first byte 0, which no version is, laid out as no build changes: that byte, the oldest, the newest, then 32 bytes of the revision's ID where there is one; a reader takes those and leaves whatever follows, which a later build may add. So a peer on another build reads it too, and nodes on different builds can say what they run, which a rollout needs. A build from before it takes it for a message of another wire version and logs that once of the peer (version=0), reading the rest of the peer's messages as before: SPEAKS rolls out node by node, with no change of VERSION. The node keeps what each peer said last (`swarm::speaking`, at most 4096 peers). It counts as `hello` traffic. `OLDEST`, the oldest version this build reads, is `VERSION` for now: a range for a later build to widen. operations.md also says what is so of the other-version warning now: every transport logs it once per peer at warn, not Mycelium alone.
* peer: a member's message before its handshake was taken asks for onetv2026-11-171-5/+33
| | | | | | | | | | In a swarm holding a store, a node reads a peer's messages only by the party its handshake named. One whose handshake it hasn't taken (its reply lost, say) was cut off at its next message, as a non-member is, while the peer, which took ours, synced on, and neither said HELLO again. Now such a message goes unread, and the node says HELLO to the peer, as to any whose reply it waits for (`hello_again_now`): its reply names its party. What a peer refused as a non-member sends next is known to be a non-member's, its party kept, so that it asks for no HELLO. A simulation loses a's replies to b for a while.
* peer: in a swarm holding a store, its members onlytv2026-11-163-0/+66
| | | | | | | | | | | | A node of a swarm holding a store syncs with its members only (`docs/store.md`, Members): the nodes its store names, each with the party its handshakes name, as the store reads now. A handshake from any other goes unanswered, and what the node had with it ends, as with a banned node; so does what it had with a member at its next message, once the store names it no more (`swarm::peer::members`). The party a handshake names is kept with the peer. While a node holds no store yet, joining, it can't tell, and takes everyone of its swarm: its seeds, which take it only where its party lists it. A node says whether it is a member itself, as its store reads, when that changes.
* handshake: the party its sender is oftv2026-11-161-0/+14
| | | | | | | In a swarm holding a store, a node's handshakes name the party it is of (`docs/store.md`, Members), so that a peer tells whether it is a member before its entry reaches it: HELLO and HELLO_REPLY carry `party`, as `--store-party` says, None elsewhere and without the `federation` feature. Wire format version 52.
* swarm: no SIGNATUREStv2026-11-091-10/+0
| | | | | | | | | | | | | | Signatures sent on their own (SIGNATURES, every second, to each peer not sent them yet) flooded every link: a signature made after its change left, or one that came with changes, went to every neighbour, whether or not it got the change along with its signature elsewhere. With every change of a node signed as it leaves (1217) and signatures going where their changes go (1218), none is left for them to carry: the message, its task and its traffic counter go (wire version 46). Signatures waiting for their changes are offered as before when sync messages bring them, and the changes waiting for signatures judged again with the next batch.
* roots: an epoch's root pinned, and named in every handshaketv2026-11-082-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Review 2, N7, the care it raised: a joining node's empty document took as the first epoch's root whatever dependency-less change came first, from whichever peer it joined through; the first epoch's ID is all zeros, so nothing pinned it. A remake's epoch has its ID, the snapshot change's hash, which the rules hold its root to. * Every node names its epoch's root in HELLO and HELLO_REPLY (the epoch's ID for a remake's, its genesis change for the first; wire version 45). A node whose document starts from another root of the same epoch refuses the handshake, logging it: another history under the swarm's ID, a forged root or a genesis started again. * A joining node with an empty document takes as its root only the one it was given (--genesis-root, new), else the one its peers name, and none while they name different ones (access::screen::RootPin, kept in Screening across documents): one peer hands it another root only if it is all the joiner hears, or never, with --genesis-root. A root refused is listed with the refused, what builds on it with it. * The genesis node logs the root (`The swarm's root`); GET /admin/epochs shows it (`root`). A genesis started again under a remembered swarm ID used to merge with the nodes of it still running; they now refuse it (another root), and the docs say to join them with seeds instead. The epoch's identity stays as it is (generation 0 all zeros): records and epoch metadata name it so, and every comparison of epochs with them.
* swarm: changes taken unjudged, dropped (REFUSALS)tv2026-11-071-0/+10
| | | | | | | | | A node refusing changes a peer brought tells it which broke a rule; the peer judges them itself, and if its rules refuse them too, drops them with all built on them (its document forked without them, a fresh actor), quarantining its own writes among them. Wire version 42. Auth plan M6 (rejoin on taint).
* access: banstv2026-11-071-0/+20
| | | | | | | | _continuum/banned/<node ID>: every node refuses the banned node's changes from then on (judged as the ban stood) and leaves its handshakes unanswered. Auth plan M6.
* signatures: on their own (SIGNATURES)tv2026-11-071-0/+10
| | | | | | | Signatures no sync message took go on their own within a second, to each peer not sent them yet (wire version bumped). Auth plan M5.
* dashboard: without LINKS; LINKS removedtv2026-11-071-6/+0
| | | | | | | | | The dashboard reads every member's links from the members themselves; LINKS and LINKS_REPLY, swarm::links and their wire tags go (wire version bumped). Nodes the browser can't reach are drawn from what the reachable ones measure. Auth plan M3.
* store: keys_at tells no map from an empty onetv2026-11-071-1/+4
| | | | | | | | registry::exists counted any value at _continuum/users as a registry; keys_at answers None where there is no map, and its users (records, members, forget records, remakes) say what they make of it. Auth plan M1 (fix).
* HyParView (slim)tv2026-11-061-2/+7
|
* plumtreetv2026-11-061-0/+12
|
* indirect probestv2026-11-061-0/+6
|
* unlisted members forgottontv2026-11-061-6/+12
|
* handshakes countedtv2026-11-061-0/+7
|
* working links recordedtv2026-11-061-0/+1
|
* heads heard in announcementstv2026-11-062-3/+5
|
* heads heard in repliestv2026-11-062-1/+4
|
* heads heard forget senttv2026-11-062-1/+31
|
* worker sends off the passtv2026-11-061-14/+43
|
* suspend detectedtv2026-11-061-0/+4
|
* rtt table prunedtv2026-11-061-0/+1
|
* one grace wait per peertv2026-11-061-1/+3
|
* reach sets boundedtv2026-11-061-5/+11
|
* strangers messages smalltv2026-11-061-0/+4
|
* lanes commenttv2026-11-051-2/+5
|
* round trips in treestv2026-11-051-1/+8
|
* suspect pathstv2026-11-051-0/+5
|
* deflate blob chunkstv2026-11-051-1/+2
|
* epoch tag in synctv2026-11-051-3/+21
|
* time blob messagestv2026-11-041-0/+19
|
* slow round back offtv2026-11-041-0/+5
|
* hello again when heard fromtv2026-11-042-2/+19
| | | | | | While we wait for a peer's HELLO_REPLY, anything else that comes from it makes our HELLO go again at once, at most once a second, instead of when the backoff says.
* unanswered pull frees the slottv2026-11-041-0/+1
| | | | | | When the answer to a pull is overdue (the sync reply timeout: 1 s in the simtests, 10 s in production), the pull gives up the slot, and the next waiting neighbour is pulled at once.
* overdue sync asked after from thentv2026-11-041-3/+3
|
* pull after gracetv2026-11-041-1/+1
| | | | | | | | Before pulling, a node waits one measured round trip to the announcer (1 s at most) and pulls only what is still missing. If the round trip isn't known yet, it pulls at once, as now. On the clean benchmark links the round trip is a few milliseconds, so those scenarios shouldn't change.
* announcements answered when lackingtv2026-11-042-5/+23
| | | | | | | A neighbour now answers an announcement only if it lacks some of the announced heads. Heads that merely differ are no longer enough, since they do while writes go on. The check reads the document, so it runs off the message consumer, as the pull check already does.
* unanswered members not reachedtv2026-11-031-7/+18
|