diff options
| author | tv <tv@krebsco.de> | 2026-11-25 15:27:53 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-25 15:27:53 +0000 |
| commit | e22f2e5c38baa1866793338fc7abde8c8e53b635 (patch) | |
| tree | f6e7225e05bc35467b638416fa8487d538d02fed /docs | |
| parent | 46fc2ab070b5f8d3cd6c8bd0d6bd15c624a061e5 (diff) | |
continuum-party vote: asks its node first whether a true is taken
A party's client recorded its vote, sent it, and only warned where its
node refused it: a true every node refuses, its party's earlier one not
dead where it builds, stayed in the record and bound the party, though no
node held it. Taking it back out on the node's word would let a node that
lies have its party vote twice.
So it asks before it signs: POST /events/back names the party, the
proposal and the events the vote would build on, and a node answers by
what it asks itself before it casts one (vote::takes_true). Nothing
signed is sent, so a node gets nothing it could pass on. Told it isn't
taken, the client casts and records nothing; a node that doesn't answer,
one before this, it says so of, and goes on as it did.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/guides/federation/proposing-and-voting.md | 14 | ||||
| -rw-r--r-- | docs/guides/federation/running-a-node.md | 6 | ||||
| -rw-r--r-- | docs/openapi.yaml | 44 |
3 files changed, 56 insertions, 8 deletions
diff --git a/docs/guides/federation/proposing-and-voting.md b/docs/guides/federation/proposing-and-voting.md index 1769a1f..a718bc8 100644 --- a/docs/guides/federation/proposing-and-voting.md +++ b/docs/guides/federation/proposing-and-voting.md @@ -113,12 +113,14 @@ record before it sends the vote. It casts no vote that would make its party vote current checkpoint's heads; * one `true` at a time: another `true` on the same version only once the proposal the party backed is dead. The client fetches the votes that made it so from the node, keeps - them in the record beside the new `true`, and builds the `true` on them, so that the - first is dead at its history too: the proposal it backs next may have been proposed at - a history holding its first `true`. A checkpoint's `true` it builds on the proposal - alone, and says when it may be refused so: where the nays came after the heads the - checkpoint names, back the one proposed after. - + those that end it in the record beside the new `true` (one of each party, of as many + parties as it takes), and builds the `true` on them, so that the first is dead at its + history too: the proposal it backs next may have been proposed at a history holding its + first `true`. A checkpoint's `true` it builds on the proposal alone. Before it signs + one, it asks its node whether nodes take it, built so (`POST /events/back`), and casts + and records nothing where they don't: where the nays came after the heads a checkpoint + names, back the one proposed after. A node before 0.1.0 doesn't answer: the client says + so, and goes on. A `true` holds the party until its proposal passes or is dead, and only other parties' nays make it dead. Where ending it would take every party yet to vote, or more, and those are a third of the parties or fewer, the client says so before it casts the `true` diff --git a/docs/guides/federation/running-a-node.md b/docs/guides/federation/running-a-node.md index 164c00d..27ee3a0 100644 --- a/docs/guides/federation/running-a-node.md +++ b/docs/guides/federation/running-a-node.md @@ -66,7 +66,8 @@ alone, so that a party listing many nodes can't be all of a node's neighbours. there is no user registry. Its users are its operators, and may do everything at it: put events, read, have it drop what it took and take it back, vote through it, make a fork's root. Those named in `--store-readers` read the federation and do nothing - else: `GET` of the events API below, and checking a fork (`POST /events/fork`), but + else: `GET` of the events API below, checking a fork (`POST /events/fork`) and asking + whether a `true` is taken (`POST /events/back`), but nothing of the document (`/store`, `/stream`), the node (`/peers`, `/admin/…`), nor what an operator does to the store (`/admin/events/…`): for an application, or someone watching, that needn't act for the node. A token is taken by the node that @@ -85,7 +86,8 @@ alone, so that a party listing many nodes can't be all of a node's neighbours. checkpoint, its heads, how many events it took, the node's party, and whether it votes for it by itself), `POST /events` (an event, whoever signed it), `GET /events/{id}`, `GET /events/counts` (what counts), `GET /events/refused` (what the store refused, and - why), `POST /events/fork` (what the node finds of a fork's root); and its operator's: + why), `POST /events/fork` (what the node finds of a fork's root), `POST /events/back` + (whether it takes a `true` a party is about to cast); and its operator's: `POST /admin/events/drop`, `/admin/events/allow`, `/admin/events/vote`, `/admin/events/fork`. Each answers `404` while the node holds no store. * **The store API** (`/store`) reads the document, where events are bytes at diff --git a/docs/openapi.yaml b/docs/openapi.yaml index adc5426..d3063d8 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -1812,6 +1812,50 @@ paths: $ref: '#/components/responses/Error' '422': $ref: '#/components/responses/Error' + /events/back: + post: + tags: [Events] + summary: Whether this node takes a `true` a party is about to cast + description: | + Whether this node takes a `true` of `party` on the proposal of hash `proposal` on + the current version, built on the events `on`, as far as the party's other votes + go: at that history, none of its `true`s on another proposal but on one that is + dead there. A party's client asks before it signs and records one, so that a + `true` every node refuses is never cast: nothing signed is sent for it. + requestBody: + required: true + content: + application/json: + schema: + type: object + required: [party, proposal, on] + properties: + party: + type: string + proposal: + type: string + on: + type: array + items: + type: string + responses: + '200': + description: Whether it takes it, and why not. + content: + application/json: + schema: + type: object + required: [takes, why] + properties: + takes: + type: boolean + why: + type: string + nullable: true + '400': + $ref: '#/components/responses/Error' + '404': + $ref: '#/components/responses/Error' /admin/events/drop: post: tags: [Events] |
