diff --git a/docs/alpha/blocks_ops.rst b/docs/alpha/blocks_ops.rst index 667006548aa7e49364f0d40743d228ee1579741d..7968024ee1a46175bf9b5c4b9b4afb6a70919604 100644 --- a/docs/alpha/blocks_ops.rst +++ b/docs/alpha/blocks_ops.rst @@ -82,7 +82,7 @@ voting operations: - The ``Ballot`` operation enables delegates to participate in the Exploration and Promotion periods. Delegates use this operation to - vote for (``Yay``), against (``Nay``), or to side with the majority + vote for (``Yea``), against (``Nay``), or to side with the majority (``Pass``), when examining a protocol amendment proposal. Further details on each operation's implementation and semantics are diff --git a/docs/alpha/voting.rst b/docs/alpha/voting.rst index ae8f1bb07950fcbeb9862554b1a39ffd1a852a03..74f38e1b78246b326fde9147898777db23280f82 100644 --- a/docs/alpha/voting.rst +++ b/docs/alpha/voting.rst @@ -44,11 +44,11 @@ The five periods are as follows: moves back to a new **proposal period**. - *Exploration period*: During this period delegates can cast one - Yay, Nay, or Pass ballot on the selected proposal. They do so using the + Yea, Nay, or Pass ballot on the selected proposal. They do so using the ``Ballot`` operation. If the voting participation reaches *quorum* and there is a *super-majority* - of Yay, the process moves to the **cooldown period**. (See below for details + of Yea, the process moves to the **cooldown period**. (See below for details on participation, quorum, and super-majority.) Otherwise the process moves back to the **proposal period**. @@ -60,11 +60,11 @@ The five periods are as follows: At the end of this period, the process moves to the **promotion period**. -- *Promotion period*: During this period, delegates can cast a Yay, Nay, or Pass +- *Promotion period*: During this period, delegates can cast a Yea, Nay, or Pass ballots using the ``Ballot`` operation. If the voting participation reaches *quorum* and there is a super-majority of - Yay, the process moves to the **adoption period**. + Yea, the process moves to the **adoption period**. Otherwise the process moves back to the **proposal period**. @@ -83,6 +83,12 @@ The five periods are as follows: And a new **proposal period** starts. +.. _yay_deprecated: + +.. warning:: + The value ``Yay``, historically used as a synonym for ``Yea``, is deprecated. + Although this value is currently still accepted by some tools to ensure backward compatibility, all uses of ``Yay`` should be replaced by ``Yea``. + Activation ---------- @@ -101,7 +107,7 @@ requirement might differ, etc. Voting Power ------------ -When supporting a proposal or casting a Yay, Nay, or Pass ballot, each delegate +When supporting a proposal or casting a Yea, Nay, or Pass ballot, each delegate has voting power equal to its *stake*. The stake is always measured in **mutez**. @@ -114,12 +120,12 @@ Super-majority and Quorum As mentioned above, during either of the **exploration** or **promotion** periods, delegates can cast ballots using the ``Ballot`` operation (see below). -In both cases, delegates can cast a single Yay, Nay, or Pass ballot. A ballot +In both cases, delegates can cast a single Yea, Nay, or Pass ballot. A ballot has a weight equal to the delegate's stake as detailed above. For either of these two periods, the process continues to the next period if the *vote participation* reaches *quorum* and there is a *super-majority* of -Yay. +Yea. The *vote participation* is the ratio of all the cumulated stake of cast ballots (including Pass ballots) to the total stake. @@ -139,8 +145,8 @@ This formula avoids establishing quorums close to 100% that would be very difficult to attain, or, conversely, low quorums close to 0% making little participation chronic, ensuring that the quorums are lower- and upper-bounded by :ref:`quorum_caps` (0.2 and 0.7, respectively). -The *super-majority* is reached if the cumulated stake of Yay ballots is -greater than 8/10 of the cumulated stake of Yay and Nay ballots. +The *super-majority* is reached if the cumulated stake of Yea ballots is +greater than 8/10 of the cumulated stake of Yea and Nay ballots. Note that Pass ballots do not count towards or against the super-majority; they still counts towards participation and quorum. @@ -236,7 +242,7 @@ A *ballot* operation can only be submitted during periods where a vote happens ballot: Vote_repr.ballot ; } The fields ``source`` and ``period`` are the same as above, while ``proposal`` -is the currently selected proposal and ``ballot`` is one of ``Yay``, ``Nay`` or +is the currently selected proposal and ``ballot`` is one of ``Yea``, ``Nay`` or ``Pass``. The ``Pass`` vote allows a delegate to contribute towards the quorum without contributing towards the super-majority. This is important because, as detailed @@ -273,7 +279,7 @@ in the following samples:: Blocks remaining until end of period: 63 Current proposal: PsNa6jTtsRfbGaNSoYXNTNM5A7c3Lji22Yf2ZhpFUjQFC17iZVp Ballots: - Yay: 2,400,000 ꜩ + Yea: 2,400,000 ꜩ Nay: 0 ꜩ Pass: 0 ꜩ Current participation 20.00%, necessary quorum 80.00% @@ -323,7 +329,7 @@ Submit ballots During either of the **exploration** or **promotion** periods, ballots can be submitted once with:: - octez-client submit ballot for + octez-client submit ballot for Further External Resources -------------------------- diff --git a/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml b/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml index 9070a0e6d51bdb9c93711226f14d8314ccc75964..9dcd4eeffadea93a436ffc4715363e2cb9ddac37 100644 --- a/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml +++ b/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml @@ -694,7 +694,7 @@ let commands_ro () = let*! () = cctxt#answer "@[Ballots:@,\ - \ Yay: %a %s@,\ + \ Yea: %a %s@,\ \ Nay: %a %s@,\ \ Pass: %a %s@,\ Current participation %.2f%%, necessary quorum %.2f%%@,\ @@ -2312,7 +2312,9 @@ let commands_rw () = | Some hash -> Lwt_result_syntax.return hash)) @@ param ~name:"ballot" - ~desc:"the ballot value (yea/yay, nay, or pass)" + ~desc: + "the ballot value (yea, nay, or pass; yay is a deprecated synonym \ + for yea)" (parameter ~autocomplete:(fun _ -> Lwt_result_syntax.return ["yea"; "nay"; "pass"]) diff --git a/src/proto_alpha/lib_protocol/vote_repr.ml b/src/proto_alpha/lib_protocol/vote_repr.ml index 493b5b194683984a7da3e80949aaa0859c14dd42..39d15701039a91fc9fe0a0b3939e2527f1cd0f8c 100644 --- a/src/proto_alpha/lib_protocol/vote_repr.ml +++ b/src/proto_alpha/lib_protocol/vote_repr.ml @@ -39,12 +39,12 @@ let ballot_encoding = (* union *) splitted ~binary:(conv_with_guard to_int8 of_int8 int8) - ~json:(string_enum [("yay", Yay); ("nay", Nay); ("pass", Pass)]) + ~json:(string_enum [("yea", Yay); ("nay", Nay); ("pass", Pass)]) let equal_ballot a b = match (a, b) with Yay, Yay | Nay, Nay | Pass, Pass -> true | _ -> false let pp_ballot ppf = function - | Yay -> Format.fprintf ppf "yay" + | Yay -> Format.fprintf ppf "yea" | Nay -> Format.fprintf ppf "nay" | Pass -> Format.fprintf ppf "pass" diff --git a/src/proto_alpha/lib_protocol/vote_storage.ml b/src/proto_alpha/lib_protocol/vote_storage.ml index f2d110f8844b5d8ae978c42d7070784c7e1d3560..1be6a6dc0cc5eaacb71c22104ea88a06ff6a4bea 100644 --- a/src/proto_alpha/lib_protocol/vote_storage.ml +++ b/src/proto_alpha/lib_protocol/vote_storage.ml @@ -65,7 +65,7 @@ let ballots_encoding = conv (fun {yay; nay; pass} -> (yay, nay, pass)) (fun (yay, nay, pass) -> {yay; nay; pass}) - @@ obj3 (req "yay" int64) (req "nay" int64) (req "pass" int64) + @@ obj3 (req "yea" int64) (req "nay" int64) (req "pass" int64) let equal_ballots b1 b2 = Int64.(equal b1.yay b2.yay && equal b1.nay b2.nay && equal b1.pass b2.pass)