package tezos-protocol-011-PtHangz2

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val version_number_004 : string
val version_number : string
val proof_of_work_nonce_size : int
val nonce_length : int
val max_anon_ops_per_block : int
val max_proposals_per_delegate : int
val max_operation_data_length : int
val max_micheline_node_count : int

A global size limit on the size of Micheline expressions after expansion.

We want to prevent constants from being used to create huge values that could potentially do damage if ever printed or sent over the network. We arrived at this number by finding the largest possible contract in terms of number of nodes. The number of nodes is constrained by the current "max_operation_data_length" (32768) to be ~10,000 ( see "largest_flat_contract.tz" in the tezt suite for the largest contract with constants that can be originated). As a first approximation, we set the node size limit to 5 times this amount.

val max_micheline_bytes_limit : int

Same as max_micheline_node_count but for limiting the combined bytes of the strings, ints and bytes in a expanded Micheline expression.

val max_allowed_global_constant_depth : int

Represents the maximum depth of an expression stored in the table after all references to other constants have (recursively) been expanded, where depth refers to the nesting of Prim and/or Seq nodes.

The size was chosen arbitrarily to match the typechecker in Script_ir_translator.

val cache_layout : int list

Each protocol defines the number of subcaches and their respective limit size using cache_layout.

val michelson_maximum_type_size : int
type fixed
val fixed_encoding : fixed Data_encoding.t
type parametric = {
  1. preserved_cycles : int;
  2. blocks_per_cycle : int32;
  3. blocks_per_commitment : int32;
  4. blocks_per_roll_snapshot : int32;
  5. blocks_per_voting_period : int32;
  6. time_between_blocks : Period_repr.t list;
  7. minimal_block_delay : Period_repr.t;
  8. endorsers_per_block : int;
  9. hard_gas_limit_per_operation : Gas_limit_repr.Arith.integral;
  10. hard_gas_limit_per_block : Gas_limit_repr.Arith.integral;
  11. proof_of_work_threshold : int64;
  12. tokens_per_roll : Tez_repr.t;
  13. seed_nonce_revelation_tip : Tez_repr.t;
  14. origination_size : int;
  15. block_security_deposit : Tez_repr.t;
  16. endorsement_security_deposit : Tez_repr.t;
  17. baking_reward_per_endorsement : Tez_repr.t list;
  18. endorsement_reward : Tez_repr.t list;
  19. cost_per_byte : Tez_repr.t;
  20. hard_storage_limit_per_operation : Z.t;
  21. quorum_min : int32;
  22. quorum_max : int32;
  23. min_proposal_quorum : int32;
  24. initial_endorsers : int;
  25. delay_per_missing_endorsement : Period_repr.t;
  26. liquidity_baking_subsidy : Tez_repr.t;
  27. liquidity_baking_sunset_level : int32;
  28. liquidity_baking_escape_ema_threshold : int32;
}
val parametric_encoding : parametric Data_encoding.t
type t = private {
  1. fixed : fixed;
  2. parametric : parametric;
}
val all : parametric -> t
val encoding : t Data_encoding.t
val check_constants : parametric -> (unit, Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.error Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.trace) Stdlib.result

performs some consistency on the protocol parameters

module Proto_previous : sig ... end
OCaml

Innovation. Community. Security.