package tezos-protocol-015-PtLimaPt
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc
doc/tezos-protocol-015-PtLimaPt.raw/Tezos_raw_protocol_015_PtLimaPt/Sc_rollup_PVM_sig/index.html
Module Tezos_raw_protocol_015_PtLimaPt.Sc_rollup_PVM_sigSource
This module introduces the semantics of Proof-generating Virtual Machines.
A PVM defines an operational semantics for some computational model. The specificity of PVMs, in comparison with standard virtual machines, is their ability to generate and to validate a *compact* proof that a given atomic execution step turned a given state into another one.
In the smart-contract rollups, PVMs are used for two purposes:
- They allow for the externalization of rollup execution by completely specifying the operational semantics of a given rollup. This standardization of the semantics gives a unique and executable source of truth about the interpretation of smart-contract rollup inboxes, seen as a transformation of a rollup state.
- They allow for the validation or refutation of a claim that the processing of some messages led to a given new rollup state (given an actual source of truth about the nature of these messages).
An input to a PVM is the message_counter element of an inbox at a given inbox_level and contains a given payload.
According the rollup management protocol, the payload must be obtained through Sc_rollup_inbox_message_repr.serialize which follows a documented format.
FIXME: https://gitlab.com/tezos/tezos/-/issues/3649
This type cannot be extended in a retro-compatible way. It should be put into a variant.
type inbox_message = {inbox_level : Raw_level_repr.t;message_counter : Tezos_protocol_environment_015_PtLimaPt.Z.t;payload : Sc_rollup_inbox_message_repr.serialized;
}val inbox_message_encoding :
inbox_message Tezos_protocol_environment_015_PtLimaPt.Data_encoding.encodinginbox_message_encoding encoding value for inbox_message.
val reveal_data_encoding :
reveal_data Tezos_protocol_environment_015_PtLimaPt.Data_encoding.encodinginput_equal i1 i2 return whether i1 and i2 are equal.
type input_request = | No_input_required| Initial| First_after of Raw_level_repr.t * Tezos_protocol_environment_015_PtLimaPt.Z.t| Needs_reveal of reveal
The PVM's current input expectations:
No_input_requiredif the machine is busy and has no need for new input.
Initialif the machine has never received an input so expects the very first item in the inbox.
First_after (level, counter)expects whatever comes next after that position in the inbox.
Needs_reveal revealif the machine reveals the existence of some data and needs this data to continue its execution.
val input_request_encoding :
input_request Tezos_protocol_environment_015_PtLimaPt.Data_encoding.encodinginput_request_encoding encoding value for input_request.
val pp_input_request :
Tezos_protocol_environment_015_PtLimaPt.Format.formatter ->
input_request ->
unitpp_input_request fmt i pretty prints the given input i to the formatter fmt.
input_request_equal i1 i2 return whether i1 and i2 are equal.
type output = {outbox_level : Raw_level_repr.t;(*The outbox level containing the message. The level corresponds to the inbox level for which the message was produced.
*)message_index : Tezos_protocol_environment_015_PtLimaPt.Z.t;(*The message index.
*)message : Sc_rollup_outbox_message_repr.t;(*The message itself.
*)
}Type that describes output values.
output_encoding encoding value for output.
pp_output fmt o pretty prints the given output o to the formatter fmt.