package tezos-protocol-004-Pt24m4xi
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
    
    
  sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b
    
    
  doc/tezos-protocol-004-Pt24m4xi.raw/Tezos_raw_protocol_004_Pt24m4xi/Baking/index.html
Module Tezos_raw_protocol_004_Pt24m4xi.BakingSource
type Tezos_protocol_environment_004_Pt24m4xi.Error_monad.error += - | Timestamp_too_early of Alpha_context.Timestamp.t * Alpha_context.Timestamp.t
val minimal_time : 
  Alpha_context.context ->
  int ->
  Tezos_protocol_environment_004_Pt24m4xi.Time.t ->
  Tezos_protocol_environment_004_Pt24m4xi.Time.t
    Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tminimal_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.
val check_baking_rights : 
  Alpha_context.context ->
  Alpha_context.Block_header.contents ->
  Tezos_protocol_environment_004_Pt24m4xi.Time.t ->
  Alpha_context.public_key
    Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tcheck_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.
val endorsement_rights : 
  Alpha_context.context ->
  Alpha_context.Level.t ->
  (Alpha_context.public_key * int list * bool)
    Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.Map.t
    Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tFor 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
val check_endorsement_rights : 
  Alpha_context.context ->
  Tezos_protocol_environment_004_Pt24m4xi.Chain_id.t ->
  Alpha_context.Kind.endorsement Alpha_context.Operation.t ->
  (Alpha_context.public_key_hash * int list * bool)
    Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tCheck that the operation was signed by a delegate allowed to endorse at the level specified by the endorsement.
val endorsement_reward : 
  Alpha_context.context ->
  block_priority:int ->
  int ->
  Alpha_context.Tez.t
    Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tReturns the endorsement reward calculated w.r.t a given priority.
val baking_priorities : 
  Alpha_context.context ->
  Alpha_context.Level.t ->
  Alpha_context.public_key Misc.lazy_listbaking_priorities ctxt level is the lazy list of contract's public key hashes that are allowed to bake for level.
val first_baking_priorities : 
  Alpha_context.context ->
  ?max_priority:int ->
  Alpha_context.public_key_hash ->
  Alpha_context.Level.t ->
  int list Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tfirst_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.
val check_signature : 
  Alpha_context.Block_header.t ->
  Tezos_protocol_environment_004_Pt24m4xi.Chain_id.t ->
  Alpha_context.public_key ->
  unit Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tcheck_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 ->
  boolChecks 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.
val check_proof_of_work_stamp : 
  Alpha_context.context ->
  Alpha_context.Block_header.t ->
  unit Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tverify if the proof of work stamp is valid
val check_fitness_gap : 
  Alpha_context.context ->
  Alpha_context.Block_header.t ->
  unit Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tcheck if the gap between the fitness of the current context and the given block is within the protocol parameters
val dawn_of_a_new_cycle : 
  Alpha_context.context ->
  Alpha_context.Cycle.t option
    Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tval earlier_predecessor_timestamp : 
  Alpha_context.context ->
  Alpha_context.Level.t ->
  Alpha_context.Timestamp.t
    Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.t