package tezos-protocol-016-PtMumbai
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b
doc/tezos-protocol-016-PtMumbai.raw/Tezos_raw_protocol_016_PtMumbai/Zk_rollup_storage/index.html
Module Tezos_raw_protocol_016_PtMumbai.Zk_rollup_storageSource
type Tezos_protocol_environment_016_PtMumbai.Error_monad.error += | Zk_rollup_does_not_exist of Zk_rollup_repr.t(*Emitted when trying to perform an operation over a ZK rollup that hasn't been initialised.
*)| Zk_rollup_invalid_op_code of int(*Emitted when trying to add to the pending list and operation with an invalid op code.
*)| Zk_rollup_pending_list_too_short(*Emitted when trying to process more public operations than those available in the pending list.
*)
These errors are only to be matched in tests.
val account :
Raw_context.t ->
Zk_rollup_repr.t ->
(Raw_context.t * Zk_rollup_account_repr.t)
Tezos_protocol_environment_016_PtMumbai.Error_monad.tzresult
Tezos_protocol_environment_016_PtMumbai.Lwt.taccount context rollup fetches the ZK rollup's account from the storage.
val pending_op :
Raw_context.t ->
Zk_rollup_repr.t ->
int64 ->
(Raw_context.t * (Zk_rollup_operation_repr.t * Ticket_hash_repr.t option))
Tezos_protocol_environment_016_PtMumbai.Error_monad.tzresult
Tezos_protocol_environment_016_PtMumbai.Lwt.tval originate :
Raw_context.t ->
Zk_rollup_account_repr.static ->
init_state:Zk_rollup_state_repr.t ->
(Raw_context.t
* Zk_rollup_repr.t
* Tezos_protocol_environment_016_PtMumbai.Z.t)
Tezos_protocol_environment_016_PtMumbai.Error_monad.tzresult
Tezos_protocol_environment_016_PtMumbai.Lwt.toriginate context static ~init_state produces an address a for a ZK rollup storage using the origination_nonce from the context. This function also initializes the storage, indexing the initial ZKRU account by a.
Returns the new context and ZKRU address, alongside the size of the new account.
val add_to_pending :
Raw_context.t ->
Zk_rollup_repr.t ->
(Zk_rollup_operation_repr.t * Ticket_hash_repr.t option) list ->
(Raw_context.t * Tezos_protocol_environment_016_PtMumbai.Z.t)
Tezos_protocol_environment_016_PtMumbai.Error_monad.tzresult
Tezos_protocol_environment_016_PtMumbai.Lwt.tadd_to_pending context rollup operations appends to the ZK rollup's pending list a list of L2 operations. Returns the new context alongside the size of the new operations.
May fail with:
Zk_rollup_invalid_op_code op_codeif theop_codeof one of theoperationsis greater or equal to the number of declared operations for thisrollup.
val get_pending_length :
Raw_context.t ->
Zk_rollup_repr.t ->
(Raw_context.t * int)
Tezos_protocol_environment_016_PtMumbai.Error_monad.tzresult
Tezos_protocol_environment_016_PtMumbai.Lwt.tget_pending_length context rollup returns the length of a ZK rollup's pending list.
val get_prefix :
Raw_context.t ->
Zk_rollup_repr.t ->
int ->
(Raw_context.t
* (Zk_rollup_operation_repr.t * Ticket_hash_repr.t option) list)
Tezos_protocol_environment_016_PtMumbai.Error_monad.tzresult
Tezos_protocol_environment_016_PtMumbai.Lwt.tget_prefix context rollup n returns the prefix of length n of the rollup's pending list.
May fail with:
Zk_rollup_pending_list_too_shortifnis greater than the length of the pending list.Zk_rollup_negative_lengthifnis negative.
val update :
Raw_context.t ->
Zk_rollup_repr.t ->
pending_to_drop:int ->
new_account:Zk_rollup_account_repr.t ->
Raw_context.t Tezos_protocol_environment_016_PtMumbai.Error_monad.tzresult
Tezos_protocol_environment_016_PtMumbai.Lwt.tupdate context rollup ~pending_to_drop ~new_account sets the rollup's account to new_account. Additionally, it removes the first pending_to_drop entries from the rollup's pending list. Returns the new context.
May fail with:
Zk_rollup_pending_list_too_shortifpending_to_dropis greater than the length of the pending list.Zk_rollup_negative_lengthifpending_to_dropis negative.
val assert_exist :
Raw_context.t ->
Zk_rollup_repr.t ->
Raw_context.t Tezos_protocol_environment_016_PtMumbai.Error_monad.tzresult
Tezos_protocol_environment_016_PtMumbai.Lwt.tassert_exist context rollup asserts that rollup has been initialized. Returns the new context.
May fail with:
Zk_rollup_does_not_existifrollupis not found.
val exists :
Raw_context.t ->
Zk_rollup_repr.t ->
(Raw_context.t * bool)
Tezos_protocol_environment_016_PtMumbai.Error_monad.tzresult
Tezos_protocol_environment_016_PtMumbai.Lwt.texists context rollup returns a boolean representing whether rollup has been initialized.