package tezos-protocol-alpha

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val name : string
include module type of struct include Tezos_raw_protocol_alpha end
module Blinded_public_key_hash = Tezos_raw_protocol_alpha.Blinded_public_key_hash
module Cache_memory_helpers = Tezos_raw_protocol_alpha.Cache_memory_helpers
module Carbonated_map_costs = Tezos_raw_protocol_alpha.Carbonated_map_costs
module Contract_delegate_storage = Tezos_raw_protocol_alpha.Contract_delegate_storage
module Contract_manager_storage = Tezos_raw_protocol_alpha.Contract_manager_storage
module Delegate_activation_storage = Tezos_raw_protocol_alpha.Delegate_activation_storage
module Frozen_deposits_storage = Tezos_raw_protocol_alpha.Frozen_deposits_storage
module Global_constants_costs = Tezos_raw_protocol_alpha.Global_constants_costs
module Global_constants_storage = Tezos_raw_protocol_alpha.Global_constants_storage
module Liquidity_baking_cpmm = Tezos_raw_protocol_alpha.Liquidity_baking_cpmm
module Liquidity_baking_lqt = Tezos_raw_protocol_alpha.Liquidity_baking_lqt
module Liquidity_baking_migration = Tezos_raw_protocol_alpha.Liquidity_baking_migration
module Liquidity_baking_repr = Tezos_raw_protocol_alpha.Liquidity_baking_repr
module Michelson_v1_primitives = Tezos_raw_protocol_alpha.Michelson_v1_primitives
module Script_interpreter_defs = Tezos_raw_protocol_alpha.Script_interpreter_defs
module Script_ir_translator = Tezos_raw_protocol_alpha.Script_ir_translator
module Script_tc_errors_registration = Tezos_raw_protocol_alpha.Script_tc_errors_registration
module Script_timestamp_repr = Tezos_raw_protocol_alpha.Script_timestamp_repr
module Script_typed_ir_size = Tezos_raw_protocol_alpha.Script_typed_ir_size
module Script_typed_ir_size_costs = Tezos_raw_protocol_alpha.Script_typed_ir_size_costs
module Services_registration = Tezos_raw_protocol_alpha.Services_registration
module Voting_period_storage = Tezos_raw_protocol_alpha.Voting_period_storage
include module type of struct include Tezos_raw_protocol_alpha.Main end
type validation_mode = Tezos_raw_protocol_alpha.Main.validation_mode =
  1. | Application of {
    1. block_header : Tezos_raw_protocol_alpha.Alpha_context.Block_header.t;
    2. fitness : Tezos_raw_protocol_alpha.Alpha_context.Fitness.t;
    3. payload_producer : Tezos_raw_protocol_alpha.Alpha_context.public_key_hash;
    4. block_producer : Tezos_raw_protocol_alpha.Alpha_context.public_key_hash;
    5. predecessor_round : Tezos_raw_protocol_alpha.Alpha_context.Round.t;
    6. predecessor_level : Tezos_raw_protocol_alpha.Alpha_context.Level.t;
    }
  2. | Partial_application of {
    1. block_header : Tezos_raw_protocol_alpha.Alpha_context.Block_header.t;
    2. fitness : Tezos_raw_protocol_alpha.Alpha_context.Fitness.t;
    3. payload_producer : Tezos_raw_protocol_alpha.Alpha_context.public_key_hash;
    4. block_producer : Tezos_raw_protocol_alpha.Alpha_context.public_key_hash;
    5. predecessor_level : Tezos_raw_protocol_alpha.Alpha_context.Level.t;
    6. predecessor_round : Tezos_raw_protocol_alpha.Alpha_context.Round.t;
    }
  3. | Partial_construction of {
    1. predecessor : Tezos_crypto.Block_hash.t;
    2. predecessor_fitness : bytes list;
    3. predecessor_level : Tezos_raw_protocol_alpha.Alpha_context.Level.t;
    4. predecessor_round : Tezos_raw_protocol_alpha.Alpha_context.Round.t;
    }
  4. | Full_construction of {
    1. predecessor : Tezos_crypto.Block_hash.t;
    2. payload_producer : Tezos_raw_protocol_alpha.Alpha_context.public_key_hash;
    3. block_producer : Tezos_raw_protocol_alpha.Alpha_context.public_key_hash;
    4. protocol_data_contents : Tezos_raw_protocol_alpha.Alpha_context.Block_header.contents;
    5. level : int32;
    6. round : Tezos_raw_protocol_alpha.Alpha_context.Round.t;
    7. predecessor_level : Tezos_raw_protocol_alpha.Alpha_context.Level.t;
    8. predecessor_round : Tezos_raw_protocol_alpha.Alpha_context.Round.t;
    }
val check_manager_signature : validation_state -> 'b Tezos_raw_protocol_alpha.Alpha_context.Kind.manager Tezos_raw_protocol_alpha.Alpha_context.contents_list -> 'a Tezos_raw_protocol_alpha.Alpha_context.operation -> (unit, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) result Lwt.t

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 Failure "get_manager_key" 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

val precheck_manager : validation_state -> 'a Tezos_raw_protocol_alpha.Alpha_context.Kind.manager Tezos_raw_protocol_alpha.Alpha_context.contents_list -> (unit, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) result Lwt.t

precheck_manager validation_state op returns () if the manager operation op is solveable, returns an error otherwise. An operation is solveable if it is well-formed and can pay the fees to be included in a block with either a success or a failure status. This function uses Apply.precheck_manager_contents_list but discard the context and balance update

val max_block_length : int
val max_operation_data_length : int
val validation_passes : Environment_context.quota list
val block_header_data_encoding : block_header_data Data_encoding.t
val block_header_metadata_encoding : block_header_metadata Data_encoding.t
val operation_data_encoding : operation_data Data_encoding.t
val operation_receipt_encoding : operation_receipt Data_encoding.t
val operation_data_and_receipt_encoding : (operation_data * operation_receipt) Data_encoding.t
val acceptable_passes : operation -> int list
val relative_position_within_block : operation -> operation -> int
val begin_partial_application : chain_id:Tezos_crypto.Chain_id.t -> ancestor_context:Environment_context.Context.t -> predecessor_timestamp:Tezos_base.Time.Protocol.t -> predecessor_fitness:bytes list -> block_header -> (validation_state, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) result Lwt.t
val begin_application : chain_id:Tezos_crypto.Chain_id.t -> predecessor_context:Environment_context.Context.t -> predecessor_timestamp:Tezos_base.Time.Protocol.t -> predecessor_fitness:bytes list -> block_header -> (validation_state, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) result Lwt.t
val begin_construction : chain_id:Tezos_crypto.Chain_id.t -> predecessor_context:Environment_context.Context.t -> predecessor_timestamp:Tezos_base.Time.Protocol.t -> predecessor_level:int32 -> predecessor_fitness:bytes list -> predecessor:Tezos_crypto.Block_hash.t -> timestamp:Tezos_base.Time.Protocol.t -> ?protocol_data:block_header_data -> unit -> (validation_state, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) result Lwt.t
val apply_operation : validation_state -> operation -> (validation_state * operation_receipt, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) result Lwt.t
val finalize_block : validation_state -> Tezos_base.Block_header.shell_header option -> (Environment_context.validation_result * block_header_metadata, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) result Lwt.t
val init : Environment_context.Context.t -> Tezos_base.Block_header.shell_header -> (Environment_context.validation_result, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) result Lwt.t
val value_of_key : chain_id:Tezos_crypto.Chain_id.t -> predecessor_context:Environment_context.Context.t -> predecessor_timestamp:Tezos_base.Time.Protocol.t -> predecessor_level:int32 -> predecessor_fitness:bytes list -> predecessor:Tezos_crypto.Block_hash.t -> timestamp:Tezos_base.Time.Protocol.t -> (Environment_context.Context.cache_key -> (Environment_context.Context.cache_value, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) result Lwt.t, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) result Lwt.t
OCaml

Innovation. Community. Security.