package tezos-protocol-015-PtLimaPt

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

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-16.0.tar.gz
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b

doc/tezos-protocol-015-PtLimaPt.raw/Tezos_raw_protocol_015_PtLimaPt/Sc_rollup_management_protocol/index.html

Module Tezos_raw_protocol_015_PtLimaPt.Sc_rollup_management_protocolSource

This module provides a typed API for the Rollup Management Protocol that defines the communication protocol for exchanging messages between Layer 1 and Layer 2 for smart-contract rollups.

The API exposes functions for constructing inbox messages. These are messages produced by the Layer 1 protocol and added to a smart-contract rollups inbox.

The Layer 2 node is responsible for decoding and interpreting the messages.

A type outbox_message representing messages from Layer 2 to Layer 1 is also provided. An outbox_message consists of a set of transactions to L1 accounts.

Sourcetype transaction = private
  1. | Transaction : {
    1. destination : Contract_hash.t;
    2. entrypoint : Alpha_context.Entrypoint.t;
    3. parameters_ty : ('a, _) Script_typed_ir.ty;
    4. parameters : 'a;
    5. unparsed_parameters : Alpha_context.Script.expr;
    } -> transaction

A type representing a Layer 2 to Layer 1 transaction.

Sourcetype atomic_transaction_batch = private {
  1. transactions : transaction list;
}

A type representing a batch of Layer 2 to Layer 1 transactions.

Sourcetype outbox_message = private
  1. | Atomic_transaction_batch of atomic_transaction_batch

A typed representation of Sc_rollup.Outbox.Message.t.

make_internal_inbox_message ctxt ty ~payload ~sender ~source constructs a smart-contract rollup's inbox message (an L1 to L2 message) with the given payload, sender, and source.

outbox_message_of_outbox_message_repr ctxt msg returns a typed version of of the given outbox message msg.

Fails with an Sc_rollup_invalid_destination error in case the parameters don't match the type of the entrypoint and destination.

Sourcemodule Internal_for_tests : sig ... end

Function for constructing and encoding inbox_message and outbox_message values. Since Layer 1 only ever consumes outbox_message values and produces inbox_message values, these functions are used for testing only.

OCaml

Innovation. Community. Security.