package tezos-protocol-015-PtLimaPt
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc
doc/tezos-protocol-015-PtLimaPt.raw/Tezos_raw_protocol_015_PtLimaPt/Vote_storage/index.html
Module Tezos_raw_protocol_015_PtLimaPt.Vote_storageSource
Manages all the voting related storage in Storage.Vote.
val get_delegate_proposal_count :
Raw_context.t ->
Tezos_protocol_environment_015_PtLimaPt.Signature.public_key_hash ->
int Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.tget_delegate_proposal_count ctxt proposer returns the number of proposals already made by proposer in the current voting cycle.
This number of proposals, aka count, has its own storage bucket.
val set_delegate_proposal_count :
Raw_context.t ->
Tezos_protocol_environment_015_PtLimaPt.Signature.public_key_hash ->
int ->
Raw_context.t Tezos_protocol_environment_015_PtLimaPt.Lwt.tset_delegate_proposal_count ctxt proposer count sets proposer's number of submitted proposals to count.
More precisely, the relevant storage bucket is allocated and initialized to count if it didn't exist; otherwise it is simply updated.
val has_proposed :
Raw_context.t ->
Tezos_protocol_environment_015_PtLimaPt.Signature.public_key_hash ->
Tezos_protocol_environment_015_PtLimaPt.Protocol_hash.t ->
bool Tezos_protocol_environment_015_PtLimaPt.Lwt.thas_proposed ctxt proposer proposal indicates whether the proposer has already proposed the proposal.
val add_proposal :
Raw_context.t ->
Tezos_protocol_environment_015_PtLimaPt.Signature.public_key_hash ->
Tezos_protocol_environment_015_PtLimaPt.Protocol_hash.t ->
Raw_context.t Tezos_protocol_environment_015_PtLimaPt.Lwt.tadd_proposal ctxt proposer proposal records the submission of proposal by proposer.
val get_proposals :
Raw_context.t ->
int64 Tezos_protocol_environment_015_PtLimaPt.Protocol_hash.Map.t
Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.tComputes for each proposal how many delegates proposed it.
val clear_proposals :
Raw_context.t ->
Raw_context.t Tezos_protocol_environment_015_PtLimaPt.Lwt.tCounts of the votes
Encoding for ballots.
Pretty printer for ballots.
val has_recorded_ballot :
Raw_context.t ->
Tezos_protocol_environment_015_PtLimaPt.Signature.Public_key_hash.t ->
bool Tezos_protocol_environment_015_PtLimaPt.Lwt.tval record_ballot :
Raw_context.t ->
Tezos_protocol_environment_015_PtLimaPt.Signature.Public_key_hash.t ->
Vote_repr.ballot ->
Raw_context.t Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.tRecords 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_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.tComputes the sum of the current ballots weighted by stake.
val get_ballot_list :
Raw_context.t ->
(Tezos_protocol_environment_015_PtLimaPt.Signature.Public_key_hash.t
* Vote_repr.ballot)
list
Tezos_protocol_environment_015_PtLimaPt.Lwt.tval clear_ballots :
Raw_context.t ->
Raw_context.t Tezos_protocol_environment_015_PtLimaPt.Lwt.tval listings_encoding :
(Tezos_protocol_environment_015_PtLimaPt.Signature.Public_key_hash.t * int64)
list
Tezos_protocol_environment_015_PtLimaPt.Data_encoding.tval update_listings :
Raw_context.t ->
Raw_context.t Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.tPopulates !Storage.Vote.Listings using the currently existing staking power and sets `Voting_power_in_listings`. Inactive delegates or delegates without the minimal required stake are not included in the listings.
val in_listings :
Raw_context.t ->
Tezos_protocol_environment_015_PtLimaPt.Signature.Public_key_hash.t ->
bool Tezos_protocol_environment_015_PtLimaPt.Lwt.tVerifies the presence of a delegate in the listing.
val get_listings :
Raw_context.t ->
(Tezos_protocol_environment_015_PtLimaPt.Signature.Public_key_hash.t * int64)
list
Tezos_protocol_environment_015_PtLimaPt.Lwt.ttype delegate_info = {voting_power : Tezos_protocol_environment_015_PtLimaPt.Int64.t option;current_ballot : Vote_repr.ballot option;current_proposals : Tezos_protocol_environment_015_PtLimaPt.Protocol_hash.t list;remaining_proposals : int;
}val pp_delegate_info :
Tezos_protocol_environment_015_PtLimaPt.Format.formatter ->
delegate_info ->
unitval delegate_info_encoding :
delegate_info Tezos_protocol_environment_015_PtLimaPt.Data_encoding.tval get_total_voting_power_free :
Raw_context.t ->
int64 Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.tReturns the sum of all voting power in the listings, without accounting for gas cost.
val get_total_voting_power :
Raw_context.t ->
(Raw_context.t * int64)
Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.tReturns the sum of all voting power in the listings.
val get_current_quorum :
Raw_context.t ->
int32 Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.tval get_participation_ema :
Raw_context.t ->
int32 Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.tval set_participation_ema :
Raw_context.t ->
int32 ->
Raw_context.t Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.tval current_proposal_exists :
Raw_context.t ->
bool Tezos_protocol_environment_015_PtLimaPt.Lwt.tIndicates whether there is a current proposal in the storage.
val get_current_proposal :
Raw_context.t ->
Tezos_protocol_environment_015_PtLimaPt.Protocol_hash.t
Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.tRetrieves the current proposal.
val find_current_proposal :
Raw_context.t ->
Tezos_protocol_environment_015_PtLimaPt.Protocol_hash.t option
Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.tRetrieves the current proposal.
val init_current_proposal :
Raw_context.t ->
Tezos_protocol_environment_015_PtLimaPt.Protocol_hash.t ->
Raw_context.t Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.tRegisters a current proposal.
val clear_current_proposal :
Raw_context.t ->
Raw_context.t Tezos_protocol_environment_015_PtLimaPt.Lwt.tRemoves the current proposal. Does nothing if there was no current proposal.
val init :
Raw_context.t ->
start_position:Tezos_protocol_environment_015_PtLimaPt.Int32.t ->
Raw_context.t Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.tSets the initial quorum to 80% and period kind to proposal.