package tezos-protocol-alpha
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=c6df840ebbf115e454db949028c595bec558a59a66cade73b52a6d099d6fa4d4
sha512=d8aee903b9fe130d73176bc8ec38b78c9ff65317da3cb4f3415f09af0c625b4384e7498201fdb61aa39086a7d5d409d0ab3423f9bc3ab989a680cf444a79bc13
doc/tezos_raw_protocol_alpha/Tezos_raw_protocol_alpha/Constants_repr/index.html
Module Tezos_raw_protocol_alpha.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
.
The max slashing period is the maximum number of cycles after which a misbehaviour can be denounced, i.e. if a misbehaviour happened at cycle c
, it will be rejected if it is denounced at cycle c + max_slashing_period
. Having max_slashing_period
strictly smaller than 2 doesn't make sense. Indeed, if a misbehaviour happens at the very last block of a cycle, it couldn't be denounced. max_slashing_period = 2
leaves one cycle to denounce a misbehaviour in the worst case, which is deemed enough. Several parts of the codebase may use the fact that max_slashing_period = 2
, so let's ensure it cannot be different.
A size limit for Sc_rollups.wrapped_proof
binary encoding.
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
A limit on the number of messages in a inbox level enforced in Sc_rollup_inbox_repr.t
.
val check_constants :
Constants_parametric_repr.t ->
unit Tezos_protocol_environment_alpha.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.