package tezos-protocol-016-PtMumbai

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Functions to manipulate transaction rollup’s inboxes.

Except explicit mention of the contrary, all the functions of this module are carbonated.

append_message ctxt tx_rollup state message tries to append message to the inbox of tx_rollup at the current level, creating it in the process if need be. This function returns the size of the appended message (in bytes), in order for the appropriate burn to be taken from the message author, the new state, as well as the storage size diff. It is the caller's responsibility to store the returned state.

Note: tx_rollup needs to be a valid transaction address. It is the responsibility of the caller to assert it.

Returns the error

  • Inbox_size_would_exceed_limit if appending message to the inbox would make it exceed the maximum size specified by the tx_rollup_hard_size_limit_per_inbox protocol parameter.
  • Message_size_exceeds_limit if the size of message is greater than the tx_rollup_hard_size_limit_per_message protocol parameter.

get ctxt level tx_rollup returns the inbox of tx_rollup at level level.

Returns the errors

  • Inbox_does_not_exist iff tx_rollup does not have an inbox at level level.

find ctxt level tx_rollup returns the inbox of tx_rollup at level level.

Returns None when the similar function get returns an error.

remove ctxt level tx_rollup removes from the context the inbox of level.

It is expected that this function is only called for inboxes that has been “adopted” by a commitment. As a consequence, the storage accounting is not performed by this function.

This function will returns the error Inbox_does_not_exist if there is no inbox for level in the storage. It is the reponsibility of the caller to ensure the tx_rollup actually exists.

check_message_hash ctxt level tx_rollup position message path checks that message is part of the tx_rollup inbox for level by checking the merkelised proof given by path.

If the proof failed, returns Wrong_message_path.

OCaml

Innovation. Community. Security.