package octez-protocol-alpha-libs
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=dbc3b675aee59c2c574e5d0a771193a2ecfca31e7a5bc5aed66598080596ce1c
sha512=b97ed762b9d24744305c358af0d20f394376b64bfdd758dd4a81775326caf445caa57c4f6445da3dd6468ff492de18e4c14af6f374dfcbb7e4d64b7b720e5e2a
doc/octez-protocol-alpha-libs.test-helpers/Tezos_alpha_test_helpers/Context/index.html
Module Tezos_alpha_test_helpers.ContextSource
val get_level :
t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t
Tezos_base.TzPervasives.tzresultval get_attesters :
t ->
Tezos_protocol_plugin_alpha.Plugin.RPC.Validators.t list
Tezos_base.TzPervasives.tzresult
Tezos_protocol_alpha.Environment.Lwt.tGiven 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 ->
(Tezos_protocol_plugin_alpha.Plugin.RPC.Validators.t
* Tezos_protocol_plugin_alpha.Plugin.RPC.Validators.t)
Tezos_base.TzPervasives.tzresult
Tezos_protocol_alpha.Environment.Lwt.tReturn the two first elements of the list returns by get_attesters.
val 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.tReturn 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 ->
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.tGiven 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 ->
(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.tReturn the nth element of the list returns by get_attesters.
val 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.tCounts 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: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.tSums the result of get_attesting_power_for_delegate over a list of levels.
val 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.tval 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.tval 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_hashval get_first_different_bakers :
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.tval get_seed_nonce_hash :
t ->
Tezos_protocol_alpha.Protocol.Nonce_hash.t Tezos_base.TzPervasives.tzresult
Tezos_protocol_alpha.Environment.Lwt.tval get_seed :
t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Seed.seed
Tezos_base.TzPervasives.tzresult
Tezos_protocol_alpha.Environment.Lwt.tReturns the seed of the cycle to which the block belongs to.
val get_seed_computation :
t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Seed.seed_computation_status
Tezos_base.TzPervasives.tzresult
Tezos_protocol_alpha.Environment.Lwt.tval get_constants :
t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Constants.t
Tezos_base.TzPervasives.tzresult
Tezos_protocol_alpha.Environment.Lwt.tReturns all the constants of the protocol
val default_test_constants :
Tezos_protocol_alpha.Protocol.Alpha_context.Constants.Parametric.tThe default constants used in the test framework. To be used with init_with_constants.
val get_baking_reward_fixed_portion :
t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t
Tezos_base.TzPervasives.tzresult
Tezos_protocol_alpha.Environment.Lwt.tval get_bonus_reward :
t ->
attesting_power:int ->
Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t
Tezos_base.TzPervasives.tzresult
Tezos_protocol_alpha.Environment.Lwt.tval 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.tval get_liquidity_baking_subsidy :
t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t
Tezos_base.TzPervasives.tzresult
Tezos_protocol_alpha.Environment.Lwt.tval get_liquidity_baking_cpmm_address :
t ->
Tezos_protocol_alpha.Protocol.Contract_hash.t
Tezos_base.TzPervasives.tzresult
Tezos_protocol_alpha.Environment.Lwt.tval get_adaptive_issuance_launch_cycle :
t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Cycle.t option
Tezos_base.TzPervasives.tzresult
Tezos_protocol_alpha.Environment.Lwt.tval get_total_frozen_stake :
t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t
Tezos_base.TzPervasives.tzresult
Tezos_protocol_alpha.Environment.Lwt.tval get_total_supply :
t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t
Tezos_base.TzPervasives.tzresult
Tezos_protocol_alpha.Environment.Lwt.tval get_seed_nonce_revelation_tip :
t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t
Tezos_base.TzPervasives.tzresult
Tezos_protocol_alpha.Environment.Lwt.tval get_vdf_revelation_tip :
t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t
Tezos_base.TzPervasives.tzresult
Tezos_protocol_alpha.Environment.Lwt.ttype '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_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_enable:bool ->
?sc_rollup_arith_pvm_enable:bool ->
?sc_rollup_private_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 ->
unit ->
(Block.t * 'accounts) Tezos_base.TzPervasives.tzresult
Tezos_protocol_alpha.Environment.Lwt.tval init_gen :
(Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t, 'accounts) tup ->
'accounts initReturns 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.
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 :
(Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t
* Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t)
initinit2 : returns an initial block with 2 initialized bootstrap accounts and the associated implicit contracts
val 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)
initinit3 : returns an initial block with 3 initialized bootstrap accounts and the associated implicit contracts
val 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.tval 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.tval 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.tval 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.tval 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.tinit_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 :
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.tinit_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 :
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.tinit_with_parameters1 params returns an initial block parametrized with params with one initialized account and the associated implicit contract.
val 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.tinit_with_parameters2 params returns an initial block parametrized with params with two initialized accounts and the associated implicit contracts
val default_raw_context :
unit ->
Tezos_protocol_alpha.Protocol.Raw_context.t Tezos_base.TzPervasives.tzresult
Tezos_protocol_alpha.Environment.Lwt.tdefault_raw_context returns a Raw_context.t for use in tests below Alpha_context