package tezos-protocol-013-PtJakart

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

This module supports advancing the ledger state by applying operations.

Each operation application takes and returns an Alpha_context.t, representing the old and new state, respectively.

The Main module provides wrappers for the functionality in this module, satisfying the Protocol signature.

type Tezos_protocol_environment_013_PtJakart.Error_monad.error +=
  1. | Internal_operation_replay of Apply_results.packed_internal_contents
  2. | Gas_quota_exceeded_init_deserialize
  3. | Tx_rollup_feature_disabled
  4. | Tx_rollup_invalid_transaction_amount
  5. | Tx_rollup_non_internal_transaction
  6. | Sc_rollup_feature_disabled
  7. | Inconsistent_counters
  8. | Forbidden_zero_ticket_quantity
type apply_mode =
  1. | Application of {
    1. predecessor_block : Tezos_protocol_environment_013_PtJakart.Block_hash.t;
    2. payload_hash : Block_payload_hash.t;
    3. locked_round : Alpha_context.Round.t option;
    4. predecessor_level : Alpha_context.Level.t;
    5. predecessor_round : Alpha_context.Round.t;
    6. round : Alpha_context.Round.t;
    }
  2. | Full_construction of {
    1. predecessor_block : Tezos_protocol_environment_013_PtJakart.Block_hash.t;
    2. payload_hash : Block_payload_hash.t;
    3. predecessor_level : Alpha_context.Level.t;
    4. predecessor_round : Alpha_context.Round.t;
    5. round : Alpha_context.Round.t;
    }
  3. | Partial_construction of {
    1. predecessor_level : Alpha_context.Level.t;
    2. predecessor_round : Alpha_context.Round.t;
    3. grand_parent_round : Alpha_context.Round.t;
    }
type finalize_application_mode =
  1. | Finalize_full_construction of {
    1. level : Alpha_context.Raw_level.t;
    2. predecessor_round : Alpha_context.Round.t;
    }
  2. | Finalize_application of Alpha_context.Fitness.t

precheck_manager_contents_list validation_state contents_list Returns an updated context, and a list of prechecked contents containing balance updates for fees related to each manager operation in contents_list

If mempool_mode, the function checks whether the total gas limit of this batch of operation is below the gas_limit of a block and fails with a permanent error when above. Otherwise, the gas limit of the batch is removed from the one of the block (when possible) before moving on.

Check if endorsements are required for a given level.

val check_minimum_endorsements : endorsing_power:int -> minimum:int -> unit Tezos_protocol_environment_013_PtJakart.Error_monad.tzresult

Check if a block's endorsing power is at least the minim required.

check_manager_signature validation_state op raw_operation The function starts by retrieving the public key hash pkh of the manager operation. In case the operation is batched, the function also checks that the sources are all the same. Once the pkh is retrieved, the function looks for its associated public key. For that, the manager operation is inspected to check if it contains a public key revelation. If not, the public key is searched in the context.

  • returns

    Error Invalid_signature if the signature check fails

  • returns

    Error Unrevealed_manager_key if the manager has not yet been revealed

  • returns

    Error Missing_manager_contract if the key is not found in the context

  • returns

    Error Inconsistent_sources if the operations in a batch are not from the same manager

OCaml

Innovation. Community. Security.