package tezos-shell

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

This module provides the operation representation used by the prevalidator and its dependencies. It also contains tools for parsing an operation into this representation, and updating the latter.

type 'protocol_operation operation = private {
  1. hash : Tezos_base.TzPervasives.Operation_hash.t;
    (*

    Hash of an operation.

    *)
  2. raw : Tezos_base.Operation.t;
    (*

    Raw representation of an operation (from the point view of the shell).

    *)
  3. protocol : 'protocol_operation;
    (*

    Economic protocol specific data of an operation. It is the unserialized representation of raw.protocol_data. For convenience, the type associated to this type may be unit if we do not have deserialized the operation yet.

    *)
  4. count_successful_prechecks : int;
    (*

    This field provides an under-approximation for the number of times the operation has been successfully prechecked. It is an under-approximation because if the operation is e.g., parsed more than once, or is prechecked in other modes, this flag is not globally updated.

    *)
}

Representation of a parsed operation, used only in the shell.

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.

module type PARSER = sig ... end

The purpose of this module type is to provide the parse function, whose return type depends on the protocol.

Create a PARSER tailored to a given protocol.

OCaml

Innovation. Community. Security.