From c64fcc05d8c53bee99ab039bd709039afb730cdd Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 18 Nov 2026 18:49:50 +0000 Subject: 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. --- docs/guides/federation/when-things-go-wrong.md | 34 +++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) (limited to 'docs/guides/federation/when-things-go-wrong.md') diff --git a/docs/guides/federation/when-things-go-wrong.md b/docs/guides/federation/when-things-go-wrong.md index c79f24f..8c46e1d 100644 --- a/docs/guides/federation/when-things-go-wrong.md +++ b/docs/guides/federation/when-things-go-wrong.md @@ -1,8 +1,8 @@ # When things go wrong -What to do when a node reports a version it refused, when a party voted twice, and when -a node doesn't do what it should. The rules are the design's -([`federation.md`](../../federation.md), +What to do when a node reports a version it refused, when a party voted twice, when a +node stopped at a version it doesn't read, and when a node doesn't do what it should. The +rules are the design's ([`federation.md`](../../federation.md), [Changing the policy](../../federation.md#changing-the-policy); [`store.md`](../../store.md), [A node's own](../../store.md#a-nodes-own)). @@ -65,6 +65,34 @@ or with its keys named anew ([`forking-and-following.md`](forking-and-following. Tell the other parties what your node took and what it refused, and send them your record. +## A node stopped + +A node stops at a version event writing a version that passed on the version it reads, +which its continuum doesn't read: of a later federation, using what a later continuum +takes, or none at all. It takes nothing and refuses nothing from then on, and votes +nothing by itself or by hand; what is put through it, it still writes into the document +(`stopped` when put). Its log says so (`The store stopped at an event this continuum +can't judge`), and `GET /events` names the event, why, and how many it holds back: + +```sh +curl -s -u tv:secret localhost:3000/events | jq .stopped +# {"heldBack":12,"id":"9a1e…","why":"version 3c0f… passed, and doesn't read as one…"} +``` + +Upgrade the node to a continuum that reads it: restarted, it reads its store anew and +takes it. Where none does (two thirds passed a proposal that is no version), have the node +drop that event: it goes on under the version before, refuses the event and any writing +that version, and keeps so (`--store-file`): + +```sh +curl -u tv:secret -X POST -H 'Content-Type: application/json' \ + --data '{"ids": [""]}' localhost:3000/admin/events/drop +# {"dropped":["9a1e…"]} +``` + +Allowed again (`/admin/events/allow`), it stops there once more. A node that stopped +keeps none of it in its store file: restarted, it stops there again. + ## A node doing less than it should * **It holds no store** (`404` from `GET /events`): it hasn't read its document yet, its -- cgit v1.3.1