package tezos-protocol-alpha

  1. Overview
  2. Docs
Tezos protocol alpha package

Install

Dune Dependency

Authors

Maintainers

Sources

octez-19.1.tar.gz
sha256=55ea1fb8bb3273a7fc270ca8f650d45c56449665619482aad9bc12f3ea736b7e
sha512=fec850fc2d17d7490bbabd5147d62aad13b3aaed8774270f8a38ab419670ed03e0fd30cf8642a97984eca5c2446726fe590ad99c015f7ec50919dc7652f25053

doc/tezos_raw_protocol_alpha/Tezos_raw_protocol_alpha/Services_registration/index.html

Module Tezos_raw_protocol_alpha.Services_registrationSource

Functions for RPC service registration, using Updater.rpc_context and RPC_service.t from the Protocol Environment.

This module is a frontend to a mutable service directory. The various register functions update the directory as a side-effect.

The get_rpc_services function returns the resulting RPC_context. It is parameterized by Updater.rpc_context which acts as the service prefix (in practice meaning this type will be passed to each handler). Hence, Protocol RPC services provide a read-only view of the Ledger state.

rpc_init rpc_context mode allows to instantiate an rpc_context using the Alpha_context representation from a raw context representation (the one the shell knows).

If mode = `Head_level, the Alpha_context uses the same level as the head of the chain (given by rpc_context.block_header).

If mode= `Successor_level, the Alpha_context uses the successor level of the head.

This function aims to be used by RPCs, in particular by RPCs which simulate an operation to determine the fees/gas of an operation. Using the `Head_level can be dangerous if some storage paths depend on the level. Using the successor level allows to ensure that the simulation is done on a fresh level.

OCaml

Innovation. Community. Security.