package tezos-protocol-011-PtHangz2
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.
Same as max_micheline_node_count
but for limiting the combined bytes of the strings, ints and bytes in a expanded Micheline expression.
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
.
Each protocol defines the number of subcaches and their respective limit size using cache_layout
.
val fixed_encoding :
fixed Tezos_protocol_environment_011_PtHangz2.Data_encoding.encoding
type parametric = {
preserved_cycles : int;
blocks_per_cycle : int32;
blocks_per_commitment : int32;
blocks_per_roll_snapshot : int32;
blocks_per_voting_period : int32;
time_between_blocks : Period_repr.t list;
minimal_block_delay : Period_repr.t;
endorsers_per_block : int;
hard_gas_limit_per_operation : Gas_limit_repr.Arith.integral;
hard_gas_limit_per_block : Gas_limit_repr.Arith.integral;
proof_of_work_threshold : int64;
tokens_per_roll : Tez_repr.t;
seed_nonce_revelation_tip : Tez_repr.t;
origination_size : int;
block_security_deposit : Tez_repr.t;
endorsement_security_deposit : Tez_repr.t;
baking_reward_per_endorsement : Tez_repr.t list;
endorsement_reward : Tez_repr.t list;
cost_per_byte : Tez_repr.t;
hard_storage_limit_per_operation : Tezos_protocol_environment_011_PtHangz2.Z.t;
quorum_min : int32;
quorum_max : int32;
min_proposal_quorum : int32;
initial_endorsers : int;
delay_per_missing_endorsement : Period_repr.t;
liquidity_baking_subsidy : Tez_repr.t;
liquidity_baking_sunset_level : int32;
liquidity_baking_escape_ema_threshold : int32;
}
val parametric_encoding :
parametric Tezos_protocol_environment_011_PtHangz2.Data_encoding.encoding
val all : parametric -> t
val encoding : t Tezos_protocol_environment_011_PtHangz2.Data_encoding.encoding
val check_constants :
parametric ->
unit Tezos_protocol_environment_011_PtHangz2.Error_monad.tzresult
performs some consistency on the protocol parameters
module Proto_previous : sig ... end