Mavryk_002_PtBoreas_test_helpers.Context
val branch : t -> Mavryk_protocol_002_PtBoreas.Environment.Block_hash.t
val pred_branch : t -> Mavryk_protocol_002_PtBoreas.Environment.Block_hash.t
val get_attesters :
t ->
Mavryk_protocol_plugin_002_PtBoreas.Plugin.RPC.Validators.t list
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.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.
val get_first_different_attesters :
t ->
(Mavryk_protocol_plugin_002_PtBoreas.Plugin.RPC.Validators.t
* Mavryk_protocol_plugin_002_PtBoreas.Plugin.RPC.Validators.t)
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
Return the two first elements of the list returns by get_attesters
.
val get_attester :
t ->
(Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.public_key_hash
* Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Slot.t list)
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.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.
val get_attester_slot :
t ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.public_key_hash ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Slot.t list option
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.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
.
val get_attester_n :
t ->
int ->
(Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.public_key_hash
* Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Slot.t list)
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
Return the n
th element of the list returns by get_attesters
.
val get_attesting_power_for_delegate :
t ->
?level:Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Raw_level.t ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.public_key_hash ->
int Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.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.
val get_cumulated_attesting_power_for_delegate :
t ->
levels:Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Raw_level.t list ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.public_key_hash ->
int Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
Sums the result of get_attesting_power_for_delegate
over a list of levels.
val get_current_voting_power :
t ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.public_key_hash ->
int64 Mavryk_protocol_002_PtBoreas.Environment.Error_monad.shell_tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val get_total_voting_power :
t ->
int64 Mavryk_protocol_002_PtBoreas.Environment.Error_monad.shell_tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val get_current_baking_power :
t ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.public_key_hash ->
int64 Mavryk_protocol_002_PtBoreas.Environment.Error_monad.shell_tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val get_bakers :
?filter:
(Mavryk_protocol_plugin_002_PtBoreas.Plugin.RPC.Baking_rights.t -> bool) ->
?cycle:Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Cycle.t ->
t ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.public_key_hash list
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val get_first_different_bakers :
?excluding:
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.public_key_hash list ->
t ->
(Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.public_key_hash
* Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.public_key_hash)
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val get_seed :
t ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Seed.seed
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
Returns the seed of the cycle to which the block belongs to.
val get_constants :
t ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Constants.t
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
Returns all the constants of the protocol
val default_test_constants :
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Constants.Parametric.t
The default constants used in the test framework. To be used with init_with_constants
.
val get_issuance_per_minute :
t ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Tez.t
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val get_baking_reward_fixed_portion :
t ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Tez.t
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val get_bonus_reward :
t ->
attesting_power:int ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Tez.t
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val get_attesting_reward :
t ->
expected_attesting_power:int ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Tez.t
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val get_liquidity_baking_subsidy :
t ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Tez.t
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val get_liquidity_baking_cpmm_address :
t ->
Mavryk_protocol_002_PtBoreas.Protocol.Contract_hash.t
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val get_adaptive_issuance_launch_cycle :
t ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Cycle.t option
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val get_total_frozen_stake :
t ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Tez.t
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val get_seed_nonce_revelation_tip :
t ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Tez.t
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val get_vdf_revelation_tip :
t ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Tez.t
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val get_ai_current_yearly_rate :
t ->
string Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val get_ai_current_yearly_rate_exact :
t ->
Mavryk_protocol_002_PtBoreas.Environment.Q.t
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val get_ai_expected_issuance :
t ->
Mavryk_protocol_002_PtBoreas.Protocol.Adaptive_issuance_services.expected_rewards
list
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val estimated_own_pending_slashed_amount :
t ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.public_key_hash ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Tez.t
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
module Vote : sig ... end
module Dal : sig ... end
module Contract : sig ... end
module Delegate : sig ... end
module Sc_rollup : sig ... end
val tup_hd : ('a, 'elts) tup -> 'elts -> 'a
type 'accounts init :=
?rng_state:Stdlib.Random.State.t ->
?commitments:
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Commitment.t list ->
?bootstrap_balances:int64 list ->
?bootstrap_delegations:
Mavryk_protocol_002_PtBoreas.Environment.Signature.Public_key_hash.t option
list ->
?bootstrap_consensus_keys:
Mavryk_protocol_002_PtBoreas.Environment.Signature.Public_key.t option list ->
?consensus_committee_size:int ->
?consensus_threshold:int ->
?min_proposal_quorum:int32 ->
?bootstrap_contracts:
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Parameters.bootstrap_contract
list ->
?level:int32 ->
?cost_per_byte:Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Tez.t ->
?issuance_weights:
Mavryk_protocol_002_PtBoreas.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:
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Gas.Arith.integral ->
?nonce_revelation_threshold:int32 ->
?dal:
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Constants.Parametric.dal ->
?adaptive_issuance:
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Constants.Parametric.adaptive_issuance ->
unit ->
(Block.t * 'accounts) Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val init_gen :
(Mavryk_protocol_002_PtBoreas.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.
val init_n :
int ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Contract.t list init
init_n n
: returns an initial block with n
initialized accounts and the associated implicit contracts
init1
: returns an initial block with 1 initialized bootstrap account and the associated implicit contract
val init2 :
(Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Contract.t
* Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Contract.t)
init
init2
: returns an initial block with 2 initialized bootstrap accounts and the associated implicit contracts
val init3 :
(Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Contract.t
* Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Contract.t
* Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Contract.t)
init
init3
: returns an initial block with 3 initialized bootstrap accounts and the associated implicit contracts
val init_with_constants_gen :
(Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Contract.t, 'contracts)
tup ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Constants.Parametric.t ->
(Block.t * 'contracts) Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val init_with_constants2 :
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Constants.Parametric.t ->
(Block.t
* (Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Contract.t
* Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Contract.t))
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
val init_with_parameters_gen :
(Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Contract.t, 'contracts)
tup ->
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Parameters.t ->
(Block.t * 'contracts) Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.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.
val init_with_parameters_n :
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Parameters.t ->
int ->
(Block.t
* Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Contract.t list)
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.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
val init_with_parameters1 :
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Parameters.t ->
(Block.t * Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Contract.t)
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
init_with_parameters1 params
returns an initial block parametrized with params
with one initialized account and the associated implicit contract.
val init_with_parameters2 :
Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Parameters.t ->
(Block.t
* (Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Contract.t
* Mavryk_protocol_002_PtBoreas.Protocol.Alpha_context.Contract.t))
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
init_with_parameters2 params
returns an initial block parametrized with params
with two initialized accounts and the associated implicit contracts
val default_raw_context :
unit ->
Mavryk_protocol_002_PtBoreas.Protocol.Raw_context.t
Mavryk_base.TzPervasives.tzresult
Mavryk_protocol_002_PtBoreas.Environment.Lwt.t
default_raw_context
returns a Raw_context.t
for use in tests below Alpha_context