package tezos-protocol-alpha

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

Module Tezos_raw_protocol_alpha.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 "large_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 michelson_maximum_type_size : int

A global size limit on the size of Michelson types.

The size of a type is the number of nodes in its AST representation. See Script_typed_ir.TYPE_SIZE.

Sourceval sc_max_wrapped_proof_binary_size : int

A size limit for Sc_rollups.wrapped_proof binary encoding.

Sourceval sc_rollup_message_size_limit : int

A limit on the size of the binary encoding for sc rollup messages: Sc_rollup_inbox_message_repr.t and Sc_rollup_outbox_message_repr.t

Sourceval sc_rollup_max_number_of_messages_per_level : Tezos_protocol_environment_alpha.Z.t

A limit on the number of messages in a inbox level enforced in Sc_rollup_inbox_repr.t.

Sourcetype fixed
Sourcetype t = private {
  1. fixed : fixed;
  2. parametric : Constants_parametric_repr.t;
}
Sourceval all_of_parametric : Constants_parametric_repr.t -> t
Sourcetype Tezos_protocol_environment_alpha.Error_monad.error +=
  1. | Invalid_protocol_constants of string

performs some consistency checks on the protocol parameters

Sourcemodule Generated : sig ... end
Sourceval cache_layout_size : int

For each subcache, a size limit needs to be declared once. However, depending how the protocol will be instantiated (sandboxed mode, test network, ...) we may want to change this limit. For each subcache, a parametric constant can be used to change the limit (see parametric).

The number of subcaches and the limits for all those subcaches form together what is called the cache_layout.

Sourceval cache_layout : Constants_parametric_repr.t -> int list

The cache_layout depends on parametric constants.

OCaml

Innovation. Community. Security.