package tezos-protocol-018-Proxford
val is_private :
Raw_context.t ->
Sc_rollup_repr.t ->
(Raw_context.t * bool)
Tezos_protocol_environment_018_Proxford.Error_monad.tzresult
Tezos_protocol_environment_018_Proxford.Lwt.t
is_private context rollup
returns true if and only if the rollup
is private, along with the new context accounting for the gas consumption of the function call.
val init :
Raw_context.t ->
Sc_rollup_repr.t ->
whitelist:Sc_rollup_whitelist_repr.t ->
origination_level:Raw_level_repr.t ->
(Raw_context.t * Tezos_protocol_environment_018_Proxford.Z.t)
Tezos_protocol_environment_018_Proxford.Error_monad.tzresult
Tezos_protocol_environment_018_Proxford.Lwt.t
init context rollup ~whitelist
returns the new context resulting from the addition of the elements of whitelist
to the whitelist in the given rollup
's storage, along with the used storage space.
val check_access_to_private_rollup :
Raw_context.t ->
Sc_rollup_repr.t ->
Tezos_protocol_environment_018_Proxford.Signature.public_key_hash ->
Raw_context.t Tezos_protocol_environment_018_Proxford.Error_monad.tzresult
Tezos_protocol_environment_018_Proxford.Lwt.t
check_access_to_private_rollup context rollup staker_pkh
returns an error if staker_pkh
is not in the whitelist of rollup
if the rollup
is marked as private. Returns the gas consumed by performing the call otherwise. Assumes the private rollup feature is activated.
val find_whitelist_uncarbonated :
Raw_context.t ->
Sc_rollup_repr.t ->
Tezos_protocol_environment_018_Proxford.Signature.public_key_hash list option
Tezos_protocol_environment_018_Proxford.Error_monad.tzresult
Tezos_protocol_environment_018_Proxford.Lwt.t
find_whitelist_uncarbonated context rollup
returns the whitelist from the storage.
val replace :
Raw_context.t ->
Sc_rollup_repr.t ->
whitelist:Sc_rollup_whitelist_repr.t ->
(Raw_context.t * Tezos_protocol_environment_018_Proxford.Z.t)
Tezos_protocol_environment_018_Proxford.Error_monad.tzresult
Tezos_protocol_environment_018_Proxford.Lwt.t
replace context rollup ~whitelist
replaces the whitelist of rollup
in the storage by whitelist
. Returns the resulting context along with the used storage space.
val make_public :
Raw_context.t ->
Sc_rollup_repr.t ->
(Raw_context.t * Tezos_protocol_environment_018_Proxford.Z.t)
Tezos_protocol_environment_018_Proxford.Error_monad.tzresult
Tezos_protocol_environment_018_Proxford.Lwt.t
make_public context rollup
removes the whitelist of rollup
from the storage thus making the rollup public. Returns the resulting context along with the freed storage space.
val adjust_storage_space :
Raw_context.t ->
Sc_rollup_repr.t ->
new_storage_size:Tezos_protocol_environment_018_Proxford.Z.t ->
(Raw_context.t * Tezos_protocol_environment_018_Proxford.Z.t)
Tezos_protocol_environment_018_Proxford.Error_monad.tzresult
Tezos_protocol_environment_018_Proxford.Lwt.t
adjust_storage_space ctxt ~new_storage_size
updates the used storage space for the whitelist according to new_storage_size
. The additional positive amount of unpaid storage is returned. If no unpaid storage is consumed, this amount is 0.
Note that when storage space for the whitelist is released we may later use that space for free. For this reason, the amount returned may be less than the given (positive) storage_diff
.
val get_last_whitelist_update :
Raw_context.t ->
Sc_rollup_repr.t ->
(Raw_context.t * Sc_rollup_whitelist_repr.last_whitelist_update)
Tezos_protocol_environment_018_Proxford.Error_monad.tzresult
Tezos_protocol_environment_018_Proxford.Lwt.t
get_last_whitelist_update ctxt rollup
returns the pair (outbox level, message index) of the latest message of update to the whitelist. Returns None if no whitelist update has been applied. The returned context accounts for the gas consumption of the storage's update.
val set_last_whitelist_update :
Raw_context.t ->
Sc_rollup_repr.t ->
Sc_rollup_whitelist_repr.last_whitelist_update ->
(Raw_context.t * Tezos_protocol_environment_018_Proxford.Z.t)
Tezos_protocol_environment_018_Proxford.Error_monad.tzresult
Tezos_protocol_environment_018_Proxford.Lwt.t
set_last_whitelist_update ctxt rollup (outbox_level, message_index)
set the outbox level and message index of the latest message of update to the whitelist. Returns the new context, and the difference from the old (maybe 0) to the new size of the underlying storage.