package tezos-client-012-Psithaca
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f
doc/tezos-client-012-Psithaca.commands/Tezos_client_012_Psithaca_commands/Client_proto_stresstest_commands/index.html
Module Tezos_client_012_Psithaca_commands.Client_proto_stresstest_commandsSource
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_012_Psithaca.Protocol.Alpha_context.Tez.t;(*fees for each transfer, in mutez
*)gas_limit : Tezos_protocol_012_Psithaca.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_012_Psithaca.Protocol.Alpha_context.public_key_hash;pk : Tezos_protocol_012_Psithaca.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 lifsingle_op_per_pkh_per_blockis 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.encodingval injected_operations_encoding :
(Tezos_base.TzPervasives.Block_hash.t
* Tezos_base.TzPervasives.Operation_hash.t list)
list
Tezos_base.TzPervasives.Data_encoding.encodingThis 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.tnormalize_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_012_Psithaca.Protocol_client_context.full ->
source Lwt.tGenerates 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_012_Psithaca.Protocol_client_context.full ->
((Tezos_base.TzPervasives.Block_hash.t * Tezos_base.Block_header.t) ->
unit Lwt.t) ->
unit Tezos_base.TzPervasives.tzresult Lwt.tval sample_transfer :
Tezos_client_012_Psithaca.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.tval inject_contents :
Tezos_client_012_Psithaca.Protocol_client_context.full ->
Tezos_shell_services.Chain_services.chain ->
Tezos_protocol_environment_012_Psithaca.Block_hash.t ->
Tezos_crypto.Signature.V0.Secret_key.t ->
'a Tezos_protocol_012_Psithaca.Protocol.Alpha_context.contents_list ->
Tezos_base.TzPervasives.Operation_hash.t Tezos_base.TzPervasives.tzresult
Lwt.tval manager_op_of_transfer :
parameters ->
transfer ->
Tezos_protocol_012_Psithaca.Protocol.Alpha_context.Kind.transaction
Tezos_protocol_012_Psithaca.Protocol.Alpha_context.Kind.manager
Tezos_protocol_012_Psithaca.Protocol.Alpha_context.contentsval cost_of_manager_operation :
Tezos_protocol_012_Psithaca.Protocol.Alpha_context.Gas.Arith.integralval inject_transfer :
Tezos_client_012_Psithaca.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.tval save_injected_operations :
Tezos_client_012_Psithaca.Protocol_client_context.full ->
state ->
unit Lwt.tval stat_on_exit :
Tezos_client_012_Psithaca.Protocol_client_context.full ->
state ->
(unit, Tezos_base.TzPervasives.tztrace) result Lwt.tval launch :
Tezos_client_012_Psithaca.Protocol_client_context.full ->
parameters ->
state ->
Random.State.t ->
(unit -> unit Lwt.t) ->
unit Tezos_base.TzPervasives.tzresult Lwt.tval json_file_or_text_parameter :
(pool_source, Tezos_client_012_Psithaca.Protocol_client_context.full)
Tezos_clic.parameterval seed_arg :
(int option, Tezos_client_012_Psithaca.Protocol_client_context.full)
Tezos_clic.argval tps_arg :
(float option, Tezos_client_012_Psithaca.Protocol_client_context.full)
Tezos_clic.argval fresh_probability_arg :
(float option, Tezos_client_012_Psithaca.Protocol_client_context.full)
Tezos_clic.argval strategy_arg :
(transfer_strategy option,
Tezos_client_012_Psithaca.Protocol_client_context.full)
Tezos_clic.argval gas_limit_arg :
(Tezos_protocol_012_Psithaca.Protocol.Alpha_context.Gas.Arith.integral option,
Tezos_client_012_Psithaca.Protocol_client_context.full)
Tezos_clic.argval storage_limit_arg :
(Z.t option, Tezos_client_012_Psithaca.Protocol_client_context.full)
Tezos_clic.argval transfers_arg :
(int option, Tezos_client_012_Psithaca.Protocol_client_context.full)
Tezos_clic.argval single_op_per_pkh_per_block_arg :
(bool, Tezos_client_012_Psithaca.Protocol_client_context.full) Tezos_clic.argval level_limit_arg :
(limit option, Tezos_client_012_Psithaca.Protocol_client_context.full)
Tezos_clic.argval verbose_arg :
(bool, Tezos_client_012_Psithaca.Protocol_client_context.full) Tezos_clic.argval save_pool_callback :
Tezos_client_012_Psithaca.Protocol_client_context.full ->
pool_source ->
state ->
unit Lwt.tval generate_random_transactions :
Tezos_client_012_Psithaca.Protocol_client_context.full Tezos_clic.commandval commands :
[< `Mainnet | `Testnet ] option ->
unit ->
Tezos_client_012_Psithaca.Protocol_client_context.full Tezos_clic.command
list