package tezos-protocol-006-PsCARTHA

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Manages all the voting related storage in Storage.Vote.

val record_proposal : Raw_context.t -> Tezos_crypto.Protocol_hash.t -> Tezos_crypto.Signature.public_key_hash -> (Raw_context.t, Tezos_protocol_environment_006_PsCARTHA__Environment.Error_monad.error list) result Lwt.t

Records a protocol proposal with the delegate that proposed it.

val recorded_proposal_count_for_delegate : Raw_context.t -> Tezos_crypto.Signature.public_key_hash -> (int, Tezos_protocol_environment_006_PsCARTHA__Environment.Error_monad.error list) result Lwt.t
val get_proposals : Raw_context.t -> (int32 Tezos_protocol_environment_006_PsCARTHA__Environment.Protocol_hash.Map.t, Tezos_protocol_environment_006_PsCARTHA__Environment.Error_monad.error list) result Lwt.t

Computes for each proposal how many delegates proposed it.

val clear_proposals : Raw_context.t -> Raw_context.t Lwt.t
type ballots = {
  1. yay : int32;
  2. nay : int32;
  3. pass : int32;
}

Counts of the votes

val ballots_encoding : ballots Data_encoding.t
val has_recorded_ballot : Raw_context.t -> Tezos_crypto.Signature.public_key_hash -> bool Lwt.t
val record_ballot : Raw_context.t -> Tezos_crypto.Signature.public_key_hash -> Vote_repr.ballot -> (Raw_context.t, Tezos_protocol_environment_006_PsCARTHA__Environment.Error_monad.error list) result Lwt.t

Records a vote for a delegate, returns a Storage_errorExisting_key if the vote was already registered

val get_ballots : Raw_context.t -> (ballots, Tezos_protocol_environment_006_PsCARTHA__Environment.Error_monad.error list) result Lwt.t

Computes the sum of the current ballots weighted by stake.

val clear_ballots : Raw_context.t -> Raw_context.t Lwt.t
val listings_encoding : (Tezos_crypto.Signature.public_key_hash * int32) list Data_encoding.t
val freeze_listings : Raw_context.t -> (Raw_context.t, Tezos_protocol_environment_006_PsCARTHA__Environment.Error_monad.error list) result Lwt.t

Populates !Storage.Vote.Listings using the currently existing rolls and sets Listings_size. Delegates without rolls are not included in the listing.

val clear_listings : Raw_context.t -> (Raw_context.t, Tezos_protocol_environment_006_PsCARTHA__Environment.Error_monad.error list) result Lwt.t
val listing_size : Raw_context.t -> (int32, Tezos_protocol_environment_006_PsCARTHA__Environment.Error_monad.error list) result Lwt.t

Returns the sum of all rolls of all delegates.

Verifies the presence of a delegate in the listing.

val get_listings : Raw_context.t -> (Tezos_crypto.Signature.public_key_hash * int32) list Lwt.t
val get_current_quorum : Raw_context.t -> (int32, Tezos_protocol_environment_006_PsCARTHA__Environment.Error_monad.error list) result Lwt.t
val get_participation_ema : Raw_context.t -> (int32, Tezos_protocol_environment_006_PsCARTHA__Environment.Error_monad.error list) result Lwt.t
val set_participation_ema : Raw_context.t -> int32 -> (Raw_context.t, Tezos_protocol_environment_006_PsCARTHA__Environment.Error_monad.error list) result Lwt.t
val get_current_period_kind : Raw_context.t -> (Voting_period_repr.kind, Tezos_protocol_environment_006_PsCARTHA__Environment.Error_monad.error list) result Lwt.t
val set_current_period_kind : Raw_context.t -> Voting_period_repr.kind -> (Raw_context.t, Tezos_protocol_environment_006_PsCARTHA__Environment.Error_monad.error list) result Lwt.t
val get_current_proposal : Raw_context.t -> (Tezos_crypto.Protocol_hash.t, Tezos_protocol_environment_006_PsCARTHA__Environment.Error_monad.error list) result Lwt.t
val init_current_proposal : Raw_context.t -> Tezos_crypto.Protocol_hash.t -> (Raw_context.t, Tezos_protocol_environment_006_PsCARTHA__Environment.Error_monad.error list) result Lwt.t
val clear_current_proposal : Raw_context.t -> (Raw_context.t, Tezos_protocol_environment_006_PsCARTHA__Environment.Error_monad.error list) result Lwt.t
val init : Raw_context.t -> (Raw_context.t, Tezos_protocol_environment_006_PsCARTHA__Environment.Error_monad.error list) result Lwt.t

Sets the initial quorum to 80% and period kind to proposal.