package tezos-shell

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

How-to obtain an instance of this module's main module type: T

Parameters

Signature

type protocol_operation = Proto.operation

Similar to the same type in the protocol, see Tezos_protocol_environment.PROTOCOL.operation

type operation_receipt = Proto.operation_receipt

Similar to the same type in the protocol, see Tezos_protocol_environment.PROTOCOL

type validation_state = Proto.validation_state

Similar to the same type in the protocol, see Tezos_protocol_environment.PROTOCOL

The type implemented by Tezos_store.Store.chain_store in production, and mocked in tests

type t

The type used internally by this module. Created by create and then passed back and possibly updated by apply_operation.

parse hash op reads a usual Operation.t and lifts it to the type protocol_operation used by this module. This function is in the tzresult monad, because it can return the following errors:

  • Validation_errors.Oversized_operation if the size of the operation data within op is too large (to protect against DoS attacks), and
  • Validation_errors.Parse_error if serialized data cannot be parsed.
val increment_successful_precheck : protocol_operation operation -> protocol_operation operation

increment_successful_precheck op increments the field count_successful_prechecks of the given operation op. It is supposed to be called after each successful precheck of a given operation op, and nowhere else. Overflow is unlikely to occur in practice, as the counter grows very slowly and the number of prechecks is bounded.

Creates a new prevalidation context w.r.t. the protocol associated with the predecessor block.

type result =
  1. | Applied of t * operation_receipt
  2. | Branch_delayed of Tezos_base.TzPervasives.tztrace
  3. | Branch_refused of Tezos_base.TzPervasives.tztrace
  4. | Refused of Tezos_base.TzPervasives.tztrace
  5. | Outdated of Tezos_base.TzPervasives.tztrace

Values returned by create. They are obtained from the result of the protocol apply_operation function and the classification of errors.

val apply_operation : t -> protocol_operation operation -> result Lwt.t

apply_operation t op calls the protocol apply_operation function and handles possible errors, hereby yielding a classification

val validation_state : t -> validation_state

validation_state t returns the subset of t corresponding to the type validation_state of the protocol.

val set_validation_state : t -> validation_state -> t

Updates the subset of t corresponding to the type validation_state of the protocol.

val pp_result : Format.formatter -> result -> unit
module Internal_for_tests : sig ... end
OCaml

Innovation. Community. Security.