package tezos-protocol-012-Psithaca

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

Module Tezos_raw_protocol_012_Psithaca.Constants_reprSource

Sourceval fitness_version_number : string
Sourceval proof_of_work_nonce_size : int
Sourceval nonce_length : int
Sourceval max_anon_ops_per_block : int
Sourceval max_proposals_per_delegate : int
Sourceval max_operation_data_length : int
Sourceval 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.

Sourceval 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.

Sourceval 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.

Sourceval stake_distribution_size : int
Sourceval sampler_state_size : int
Sourceval cache_layout : int list

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

Sourceval michelson_maximum_type_size : int
Sourcetype fixed
Sourcetype ratio = {
  1. numerator : int;
  2. denominator : int;
}
Sourcetype delegate_selection =
  1. | Random
  2. | Round_robin_over of Tezos_protocol_environment_012_Psithaca.Signature.Public_key.t list list
Sourcetype 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 : Tezos_protocol_environment_012_Psithaca.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;
}
Sourcetype t = private {
  1. fixed : fixed;
  2. parametric : parametric;
}
Sourceval all : parametric -> t
Sourcetype Tezos_protocol_environment_012_Psithaca.Error_monad.error +=
  1. | Invalid_protocol_constants of string

performs some consistency checks on the protocol parameters

Sourcemodule Generated : sig ... end
Sourcemodule Proto_previous : sig ... end
OCaml

Innovation. Community. Security.