package octez-proto-libs

  1. Overview
  2. Docs
Octez protocol libraries

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-octez-v20.1.tag.bz2
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65

doc/octez-proto-libs.protocol-environment/Tezos_protocol_environment/Proxy_context/index.html

Module Tezos_protocol_environment.Proxy_contextSource

This module is the location where the proxy tweaks the behavior of a vanilla client. A regular mockup client uses a Memory_context in place of this implementation. Compared to Memory_context, this instance features a Proxy_Delegate.T which under the hood relies on Proxy_getter.

Other *_context modules of Tezos_protocol_environment, i.e. siblings of this file, are backed by different type of values coming from Tezos_context. This file is backed by M.t below, which is a thin layer over Tezos_memory_context.Context. Because of that, this instance of Tezos_protocol_environment is close to the Memory_context one.

Whereas Memory_context is a regular recursive map, Proxy_context obtains values by delegating to endpoints when receiving requests. Hence, right after having created an empty value with an instance of Proxy_Delegate.T, this value behaves as the distant endpoint it delegates to.

Sourcemodule M : sig ... end

The module by which to parameterize Environment_context.Context.kind below.

Sourcetype Tezos_protocol_environment__.Environment_context.Context.kind +=
  1. | Context : M.t Tezos_protocol_environment__.Environment_context.Context.kind

The additional kind identifying Proxy_context values. Used to detect at runtime when a proxy context is expected, to disambiguate from other kinds.

Sourceval empty : Proxy_delegate.t option -> Tezos_protocol_environment__.Environment_context.Context.t

Constructs an empty context, possibly giving the delegate (the function querying the endpoint) right away. Otherwise set it later with set delegate

OCaml

Innovation. Community. Security.