package tezos-protocol-008-PtEdoTez
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
    
    
  sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b
    
    
  doc/tezos-protocol-008-PtEdoTez.raw/Tezos_raw_protocol_008_PtEdoTez/Raw_context/index.html
Module Tezos_raw_protocol_008_PtEdoTez.Raw_contextSource
Errors
type storage_error = - | Incompatible_protocol_version of string
- | Missing_key of string list * missing_key_kind
- | Existing_key of string list
- | Corrupted_data of string list
An internal storage error that should not happen
type Tezos_protocol_environment_008_PtEdoTez.Error_monad.error += - | Storage_error of storage_error
type Tezos_protocol_environment_008_PtEdoTez.Error_monad.error += - | Failed_to_decode_parameter of Tezos_protocol_environment_008_PtEdoTez.Data_encoding.json * string
val storage_error : 
  storage_error ->
  'a Tezos_protocol_environment_008_PtEdoTez.Error_monad.tzresultAbstract Context
Abstract view of the context. Includes a handle to the functional key-value database (Context.t) along with some in-memory values (gas, etc.).
val prepare : 
  level:Tezos_protocol_environment_008_PtEdoTez.Int32.t ->
  predecessor_timestamp:Tezos_protocol_environment_008_PtEdoTez.Time.t ->
  timestamp:Tezos_protocol_environment_008_PtEdoTez.Time.t ->
  fitness:Tezos_protocol_environment_008_PtEdoTez.Fitness.t ->
  Tezos_protocol_environment_008_PtEdoTez.Context.t ->
  context Tezos_protocol_environment_008_PtEdoTez.Error_monad.tzresult
    Tezos_protocol_environment_008_PtEdoTez.Lwt.tRetrieves the state of the database and gives its abstract view. It also returns wether this is the first block validated with this version of the protocol.
val prepare_first_block : 
  level:int32 ->
  timestamp:Tezos_protocol_environment_008_PtEdoTez.Time.t ->
  fitness:Tezos_protocol_environment_008_PtEdoTez.Fitness.t ->
  Tezos_protocol_environment_008_PtEdoTez.Context.t ->
  (previous_protocol
   * context
   * Tezos_protocol_environment_008_PtEdoTez.Int32.t)
    Tezos_protocol_environment_008_PtEdoTez.Error_monad.tzresult
    Tezos_protocol_environment_008_PtEdoTez.Lwt.tReturns the state of the database resulting of operations on its abstract view
val patch_constants : 
  context ->
  (Constants_repr.parametric -> Constants_repr.parametric) ->
  context Tezos_protocol_environment_008_PtEdoTez.Lwt.tval add_fees : 
  context ->
  Tez_repr.t ->
  context Tezos_protocol_environment_008_PtEdoTez.Error_monad.tzresultIncrement the current block fee stash that will be credited to baker's frozen_fees account at finalize_application
val add_rewards : 
  context ->
  Tez_repr.t ->
  context Tezos_protocol_environment_008_PtEdoTez.Error_monad.tzresultIncrement the current block reward stash that will be credited to baker's frozen_fees account at finalize_application
val add_deposit : 
  context ->
  Tezos_protocol_environment_008_PtEdoTez.Signature.Public_key_hash.t ->
  Tez_repr.t ->
  context Tezos_protocol_environment_008_PtEdoTez.Error_monad.tzresultIncrement the current block deposit stash for a specific delegate. All the delegates' frozen_deposit accounts are credited at finalize_application
val get_deposits : 
  context ->
  Tez_repr.t
    Tezos_protocol_environment_008_PtEdoTez.Signature.Public_key_hash.Map.tval check_gas_limit : 
  t ->
  'a Gas_limit_repr.Arith.t ->
  unit Tezos_protocol_environment_008_PtEdoTez.Error_monad.tzresultval init_origination_nonce : 
  t ->
  Tezos_protocol_environment_008_PtEdoTez.Operation_hash.t ->
  tval origination_nonce : 
  t ->
  Contract_repr.origination_nonce
    Tezos_protocol_environment_008_PtEdoTez.Error_monad.tzresultval increment_origination_nonce : 
  t ->
  (t * Contract_repr.origination_nonce)
    Tezos_protocol_environment_008_PtEdoTez.Error_monad.tzresultGeneric accessors
All context manipulation functions. This signature is included as-is for direct context accesses, and used in Storage_functors to provide restricted views to the context.
include T with type t := t and type context := context
Tells if the key is already defined as a value.
Tells if the key is already defined as a directory.
val get : 
  context ->
  key ->
  value Tezos_protocol_environment_008_PtEdoTez.Error_monad.tzresult
    Tezos_protocol_environment_008_PtEdoTez.Lwt.tRetrieve the value from the storage bucket ; returns a Storage_errorMissing_key if the key is not set.
Retrieves the value from the storage bucket ; returns None if the data is not initialized.
val init : 
  context ->
  key ->
  value ->
  context Tezos_protocol_environment_008_PtEdoTez.Error_monad.tzresult
    Tezos_protocol_environment_008_PtEdoTez.Lwt.tAllocates the storage bucket and initializes it ; returns a Storage_errorExisting_key if the bucket exists.
val set : 
  context ->
  key ->
  value ->
  context Tezos_protocol_environment_008_PtEdoTez.Error_monad.tzresult
    Tezos_protocol_environment_008_PtEdoTez.Lwt.tUpdates the content of the bucket ; returns a Storage_error
Missing_key if the value does not exists.
val init_set : 
  context ->
  key ->
  value ->
  context Tezos_protocol_environment_008_PtEdoTez.Lwt.tAllocates the data and initializes it with a value ; just updates it if the bucket exists.
val set_option : 
  context ->
  key ->
  value option ->
  context Tezos_protocol_environment_008_PtEdoTez.Lwt.tWhen the value is Some v, allocates the data and initializes it with v ; just updates it if the bucket exists. When the value is None, delete the storage bucket when the value ; does nothing if the bucket does not exists.
val delete : 
  context ->
  key ->
  context Tezos_protocol_environment_008_PtEdoTez.Error_monad.tzresult
    Tezos_protocol_environment_008_PtEdoTez.Lwt.tDelete the storage bucket ; returns a Storage_error
Missing_key if the bucket does not exists.
Removes the storage bucket and its contents ; does nothing if the bucket does not exists.
Recursively removes all the storage buckets and contents ; does nothing if no bucket exists.
val copy : 
  context ->
  from:key ->
  to_:key ->
  context Tezos_protocol_environment_008_PtEdoTez.Error_monad.tzresult
    Tezos_protocol_environment_008_PtEdoTez.Lwt.tval fold : 
  context ->
  key ->
  init:'a ->
  f:
    (Tezos_protocol_environment_008_PtEdoTez.Context.key_or_dir ->
      'a ->
      'a Tezos_protocol_environment_008_PtEdoTez.Lwt.t) ->
  'a Tezos_protocol_environment_008_PtEdoTez.Lwt.tIterator on all the items of a given directory.
Recursively list all subkeys of a given key.
val fold_keys : 
  context ->
  key ->
  init:'a ->
  f:(key -> 'a -> 'a Tezos_protocol_environment_008_PtEdoTez.Lwt.t) ->
  'a Tezos_protocol_environment_008_PtEdoTez.Lwt.tRecursive iterator on all the subkeys of a given key.
Internally used in Storage_functors to escape from a view.
Internally used in Storage_functors to retrieve a full key from partial key relative a view.
val consume_gas : 
  context ->
  Gas_limit_repr.cost ->
  context Tezos_protocol_environment_008_PtEdoTez.Error_monad.tzresultInternally used in Storage_functors to consume gas from within a view.
val check_enough_gas : 
  context ->
  Gas_limit_repr.cost ->
  unit Tezos_protocol_environment_008_PtEdoTez.Error_monad.tzresultCheck if consume_gas will fail
Initialize the local nonce used for preventing a script to duplicate an internal operation to replay it.
val fresh_internal_nonce : 
  context ->
  (context * int) Tezos_protocol_environment_008_PtEdoTez.Error_monad.tzresultIncrements the internal operation nonce.
Mark an internal operation nonce as taken.
Check is the internal operation nonce has been taken.
val allowed_endorsements : 
  context ->
  (Tezos_protocol_environment_008_PtEdoTez.Signature.Public_key.t
   * int list
   * bool)
    Tezos_protocol_environment_008_PtEdoTez.Signature.Public_key_hash.Map.tReturns a map where to each endorser's pkh is associated the list of its endorsing slots (in decreasing order) for a given level.
Keep track of the number of endorsements that are included in a block
val init_endorsements : 
  context ->
  (Tezos_protocol_environment_008_PtEdoTez.Signature.Public_key.t
   * int list
   * bool)
    Tezos_protocol_environment_008_PtEdoTez.Signature.Public_key_hash.Map.t ->
  contextInitializes the map of allowed endorsements, this function must only be called once.
val record_endorsement : 
  context ->
  Tezos_protocol_environment_008_PtEdoTez.Signature.Public_key_hash.t ->
  contextMarks an endorsement in the map as used.
val fold_map_temporary_lazy_storage_ids : 
  context ->
  (Lazy_storage_kind.Temp_ids.t -> Lazy_storage_kind.Temp_ids.t * 'res) ->
  context * 'resval map_temporary_lazy_storage_ids_s : 
  context ->
  (Lazy_storage_kind.Temp_ids.t ->
    (context * Lazy_storage_kind.Temp_ids.t)
      Tezos_protocol_environment_008_PtEdoTez.Lwt.t) ->
  context Tezos_protocol_environment_008_PtEdoTez.Lwt.t