From 9fa62c47e4d50cb143473002c4d55482d0aa5bed Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 16 Nov 2026 11:46:51 +0000 Subject: federation: no bound on the writers a party's nodes start The bound was judged at a change's history, as any rule is, so it counted only the writers in that history: writers started side by side, each at a history holding none of the others, were each within it, and a party flooding on purpose passed it as often as it liked. Counted for a party, it let one node gone wrong use up the room of all its party's nodes for the rest of the epoch. It goes. A party whose nodes start writers without end runs the others out of memory: denial of service, which breaks no promise. Its writers name its node, and the node's entry its party; a remake leaves an epoch's writers behind, and the others fork without the party. --- docs/federation.md | 47 ++++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 25 deletions(-) (limited to 'docs') diff --git a/docs/federation.md b/docs/federation.md index 72104a3..f70003b 100644 --- a/docs/federation.md +++ b/docs/federation.md @@ -65,9 +65,10 @@ Not promised: * progress without the parties' cooperation: those who cooperate fork, and carry on; * that a party votes well; * that what a party's nodes withhold reaches anyone; -* that the swarm stays fast. A party that floods the document, or whose nodes keep - remakes from committing, makes nodes slow, not wrong: denial of service breaks no - promise here, and the others fork away from it; +* that the swarm stays fast, or up. A party that floods the document, whose nodes keep + remakes from committing, or whose nodes start writers without end (Where Automerge + sets limits), makes nodes slow, or runs them out of memory, not wrong: denial of + service breaks no promise here, and the others fork away from it; * that honest nodes stay together where keys voted twice (Changing the policy): each node keeps the version it took, until its operator has it drop it, and one that had taken neither of two (it lagged behind, or joins) may be shown either first; @@ -576,21 +577,18 @@ epoch its peers give it, or the one its operator pins. * **Changes it shouldn't apply.** A change is first of all one Automerge itself writes, or it is refused before Automerge sees it, in every swarm *(checked: `document::changes::Written`)*. -* **Writers a party's nodes start.** A party's nodes start at most so many writers in - an epoch together, the party each node's entry names counting, a bound judged at a - change's history as any rule is: every writer costs every node memory (below), and a - party starting one with every change, on as many nodes as it lists, would run the - others out of memory, which is more than slow. The figure leaves room for its honest - nodes' starts, rejoins and drops, each a writer, until a remake. -The rest are recommendations: none breaks a promise, only how fast a node is, or how -long nodes stay together. +The rest are recommendations: none breaks a promise, only how fast a node is, whether +it stays up, or how long nodes stay together. * **Writers.** Every writer costs every node memory while the epoch lasts, in proportion to the document's history *(measured: about 4 bytes per change)*. A node writes under a fresh writer each time it starts, rejoins or drops. A federated swarm remakes before its writers and history make that felt, and a node keeps its writer - over a clean restart where it can. + over a clean restart where it can. Nothing bounds the writers a node starts: one that + starts one with every change, by fault or on purpose, runs the others out of memory. + Its writers name it, and its entry its party; a remake leaves an epoch's writers + behind, and the others fork without the party. * **One change a number.** A node that commits two changes under one writer and number splits the nodes that took one from those that took the other: a node holding one can't take the other. Continuum refuses the second as forged, by whoever brings it @@ -682,7 +680,7 @@ What an attacker does, and what happens. *Unit*: the judging, with crafted chang | 39 | A writer forked: two changes, one number | Honest nodes split until operators have one side drop what it took, or a fork. Not promised | sim | | 40 | Different changes to different peers | Honest nodes agree once they sync, but where keys voted twice, a coordinator decided two remakes for one epoch, or a writer forked | sim | | 41 | A party withholding its changes or votes | Not promised | — | -| 42 | Flooding: namespace, proposals, history | Slow, not wrong | bench | +| 42 | Flooding: namespace, proposals, history, writers | Slow, or out of memory; not wrong: a remake leaves the writers behind, and the others fork | bench | | 43 | A node taken off its list writes changes at a history where it was on | Taken where valid there; ended by a remake whose base holds that list | unit | | 44 | A token from another node, even one its party lists | Refused: a node takes only its own | unit | | 45 | A party lists another party's nodes, or one its party dropped | Nothing changes: a node is its own party's | unit | @@ -718,13 +716,12 @@ What an attacker does, and what happens. *Unit*: the judging, with crafted chang | 75 | A version, set, list, path or value larger than the federation allows | Refused; none can be too large for a sync message | unit | | 76 | Two thirds back a proposal that is no version | It can't be written, nor die; the federation is bound to its version. A node shows that it is none, and clients don't back it | unit | | 77 | A party's vote committed again at a history before the nays that freed it, its clock set between, then a remake | The replay refuses it at first, and takes it once the rest is in | unit | -| 78 | A party's nodes starting a fresh writer with every change, or the party listing new nodes to start more | Refused past the bound on the writers a party's nodes start in an epoch | unit | -| 79 | Keys voting twice, or a writer forked, part honest nodes | An operator has its node drop what it took and take the other side's; no fork | sim | -| 80 | An honest party backs a second proposal once its first is dead; another party later signs `true` on the first too | It isn't named: its first proposal is dead by all the votes; the party with `true` and `false` on one is | unit | -| 81 | A node whose operator had it drop a version is sent it again, or holds the votes that passed it | It refuses those changes and writes the version no more, in that epoch, until its operator says otherwise | unit | -| 82 | A key its party dropped wrote, from a history before the drop, ahead of the party's envelope; then a remake or a fork | The snapshot or genesis keeps the party's value, as the federation reads it | unit | -| 83 | A node taken off its list proposes and decides a remake at a history where it was on | Nobody follows it: a node follows a remake only where its coordinator's party lists the coordinator when it switches | unit | -| 84 | A party taken out and let in again within an epoch | The list it wrote before counts no more: its list's `since` is the version that let it in | unit | +| 78 | Keys voting twice, or a writer forked, part honest nodes | An operator has its node drop what it took and take the other side's; no fork | sim | +| 79 | An honest party backs a second proposal once its first is dead; another party later signs `true` on the first too | It isn't named: its first proposal is dead by all the votes; the party with `true` and `false` on one is | unit | +| 80 | A node whose operator had it drop a version is sent it again, or holds the votes that passed it | It refuses those changes and writes the version no more, in that epoch, until its operator says otherwise | unit | +| 81 | A key its party dropped wrote, from a history before the drop, ahead of the party's envelope; then a remake or a fork | The snapshot or genesis keeps the party's value, as the federation reads it | unit | +| 82 | A node taken off its list proposes and decides a remake at a history where it was on | Nobody follows it: a node follows a remake only where its coordinator's party lists the coordinator when it switches | unit | +| 83 | A party taken out and let in again within an epoch | The list it wrote before counts no more: its list's `since` is the version that let it in | unit | ## Roads not taken @@ -835,11 +832,11 @@ On a federated swarm: touching what the federation reads (versions, proposals, votes, key sets, node lists), as `access::screen` moves it today for what continuum's rules read; the byte formats (a version's JCS bytes, hashes in paths and how two compare, the meta's - version); the bound on the writers a party's nodes start in an epoch; and the sizes a - version, a set, a list, a path and a value may have, each within what a sync message - carries. A node that doesn't know the policy stops taking changes. Until stage 5, a - federated swarm takes no remake: from stage 4 on, one that grows too large starts - afresh by a fork whose version names the same parties, keys and rules. + version); and the sizes a version, a set, a list, a path and a value may have, each + within what a sync message carries. A node that doesn't know the policy stops taking + changes. Until stage 5, a federated swarm takes no remake: from stage 4 on, one that + grows too large starts afresh by a fork whose version names the same parties, keys + and rules. 2. **What counts**, read by the current version and the keys; shown in the API. Reports of the versions a node refused, and its operator having it drop what it took; a tool reporting, from the votes, a party that voted twice. -- cgit v1.3.1