package tezos-protocol-006-PsCARTHA

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

Tezos Protocol Implementation - Protocol Signature Instance

type validation_mode =
  1. | Application of {
    1. block_header : Alpha_context.Block_header.t;
    2. baker : Alpha_context.public_key_hash;
    3. block_delay : Alpha_context.Period.t;
    }
  2. | Partial_application of {
    1. block_header : Alpha_context.Block_header.t;
    2. baker : Alpha_context.public_key_hash;
    3. block_delay : Alpha_context.Period.t;
    }
  3. | Partial_construction of {
    1. predecessor : Tezos_protocol_environment.Block_hash.t;
    }
  4. | Full_construction of {
    1. predecessor : Tezos_protocol_environment.Block_hash.t;
    2. protocol_data : Alpha_context.Block_header.contents;
    3. baker : Alpha_context.public_key_hash;
    4. block_delay : Alpha_context.Period.t;
    }
type validation_state = {
  1. mode : validation_mode;
  2. chain_id : Tezos_protocol_environment.Chain_id.t;
  3. ctxt : Alpha_context.t;
  4. op_count : int;
}
include Tezos_protocol_environment.Updater.PROTOCOL with type block_header_data = Alpha_context.Block_header.protocol_data and type block_header_metadata = Apply_results.block_metadata and type block_header = Alpha_context.Block_header.t and type operation_data := operation_data and type operation_receipt = Apply_results.packed_operation_metadata and type operation := operation and type validation_state := validation_state
val max_block_length : int

The maximum size of a block header in bytes.

val max_operation_data_length : int

The maximum size of an operation in bytes.

val validation_passes : Tezos_protocol_environment.Updater.quota list

The number of validation passes (length of the list) and the operation's quota for each pass.

The version specific type of blocks.

Encoding for version specific part of block headers.

A fully parsed block header.

type block_header_metadata = Apply_results.block_metadata

Version-specific side information computed by the protocol during the validation of a block. Should not include information about the evaluation of operations which is handled separately by operation_metadata. To be used as an execution trace by tools (client, indexer). Not necessary for validation.

Encoding for version-specific block metadata.

Version-specific side information computed by the protocol during the validation of each operation, to be used conjointly with block_header_metadata.

Encoding for version-specific operation data.

Encoding for version-specific operation receipts.

Encoding that mixes an operation data and its receipt.

val acceptable_passes : operation -> int list

The Validation passes in which an operation can appear. For instance [0] if it only belongs to the first pass. An answer of [] means that the operation is ill-formed and cannot be included at all.

val compare_operations : operation -> operation -> int

Basic ordering of operations. compare_operations op1 op2 means that op1 should appear before op2 in a block.

Checks that a block is well formed in a given context. This function should run quickly, as its main use is to reject bad blocks from the chain as early as possible. The input context is the one resulting of an ancestor block of same protocol version. This ancestor of the current head is guaranteed to be more recent than `last_allowed_fork_level`.

The resulting `validation_state` will be used for multi-pass validation.

The first step in a block validation sequence. Initializes a validation context for validating a block. Takes as argument the Block_header.t to initialize the context for this block. The function precheck_block may not have been called before begin_application, so all the check performed by the former must be repeated in the latter.

Initializes a validation context for constructing a new block (as opposed to validating an existing block). When the protocol_data argument is specified, it should contains a 'prototype' of a the protocol specific part of a block header, and the function should produce the exact same effect on the context than would produce the validation of a block containing an "equivalent" (but complete) header. For instance, if the block header usually includes a signature, the header provided to begin_construction should includes a faked signature.

The last step in a block validation sequence. It produces the context that will be used as input for the validation of its successor block candidates.

The list of remote procedures exported by this implementation

Initialize the context (or upgrade the context after a protocol amendment). This function receives the context resulting of the application of a block that triggered the amendment. It also receives the header of the block that triggered the amendment.