diff options
| author | tv <tv@krebsco.de> | 2026-11-14 12:20:30 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-14 12:20:30 +0000 |
| commit | cf539b9d905b25ea2432bea805f6abd8a649592e (patch) | |
| tree | 0177709598273bf697ce5fc79286a8ebcd857a94 /docs | |
| parent | 9dd1711fa24be4b8ad05d8a07dbed7e6e6a9e93e (diff) | |
federation: a party is headed below the roots
A party for a budget was a user with the users below it that no line
reaches but through it. Every line starts at a root, so a root's party
held every user only it had brought in: one newcomer writing at the
budget's pace stalled the root's witness changes at every node.
A user's party is now headed by the highest user below the roots
through whom all its lines pass: a user a root created heads its own,
and a root is its own party. A root's node's witness changes, one a
`witness` at most, draw on no party.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/federation.md | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/docs/federation.md b/docs/federation.md index 3ca844d..ccf62f0 100644 --- a/docs/federation.md +++ b/docs/federation.md @@ -402,11 +402,14 @@ grows. A statement is signed by one user and says one thing: What is over waits, and nothing is refused for it: a change larger than what is left of the hour is taken once nothing of its party waits before it, and the party's next changes wait until the hour it overdrew is paid. For a budget a party is a user with - the users below it that no line reaches but through it, as the graph stands where - the node reads it: creating users makes no second budget. A node's changes draw on - the party of the user its writers count for (above), whatever they carry: a - statement another party hands a node draws on the node's party, which takes it at - its own pace. + the users below it that no line reaches but through it: the party of a user is + headed by the highest user below the roots through whom all its lines pass, as the + graph stands where the node reads it. A user a root created heads its own, and a + root is its own party: creating users makes no second budget, and nobody shares a + root's. A node's changes draw on the party of the user its writers count for + (above), whatever they carry: a statement another party hands a node draws on the + node's party, which takes it at its own pace. A root's node's witness changes, one a + `witness` at most, draw on no party. * **Past a limit.** A user's statements of one kind are counted from the first: each has, and states, the number after the highest of those it was signed in sight of, and of two with one number the one with the lower digest comes first. A statement is @@ -732,13 +735,13 @@ What this gives: * **Settled.** Every node writes its member entry as often as `stamp` says, and a root's node also once claims reach it that it hadn't seen: within `witness`, one change for all that reached it meanwhile, so no more often than `witness` (with a - minute, 1 440 changes a day, within the budget recommended for its party). Such a - change has in its history everything the node had received. The roots' nodes are on - every side. So once a root's node wrote after receiving a claim, while it held no - other of that name that stood, every other claim of the name is late against it: one - surfacing later, however little it says it saw, and one that was there and comes to - count later. The claim is **settled**, within `witness` of reaching a root's node. A - node tells (`settled`, below). + minute, 1 440 changes a day, drawing on no party's budget). Such a change has in its + history everything the node had received. The roots' nodes are on every side. So + once a root's node wrote after receiving a claim, while it held no other of that + name that stood, every other claim of the name is late against it: one surfacing + later, however little it says it saw, and one that was there and comes to count + later. The claim is **settled**, within `witness` of reaching a root's node. A node + tells (`settled`, below). * **Several roots.** Any one of them settles a claim. Two that received two claims in different orders make each late against the other: contested, as two claims made at once are, and one releases. So with more roots a claim is settled though one is @@ -2534,19 +2537,20 @@ Nodes and syncing: | 145 | Sends a node a change of the node's own writer, another value, to make it start a writer | Refused as forged; the node switches only where its own key signed it (a copy of its files) | 6 | unit, exists: `another_writing_as_this_node` | | 146 | Crafts a first change of another node's writer, authored as a third node, to sort before the writer's own in a batch, so that screening judges the writer's changes as the third node's | Screening names a change's node by its own author, or that of its actor's first change in its own history, never by another change of the batch: the writer's changes are vouched for by their own node's signature, and the crafted one, a second first change of the writer, is refused as forged | 1, 2 | unit, exists: `a_committer_from_its_own_history` | | 147 | Sends a change of a few bytes that holds a million operations | Taken, at the cost of applying it, against its party's budget, which counts operations: the party's next changes wait until it is paid | 6; not promised (a bound on what an epoch's document costs) | argued; sim: `a_party_past_its_budget_waits` | -| 148 | Claims and releases a name a minute, by many users, to have every root's node write for each | A root's node writes once a `witness` at most, for all claims that reached it meanwhile, and takes the party's claims at its budget's pace | 6 | unit: `a_root_witnesses_once_a_witness` | -| 149 | Crafts a change Automerge won't take, or that writes in an object nowhere to be found | Refuse *(checked: the rules refuse the second today)*; only the message that brought it fails | 1 | unit: `a_change_writing_nowhere` | -| 150 | Crafts a change Automerge takes and shouldn't: bytes it wouldn't encode itself, operations numbered against its dependencies', a gap in its actor's changes, an operation named that is elsewhere or outside its history, an operation Automerge's transactions never write (an element written over naming the one inserted after it, an insert that replaces, a deletion or an increment inserted, a deletion named as replaced), a table written into, a value written at a mark's begin | Refuse before Automerge sees it, by the change and its own history alone: applied, such a change makes a node panic, save a document that doesn't load, or part from nodes it reached in another order | 1, 2 | unit, exist: `bytes_automerge_wouldnt_encode_are_refused`, `operations_numbered_against_their_dependencies_are_refused`, `a_gap_in_an_actors_changes_is_refused`, `operations_named_at_the_wrong_place_are_refused`, `operations_outside_a_changes_history_are_refused`, `only_what_transactions_write_passes`, `only_what_holds_a_value_is_replaced`, `no_table`, `no_mark`, `what_passes_leaves_automerge_sound`, `a_batch_is_checked_against_itself`, `a_change_refused_after_its_check_stands_in_for_nothing` | +| 148 | A newcomer a root created writes at the budget's pace, to stall the root's witness at every node | A user a root created heads a party of its own, and waits on its own budget; a root is its own party, and its node's witness changes draw on none | 5, 6 | unit: `a_party_below_the_roots` | +| 149 | Claims and releases a name a minute, by many users, to have every root's node write for each | A root's node writes once a `witness` at most, for all claims that reached it meanwhile, and takes the party's claims at its budget's pace | 6 | unit: `a_root_witnesses_once_a_witness` | +| 150 | Crafts a change Automerge won't take, or that writes in an object nowhere to be found | Refuse *(checked: the rules refuse the second today)*; only the message that brought it fails | 1 | unit: `a_change_writing_nowhere` | +| 151 | Crafts a change Automerge takes and shouldn't: bytes it wouldn't encode itself, operations numbered against its dependencies', a gap in its actor's changes, an operation named that is elsewhere or outside its history, an operation Automerge's transactions never write (an element written over naming the one inserted after it, an insert that replaces, a deletion or an increment inserted, a deletion named as replaced), a table written into, a value written at a mark's begin | Refuse before Automerge sees it, by the change and its own history alone: applied, such a change makes a node panic, save a document that doesn't load, or part from nodes it reached in another order | 1, 2 | unit, exist: `bytes_automerge_wouldnt_encode_are_refused`, `operations_numbered_against_their_dependencies_are_refused`, `a_gap_in_an_actors_changes_is_refused`, `operations_named_at_the_wrong_place_are_refused`, `operations_outside_a_changes_history_are_refused`, `only_what_transactions_write_passes`, `only_what_holds_a_value_is_replaced`, `no_table`, `no_mark`, `what_passes_leaves_automerge_sound`, `a_batch_is_checked_against_itself`, `a_change_refused_after_its_check_stands_in_for_nothing` | Rules, and the swarm as it is: | # | The adversary | Honest nodes | Promise | Shown by | |---|---|---|---|---| -| 151 | A rule differs between versions (a bug) | Each side refuses what the other takes, or their stamps name two digests for the same changes: each logs and shows it. A node that finds itself apart from the nodes of more than two thirds of the other voters at its first start with a version writes nothing. One side upgrades and drops | not promised | sim: `a_side_drops_and_comes_back`, `two_digests_one_history`; unit: `a_node_checks_itself` | -| 152 | Stamps a wrong digest, to keep the nodes that upgrade from writing; one of three voters does | A node stops only where it differs from the nodes of more than two thirds of the other voters; from fewer it shows it and goes on | 6 | unit: `one_wrong_digest_stops_nobody`, `of_three_voters` | -| 153 | A policy version a node doesn't know: in the root, or decided | It doesn't sync, and takes no such proposal up: a policy is decided only with two thirds of the voters' nodes knowing it | 1 | unit: `no_sync_under_an_unknown_policy`, `an_unknown_policy_isnt_taken_up` | -| 154 | A partition, for any length of time | A side decides only with nodes of two thirds of all the voters on it. Where a third of them have nodes and votes on both sides, both may: every node then acts on the higher number | 7 | sim: `one_side_decides`; unit: `the_last_holds` | -| 155 | None: a swarm that isn't federated | Everything as today | Optional | the existing tests, untouched; `bench_screening` | +| 152 | A rule differs between versions (a bug) | Each side refuses what the other takes, or their stamps name two digests for the same changes: each logs and shows it. A node that finds itself apart from the nodes of more than two thirds of the other voters at its first start with a version writes nothing. One side upgrades and drops | not promised | sim: `a_side_drops_and_comes_back`, `two_digests_one_history`; unit: `a_node_checks_itself` | +| 153 | Stamps a wrong digest, to keep the nodes that upgrade from writing; one of three voters does | A node stops only where it differs from the nodes of more than two thirds of the other voters; from fewer it shows it and goes on | 6 | unit: `one_wrong_digest_stops_nobody`, `of_three_voters` | +| 154 | A policy version a node doesn't know: in the root, or decided | It doesn't sync, and takes no such proposal up: a policy is decided only with two thirds of the voters' nodes knowing it | 1 | unit: `no_sync_under_an_unknown_policy`, `an_unknown_policy_isnt_taken_up` | +| 155 | A partition, for any length of time | A side decides only with nodes of two thirds of all the voters on it. Where a third of them have nodes and votes on both sides, both may: every node then acts on the higher number | 7 | sim: `one_side_decides`; unit: `the_last_holds` | +| 156 | None: a swarm that isn't federated | Everything as today | Optional | the existing tests, untouched; `bench_screening` | ## The registry on it ``` @@ -2603,7 +2607,7 @@ it trusts for that. ## Stages Each leaves the system working, and is a few patches with its tests, which leave -their vectors. At every stage the existing tests pass untouched (155). +their vectors. At every stage the existing tests pass untouched (156). 1. **A federated swarm's frame.** `--genesis-policy` (a file, written into the genesis change with the roots, the voters and the users it starts with); a federated node @@ -2611,7 +2615,7 @@ their vectors. At every stage the existing tests pass untouched (155). yet, takes tokens and logins by key as its operator says, keeps ended sessions to itself, stamps as the policy says, and writes a member entry of the policy's shape and size. What the genesis change sets for the swarm as a whole is read from the - policy. Tests: 136 to 139, 146, 150, 153, 155, and the policy's existing tests + policy. Tests: 136 to 139, 146, 151, 154, 156, and the policy's existing tests under a policy from the genesis change. Those of a crafted change, and of a crafted committer, exist already: screening refuses those in every swarm. 2. **Statements.** The users' registers (`create`, `key`, `node`, `vouch`, `release`); @@ -2647,7 +2651,7 @@ their vectors. At every stage the existing tests pass untouched (155). 8. **Coming back.** The drop an operator asks for, a forked writer proven and shown with what the roots' nodes hold, the budget and the share per party, the writers counted per user, for the one a node's member entry names, a node keeping its - writer over a clean stop. Tests: 133, 140 to 145, 147 to 149. + writer over a clean stop. Tests: 133, 140 to 145, 147 to 150. 9. **The registry.** Import, export, and a federated swarm of the simulations with the registry's kinds and a few hundred hosts. From here it can be tried: users, hosts, names, a root that settles, names that become final. It isn't to be relied on yet. @@ -2661,10 +2665,10 @@ their vectors. At every stage the existing tests pass untouched (155). contested name is, a name the rules leave to the voters; a decision of the voters before counted only in sight of the list that replaced them; a final decision. The simulations start from a root change naming several voters. Tests: 25, 65, 69 to - 88, 122 to 125, 154. + 88, 122 to 125, 155. 11. **Versions.** The digest with every stamp, a node checking itself before it writes; for every swarm, a node that speaks the wire version before its own, and a - handshake that says which epochs its node keeps. Tests: 151, 152. + handshake that says which epochs its node keeps. Tests: 152, 153. 12. **Remakes.** Compaction only; a node proposing and acking by `remakeChanges` and `remakeWriters`, and following such a remake only, by its result; the snapshot every node builds, with whatever can still count and how far each length of time @@ -2678,7 +2682,7 @@ their vectors. At every stage the existing tests pass untouched (155). to 117, 119 to 121. 13. **The policy by a decision.** The policy as a matter, a node that doesn't know it, what it no longer covers: shown aside, taken away by its user only, dropped after - a time, moved at a remake. Tests: 32, 52, 89, 90, 153. + a time, moved at a remake. Tests: 32, 52, 89, 90, 154. 14. **Going apart, and refusing.** A fork followed by an operator's word, with who votes and who the roots are on its side. Refusing a decision: a node's bounds, the epoch without the decision, what a node takes along. Tests: 126 to 131. From here |
