package tezos-protocol-alpha
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f
doc/tezos-protocol-alpha.raw/Tezos_raw_protocol_alpha/Sc_rollup_inbox_message_repr/index.html
Module Tezos_raw_protocol_alpha.Sc_rollup_inbox_message_reprSource
This module exposes a type t that represents inbox messages. Inbox messages are produced by the Layer 1 protocol and are encoded using the serialize function, before being added to a smart-contract rollup's inbox.
They are part of the Rollup Management Protocol that defines the communication protocol for exchanging messages between Layer 1 and Layer 2 for a smart-contract rollup.
There are two types of inbox messages: external and internal.
Internal messages originate from Layer 1 smart-contract and consist of:
payloadthe parameters passed to the smart-contract rollup.senderthe Layer 1 contract caller.sourcethe public key hash used for originating the transaction.
External messages originate from the Sc_rollup_add_messages manager-operation and consists of strings. The Layer 2 node is responsible for decoding and interpreting these messages.
type internal_inbox_message = | Transfer of {payload : Script_repr.expr;(*A Micheline value containing the parameters passed to the rollup.
*)sender : Contract_hash.t;(*The contract hash of an Layer 1 originated contract sending a message to the rollup.
*)source : Tezos_protocol_environment_alpha.Signature.public_key_hash;(*The implicit account that originated the transaction.
*)destination : Sc_rollup_repr.Address.t;(*The destination, as a rollup address, for the message.
*)
}| Start_of_level(*Internal message put at the beginning of each inbox's level.
*)| End_of_level(*Internal message put at the end of each inbox's level.
*)| Info_per_level of {predecessor_timestamp : Tezos_protocol_environment_alpha.Time.t;(*Timestamp of the predecessor block where this message is pushed.
*)predecessor : Tezos_protocol_environment_alpha.Block_hash.t;(*Predecessor of the block this message is pushed.
*)
}
internal_inbox_message represent an internal message in a inbox (L1 -> L2). This is not inline so it can easily be used by Sc_rollup_costs.cost_serialize_internal_inbox_message.
A type representing messages from Layer 1 to Layer 2. Internal ones are originated from Layer 1 smart-contracts and external ones are messages from an external manager operation.
Encoding for messages from Layer 1 to Layer 2
serialize msg encodes the inbox message msg in binary format.
deserialize bs decodes bs as an inbox_message t.
hash_serialized_message payload is the hash of payload. It is used by Sc_rollup_inbox_merkelized_payload_hashes_repr.t.
serialized representation of Internal [Start_of_level].
serialized representation of Internal [End_of_level].