package tezos-protocol-014-PtKathma

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

Functions for the plugin.

These functions are temporary.

TODO: https://gitlab.com/tezos/tezos/-/issues/3245 Update the plugin to call directly validate_operation then remove these functions.

type 'a should_check_signature =
  1. | Check_signature of 'a Alpha_context.operation
  2. | Skip_signature_check

Indicate whether the signature should be checked in precheck_manager; if so, provide the raw operation.

We could have used an option, but this makes calls to precheck_manager more readable.

Similar to validate_operation, but do not check the one-operation-per-manager-per-block restriction (1M).

Indeed, 1M is already handled by the plugin. This function is purposefully close to the former Apply.precheck_manager_contents_list, so that few changes are needed in the plugin.

The signature is only checked if the should_check_signature argument is Check_signature _.

The validate_operation_state does not need to be updated because:

  1. 1M is not handled here anyway.
  1. In mempool mode, the block gas limit is not tracked.

This function is called by Main.precheck_manager, which is called in lib_plugin/mempool.ml.

Same as precheck_manager, except that:

  • This function does not require validate_operation_info and validate_operation_state arguments. Instead, they are constructed internally from the given context and chain_id.
  • This function accepts any kind of operation as its contents_list argument rather than just manager operations. However, on non-manager operations, this function does not check anything.

This function is called in lib_plugin/RPC.ml, where we do not have access to a Main.validation_state containing validate_operation_info and _state, and where we need a stamp even for non-manager operations.

OCaml

Innovation. Community. Security.