package octez-protocol-alpha-libs

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Tezos_alpha_test_helpers.ContextSource

Sourcetype t =
  1. | B of Block.t
  2. | I of Incremental.t
Sourceval get_alpha_ctxt : ?policy:Block.baker_policy -> t -> Tezos_protocol_alpha.Protocol.Alpha_context.context Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval branch : t -> Tezos_protocol_alpha.Environment.Block_hash.t
Sourceval pred_branch : t -> Tezos_protocol_alpha.Environment.Block_hash.t
Sourceval get_level : t -> Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t Tezos_base.TzPervasives.tzresult
Sourceval get_attesters : t -> Tezos_protocol_plugin_alpha.Plugin.RPC.Validators.t list Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t

Given a context, returns the list of attesters charactized by the level, the public key hash of the delegate, its consensus_key and its assigned slots. see Plugin.RPC.Validator.t.

Return the two first elements of the list returns by get_attesters.

Sourceval get_attester : t -> (Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash * Tezos_protocol_alpha.Protocol.Alpha_context.Slot.t list) Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t

Return the first element delegate,slot of the list returns by get_attesters, where delegate is the consensus key when is set.

Sourceval get_attester_slot : t -> Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash -> Tezos_protocol_alpha.Protocol.Alpha_context.Slot.t list option Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t

Given a delegate, and a context ctxt, if delegate is in get_attesters ctxt returns the slots of delegate otherwise return None.

Sourceval get_attester_n : t -> int -> (Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash * Tezos_protocol_alpha.Protocol.Alpha_context.Slot.t list) Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t

Return the nth element of the list returns by get_attesters.

Sourceval get_attesting_power_for_delegate : t -> ?level:Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t -> Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash -> int Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t

Counts the number of attesting slots that the given delegate has in the requested level. If ommited, level defaults to the next level.

Sourceval get_cumulated_attesting_power_for_delegate : t -> levels:Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t list -> Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash -> int Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t

Sums the result of get_attesting_power_for_delegate over a list of levels.

Sourceval get_current_voting_power : t -> Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash -> int64 Tezos_protocol_alpha.Environment.Error_monad.shell_tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_voting_power : t -> Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash -> int64 Tezos_protocol_alpha.Environment.Error_monad.shell_tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_total_voting_power : t -> int64 Tezos_protocol_alpha.Environment.Error_monad.shell_tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_current_baking_power : t -> Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash -> int64 Tezos_protocol_alpha.Environment.Error_monad.shell_tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_bakers : ?filter:(Tezos_protocol_plugin_alpha.Plugin.RPC.Baking_rights.t -> bool) -> ?cycle:Tezos_protocol_alpha.Protocol.Alpha_context.Cycle.t -> t -> Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash list Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_baker : t -> round:Tezos_protocol_alpha.Protocol.Alpha_context.Round.t -> Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_first_different_baker : Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash -> Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash Tezos_base.TzPervasives.trace -> Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash
Sourceval get_first_different_bakers : ?excluding:Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash list -> t -> (Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash * Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash) Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_seed_nonce_hash : t -> Tezos_protocol_alpha.Protocol.Nonce_hash.t Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_seed : t -> Tezos_protocol_alpha.Protocol.Alpha_context.Seed.seed Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t

Returns the seed of the cycle to which the block belongs to.

Sourceval get_seed_computation : t -> Tezos_protocol_alpha.Protocol.Alpha_context.Seed.seed_computation_status Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_constants : t -> Tezos_protocol_alpha.Protocol.Alpha_context.Constants.t Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t

Returns all the constants of the protocol

Sourceval default_test_constants : Tezos_protocol_alpha.Protocol.Alpha_context.Constants.Parametric.t

The default constants used in the test framework. To be used with init_with_constants.

Sourceval get_issuance_per_minute : t -> Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_baking_reward_fixed_portion : t -> Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_bonus_reward : t -> attesting_power:int -> Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_attesting_reward : t -> expected_attesting_power:int -> Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_liquidity_baking_subsidy : t -> Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_liquidity_baking_cpmm_address : t -> Tezos_protocol_alpha.Protocol.Contract_hash.t Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_adaptive_issuance_launch_cycle : t -> Tezos_protocol_alpha.Protocol.Alpha_context.Cycle.t option Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_total_frozen_stake : t -> Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_total_supply : t -> Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_seed_nonce_revelation_tip : t -> Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_vdf_revelation_tip : t -> Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_ai_current_yearly_rate : t -> string Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_ai_current_yearly_rate_exact : t -> Tezos_protocol_alpha.Environment.Q.t Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_ai_expected_issuance : t -> Tezos_protocol_alpha.Protocol.Adaptive_issuance_services.expected_rewards list Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_denunciations : t -> (Tezos_protocol_alpha.Environment.Signature.Public_key_hash.t * Tezos_protocol_alpha.Protocol.Denunciations_repr.item) list Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval get_denunciations_for_delegate : t -> Tezos_protocol_alpha.Environment.Signature.Public_key_hash.t -> Tezos_protocol_alpha.Protocol.Denunciations_repr.item list Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval estimated_shared_pending_slashed_amount : t -> Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash -> Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval estimated_own_pending_slashed_amount : t -> Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash -> Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourcemodule Vote : sig ... end
Sourcemodule Dal : sig ... end
Sourcemodule Contract : sig ... end
Sourcemodule Delegate : sig ... end
Sourcemodule Sc_rollup : sig ... end
Sourcetype (_, _) tup =
  1. | T1 : ('a, 'a) tup
  2. | T2 : ('a, 'a * 'a) tup
  3. | T3 : ('a, 'a * 'a * 'a) tup
  4. | TList : int -> ('a, 'a list) tup
Sourceval tup_hd : ('a, 'elts) tup -> 'elts -> 'a
type 'accounts init := ?rng_state:Random.State.t -> ?commitments:Tezos_protocol_alpha.Protocol.Alpha_context.Commitment.t list -> ?bootstrap_balances:int64 list -> ?bootstrap_delegations: Tezos_protocol_alpha.Environment.Signature.Public_key_hash.t option list -> ?bootstrap_consensus_keys: Tezos_protocol_alpha.Environment.Signature.Public_key.t option list -> ?consensus_committee_size:int -> ?consensus_threshold:int -> ?min_proposal_quorum:int32 -> ?bootstrap_contracts: Tezos_protocol_alpha.Protocol.Alpha_context.Parameters.bootstrap_contract list -> ?level:int32 -> ?cost_per_byte:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t -> ?issuance_weights: Tezos_protocol_alpha.Protocol.Alpha_context.Constants.Parametric.issuance_weights -> ?origination_size:int -> ?blocks_per_cycle:int32 -> ?cycles_per_voting_period:int32 -> ?sc_rollup_arith_pvm_enable:bool -> ?sc_rollup_private_enable:bool -> ?sc_rollup_riscv_pvm_enable:bool -> ?dal_enable:bool -> ?zk_rollup_enable:bool -> ?hard_gas_limit_per_block: Tezos_protocol_alpha.Protocol.Alpha_context.Gas.Arith.integral -> ?nonce_revelation_threshold:int32 -> ?dal:Tezos_protocol_alpha.Protocol.Alpha_context.Constants.Parametric.dal -> ?adaptive_issuance: Tezos_protocol_alpha.Protocol.Alpha_context.Constants.Parametric.adaptive_issuance -> unit -> (Block.t * 'accounts) Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval init_gen : (Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t, 'accounts) tup -> 'accounts init

Returns an initial block and the implicit contracts corresponding to its bootstrap accounts. The number of bootstrap accounts, and the structure of the returned contracts, are specified by the tup argument.

Sourceval init_n : int -> Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t list init

init_n n : returns an initial block with n initialized accounts and the associated implicit contracts

Sourceval init1 : Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t init

init1 : returns an initial block with 1 initialized bootstrap account and the associated implicit contract

Sourceval init2 : (Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t * Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t) init

init2 : returns an initial block with 2 initialized bootstrap accounts and the associated implicit contracts

Sourceval init3 : (Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t * Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t * Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t) init

init3 : returns an initial block with 3 initialized bootstrap accounts and the associated implicit contracts

Sourceval init_with_constants_gen : (Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t, 'contracts) tup -> Tezos_protocol_alpha.Protocol.Alpha_context.Constants.Parametric.t -> (Block.t * 'contracts) Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval init_with_constants_n : Tezos_protocol_alpha.Protocol.Alpha_context.Constants.Parametric.t -> int -> (Block.t * Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t list) Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval init_with_constants1 : Tezos_protocol_alpha.Protocol.Alpha_context.Constants.Parametric.t -> (Block.t * Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t) Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval init_with_constants2 : Tezos_protocol_alpha.Protocol.Alpha_context.Constants.Parametric.t -> (Block.t * (Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t * Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t)) Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t
Sourceval init_with_parameters_gen : (Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t, 'contracts) tup -> Tezos_protocol_alpha.Protocol.Alpha_context.Parameters.t -> (Block.t * 'contracts) Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t

init_with_parameters_gen tup params returns an initial block parametrised with params and the implicit contracts corresponding to its bootstrap accounts. The number of bootstrap accounts, and the structure of the returned contracts, are specified by the tup argument.

Sourceval init_with_parameters_n : Tezos_protocol_alpha.Protocol.Alpha_context.Parameters.t -> int -> (Block.t * Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t list) Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t

init_with_parameters_n params n returns an initial block parametrized with params with n initialized accounts and the associated implicit contracts

Sourceval init_with_parameters1 : Tezos_protocol_alpha.Protocol.Alpha_context.Parameters.t -> (Block.t * Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t) Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t

init_with_parameters1 params returns an initial block parametrized with params with one initialized account and the associated implicit contract.

Sourceval init_with_parameters2 : Tezos_protocol_alpha.Protocol.Alpha_context.Parameters.t -> (Block.t * (Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t * Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t)) Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t

init_with_parameters2 params returns an initial block parametrized with params with two initialized accounts and the associated implicit contracts

Sourceval default_raw_context : unit -> Tezos_protocol_alpha.Protocol.Raw_context.t Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t

default_raw_context returns a Raw_context.t for use in tests below Alpha_context

Sourceval raw_context_from_constants : Tezos_protocol_alpha.Protocol.Alpha_context.Constants.Parametric.t -> Tezos_protocol_alpha.Protocol.Raw_context.t Tezos_base.TzPervasives.tzresult Tezos_protocol_alpha.Environment.Lwt.t

raw_context_from_constants returns a Raw_context.t for use in tests below Alpha_context

OCaml

Innovation. Community. Security.