From 1ed4ccdb0cd3a9407b6101b1bc595df2a451a18d Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 17 Nov 2026 16:10:34 +0000 Subject: events: counts names who voted what, and whether a proposal passed or is dead `GET /events/counts` gives each proposal on the current version the parties voting `true` and `false` (`yes`, `no`), whether it passed and whether it is dead (`passed`, `dead`), as the node reads its votes (`State::tally`, which the fold judges by too), so that reading where a vote stands takes no fetch of every vote. A party's client still decides its votes by the votes it checks itself. --- docs/guides/federation/proposing-and-voting.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'docs/guides/federation/proposing-and-voting.md') diff --git a/docs/guides/federation/proposing-and-voting.md b/docs/guides/federation/proposing-and-voting.md index ee9a46a..3f4aa0f 100644 --- a/docs/guides/federation/proposing-and-voting.md +++ b/docs/guides/federation/proposing-and-voting.md @@ -113,6 +113,20 @@ kills it the sooner, and frees its backers for another. ## Following a vote `GET /events/counts` names each proposal on the current version with the events -proposing it (`proposals`) and the votes on it (`votes`), each by its ID; `GET -/events/{id}` shows a vote, signed by its party. A node writes nothing more than the -version once it passed; the parties' records keep their votes. +proposing it (`proposals`) and the votes on it (`votes`), each by its ID; the parties +voting `true` (`yes`) and `false` (`no`); and whether it passed (`passed`) and whether +it is dead (`dead`), as the node reads its votes: + +```sh +curl -s -u tv:secret localhost:3000/events/counts | jq .proposals +# {"8d02…":{"dead":true,"no":["lass"],"passed":false,"proposals":["c41e…"], +# "votes":["5a77…","e019…"],"yes":["tv"]}} +``` + +`GET /events/{id}` shows a proposing event, the version it proposes in `proposal`, and +a vote, signed by its party. A node lacking some votes reads a proposal as neither passed +nor dead where another reads it dead; no vote takes either back. A dead proposal stays +listed until a version passes on the current one, and a passed one is written at once; +then every proposal on the version before lapses. A party's client decides its votes by +the votes it checks itself, never by what a node says of them; the parties' records keep +their votes. -- cgit v1.3.1