val minimal_time :
Alpha_context.context->int ->Tezos_base__TzPervasives.Time.Protocol.t ->(Tezos_base__TzPervasives.Time.Protocol.t,
Tezos_protocol_environment_008_PtEdoTez__Environment.Error_monad.error list)Stdlib.result
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.
val endorsement_rights :
Alpha_context.context->Alpha_context.Level.t->((Alpha_context.public_key * int list * bool)Tezos_protocol_environment_008_PtEdoTez__Environment.Signature.Public_key_hash.Map.t,
Tezos_protocol_environment_008_PtEdoTez__Environment.Error_monad.error list)Stdlib.resultLwt.t
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
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.
Checks if the header that would be built from the given components is valid for the given difficulty. 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.
A block is valid only if its timestamp has a minimal delay with respect to the previous block's timestamp, and this minimal delay depends not only on the block's priority but also on the number of endorsement operations included in the block.
In Emmy+, blocks' fitness increases by one unit with each level.
In this way, Emmy+ simplifies the optimal baking strategy: The bakers used to have to choose whether to wait for more endorsements to include in their block, or to publish the block immediately, without waiting. The incentive for including more endorsements was to increase the fitness and win against unknown blocks. However, when a block was produced too late in the priority period, there was the risk that the block did not reach endorsers before the block of next priority. In Emmy+, the baker does not need to take such a decision, because the baker cannot publish a block too early.
Given a delay of a block's timestamp with respect to the minimum time to bake at the block's priority (as returned by `minimum_time`), it returns the minimum number of endorsements that the block has to contain
val minimal_valid_time :
Alpha_context.context->priority:int ->endorsing_power:int ->(Tezos_base__TzPervasives.Time.Protocol.t,
Tezos_protocol_environment_008_PtEdoTez__Environment.Error_monad.error list)Stdlib.result
This is the somehow the dual of the previous function. Given a block priority and a number of endorsement slots (given by the `endorsing_power` argument), it returns the minimum time at which the next block can be baked.