package tezos-protocol-012-Psithaca
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc
doc/tezos-protocol-012-Psithaca.raw/Tezos_raw_protocol_012_Psithaca/Constants_repr/index.html
Module Tezos_raw_protocol_012_Psithaca.Constants_repr
Source
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
.
type delegate_selection =
| Random
| Round_robin_over of Tezos_protocol_environment_012_Psithaca.Signature.Public_key.t list list
val delegate_selection_encoding :
delegate_selection
Tezos_protocol_environment_012_Psithaca.Data_encoding.encoding
type parametric = {
preserved_cycles : int;
blocks_per_cycle : int32;
blocks_per_commitment : int32;
blocks_per_stake_snapshot : int32;
blocks_per_voting_period : int32;
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;
baking_reward_fixed_portion : Tez_repr.t;
baking_reward_bonus_per_slot : Tez_repr.t;
endorsing_reward_per_slot : Tez_repr.t;
cost_per_byte : Tez_repr.t;
hard_storage_limit_per_operation : Tezos_protocol_environment_012_Psithaca.Z.t;
quorum_min : int32;
quorum_max : int32;
min_proposal_quorum : int32;
liquidity_baking_subsidy : Tez_repr.t;
liquidity_baking_sunset_level : int32;
liquidity_baking_escape_ema_threshold : int32;
max_operations_time_to_live : int;
minimal_block_delay : Period_repr.t;
delay_increment_per_round : Period_repr.t;
minimal_participation_ratio : ratio;
consensus_committee_size : int;
consensus_threshold : int;
max_slashing_period : int;
frozen_deposits_percentage : int;
double_baking_punishment : Tez_repr.t;
ratio_of_frozen_deposits_slashed_per_double_endorsement : ratio;
delegate_selection : delegate_selection;
}
val parametric_encoding :
parametric Tezos_protocol_environment_012_Psithaca.Data_encoding.encoding
val check_constants :
parametric ->
unit Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
performs some consistency checks on the protocol parameters