package tezos-protocol-015-PtLimaPt
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b
doc/tezos-protocol-015-PtLimaPt.raw/Tezos_raw_protocol_015_PtLimaPt/Sc_rollup_costs/index.html
Module Tezos_raw_protocol_015_PtLimaPt.Sc_rollup_costs
Source
This module contains constants and utility functions for gas metering functions used when handling SC rollups operations in context.
val is_valid_parameters_ty_cost :
ty_size:'a Saturation_repr.t ->
Saturation_repr.may_saturate Saturation_repr.t
is_valid_parameters_ty_cost ty
returns the cost of checking whether a type is a valid sc rollup parameter.
val cost_add_serialized_messages :
num_messages:int ->
total_messages_size:int ->
int32 ->
Gas_limit_repr.cost
cost_add_serialized_messages ~num_messages ~total_messages_length level
returns the cost of adding num_messages
with total messages size total_messages_size
to a sc-rollup inbox at level level
. This function is used internally in the Sc_rollup_storage
module.
val cost_serialize_internal_inbox_message :
Sc_rollup_inbox_message_repr.internal_inbox_message ->
Gas_limit_repr.cost
cost_serialize_internal_inbox_message internal_inbox_message
is the cost of the serialization of an internal inbox message. It's equal to the cost of serializing the script expression, with Script_repr.force_bytes_cost
plus a fixed amount for the serialized addresses.
It traverses the payload expression to find the precise cost. It is safe to use Script_repr.force_bytes_cost
because the payload of an internal inbox message is bounded.
cost_deserialize_output_proof ~bytes_len
is the cost of the deserialization of an output proof. It's equal to the cost of deserializing a script expression of size bytes_len
.
cost_serialize_external_inbox_message ~bytes_len
is the cost of the serialization of an external inbox message of length bytes_len
. It is equal to the estimated cost of encoding a byte multiplied by bytes_len
.
cost_hash_bytes ~bytes_len
is the cost of hashing bytes_len
bytes.