package tezos-protocol-016-PtMumbai

  1. Overview
  2. Docs
Tezos/Protocol: economic-protocol definition

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-17.3.tar.gz
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc

doc/tezos-protocol-016-PtMumbai.raw/Tezos_raw_protocol_016_PtMumbai/Sc_rollup_costs/index.html

Module Tezos_raw_protocol_016_PtMumbai.Sc_rollup_costsSource

This module contains constants and utility functions for gas metering functions used when handling SC rollups operations in context.

Sourcemodule Constants : sig ... end
Sourceval 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.

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.

Sourceval cost_deserialize_output_proof : bytes_len:int -> Gas_limit_repr.cost

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.

Sourceval cost_serialize_external_inbox_message : bytes_len:int -> Gas_limit_repr.cost

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.

Sourceval cost_hash_bytes : bytes_len:int -> Gas_limit_repr.cost

cost_hash_bytes ~bytes_len is the cost of hashing bytes_len bytes.

Sourceval cost_check_dissection : number_of_states:int -> tick_size:int -> hash_size:int -> Gas_limit_repr.cost

cost_check_dissection ~number_of_states ~tick_size ~hash_size is the cost of checking that a dissection with a given number_of_states used in a refutation game is well-formed. This includes the comparison of a linear number of ticks as well as the verification of two hashes of given hash_size.

Sourceval cost_verify_output_proof : bytes_len:int -> Gas_limit_repr.cost

cost_verify_output_proof ~bytes_len is the cost of verifying an output proof of length bytes_len.

Sourceval cost_add_message : current_index:Tezos_protocol_environment_016_PtMumbai.Z.t -> msg_len:int -> Gas_limit_repr.cost

cost_add_message ~new_cell_index ~msg_len returns the cost of adding a message of length msg_len to a sc-rollup inbox. This function is used internally in the Sc_rollup_storage module and covers the function Sc_rollup_inbox_merkelized_payload_hashes_repr.add_payload

OCaml

Innovation. Community. Security.