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 = Filter.Proto.operation

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

type validation_state = Filter.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 state used internally by this module. Created by create and then passed back and possibly updated by add_operation and remove_operation.

This state notably contains a representation of the protocol mempool, as well as the filter state.

Create an empty state based on the head block.

Called only once when a prevalidator starts.

Create a new empty state based on the head block.

The previous state must be provided (even when it was based on a different block). Indeed, parts of it are recycled to make this function more efficient than create.

Light preliminary checks that should be performed on arrival of an operation and after a flush of the prevalidator.

See Shell_plugin.FILTER.Mempool.pre_filter.

If an old operation has been replaced by a newly added operation, then this type contains its hash and its new classification. If there is no replaced operation, this is None.

Result of add_operation.

Contain the updated (or unchanged) state t, the operation (in which count_successful_prechecks has been incremented if appropriate), its classification, and the potential replacement.

Invariant: replacement can only be Some _ when the classification is `Prechecked.

Call the protocol Mempool.add_operation function, providing it with the conflict_handler from the plugin.

Then if the protocol accepts the operation, call the plugin add_operation_and_enforce_mempool_bound, which is responsible for bounding the number of manager operations in the mempool.

See add_result for a description of the output.

val remove_operation : t -> Tezos_base.TzPervasives.Operation_hash.t -> t

Remove an operation from the state.

The state remains unchanged when the operation was not present.

module Internal_for_tests : sig ... end
OCaml

Innovation. Community. Security.