package octez-protocol-011-PtHangz2-libs
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 input_source =
| Explicit of source
| Wallet_alias of string
| Wallet_pkh of Tezos_protocol_011_PtHangz2.Protocol.Alpha_context.public_key_hash
type transfer = {
src : source;
dst : Tezos_protocol_011_PtHangz2.Protocol.Alpha_context.public_key_hash;
fee : Tezos_protocol_011_PtHangz2.Protocol.Alpha_context.Tez.t;
amount : Tezos_protocol_011_PtHangz2.Protocol.Alpha_context.Tez.t;
counter : Z.t option;
fresh_dst : bool;
}
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 verbose : bool ref
val debug : bool ref
val default_parameters : parameters
val input_source_encoding :
input_source Tezos_base.TzPervasives.Data_encoding.encoding
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
val parse_strategy : string -> (transfer_strategy, string) result
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.
val unnormalize_source : source_origin -> input_source
unnormalize_source src_org
converts src_org
from normalized data structure to in-output one.
val sample_any_source_from_pool : state -> Random.State.t -> source Lwt.t
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 random_seed : Random.State.t -> bytes
val generate_fresh_source : state -> Random.State.t -> source
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 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 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 group : Tezos_clic.group
type pool_source =
| From_string of {
json : Ezjsonm.value;
}
| From_file of {
path : string;
json : Ezjsonm.value;
}
val json_of_pool_source : pool_source -> Ezjsonm.value
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 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 debug_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