package octez-protocol-017-PtNairob-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

These generators aims at generating operations which are not necessary correct. The goal is to tests functions such as Operation.compare with as much as possible parameters that play a role in operation weight computation.

When adding a new operation, one should also add its weight computation, hence knows which kind of generator should be provided for this new operation.

Operations kind labelling.

val consensus_pass : [> `PConsensus ]
val anonymous_pass : [> `PAnonymous ]
val vote_pass : [> `PVote ]
val manager_pass : [> `PManager ]
val all_passes : [> `PAnonymous | `PConsensus | `PManager | `PVote ] list
val all_non_manager_passes : [> `PAnonymous | `PConsensus | `PVote ] list
val consensus_kinds : [> `KDal_attestation | `KEndorsement | `KPreendorsement ] list
val anonymous_kinds : [> `KActivate_account | `KDouble_baking | `KDouble_endorsement | `KDouble_preendorsement | `KSeed_nonce_revelation | `KVdf_revelation ] list
val vote_kinds : [> `KBallot | `KProposals ] list
val manager_kinds : [> `KDal_publish_slot_header | `KDelegation | `KIncrease_paid_storage | `KOrigination | `KRegister_global_constant | `KReveal | `KSc_rollup_add_messages | `KSc_rollup_cement | `KSc_rollup_execute_outbox_message | `KSc_rollup_originate | `KSc_rollup_publish | `KSc_rollup_recover_bond | `KSc_rollup_refute | `KSc_rollup_timeout | `KSet_deposits_limit | `KTransaction | `KTransfer_ticket ] list
val pass_to_operation_kinds : [< `PAnonymous | `PConsensus | `PManager | `PVote ] -> [> `KActivate_account | `KBallot | `KDal_attestation | `KDouble_baking | `KDouble_endorsement | `KDouble_preendorsement | `KEndorsement | `KManager | `KPreendorsement | `KProposals | `KSeed_nonce_revelation | `KVdf_revelation ] list
val pp_kind : Stdlib.Format.formatter -> [< `KActivate_account | `KBallot | `KDal_attestation | `KDouble_baking | `KDouble_endorsement | `KDouble_preendorsement | `KEndorsement | `KManager | `KPreendorsement | `KProposals | `KSeed_nonce_revelation | `KVdf_revelation ] -> unit

Generators

module Gen_hash (H : sig ... end) : sig ... end

Selection in hashes list

val random_seed : bytes QCheck2.Gen.t

Operations parameters generators

val gen_slot : Tezos_raw_protocol_017_PtNairob__Alpha_context.Slot.t QCheck2.Gen.t
val gen_amount_in_bytes : Z.t QCheck2.Gen.t
val gen_counters : Tezos_raw_protocol_017_PtNairob__Alpha_context.Manager_counter.t QCheck2.Gen.t
val gen_storage_limit : Z.t QCheck2.Gen.t

Generators for each Operation Kind

val random_period : int32 QCheck2.Gen.t

By Kind Operation Generator

val generator_of : ?source:Tezos_protocol_017_PtNairob.Protocol.Alpha_context.public_key_hash -> [< `KDal_publish_slot_header | `KDelegation | `KIncrease_paid_storage | `KOrigination | `KRegister_global_constant | `KReveal | `KSc_rollup_add_messages | `KSc_rollup_cement | `KSc_rollup_execute_outbox_message | `KSc_rollup_originate | `KSc_rollup_publish | `KSc_rollup_recover_bond | `KSc_rollup_refute | `KSc_rollup_timeout | `KSet_deposits_limit | `KTransaction | `KTransfer_ticket ] -> Tezos_raw_protocol_017_PtNairob__Alpha_context.packed_operation QCheck2.Gen.t
val generate_non_manager_operation : Tezos_raw_protocol_017_PtNairob__Alpha_context.packed_operation QCheck2.Gen.t
val generate_manager_operation : int -> Tezos_raw_protocol_017_PtNairob__Alpha_context.packed_operation QCheck2.Gen.t
val max_batch_size : int

The default upper bound on the number of manager operations in a batch.

As of December 2022, there is no batch maximal size enforced anywhere in the protocol. However, the Octez Shell only accepts batches of at most operations_batch_size operations, which has a default value of 50 in src/lib_shell_services/shell_limits.ml. The protocol tests do not necessarily have to align with this value, but there is no reason either to choose a different one. Therefore, they use the same bound, but decremented once to account for some tests adding a reveal at the front of the batch as needed.

val generate_operation : ([ `KActivate_account | `KBallot | `KDal_attestation | `KDouble_baking | `KDouble_endorsement | `KDouble_preendorsement | `KEndorsement | `KManager | `KPreendorsement | `KProposals | `KSeed_nonce_revelation | `KVdf_revelation ] * (Tezos_protocol_environment_017_PtNairob.Operation_hash.t * Tezos_raw_protocol_017_PtNairob__Alpha_context.packed_operation)) QCheck2.Gen.t
OCaml

Innovation. Community. Security.