From 237c79efc5d25f438d024522fd89ea7fc600cbd1 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 19 Nov 2026 21:24:09 +0000 Subject: continuum-party: a record held against the node's votes, a wait, restore A party votes from one record; a second record voting beside it, or one begun anew after a loss, can make the party vote twice. The client votes by its record, never by what a node shows, and still should look. Before a vote (`consistent`, `unrecorded`), the party's votes on the current version that the node shows (each proposal's yes and no) are held against the record's (Record::votes_cast): one the node shows that the record lacks refuses the vote, naming it and `restore`; one the record holds that the node doesn't show is said, as on its way or held back. Where they agree, nothing is said. What may keep a vote from the node is said too (`cut_off`, from counts' `heard`): the party's own nodes the node hasn't heard from in five minutes, through which another vote of it may have gone; and the parties none of whose nodes it heard from lately, where they are a third of those with nodes or more: a part of the swarm cut off. Then it waits (--wait SECONDS, 5 unless given, on vote and propose) and asks the node again: a vote cast elsewhere just before arrives first. A version passing meanwhile ends it, as the proposal lapsed. `restore` takes the party's votes on the current version, as the node holds them, into its record, or a new one of --party (Record::restore, checking each vote's signature, its party and version, none twice); a record begun on the current version casts on it then. Best effort: a vote on its way from elsewhere isn't among them, and what `again` signs anew, and the nays that freed an earlier `true`, it doesn't learn. --- share/bash-completion/completions/continuum-party | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'share/bash-completion/completions') diff --git a/share/bash-completion/completions/continuum-party b/share/bash-completion/completions/continuum-party index 7834536..72c6a6f 100644 --- a/share/bash-completion/completions/continuum-party +++ b/share/bash-completion/completions/continuum-party @@ -78,10 +78,10 @@ _continuum_party() prev=${words[cword - 1]} fi - local global_options='--node --token --key --record --federation --config --unset - --help --version' - local commands='init write keys nodes next propose vote again found root fork check - judge proposals show status values get twice help' + local global_options='--node --token --key --record --party --federation --config + --unset --help --version' + local commands='init write keys nodes next propose vote again restore found root fork + check judge proposals show status values get twice help' local intents='admit remove give take keys nodes checkpoint revision' # The command, the intent of `propose` and `fork`, and the arguments after them that @@ -93,7 +93,7 @@ _continuum_party() word=${words[i]} if [[ -z $command ]]; then case $word in - --node | --token | --key | --record | --federation | --config | --unset) + --node | --token | --key | --record | --party | --federation | --config | --unset) _continuum_party_client+=("$word" "${words[i + 1]}") ((i++)) ;; @@ -146,7 +146,7 @@ _continuum_party() [[ $command == keys ]] && _continuum_party_files return ;; - --node | --token | --unset | --nodes | --founder | --rule | --at) + --node | --token | --unset | --nodes | --founder | --rule | --at | --wait | --party) return ;; esac @@ -165,7 +165,7 @@ _continuum_party() propose | fork) local own if [[ $command == propose ]]; then - own='--yes --print' + own='--yes --print --wait' else own='--at --founder' fi @@ -203,7 +203,7 @@ _continuum_party() ;; vote) if [[ $cur == -* ]]; then - _continuum_party_words '--through' + _continuum_party_words '--through --wait' elif ((n == 0)); then _continuum_party_words "$(_continuum_party_proposals)" elif ((n == 1)); then -- cgit v1.3.1