Tezos_raw_protocol_alpha.Delegate_consensus_keyManagement of a delegate's consensus key, the one used to sign blocks and consensus operations. It is responsible for maintaining the tables Storage.Consensus_keys, Storage.Contract.Consensus_key, Storage.Contract.Pending_consensus_keys, Storage.Contract.Companion_key, and Storage.Contract.Pending_companion_keys.
type Tezos_protocol_environment_alpha.Error_monad.error += | Invalid_consensus_key_update_noop of Cycle_repr.t
* Operation_repr.consensus_key_kind| Invalid_consensus_key_update_active of Tezos_protocol_environment_alpha.Signature.Public_key_hash.t
* Operation_repr.consensus_key_kind| Invalid_consensus_key_update_tz4 of Tezos_protocol_environment_alpha.Bls.Public_key.t
* Operation_repr.consensus_key_kind| Invalid_consensus_key_update_another_delegate of Tezos_protocol_environment_alpha.Signature.Public_key_hash.t
* Operation_repr.consensus_key_kindtype pk = Raw_context.consensus_pk = {delegate : Tezos_protocol_environment_alpha.Signature.Public_key_hash.t;consensus_pk : Tezos_protocol_environment_alpha.Signature.Public_key.t;consensus_pkh : Tezos_protocol_environment_alpha.Signature.Public_key_hash.t;companion_pk : Tezos_protocol_environment_alpha.Bls.Public_key.t option;companion_pkh : Tezos_protocol_environment_alpha.Bls.Public_key_hash.t option;}The public key of a consensus key and the associated delegate.
type power = Raw_context.consensus_power = {consensus_key : pk;attesting_power : Attesting_power_repr.t;dal_power : int;}The attesting and dal power related to the associated consensus key
type t = {delegate : Tezos_protocol_environment_alpha.Signature.Public_key_hash.t;consensus_pkh : Tezos_protocol_environment_alpha.Signature.Public_key_hash.t;}The public key hash of a consensus key and the associated delegate.
val encoding : t Tezos_protocol_environment_alpha.Data_encoding.tval zero : tval pp : Tezos_protocol_environment_alpha.Format.formatter -> t -> unitval check_not_tz4 :
Operation_repr.consensus_key_kind ->
Tezos_protocol_environment_alpha.Signature.public_key ->
unit Tezos_protocol_environment_alpha.Error_monad.tzresultcheck_not_tz4 pk checks that pk is not a BLS address.
val init :
Raw_context.t ->
Tezos_protocol_environment_alpha.Signature.Public_key_hash.t ->
Tezos_protocol_environment_alpha.Signature.Public_key.t ->
Raw_context.t Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tInitialize the consensus key when registering a delegate.
val init_bootstrap :
Raw_context.t ->
Tezos_protocol_environment_alpha.Signature.Public_key_hash.t ->
Tezos_protocol_environment_alpha.Signature.Public_key.t ->
Raw_context.t Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tInitialize the consensus key when registering a bootstrap account. This function must be called after setting the bootstrap account as a self delegate.
val active_pubkey :
Raw_context.t ->
Tezos_protocol_environment_alpha.Signature.Public_key_hash.t ->
pk Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tReturns the active consensus key for the current cycle.
val active_key :
Raw_context.t ->
Tezos_protocol_environment_alpha.Signature.Public_key_hash.t ->
t Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tReturns the active consensus key for the current cycle.
val active_pubkey_for_cycle :
Raw_context.t ->
Tezos_protocol_environment_alpha.Signature.Public_key_hash.t ->
Cycle_repr.t ->
pk Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tReturns the active consensus key for the given cycle.
val pending_updates :
Raw_context.t ->
Tezos_protocol_environment_alpha.Signature.Public_key_hash.t ->
(Cycle_repr.t
* Tezos_protocol_environment_alpha.Signature.Public_key_hash.t
* Tezos_protocol_environment_alpha.Signature.Public_key.t)
list
Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tReturns the list of pending consensus-key updates in upcoming cycles.
val pending_companion_updates :
Raw_context.t ->
Tezos_protocol_environment_alpha.Signature.Public_key_hash.t ->
(Cycle_repr.t
* Tezos_protocol_environment_alpha.Bls.Public_key_hash.t
* Tezos_protocol_environment_alpha.Bls.Public_key.t)
list
Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tReturns the list of pending companion key updates in upcoming cycles.
val register_update :
Raw_context.t ->
Tezos_protocol_environment_alpha.Signature.Public_key_hash.t ->
Tezos_protocol_environment_alpha.Signature.Public_key.t ->
Raw_context.t Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tRegister a consensus-key update.
val register_update_companion :
Raw_context.t ->
Tezos_protocol_environment_alpha.Signature.Public_key_hash.t ->
Tezos_protocol_environment_alpha.Bls.Public_key.t ->
Raw_context.t Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tRegister a companion-key update.
val activate :
Raw_context.t ->
new_cycle:Cycle_repr.t ->
Raw_context.t Tezos_protocol_environment_alpha.Lwt.tActivate consensus and companion keys at the beginning of cycle new_cycle.