package tezos-protocol-013-PtJakart
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b
doc/tezos-protocol-013-PtJakart.raw/Tezos_raw_protocol_013_PtJakart/Constants_repr/index.html
Module Tezos_raw_protocol_013_PtJakart.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 "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.
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
.
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
.
type parametric = {
preserved_cycles : int;
blocks_per_cycle : int32;
blocks_per_commitment : int32;
blocks_per_stake_snapshot : int32;
cycles_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_013_PtJakart.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_toggle_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;
initial_seed : State_hash.t option;
cache_script_size : int;
cache_stake_distribution_cycles : int;
cache_sampler_state_cycles : int;
tx_rollup_enable : bool;
tx_rollup_origination_size : int;
tx_rollup_hard_size_limit_per_inbox : int;
tx_rollup_hard_size_limit_per_message : int;
tx_rollup_commitment_bond : Tez_repr.t;
tx_rollup_finality_period : int;
tx_rollup_withdraw_period : int;
tx_rollup_max_inboxes_count : int;
tx_rollup_max_messages_per_inbox : int;
tx_rollup_max_commitments_count : int;
tx_rollup_cost_per_byte_ema_factor : int;
tx_rollup_max_ticket_payload_size : int;
tx_rollup_max_withdrawals_per_batch : int;
tx_rollup_rejection_max_proof_size : int;
tx_rollup_sunset_level : int32;
sc_rollup_enable : bool;
sc_rollup_origination_size : int;
sc_rollup_challenge_window_in_blocks : int;
sc_rollup_max_available_messages : int;
}
val parametric_encoding :
parametric Tezos_protocol_environment_013_PtJakart.Data_encoding.encoding
val check_constants :
parametric ->
unit Tezos_protocol_environment_013_PtJakart.Error_monad.tzresult
performs some consistency checks on the protocol parameters
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
.
The cache_layout
depends on parametric constants.