package tezos-protocol-alpha
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/tezos_raw_protocol_alpha/Tezos_raw_protocol_alpha/Delegate_sampler/index.html
Module Tezos_raw_protocol_alpha.Delegate_samplerSource
This module draws random values for a cycle based on the Seed_repr.seed associated that cycle. These random values are only delegates associated with slots. The selection of delegates is done by sampling from a particular distribution of the stake among the active delegates.
This module is responsible for maintaining the table Storage.Delegate_sampler_state.
val slot_owner :
Raw_context.t ->
Level_repr.t ->
Slot_repr.t ->
(Raw_context.t * Delegate_consensus_key.pk)
Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tParticipation slots potentially associated to accounts. The accounts that didn't place a deposit will be excluded from this list. This function should only be used to compute the deposits to freeze or initialize the protocol while stitching. RPCs can use this function to predict an approximation of long term future slot allocations. It shouldn't be used in the baker.
val baking_rights_owner :
Raw_context.t ->
Level_repr.t ->
round:Round_repr.round ->
(Raw_context.t * Slot_repr.t * Delegate_consensus_key.pk)
Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tval load_sampler_for_cycle :
Raw_context.t ->
Cycle_repr.t ->
Raw_context.t Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tload_sampler_for_cycle ctxt cycle caches the seeded stake sampler for cycle in ctxt. If the sampler was already cached, then ctxt is returned unchanged.
This function has the same effect on ctxt as slot_owner and baking_rights_owner.
val select_new_distribution_at_cycle_end :
Raw_context.t ->
new_cycle:Cycle_repr.t ->
Raw_context.t Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tval clear_outdated_sampling_data :
Raw_context.t ->
new_cycle:Cycle_repr.t ->
Raw_context.t Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tval select_distribution_for_cycle :
Raw_context.t ->
Cycle_repr.t ->
Raw_context.t Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tval cleanup_values_for_protocol_p :
Raw_context.t ->
preserved_cycles:int ->
consensus_rights_delay:int ->
new_cycle:Cycle_repr.t ->
Raw_context.t Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tval attesting_rights_count :
Raw_context.t ->
Level_repr.t ->
(Raw_context.t
* int Tezos_protocol_environment_alpha.Signature.Public_key_hash.Map.t)
Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tattesting_rights_count ctxt level returns a map of the delegates to their number of attestation slots for the given level. Fails if the given level is in a cycle for which the seed is not in the storage