package tezos-protocol-017-PtNairob

  1. Overview
  2. Docs
Tezos/Protocol: economic-protocol definition

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-17.3.tar.gz
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc

doc/tezos-protocol-017-PtNairob.raw/Tezos_raw_protocol_017_PtNairob/Alpha_context/Consensus/index.html

Module Alpha_context.ConsensusSource

This module re-exports definitions from Raw_context.Consensus.

include Raw_context.CONSENSUS with type t := t and type slot := Slot.t and type 'a slot_map := 'a Slot.Map.t and type slot_set := Slot.Set.t and type round := Round.t and type consensus_pk := Consensus_key.pk
Sourceval allowed_endorsements : t -> (Consensus_key.pk * int) Slot.Map.t option

Returns a map where each endorser's pkh is associated to the list of its endorsing slots (in decreasing order) for a given level.

Sourceval allowed_preendorsements : t -> (Consensus_key.pk * int) Slot.Map.t option

Returns a map where each endorser's pkh is associated to the list of its endorsing slots (in decreasing order) for a given level.

Sourcetype Tezos_protocol_environment_017_PtNairob.Error_monad.error +=
  1. | Slot_map_not_found of {
    1. loc : string;
    }

Missing pre-computed map by first slot. This error should not happen.

Sourceval current_endorsement_power : t -> int

endorsement power ctx returns the endorsement power of the current block.

Sourceval initialize_consensus_operation : t -> allowed_endorsements:(Consensus_key.pk * int) Slot.Map.t option -> allowed_preendorsements:(Consensus_key.pk * int) Slot.Map.t option -> t

Initializes the map of allowed endorsements and preendorsements, this function must be called only once and before applying any consensus operation.

Sourceval record_endorsement : t -> initial_slot:Slot.t -> power:int -> t Tezos_protocol_environment_017_PtNairob.Error_monad.tzresult

record_endorsement ctx ~initial_slot ~power records an endorsement for the current block.

The endorsement should be valid in the sense that Int_map.find_opt initial_slot allowed_endorsement ctx = Some (pkh, power).

Sourceval record_preendorsement : t -> initial_slot:Slot.t -> power:int -> Round.t -> t Tezos_protocol_environment_017_PtNairob.Error_monad.tzresult

record_preendorsement ctx ~initial_slot ~power round payload_hash power records a preendorsement for a proposal at round with payload payload_hash.

The preendorsement should be valid in the sense that Int_map.find_opt initial_slot allowed_preendorsement ctx = Some (pkh, power).

Sourceval endorsements_seen : t -> Slot.Set.t
Sourceval get_preendorsements_quorum_round : t -> Round.t option

get_preendorsements_quorum_round ctx returns None if no preendorsement are included in the current block. Otherwise, return Some r where r is the round of the preendorsements included in the block.

Sourceval set_preendorsements_quorum_round : t -> Round.t -> t

set_preendorsements_quorum_round ctx round sets the round for preendorsements included in this block. This function should be called only once.

This function is only used in Full_construction mode.

Sourceval locked_round_evidence : t -> (Round.t * int) option

locked_round_evidence ctx returns the round of the recorded preendorsements as well as their power.

store_endorsement_branch context branch sets the "endorsement branch" (see Storage.Tenderbake.Endorsement_branch to branch in both the disk storage and RAM.

OCaml

Innovation. Community. Security.