package tezos-client-010-PtGRANAD-commands

  1. Overview
  2. Docs
type transfer_strategy =
  1. | Fixed_amount of {
    1. mutez : Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Tez.t;
    }
    (*

    Amount to transfer

    *)
  2. | Evaporation of {
    1. fraction : float;
    }
    (*

    Maximum fraction of current wealth to transfer. Minimum amount is 1 mutez regardless of total wealth.

    *)
type parameters = {
  1. seed : int;
  2. fresh_probability : float;
    (*

    Per-transfer probability that the destination will be fresh

    *)
  3. tps : float;
    (*

    Transaction per seconds target

    *)
  4. strategy : transfer_strategy;
  5. fee_mutez : Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Tez.t;
    (*

    fees for each transfer, in mutez

    *)
  6. gas_limit : Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Gas.Arith.integral;
    (*

    gas limit per operation

    *)
  7. storage_limit : Z.t;
    (*

    storage limit per operation

    *)
  8. account_creation_storage : Z.t;
    (*

    upper bound on bytes consumed when creating a tz1 account

    *)
  9. total_transfers : int option;
    (*

    total number of transfers to perform; unbounded if None

    *)
  10. 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

    *)
}
type origin =
  1. | Explicit
  2. | Wallet_pkh
  3. | Wallet_alias of string
type input_source =
  1. | Explicit of source
  2. | Wallet_alias of string
  3. | Wallet_pkh of Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.public_key_hash
type source_origin = {
  1. source : source;
  2. origin : origin;
}
type state = {
  1. current_head_on_start : Tezos_crypto.Block_hash.t;
  2. counters : (Tezos_crypto.Block_hash.t * Z.t) Tezos_crypto.Signature.Public_key_hash.Table.t;
  3. mutable pool : source_origin list;
  4. mutable pool_size : int;
    (*

    Some l if single_op_per_pkh_per_block is true

    *)
  5. mutable shuffled_pool : source list option;
  6. mutable revealed : Tezos_crypto.Signature.Public_key_hash.Set.t;
  7. mutable last_block : Tezos_crypto.Block_hash.t;
  8. new_block_condition : unit Lwt_condition.t;
  9. injected_operations : Tezos_crypto.Operation_hash.t list Tezos_crypto.Block_hash.Table.t;
}
val verbose : bool Stdlib.ref
val debug : bool Stdlib.ref
val debug_msg : (unit -> unit Lwt.t) -> unit Lwt.t
val default_parameters : parameters
val input_source_encoding : input_source Data_encoding.encoding
val input_source_list_encoding : input_source list Data_encoding.encoding
val injected_operations_encoding : (Tezos_crypto.Block_hash.t * Tezos_crypto.Operation_hash.t list) list Data_encoding.encoding
val parse_strategy : string -> (transfer_strategy, string) Stdlib.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 : < answer : 'a. ('a, unit) Tezos_client_base.Client_context.lwt_format -> 'a ; error : 'a 'b. ('a, 'b) Tezos_client_base.Client_context.lwt_format -> 'a ; get_base_dir : string ; load : 'a. string -> default:'a -> 'a Data_encoding.encoding -> ('a, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t ; load_passwords : string Lwt_stream.t option ; log : 'a. string -> ('a, unit) Tezos_client_base.Client_context.lwt_format -> 'a ; message : 'a. ('a, unit) Tezos_client_base.Client_context.lwt_format -> 'a ; multiple_password_retries : bool ; prompt : 'a. ('a, (string, Tezos_error_monad.TzCore.error list) Stdlib.result) Tezos_client_base.Client_context.lwt_format -> 'a ; prompt_password : 'a. ('a, (Stdlib.Bytes.t, Tezos_error_monad.TzCore.error list) Stdlib.result) Tezos_client_base.Client_context.lwt_format -> 'a ; read_file : string -> (string, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t ; warning : 'a. ('a, unit) Tezos_client_base.Client_context.lwt_format -> 'a ; with_lock : 'a. (unit -> 'a Lwt.t) -> 'a Lwt.t ; write : 'a. string -> 'a -> 'a Data_encoding.encoding -> (unit, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t.. > -> 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 -> Stdlib.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 -> Stdlib.Random.State.t -> Tezos_client_010_PtGRANAD.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 : Stdlib.Random.State.t -> bytes
val generate_fresh_source : state -> Stdlib.Random.State.t -> source
val save_injected_operations : Tezos_client_010_PtGRANAD.Protocol_client_context.full -> state -> unit Lwt.t
type pool_source =
  1. | From_string of {
    1. json : Ezjsonm.value;
    }
  2. | From_file of {
    1. path : string;
    2. json : Ezjsonm.value;
    }
val json_of_pool_source : pool_source -> Ezjsonm.value
val set_option : 'a option -> ('b -> 'a -> 'b) -> 'b -> 'b
val commands : [< `Mainnet | `Testnet ] option -> unit -> Tezos_client_010_PtGRANAD.Protocol_client_context.full Tezos_clic.Clic.command list
OCaml

Innovation. Community. Security.