aboutsummaryrefslogtreecommitdiffstats
path: root/docs/guides/federation/proposing-and-voting.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/guides/federation/proposing-and-voting.md')
-rw-r--r--docs/guides/federation/proposing-and-voting.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/guides/federation/proposing-and-voting.md b/docs/guides/federation/proposing-and-voting.md
index f052276..9b50e09 100644
--- a/docs/guides/federation/proposing-and-voting.md
+++ b/docs/guides/federation/proposing-and-voting.md
@@ -116,6 +116,35 @@ casts nothing on the current version, and votes again from the next one. A party
never voted may begin its record from the root (`init --root`), and casts on every
version.
+## Counting support first
+
+A `true` isn't taken back, and binds while its proposal can pass. Parties that want to
+know who would back a proposal before anyone is bound can say so by plain writes, which
+bind nobody and count for nothing in the votes. The version gives each party a place for
+it, by a rule:
+
+```json
+{"path": "intents/{party}/**", "writer": "{party}"}
+```
+
+and each party writes there, by the proposal's hash, whether it would back it:
+
+```sh
+continuum-party --node http://tv:secret@localhost:3000 --key tv.key --record tv.record \
+ write intents/tv/8d02… true
+```
+
+Anyone reads them at `values` in `GET /events/counts`:
+
+```sh
+curl -s -u tv:secret localhost:3000/events/counts \
+ | jq '.values | with_entries(select(.key | test("^intents/[^/]+/8d02")))'
+```
+
+Once two thirds of the parties wrote `true`, each backs it. A party's write there is its
+word, not its vote: it may write `false` later, or vote otherwise. It doesn't help with
+parties that stay quiet: they write nothing either.
+
## Passing and dying
A proposal **passes** once at least two thirds of its version's parties voted `true`