package tezos-010-PtGRANAD-test-helpers

  1. Overview
  2. Docs
type block = t

Policies to select the next baker:

  • By_priority p selects the baker at priority p
  • By_account pkh selects the first slot for baker pkh
  • Excluding pkhs selects the first baker that doesn't belong to pkhs

Returns (account, priority, timestamp) of the next baker given a policy, defaults to By_priority 0.

val get_endorsing_power : block -> (int, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t
module Forge : sig ... end
val genesis : ?with_commitments:bool -> ?endorsers_per_block:int -> ?initial_endorsers:int -> ?min_proposal_quorum:int32 -> ?time_between_blocks: Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Period.t list -> ?minimal_block_delay: Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Period.t -> ?delay_per_missing_endorsement: Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Period.t -> ?bootstrap_contracts: Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Parameters.bootstrap_contract list -> ?level:int32 -> (Account.t * Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Tez.tez) list -> (block, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t

genesis <opts> accounts : generates an initial block with the given constants <opts> and initializes accounts with their associated amounts.

val alpha_context : ?with_commitments:bool -> ?endorsers_per_block:int -> ?initial_endorsers:int -> ?min_proposal_quorum:int32 -> (Account.t * Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Tez.tez) list -> (Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.t, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t

alpha_context <opts> accounts : instantiates an alpha_context with the given constants <opts> and initializes accounts with their associated amounts.

applies a signed header and its operations to a block and obtains a new block

bake b returns a block b' which has as predecessor block b. Optional parameter policy allows to pick the next baker in several ways. This function bundles together forge_header, sign_header and apply. These functions should be used instead of bake to craft unusual blocks for testing together with setters for properties of the headers. For examples see seed.ml or double_baking.ml

val bake_n : ?policy:baker_policy -> ?liquidity_baking_escape_vote:bool -> int -> t -> (block, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t

Bakes n blocks.

val bake_n_with_all_balance_updates : ?policy:baker_policy -> ?liquidity_baking_escape_vote:bool -> int -> t -> (block * Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Receipt.balance_updates, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t

Version of bake_n that returns a list of all balance updates included in the metadata of baked blocks. *

Version of bake_n that returns a list of all origination results in the metadata of baked blocks. *

val bake_n_with_liquidity_baking_escape_ema : ?policy:baker_policy -> ?liquidity_baking_escape_vote:bool -> int -> t -> (block * Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Liquidity_baking.escape_ema, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t

Version of bake_n that returns the liquidity baking escape EMA after n blocks. *

val bake_until_cycle_end : ?policy:baker_policy -> t -> (t, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t

Given a block b at level l bakes enough blocks to complete a cycle, that is blocks_per_cycle - (l % blocks_per_cycle).

val bake_until_n_cycle_end : ?policy:baker_policy -> int -> t -> (t, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t

Bakes enough blocks to end n cycles.

Bakes enough blocks to reach the cycle.

Common util function to create parameters for initial_context function

OCaml

Innovation. Community. Security.