aboutsummaryrefslogtreecommitdiffstats
path: root/docs/openapi.yaml
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-17 16:10:34 +0000
committertv <tv@krebsco.de>2026-11-17 17:14:22 +0100
commit1ed4ccdb0cd3a9407b6101b1bc595df2a451a18d (patch)
treed75459a0844e3be3d9f646af66fe0ab60586b526 /docs/openapi.yaml
parent2f78f51a4cd779e0ab989057727995f7bccf75ab (diff)
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.
Diffstat (limited to 'docs/openapi.yaml')
-rw-r--r--docs/openapi.yaml19
1 files changed, 17 insertions, 2 deletions
diff --git a/docs/openapi.yaml b/docs/openapi.yaml
index c2cee82..789ee6c 100644
--- a/docs/openapi.yaml
+++ b/docs/openapi.yaml
@@ -1509,7 +1509,10 @@ paths:
(its number, its hash, and the version itself), each party's keys and nodes, the
value at each place, the members, each `[node, party]`, and the proposals on the
current version, by their hash, each with the IDs of the events proposing it
- (`proposals`) and of the votes on it (`votes`).
+ (`proposals`) and of the votes on it (`votes`), the parties voting `true` (`yes`)
+ and `false` (`no`), whether it passed (`passed`: two thirds of the parties voted
+ `true`) and whether it is dead (`dead`: so many voted `false` that the rest can't
+ pass it). A passed proposal is written at once, and lapses with the rest.
responses:
'200':
description: What counts.
@@ -1535,7 +1538,7 @@ paths:
type: object
additionalProperties:
type: object
- required: [proposals, votes]
+ required: [proposals, votes, yes, no, passed, dead]
properties:
proposals:
type: array
@@ -1545,6 +1548,18 @@ paths:
type: array
items:
type: string
+ yes:
+ type: array
+ items:
+ type: string
+ no:
+ type: array
+ items:
+ type: string
+ passed:
+ type: boolean
+ dead:
+ type: boolean
'404':
$ref: '#/components/responses/Error'
/events/refused: