package tezos-protocol-002-PsYLVpVv

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type Tezos_protocol_environment_002_PsYLVpVv.Error_monad.error +=
  1. | Invalid_fitness_gap of int64 * int64

minimal_time ctxt priority pred_block_time returns the minimal time, given the predecessor block timestamp pred_block_time, after which a baker with priority priority is allowed to bake. Fail with Invalid_time_between_blocks_constant if the minimal time cannot be computed.

check_baking_rights ctxt block pred_timestamp verifies that: * the contract that owned the roll at cycle start has the block signer as delegate. * the timestamp is coherent with the announced slot.

For a given level computes who has the right to include an endorsement in the next block. The result can be stored in Alpha_context.allowed_endorsements

Check that the operation was signed by a delegate allowed to endorse at the level specified by the endorsement.

Returns the endorsement reward calculated w.r.t a given priority.

baking_priorities ctxt level is the lazy list of contract's public key hashes that are allowed to bake for level.

first_baking_priorities ctxt ?max_priority contract_hash level is a list of priorities of max ?max_priority elements, where the delegate of contract_hash is allowed to bake for level. If ?max_priority is None, a sensible number of priorities is returned.

check_signature ctxt chain_id block id check if the block is signed with the given key, and belongs to the given chain_id

val check_header_proof_of_work_stamp : Alpha_context.Block_header.shell_header -> Alpha_context.Block_header.contents -> int64 -> bool

Checks if the header that would be built from the given components is valid for the given diffculty. The signature is not passed as it is does not impact the proof-of-work stamp. The stamp is checked on the hash of a block header whose signature has been zeroed-out.

check if the gap between the fitness of the current context and the given block is within the protocol parameters

OCaml

Innovation. Community. Security.