Mavryk_raw_protocol_alpha.Storage_functors
Tezos Protocol Implementation - Typed storage builders.
Contains functors used by Storage
to create the structure on disk.
See Make_subcontext
module Registered : Storage_sigs.REGISTER
module Ghost : Storage_sigs.REGISTER
module Make_subcontext
(_ : Storage_sigs.REGISTER)
(C : Raw_context.T)
(_ : Storage_sigs.NAME) :
Raw_context.T with type t = C.t
Given a Raw_context
, return a new Raw_context
that projects into a given subtree. Similar to a functional lens.
module Make_single_data_storage
(_ : Storage_sigs.REGISTER)
(C : Raw_context.T)
(_ : Storage_sigs.NAME)
(V : Storage_sigs.VALUE) :
Storage_sigs.Single_data_storage with type t = C.t and type value = V.t
module type INDEX = sig ... end
A type that can be serialized as a string list
, and used as a prefix in the typed datastore.
module Make_data_set_storage
(C : Raw_context.T)
(I : INDEX) :
Storage_sigs.Data_set_storage with type t = C.t and type elt = I.t
Create storage for a compound type.
module Make_carbonated_data_set_storage
(C : Raw_context.T)
(I : INDEX) :
Storage_sigs.Carbonated_data_set_storage with type t = C.t and type elt = I.t
Like Make_data_set_storage
, adding tracking of storage cost.
module Make_indexed_data_storage
(C : Raw_context.T)
(I : INDEX)
(V : Storage_sigs.VALUE) :
Storage_sigs.Indexed_data_storage
with type t = C.t
and type key = I.t
and type value = V.t
This functor creates storage for types with a notion of an index.
module Make_indexed_carbonated_data_storage
(C : Raw_context.T)
(I : INDEX)
(V : Storage_sigs.VALUE) :
Storage_sigs.Indexed_carbonated_data_storage
with type t = C.t
and type key = I.t
and type value = V.t
Like Make_indexed_data_storage
, adding tracking of storage cost.
module Make_indexed_data_snapshotable_storage
(C : Raw_context.T)
(Snapshot : INDEX)
(I : INDEX)
(V : Storage_sigs.VALUE) :
Storage_sigs.Indexed_data_snapshotable_storage
with type t = C.t
and type snapshot = Snapshot.t
and type key = I.t
and type value = V.t
module Make_indexed_subcontext
(C : Raw_context.T)
(I : INDEX) :
Storage_sigs.Indexed_raw_context
with type t = C.t
and type key = I.t
and type 'a ipath = 'a I.ipath
module type WRAPPER = sig ... end
module Wrap_indexed_data_storage
(C : Storage_sigs.Indexed_data_storage)
(K : WRAPPER with type key := C.key) :
Storage_sigs.Indexed_data_storage
with type t = C.t
and type key = K.t
and type value = C.value