package tezos-protocol-alpha
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc
doc/tezos-protocol-alpha.raw/Tezos_raw_protocol_alpha/Tx_rollup_inbox_storage/index.html
Module Tezos_raw_protocol_alpha.Tx_rollup_inbox_storageSource
Functions to manipulate transaction rollup’s inboxes.
Except explicit mention of the contrary, all the functions of this module are carbonated.
val append_message :
Raw_context.t ->
Tx_rollup_repr.t ->
Tx_rollup_state_repr.t ->
Tx_rollup_message_repr.t ->
(Raw_context.t
* Tx_rollup_state_repr.t
* Tezos_protocol_environment_alpha.Z.t)
Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tappend_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_limitif appendingmessageto the inbox would make it exceed the maximum size specified by thetx_rollup_hard_size_limit_per_inboxprotocol parameter.Message_size_exceeds_limitif the size ofmessageis greater than thetx_rollup_hard_size_limit_per_messageprotocol parameter.
val get :
Raw_context.t ->
Tx_rollup_level_repr.t ->
Tx_rollup_repr.t ->
(Raw_context.t * Tx_rollup_inbox_repr.t)
Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tget ctxt level tx_rollup returns the inbox of tx_rollup at level level.
Returns the errors
Inbox_does_not_existifftx_rollupdoes not have an inbox at levellevel.
val find :
Raw_context.t ->
Tx_rollup_level_repr.t ->
Tx_rollup_repr.t ->
(Raw_context.t * Tx_rollup_inbox_repr.t option)
Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tfind ctxt level tx_rollup returns the inbox of tx_rollup at level level.
Returns None when the similar function get returns an error.
val remove :
Raw_context.t ->
Tx_rollup_level_repr.t ->
Tx_rollup_repr.t ->
Raw_context.t Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tremove 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.
val check_message_hash :
Raw_context.t ->
Tx_rollup_level_repr.t ->
Tx_rollup_repr.t ->
position:int ->
Tx_rollup_message_repr.t ->
Tx_rollup_inbox_repr.Merkle.path ->
Raw_context.t Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tcheck_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.