package tezos-protocol-017-PtNairob
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc
doc/tezos-protocol-017-PtNairob.raw/Tezos_raw_protocol_017_PtNairob/Lazy_storage_kind/index.html
Module Tezos_raw_protocol_017_PtNairob.Lazy_storage_kind
Source
Lazy_storage offers a unified interface for specific Michelson datatype that behave somewhat lazily, because they are intended to be quite big. Instead of serializing/deserializing the whole value to/from the storage, only an identifier is used. The identifier acts like a pointer. When using the value in a Michelson script, some part of it may be read from the storage, and a lightweight diff is computed. The diff is effectively applied to the storage at the end of the execution.
This module defines the different kinds of lazy storages and their basic properties. See also Lazy_storage_diff
.
Lazy storage types are:
- Big_map
Lazy storage ids are kept as abstract as possible to avoid mixing them up.
type ('id, 'alloc, 'updates) t =
| Big_map : (Big_map.Id.t, Big_map.alloc, Big_map.updates) t
| Sapling_state : (Sapling_state.Id.t, Sapling_state.alloc, Sapling_state.updates) t
Kinds of lazy storage. The GADT ensures operations are properly applied to the correct kind.
'id
the abstract type for the identifier of the kind. 'alloc
is the type used to construct a new value. 'updates
is the type used to update a value.