package tezos-protocol-012-Psithaca

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val fitness_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 stake_distribution_size : int
val sampler_state_size : int
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 ratio = {
  1. numerator : int;
  2. denominator : int;
}
val ratio_encoding : ratio Data_encoding.t
val pp_ratio : Format.formatter -> ratio -> unit
type delegate_selection =
  1. | Random
  2. | Round_robin_over of Tezos_crypto.Signature.public_key list list
val delegate_selection_encoding : delegate_selection Data_encoding.t
type parametric = {
  1. preserved_cycles : int;
  2. blocks_per_cycle : int32;
  3. blocks_per_commitment : int32;
  4. blocks_per_stake_snapshot : int32;
  5. blocks_per_voting_period : int32;
  6. hard_gas_limit_per_operation : Gas_limit_repr.Arith.integral;
  7. hard_gas_limit_per_block : Gas_limit_repr.Arith.integral;
  8. proof_of_work_threshold : int64;
  9. tokens_per_roll : Tez_repr.t;
  10. seed_nonce_revelation_tip : Tez_repr.t;
  11. origination_size : int;
  12. baking_reward_fixed_portion : Tez_repr.t;
  13. baking_reward_bonus_per_slot : Tez_repr.t;
  14. endorsing_reward_per_slot : Tez_repr.t;
  15. cost_per_byte : Tez_repr.t;
  16. hard_storage_limit_per_operation : Z.t;
  17. quorum_min : int32;
  18. quorum_max : int32;
  19. min_proposal_quorum : int32;
  20. liquidity_baking_subsidy : Tez_repr.t;
  21. liquidity_baking_sunset_level : int32;
  22. liquidity_baking_escape_ema_threshold : int32;
  23. max_operations_time_to_live : int;
  24. minimal_block_delay : Period_repr.t;
  25. delay_increment_per_round : Period_repr.t;
  26. minimal_participation_ratio : ratio;
  27. consensus_committee_size : int;
  28. consensus_threshold : int;
  29. max_slashing_period : int;
  30. frozen_deposits_percentage : int;
  31. double_baking_punishment : Tez_repr.t;
  32. ratio_of_frozen_deposits_slashed_per_double_endorsement : ratio;
  33. delegate_selection : delegate_selection;
}
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
type Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.error +=
  1. | Invalid_protocol_constants of string
val check_constants : parametric -> (unit, Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.error Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.trace) result

performs some consistency checks on the protocol parameters

module Generated : sig ... end
module Proto_previous : sig ... end
OCaml

Innovation. Community. Security.