package tezos-client-011-PtHangz2
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc
doc/tezos-client-011-PtHangz2.commands/Tezos_client_011_PtHangz2_commands/Client_proto_stresstest_commands/index.html
Module Tezos_client_011_PtHangz2_commands.Client_proto_stresstest_commands
Source
type parameters = {
seed : int;
fresh_probability : float;
(*Per-transfer probability that the destination will be fresh
*)tps : float;
(*Transaction per seconds target
*)strategy : transfer_strategy;
fee_mutez : Tezos_protocol_011_PtHangz2.Protocol.Alpha_context.Tez.t;
(*fees for each transfer, in mutez
*)gas_limit : Tezos_protocol_011_PtHangz2.Protocol.Alpha_context.Gas.Arith.integral;
(*gas limit per operation
*)storage_limit : Z.t;
(*storage limit per operation
*)account_creation_storage : Z.t;
(*upper bound on bytes consumed when creating a tz1 account
*)total_transfers : int option;
(*total number of transfers to perform; unbounded if None
*)single_op_per_pkh_per_block : bool;
(*if true, a single operation will be injected by pkh by block to improve the chance for the injected operations to be included in the next block
*)level_limit : limit option;
(*total number of levels during which the stresstest is run; unbounded if None
*)
}
type source = {
pkh : Tezos_protocol_011_PtHangz2.Protocol.Alpha_context.public_key_hash;
pk : Tezos_protocol_011_PtHangz2.Protocol.Alpha_context.public_key;
sk : Tezos_crypto.Signature.V0.secret_key;
}
type state = {
current_head_on_start : Tezos_base.TzPervasives.Block_hash.t;
counters : (Tezos_base.TzPervasives.Block_hash.t * Z.t) Tezos_crypto.Signature.V0.Public_key_hash.Table.t;
mutable pool : source_origin list;
mutable pool_size : int;
(*
*)Some l
ifsingle_op_per_pkh_per_block
is truemutable shuffled_pool : source list option;
mutable revealed : Tezos_crypto.Signature.V0.Public_key_hash.Set.t;
mutable last_block : Tezos_base.TzPervasives.Block_hash.t;
mutable last_level : int;
new_block_condition : unit Lwt_condition.t;
injected_operations : Tezos_base.TzPervasives.Operation_hash.t list Tezos_base.TzPervasives.Block_hash.Table.t;
}
val input_source_list_encoding :
input_source list Tezos_base.TzPervasives.Data_encoding.encoding
val injected_operations_encoding :
(Tezos_base.TzPervasives.Block_hash.t
* Tezos_base.TzPervasives.Operation_hash.t list)
list
Tezos_base.TzPervasives.Data_encoding.encoding
This command uses two different data structures for sources:
- The in-output files one,
- The normalized one.
The data structure used for in-output files does not directly contain the data required to forge operations. For efficiency purposes, the sources are converted into a normalized data structure that contains all the required data to forge operations and the format originally used to be able to revert this conversion.
val normalize_source :
Tezos_client_base.Client_context.io_wallet ->
input_source ->
source_origin option Lwt.t
normalize_source cctxt src
converts src
from in-output data structure to normalized one. If the conversion fails, None
is returned and a warning message is printed in cctxt
.
Only unencrypted and encrypted sources from the wallet of cctxt
are supported.
unnormalize_source src_org
converts src_org
from normalized data structure to in-output one.
Samples from state.pool
. Used to generate the destination of a transfer, and its source only when state.shuffled_pool
is None
meaning that --single-op-per-pkh-per-block
is not set.
val sample_source_from_pool :
state ->
Random.State.t ->
Tezos_client_011_PtHangz2.Protocol_client_context.full ->
source Lwt.t
Generates the source of a transfer. If state.shuffled_pool
has a value (meaning that --single-op-per-pkh-per-block
is active) then it is sampled from there, otherwise from state.pool
.
val heads_iter :
Tezos_client_011_PtHangz2.Protocol_client_context.full ->
((Tezos_base.TzPervasives.Block_hash.t * Tezos_base.Block_header.t) ->
unit Lwt.t) ->
unit Tezos_base.TzPervasives.tzresult Lwt.t
val sample_transfer :
Tezos_client_011_PtHangz2.Protocol_client_context.full ->
Tezos_shell_services.Shell_services.chain ->
Tezos_shell_services.Shell_services.block ->
parameters ->
state ->
Random.State.t ->
(transfer, Tezos_base.TzPervasives.Error_monad.tztrace) result Lwt.t
val inject_contents :
Tezos_client_011_PtHangz2.Protocol_client_context.full ->
Tezos_shell_services.Chain_services.chain ->
Tezos_protocol_environment_011_PtHangz2.Block_hash.t ->
Tezos_crypto.Signature.V0.Secret_key.t ->
'a Tezos_protocol_011_PtHangz2.Protocol.Alpha_context.contents_list ->
Tezos_base.TzPervasives.Operation_hash.t Tezos_base.TzPervasives.tzresult
Lwt.t
val manager_op_of_transfer :
parameters ->
transfer ->
Tezos_protocol_011_PtHangz2.Protocol.Alpha_context.Kind.transaction
Tezos_protocol_011_PtHangz2.Protocol.Alpha_context.Kind.manager
Tezos_protocol_011_PtHangz2.Protocol.Alpha_context.contents
val cost_of_manager_operation :
Tezos_protocol_011_PtHangz2.Protocol.Alpha_context.Gas.Arith.integral
val inject_transfer :
Tezos_client_011_PtHangz2.Protocol_client_context.full ->
parameters ->
state ->
Random.State.t ->
Tezos_shell_services.Shell_services.chain ->
Tezos_shell_services.Shell_services.block ->
transfer ->
(unit, Tezos_base.TzPervasives.Error_monad.tztrace) result Lwt.t
val save_injected_operations :
Tezos_client_011_PtHangz2.Protocol_client_context.full ->
state ->
unit Lwt.t
val stat_on_exit :
Tezos_client_011_PtHangz2.Protocol_client_context.full ->
state ->
(unit, Tezos_base.TzPervasives.tztrace) result Lwt.t
val launch :
Tezos_client_011_PtHangz2.Protocol_client_context.full ->
parameters ->
state ->
Random.State.t ->
(unit -> unit Lwt.t) ->
unit Tezos_base.TzPervasives.tzresult Lwt.t
val json_file_or_text_parameter :
(pool_source, Tezos_client_011_PtHangz2.Protocol_client_context.full)
Tezos_clic.parameter
val seed_arg :
(int option, Tezos_client_011_PtHangz2.Protocol_client_context.full)
Tezos_clic.arg
val tps_arg :
(float option, Tezos_client_011_PtHangz2.Protocol_client_context.full)
Tezos_clic.arg
val fresh_probability_arg :
(float option, Tezos_client_011_PtHangz2.Protocol_client_context.full)
Tezos_clic.arg
val strategy_arg :
(transfer_strategy option,
Tezos_client_011_PtHangz2.Protocol_client_context.full)
Tezos_clic.arg
val gas_limit_arg :
(Tezos_protocol_011_PtHangz2.Protocol.Alpha_context.Gas.Arith.integral option,
Tezos_client_011_PtHangz2.Protocol_client_context.full)
Tezos_clic.arg
val storage_limit_arg :
(Z.t option, Tezos_client_011_PtHangz2.Protocol_client_context.full)
Tezos_clic.arg
val transfers_arg :
(int option, Tezos_client_011_PtHangz2.Protocol_client_context.full)
Tezos_clic.arg
val single_op_per_pkh_per_block_arg :
(bool, Tezos_client_011_PtHangz2.Protocol_client_context.full) Tezos_clic.arg
val level_limit_arg :
(limit option, Tezos_client_011_PtHangz2.Protocol_client_context.full)
Tezos_clic.arg
val verbose_arg :
(bool, Tezos_client_011_PtHangz2.Protocol_client_context.full) Tezos_clic.arg
val save_pool_callback :
Tezos_client_011_PtHangz2.Protocol_client_context.full ->
pool_source ->
state ->
unit Lwt.t
val generate_random_transactions :
Tezos_client_011_PtHangz2.Protocol_client_context.full Tezos_clic.command
val commands :
[< `Mainnet | `Testnet ] option ->
unit ->
Tezos_client_011_PtHangz2.Protocol_client_context.full Tezos_clic.command
list