package tezos-protocol-alpha
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f
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.