package octez-protocol-019-PtParisB-libs

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

Module Tezos_019_PtParisB_test_helpers.Operation_generatorSource

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.

Sourceval consensus_pass : [> `PConsensus ]
Sourceval anonymous_pass : [> `PAnonymous ]
Sourceval vote_pass : [> `PVote ]
Sourceval manager_pass : [> `PManager ]
Sourceval all_passes : [> `PAnonymous | `PConsensus | `PManager | `PVote ] list
Sourceval all_non_manager_passes : [> `PAnonymous | `PConsensus | `PVote ] list
Sourceval consensus_kinds : [> `KAttestation | `KPreattestation ] list
Sourceval anonymous_kinds : [> `KActivate_account | `KDouble_attestation | `KDouble_baking | `KDouble_preattestation | `KSeed_nonce_revelation | `KVdf_revelation ] list
Sourceval vote_kinds : [> `KBallot | `KProposals ] list
Sourceval manager_kinds : [> `KDal_publish_commitment | `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
Sourceval pass_to_operation_kinds : [< `PAnonymous | `PConsensus | `PManager | `PVote ] -> [> `KActivate_account | `KAttestation | `KBallot | `KDouble_attestation | `KDouble_baking | `KDouble_preattestation | `KManager | `KPreattestation | `KProposals | `KSeed_nonce_revelation | `KVdf_revelation ] list
Sourceval pp_kind : Format.formatter -> [< `KActivate_account | `KAttestation | `KBallot | `KDal_attestation | `KDouble_attestation | `KDouble_baking | `KDouble_preattestation | `KManager | `KPreattestation | `KProposals | `KSeed_nonce_revelation | `KVdf_revelation ] -> unit

Generators

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

Selection in hashes list

Sourceval gen_block_hash : Tezos_base.TzPervasives.Block_hash.t QCheck2.Gen.t
Sourceval random_payload_hash : Tezos_protocol_019_PtParisB.Protocol.Block_payload_hash.t QCheck2.Gen.t
Sourceval gen_algo : Tezos_base.TzPervasives.Signature.algo QCheck2.Gen.t
Sourceval random_seed : bytes QCheck2.Gen.t
Sourceval random_keys : (Tezos_base.TzPervasives.Signature.public_key_hash * Tezos_base.TzPervasives.Signature.public_key * Tezos_base.TzPervasives.Signature.secret_key) QCheck2.Gen.t
Sourceval random_tz1 : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.public_key_hash QCheck2.Gen.t
Sourceval random_tz2 : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.public_key_hash QCheck2.Gen.t
Sourceval random_tz3 : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.public_key_hash QCheck2.Gen.t
Sourceval random_tz4 : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.public_key_hash QCheck2.Gen.t
Sourceval random_pkh : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.public_key_hash QCheck2.Gen.t
Sourceval random_pk : Tezos_base.TzPervasives.Signature.public_key QCheck2.Gen.t
Sourceval random_signature : Tezos_base.TzPervasives.Signature.t QCheck2.Gen.t
Sourceval random_contract_hash : Tezos_protocol_019_PtParisB.Protocol.Contract_hash.t QCheck2.Gen.t
Sourceval block_headers : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Block_header.block_header list
Sourceval random_block_header : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Block_header.block_header QCheck2.Gen.t
Sourceval random_sc_rollup : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Sc_rollup.Address.t QCheck2.Gen.t
Sourceval random_proto : Tezos_base.TzPervasives.Protocol_hash.t QCheck2.Gen.t
Sourceval random_code : Tezos_protocol_019_PtParisB.Protocol.Blinded_public_key_hash.activation_code QCheck2.Gen.t

Operations parameters generators

Sourceval random_shell : Tezos_base.Operation.shell_header QCheck2.Gen.t
Sourceval gen_slot : Tezos_raw_protocol_019_PtParisB__Alpha_context.Slot.t QCheck2.Gen.t
Sourceval gen_level : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Raw_level.raw_level QCheck2.Gen.t
Sourceval gen_round : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Round.t QCheck2.Gen.t
Sourceval generate_consensus_content : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.consensus_content QCheck2.Gen.t
Sourceval gen_tez : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Tez.t QCheck2.Gen.t
Sourceval gen_fee : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Tez.t QCheck2.Gen.t
Sourceval gen_amount : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Tez.t QCheck2.Gen.t
Sourceval gen_amount_in_bytes : Z.t QCheck2.Gen.t
Sourceval random_contract : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Contract.t QCheck2.Gen.t
Sourceval gen_counters : Tezos_raw_protocol_019_PtParisB__Alpha_context.Manager_counter.t QCheck2.Gen.t
Sourceval gen_ticket_amounts : Tezos_protocol_019_PtParisB.Protocol.Ticket_amount.t QCheck2.Gen.t
Sourceval gen_gas_limit : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Gas.Arith.integral QCheck2.Gen.t
Sourceval gen_storage_limit : Z.t QCheck2.Gen.t
Sourceval nonces : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Nonce.nonce list
Sourceval random_nonce : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Nonce.nonce QCheck2.Gen.t
Sourceval vdf_solutions : (Tezos_protocol_019_PtParisB.Environment.Vdf.result * Tezos_protocol_019_PtParisB.Environment.Vdf.proof) list

Generators for each Operation Kind

Sourceval wrap_operation : Tezos_protocol_environment_019_PtParisB.Operation.shell_header -> 'kind Tezos_protocol_019_PtParisB.Protocol.Alpha_context.protocol_data -> 'kind Tezos_protocol_019_PtParisB.Protocol.Alpha_context.operation
Sourceval generate_op : 'kind Tezos_protocol_019_PtParisB.Protocol.Alpha_context.contents QCheck2.Gen.t -> 'kind Tezos_protocol_019_PtParisB.Protocol.Alpha_context.operation QCheck2.Gen.t
Sourceval generate_preattestation : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.preattestation Tezos_protocol_019_PtParisB.Protocol.Alpha_context.contents QCheck2.Gen.t
Sourceval generate_attestation : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.attestation Tezos_protocol_019_PtParisB.Protocol.Alpha_context.contents QCheck2.Gen.t
Sourceval generate_vdf_revelation : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.vdf_revelation Tezos_protocol_019_PtParisB.Protocol.Alpha_context.contents QCheck2.Gen.t
Sourceval generate_seed_nonce_revelation : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.seed_nonce_revelation Tezos_protocol_019_PtParisB.Protocol.Alpha_context.contents QCheck2.Gen.t
Sourceval generate_double_preattestation : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.double_preattestation_evidence Tezos_protocol_019_PtParisB.Protocol.Alpha_context.contents QCheck2.Gen.t
Sourceval generate_double_attestation : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.double_attestation_evidence Tezos_protocol_019_PtParisB.Protocol.Alpha_context.contents QCheck2.Gen.t
Sourceval generate_double_baking : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.double_baking_evidence Tezos_protocol_019_PtParisB.Protocol.Alpha_context.contents QCheck2.Gen.t
Sourceval generate_activate_account : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.activate_account Tezos_protocol_019_PtParisB.Protocol.Alpha_context.contents QCheck2.Gen.t
Sourceval random_period : int32 QCheck2.Gen.t
Sourceval generate_proposals : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.proposals Tezos_protocol_019_PtParisB.Protocol.Alpha_context.contents QCheck2.Gen.t
Sourceval generate_ballot : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.ballot Tezos_protocol_019_PtParisB.Protocol.Alpha_context.contents QCheck2.Gen.t
Sourceval generate_manager_aux : ?source:Tezos_protocol_019_PtParisB.Protocol.Alpha_context.public_key_hash -> 'a Tezos_protocol_019_PtParisB.Protocol.Alpha_context.manager_operation QCheck2.Gen.t -> 'a Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.manager Tezos_protocol_019_PtParisB.Protocol.Alpha_context.contents QCheck2.Gen.t
Sourceval generate_manager : ?source:Tezos_protocol_019_PtParisB.Protocol.Alpha_context.public_key_hash -> 'a Tezos_protocol_019_PtParisB.Protocol.Alpha_context.manager_operation QCheck2.Gen.t -> 'a Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.manager Tezos_protocol_019_PtParisB.Protocol.Alpha_context.operation QCheck2.Gen.t
Sourceval generate_reveal : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.reveal Tezos_protocol_019_PtParisB.Protocol.Alpha_context.manager_operation QCheck2.Gen.t
Sourceval generate_transaction : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.transaction Tezos_protocol_019_PtParisB.Protocol.Alpha_context.manager_operation QCheck2.Gen.t
Sourceval generate_origination : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.origination Tezos_protocol_019_PtParisB.Protocol.Alpha_context.manager_operation QCheck2.Gen.t
Sourceval generate_delegation : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.delegation Tezos_protocol_019_PtParisB.Protocol.Alpha_context.manager_operation QCheck2.Gen.t
Sourceval generate_increase_paid_storage : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.increase_paid_storage Tezos_protocol_019_PtParisB.Protocol.Alpha_context.manager_operation QCheck2.Gen.t
Sourceval generate_set_deposits_limit : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.set_deposits_limit Tezos_protocol_019_PtParisB.Protocol.Alpha_context.manager_operation QCheck2.Gen.t
Sourceval generate_register_global_constant : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.register_global_constant Tezos_protocol_019_PtParisB.Protocol.Alpha_context.manager_operation QCheck2.Gen.t
Sourceval generate_transfer_ticket : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.transfer_ticket Tezos_protocol_019_PtParisB.Protocol.Alpha_context.manager_operation QCheck2.Gen.t
Sourceval generate_dal_publish_commitment : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.dal_publish_commitment Tezos_protocol_019_PtParisB.Protocol.Alpha_context.manager_operation QCheck2.Gen.t
Sourceval generate_sc_rollup_originate : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.sc_rollup_originate Tezos_protocol_019_PtParisB.Protocol.Alpha_context.manager_operation QCheck2.Gen.t
Sourceval generate_sc_rollup_add_messages : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.sc_rollup_add_messages Tezos_protocol_019_PtParisB.Protocol.Alpha_context.manager_operation QCheck2.Gen.t
Sourceval sc_dummy_commitment : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Sc_rollup.Commitment.t
Sourceval generate_sc_rollup_cement : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.sc_rollup_cement Tezos_protocol_019_PtParisB.Protocol.Alpha_context.manager_operation QCheck2.Gen.t
Sourceval generate_sc_rollup_publish : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.sc_rollup_publish Tezos_protocol_019_PtParisB.Protocol.Alpha_context.manager_operation QCheck2.Gen.t
Sourceval generate_sc_rollup_refute : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.sc_rollup_refute Tezos_protocol_019_PtParisB.Protocol.Alpha_context.manager_operation QCheck2.Gen.t
Sourceval generate_sc_rollup_timeout : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.sc_rollup_timeout Tezos_protocol_019_PtParisB.Protocol.Alpha_context.manager_operation QCheck2.Gen.t
Sourceval generate_sc_rollup_execute_outbox_message : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.sc_rollup_execute_outbox_message Tezos_protocol_019_PtParisB.Protocol.Alpha_context.manager_operation QCheck2.Gen.t
Sourceval generate_sc_rollup_recover_bond : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Kind.sc_rollup_recover_bond Tezos_protocol_019_PtParisB.Protocol.Alpha_context.manager_operation QCheck2.Gen.t

By Kind Operation Generator

Sourceval generator_of : ?source:Tezos_protocol_019_PtParisB.Protocol.Alpha_context.public_key_hash -> [< `KDal_publish_commitment | `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_019_PtParisB__Alpha_context.packed_operation QCheck2.Gen.t
Sourceval generate_non_manager_operation : Tezos_raw_protocol_019_PtParisB__Alpha_context.packed_operation QCheck2.Gen.t
Sourceval generate_manager_operation : int -> Tezos_raw_protocol_019_PtParisB__Alpha_context.packed_operation QCheck2.Gen.t
Sourceval 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.

Sourceval generate_operation : ([ `KActivate_account | `KAttestation | `KBallot | `KDouble_attestation | `KDouble_baking | `KDouble_preattestation | `KManager | `KPreattestation | `KProposals | `KSeed_nonce_revelation | `KVdf_revelation ] * (Tezos_protocol_environment_019_PtParisB.Operation_hash.t * Tezos_raw_protocol_019_PtParisB__Alpha_context.packed_operation)) QCheck2.Gen.t
OCaml

Innovation. Community. Security.