Module Tezos_024_PtTALLiN_test_helpers.Scenario_begin

type Tezos_base.TzPervasives.error +=
  1. | Inconsistent_number_of_bootstrap_accounts

Returns when the number of bootstrap accounts created by Context.init_n n is not equal to n

type starter_constants =
  1. | Mainnet
  2. | Sandbox
  3. | Test
val start_with_list : constants:(string * Scenario_constants.constants) list -> (unit, Scenario_constants.constants) Scenario_dsl.scenarios
val init_constants : ?default:starter_constants -> ?reward_per_block:int64 -> ?deactivate_dynamic:bool -> ?blocks_per_cycle:int32 -> ?delegate_parameters_activation_delay:int -> unit -> (unit, Scenario_constants.constants) Scenario_dsl.scenarios

Initializes the constants for testing, with well chosen default values. Recommended over start or start_with

type algo =
  1. | Any_algo
  2. | Ed25519
  3. | Secp256k1
  4. | P256
  5. | Bls
  6. | Not_Bls
val algo_to_algo : rng_state:Stdlib.Random.State.t -> algo -> Signature.algo option
type bootstrap_info = {
  1. name : string;
  2. balance_opt : int64 option;
  3. algo_opt : algo option;
  4. delegate_opt : string option;
  5. consensus_key_algo_opt_opt : algo option option;
  6. companion_key_flag_opt : bool option;
}
val make : ?algo:algo -> ?balance:int64 -> ?delegate:string -> ?consensus_key:algo option -> ?companion_key:bool -> string -> bootstrap_info

Used to build bootstrap detailed info.

  • parameter algo

    defines the algorithm to use for the given bootstrap. Set to Any_algo to choose one randomly.

  • parameter balance

    is the initial balance of the bootstrap account. Defaults to whatever Account.make_bootstrap_accounts sets it to, which should be Default_parameters.Internal_for_tests.bootstrap_balance

  • parameter delegate

    is the name of the initial delegate of the account. If set, then the bootstrap account will not be a self delegate. It cannot be set at the same time as the consensus key.

  • parameter consensus_key

    None means that the bootstrap account does not have a consensus key. Some algo will set a consensus key with the given algo.

  • parameter companion_key

    is a flag that sets a BLS companion key iff the parameter is set to true.

type bootstrap_full_info = {
  1. name : string;
  2. algo : algo;
  3. balance_opt : int64 option;
  4. delegate_opt : string option;
  5. consensus_key_algo_opt : algo option;
  6. companion_key_flag : bool;
}
type bootstrap_accounts = {
  1. name : string;
  2. balance : int64 option;
  3. account : Account.t;
  4. delegate : string option;
  5. consensus_key : Account.t option;
  6. companion_key : Account.t option;
}
val pp_bootstrap_info : Stdlib.Format.formatter -> bootstrap_accounts -> unit
val begin_test : ?bootstrap_info_list:bootstrap_info list -> ?default_algo:algo -> ?default_consensus_key:algo option -> ?default_companion_key:bool -> ?burn_rewards:bool -> ?force_attest_all:bool -> ?force_preattest_all:bool -> ?check_finalized_every_block: (Block.full_metadata -> (Block.t * State.t) -> unit Tezos_base.TzPervasives.tzresult Lwt.t) list -> ?disable_default_checks:bool -> ?rng_state:Stdlib.Random.State.t -> ?abaab_activation_levels:int option list -> string list -> (Scenario_constants.constants, Scenario_base.t) Scenario_dsl.scenarios

Initialize the test, given some initial parameters. algo defines the algorithm used for the delegates_name_list. If not set, a random algorithm is selected for each. To use a different algorithm for each delegate, use delegates_with_algo