diff options
| author | tv <tv@krebsco.de> | 2026-11-18 18:49:50 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-18 20:29:41 +0100 |
| commit | c64fcc05d8c53bee99ab039bd709039afb730cdd (patch) | |
| tree | 45baad78d7b92de42283be2954fc3f9b4dd6129d /docs/federation.md | |
| parent | 598366b03679eac9d04f32d9194f3ba4ba9c3da8 (diff) | |
federation: a node stops at a version it doesn't read
A version event writing a proposal passed on the version a node reads, which doesn't
read as a version there (of a later federation, using what a later continuum takes, or
none at all), the node can't judge: `Fold::stops`. The store stops at it: it takes
nothing and refuses nothing from then on, holding back whatever comes, that event first
(`Offered::Stopped`), and keeps none of it across a restart, where it stops there again.
One beside the version the node reads is refused of its own, as any other.
Its operator has it drop that event (`POST /admin/events/drop`), or one it builds on:
it is refused as dropped, or as built on what was, any version event writing that
version with it, kept in the store file; the node judges what it held back and goes on
under the version before. Allowed again, it stops there once more.
The node logs the stop and its end; `GET /events` names the event, why, and how many it
holds back (`stopped`); a put answers `stopped`, written into the document all the same;
a node voting by itself casts nothing while stopped. The test fold's eras tagged `new`
stop a store.
Row 39 is tested (`federation_attack_39`); of rows 9, 10 and 48, a node stops at the
version event.
Diffstat (limited to 'docs/federation.md')
| -rw-r--r-- | docs/federation.md | 44 |
1 files changed, 29 insertions, 15 deletions
diff --git a/docs/federation.md b/docs/federation.md index 190f2b4..cef373b 100644 --- a/docs/federation.md +++ b/docs/federation.md @@ -242,12 +242,15 @@ application keeps party names apart from its spelling (no party named `wiki` whi A version is none if a field is missing or more (but for `checkpoint`, which it may leave out), if it gives a party more keys than a key set may hold or more nodes than a node list, or a rule a path longer than a write's may be, or if it breaks any of the -above. It can't pass, and a version event naming it is refused. A proposal is taken -whatever it holds: whether it is a version is asked where a version event names it, so -that nodes knowing more of what a version may say don't part from those knowing less. A -node shows whether a proposal is a version by the federation it knows, and a party's -client backs none that isn't: two thirds backing one that can never be written bind the -federation to its version, as a yes binds ([Changing the policy](#changing-the-policy)). +above. A proposal is taken whatever it holds: whether it is a version is asked where a +version event names it, so that nodes knowing more of what a version may say don't part +from those knowing less. A node can't tell a version that is none from one a later +continuum reads: at a version event writing one that passed, it stops +([Changing the federation](#changing-the-federation)). A node shows whether a proposal is +a version by the federation it knows, and a party's client backs none that isn't: two +thirds backing one that is none stop every node at its version event, until their +operators have them drop it, and bind the federation to its version, as a yes binds +([Changing the policy](#changing-the-policy)). What the swarm's document holds beyond the events, and what a node takes at its API, is the store's ([`store.md`](store.md), [On Automerge](store.md#on-automerge)). @@ -296,8 +299,10 @@ Once a proposal passed on the current version, a node writes it as soon as it ho passed, by a **version** event, `{"deps": […], "version": <hash>}`, which no party signs: any node may write it, and the same version written by several is one (below). Every node judges it at its history: the proposal proposed there on the version current -there, passed there, and a version changing that one. A version takes effect where it is -written: it is current at every history that holds it and no version after it. +there, passed there, and a version changing that one; where the proposal is none to the +node, it can't judge it ([Changing the federation](#changing-the-federation)). A version +takes effect where it is written: it is current at every history that holds it and no +version after it. **A node takes a version only where it changes the version the node reads**, or is one it took, written again. A version event of any other, valid at its history or not, it @@ -519,7 +524,9 @@ rule for checkpoints, none for a version that changes more than its number, what changes and its checkpoint, which it checks against the current one, nor for one whose heads leave out what it held for a while ([Checkpoints](#checkpoints)). Where two checkpoints are proposed at once, the votes split, as any do; a rule may vote `false` on -the one it doesn't back, so that one dies and its backers are free. +the one it doesn't back, so that one dies and its backers are free. A node that stopped +at a version it doesn't read casts nothing, by itself or by hand, as what it reads is +behind ([Changing the federation](#changing-the-federation)). It signs with a key the party's version names, which the party keeps on that node, not apart: one stolen there votes, and writes the party's key set and node list, as the @@ -659,7 +666,7 @@ fold, with crafted events. *Sim*: a simulation. *Bench*: measured, not judged. | 6 | A key set signed by a key the version doesn't name, or by one a later version replaced, at a history from before | Refused; or, written under a version before the one that named the party's keys anew, it counts no more | unit | | 7 | A key set without the key that signed it | Counts: a set is checked where it is written | unit | | 8 | A version event without the votes, or for a proposal not on the version current at its history | Refused at its history | unit | -| 9 | A version with a field missing or more, a rule under `_continuum`, without a literal first segment, with `**` not last, `{party}` twice, or a writer that is no party of it | No version: can't pass; a version event naming it is refused | unit | +| 9 | A version with a field missing or more, a rule under `_continuum`, without a literal first segment, with `**` not last, `{party}` twice, or a writer that is no party of it | No version: passed, a node stops at a version event writing it, as at one it doesn't know (39) | unit | | 10 | A proposal naming a federation, or saying what, a node doesn't know | Taken as a proposal; asked where a version event names it | unit | | 11 | `true` on two proposals of one version | The second refused, unless the first is dead at its history | unit | | 12 | `true` on two proposals at once, from two nodes | Both taken; two versions changing one may be written; each node keeps the one it took and refuses the other; reported; the parties fork | unit, every order | @@ -689,7 +696,7 @@ fold, with crafted events. *Sim*: a simulation. *Bench*: measured, not judged. | 36 | A fork's version giving a party that didn't go keys of its founder's | Joiners holding the federation are told, party by party | unit | | 37 | Two founders forking one version at one set of heads, or starting a federation from one first version | One store: its root is built byte for byte | unit | | 38 | A group whose parties list no nodes forks | Its version names their node lists | unit | -| 39 | A federation, or a version, a node doesn't know | It stops taking events | unit | +| 39 | A federation, or a version, a node doesn't know | Of its root, it holds no store; at a version event writing one that passed, it stops: takes nothing and refuses nothing, until it runs a continuum that reads it, or its operator has it drop that event | unit | | 40 | Two parties each writing a key set beside the other's vote, crossed | Nothing: votes go by their version's keys | unit | | 41 | A federation's root with heads or events kept, or whose version lists no node | None; or nothing after it is taken, as no node is a member | unit | | 42 | A version replacing every listed party's keys | The lists still count, each its party's until it writes another | unit | @@ -698,7 +705,7 @@ fold, with crafted events. *Sim*: a simulation. *Bench*: measured, not judged. | 45 | An honest node writes a version valid where it is written, on the side a node doesn't read | Refused, and reported apart; nothing is held against the node that put it | unit | | 46 | A party's `true` and `false` on one proposal, both in a history | Both count there: a history holding more votes takes back no pass and no death | unit | | 47 | A path whose `{party}` segment names no party (`names/r/foo`) | The `{party}` rule doesn't match; a later rule decides | unit | -| 48 | 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 | +| 48 | Two thirds back a proposal that is no version | It can't die; nodes stop at a version event writing it, until their operators have them drop it (39); the federation is bound to its version. A node shows that it is none, and clients don't back it | unit | | 49 | Keys voting twice part honest nodes | An operator has its node drop what it took and take the other side's; no fork. Where the version it took named a checkpoint, by a checkpoint its operator pins | sim | | 50 | 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 | | 51 | A node whose operator had it drop a version is sent it again, written anew by another node, or holds the votes that passed it | It refuses any event writing that version and writes it no more, until its operator says otherwise | unit | @@ -805,14 +812,21 @@ and the Automerge version, whose encoding fixes a change's hash. A change to the federation is a design like this one, with the next number. A swarm moves to it by a version of its policy that names it (`"federation": 2`), which the parties pass once their nodes run a continuum that knows it. A node that doesn't know -the federation, or a version, its swarm has stops taking events and says so. +the federation its swarm's root names holds no store, and says so. One that doesn't read +a version that passed on the version it reads stops at the version event writing it, and +says so: it takes nothing and refuses nothing from then on, and keeps none of it across a +restart, until it runs a continuum that reads it, or its operator has it drop that event +([`store.md`](store.md), [A node's own](store.md#a-nodes-own)). Dropped, the node refuses +that event and any writing that version, as any version its operator had it drop, and +goes on under the version before. One beside the version it reads, it refuses of its own, +as any other ([Changing the policy](#changing-the-policy)). A change that only has the federation take what it refused, and reads nothing it took otherwise, keeps the number: the keys of type `ecdsa-sha2-nistp256` taken beside Ed25519 ones are such a change. It is rolled out first and used after: every node runs a continuum that takes it before any party uses it. A node that doesn't refuses what uses -it, a version naming such a key among them, and reads otherwise than the others until -it does. +it, and reads otherwise than the others until it does; at a version naming such a key, +which it doesn't read, it stops, as above. ## The registry on it |
