package tezos-protocol-014-PtKathma
Tezos Protocol Implementation - Protocol Signature Instance
This module is the entrypoint to the protocol for shells and other embedders. This signature is an instance of the Updater.PROTOCOL
signature from the Protocol Environment.
Each Protocol depends on a version of the Protocol Environment. For the currently developed protocol, this is normally the latest version. You can see the full list of versions here.
For details on how Protocol and Environment interact, see this overview.
type validation_mode =
| Application of {
block_header : Alpha_context.Block_header.t;
fitness : Alpha_context.Fitness.t;
payload_producer : Alpha_context.public_key_hash;
block_producer : Alpha_context.public_key_hash;
predecessor_round : Alpha_context.Round.t;
predecessor_level : Alpha_context.Level.t;
}
(*Full Validation of a block. See
*)Tezos_protocol_environment_sigs.V5.T.Updater.PROTOCOL.begin_application
*| Partial_application of {
block_header : Alpha_context.Block_header.t;
fitness : Alpha_context.Fitness.t;
payload_producer : Alpha_context.public_key_hash;
block_producer : Alpha_context.public_key_hash;
predecessor_level : Alpha_context.Level.t;
predecessor_round : Alpha_context.Round.t;
}
(*
*)Partial_application
is used in pre-checking of blocks - not all checks are done. Special case ofApplication
to allow quick rejection of bad blocks. SeeTezos_protocol_environment_sigs.V5.T.Updater.PROTOCOL.begin_partial_application
| Partial_construction of {
predecessor : Tezos_protocol_environment_014_PtKathma.Block_hash.t;
predecessor_fitness : Tezos_protocol_environment_014_PtKathma.Fitness.t;
predecessor_level : Alpha_context.Level.t;
predecessor_round : Alpha_context.Round.t;
}
(*Shell/mempool-only construction of a virtual block. See
*)Tezos_protocol_environment_sigs.V5.T.Updater.PROTOCOL.begin_construction
| Full_construction of {
predecessor : Tezos_protocol_environment_014_PtKathma.Block_hash.t;
payload_producer : Alpha_context.public_key_hash;
block_producer : Alpha_context.public_key_hash;
protocol_data_contents : Alpha_context.Block_header.contents;
level : Tezos_protocol_environment_014_PtKathma.Int32.t;
round : Alpha_context.Round.t;
predecessor_level : Alpha_context.Level.t;
predecessor_round : Alpha_context.Round.t;
}
(*Baker-only block construction for baking in. See
*)Tezos_protocol_environment_sigs.V5.T.Updater.PROTOCOL.begin_construction
validation_mode
permits to differenciate !type:validation_state
values.
There are four validation modes:
Application
Partial_application
Partial_construction
Full_construction
For the meaning and typical uses of each mode, refer to the comments attached to the corresponding type constructors below.
type validation_state = {
mode : validation_mode;
chain_id : Tezos_protocol_environment_014_PtKathma.Chain_id.t;
ctxt : Alpha_context.t;
op_count : int;
migration_balance_updates : Alpha_context.Receipt.balance_updates;
liquidity_baking_toggle_ema : Alpha_context.Liquidity_baking.Toggle_EMA.t;
implicit_operations_results : Apply_results.packed_successful_manager_operation_result list;
validate_operation_info : Validate_operation.validate_operation_info;
validate_operation_state : Validate_operation.validate_operation_state;
}
type operation_data = Alpha_context.packed_protocol_data
type operation = Alpha_context.packed_operation = {
shell : Tezos_protocol_environment_014_PtKathma.Operation.shell_header;
protocol_data : operation_data;
}
val precheck_manager :
validation_state ->
'a Alpha_context.Kind.manager Alpha_context.contents_list ->
'a Alpha_context.Kind.manager
Validate_operation.TMP_for_plugin.should_check_signature ->
Validate_operation.stamp
Tezos_protocol_environment_014_PtKathma.Error_monad.tzresult
Tezos_protocol_environment_014_PtKathma.Lwt.t
See Validate_operation.precheck_manager
.
include Tezos_protocol_environment_014_PtKathma.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 validation_passes :
Tezos_protocol_environment_014_PtKathma.Updater.quota list
type block_header_data = Alpha_context.Block_header.protocol_data
val block_header_data_encoding :
block_header_data Tezos_protocol_environment_014_PtKathma.Data_encoding.t
type block_header = Alpha_context.Block_header.t = {
shell : Tezos_protocol_environment_014_PtKathma.Block_header.shell_header;
protocol_data : block_header_data;
}
type block_header_metadata = Apply_results.block_metadata
val block_header_metadata_encoding :
block_header_metadata Tezos_protocol_environment_014_PtKathma.Data_encoding.t
type operation_receipt = Apply_results.packed_operation_metadata
val operation_data_encoding :
operation_data Tezos_protocol_environment_014_PtKathma.Data_encoding.t
val operation_receipt_encoding :
operation_receipt Tezos_protocol_environment_014_PtKathma.Data_encoding.t
val operation_data_and_receipt_encoding :
(operation_data * operation_receipt)
Tezos_protocol_environment_014_PtKathma.Data_encoding.t
val acceptable_passes : operation -> int list
val begin_partial_application :
chain_id:Tezos_protocol_environment_014_PtKathma.Chain_id.t ->
ancestor_context:Tezos_protocol_environment_014_PtKathma.Context.t ->
predecessor_timestamp:Tezos_protocol_environment_014_PtKathma.Time.t ->
predecessor_fitness:Tezos_protocol_environment_014_PtKathma.Fitness.t ->
block_header ->
validation_state Tezos_protocol_environment_014_PtKathma.Error_monad.tzresult
Tezos_protocol_environment_014_PtKathma.Lwt.t
val begin_application :
chain_id:Tezos_protocol_environment_014_PtKathma.Chain_id.t ->
predecessor_context:Tezos_protocol_environment_014_PtKathma.Context.t ->
predecessor_timestamp:Tezos_protocol_environment_014_PtKathma.Time.t ->
predecessor_fitness:Tezos_protocol_environment_014_PtKathma.Fitness.t ->
block_header ->
validation_state Tezos_protocol_environment_014_PtKathma.Error_monad.tzresult
Tezos_protocol_environment_014_PtKathma.Lwt.t
val begin_construction :
chain_id:Tezos_protocol_environment_014_PtKathma.Chain_id.t ->
predecessor_context:Tezos_protocol_environment_014_PtKathma.Context.t ->
predecessor_timestamp:Tezos_protocol_environment_014_PtKathma.Time.t ->
predecessor_level:Tezos_protocol_environment_014_PtKathma.Int32.t ->
predecessor_fitness:Tezos_protocol_environment_014_PtKathma.Fitness.t ->
predecessor:Tezos_protocol_environment_014_PtKathma.Block_hash.t ->
timestamp:Tezos_protocol_environment_014_PtKathma.Time.t ->
?protocol_data:block_header_data ->
unit ->
validation_state Tezos_protocol_environment_014_PtKathma.Error_monad.tzresult
Tezos_protocol_environment_014_PtKathma.Lwt.t
val finalize_block :
validation_state ->
Tezos_protocol_environment_014_PtKathma.Block_header.shell_header option ->
(Tezos_protocol_environment_014_PtKathma.Updater.validation_result
* block_header_metadata)
Tezos_protocol_environment_014_PtKathma.Error_monad.tzresult
Tezos_protocol_environment_014_PtKathma.Lwt.t
val init :
Tezos_protocol_environment_014_PtKathma.Chain_id.t ->
Tezos_protocol_environment_014_PtKathma.Context.t ->
Tezos_protocol_environment_014_PtKathma.Block_header.shell_header ->
Tezos_protocol_environment_014_PtKathma.Updater.validation_result
Tezos_protocol_environment_014_PtKathma.Error_monad.tzresult
Tezos_protocol_environment_014_PtKathma.Lwt.t
val value_of_key :
chain_id:Tezos_protocol_environment_014_PtKathma.Chain_id.t ->
predecessor_context:Tezos_protocol_environment_014_PtKathma.Context.t ->
predecessor_timestamp:Tezos_protocol_environment_014_PtKathma.Time.t ->
predecessor_level:Tezos_protocol_environment_014_PtKathma.Int32.t ->
predecessor_fitness:Tezos_protocol_environment_014_PtKathma.Fitness.t ->
predecessor:Tezos_protocol_environment_014_PtKathma.Block_hash.t ->
timestamp:Tezos_protocol_environment_014_PtKathma.Time.t ->
(Tezos_protocol_environment_014_PtKathma.Context.Cache.key ->
Tezos_protocol_environment_014_PtKathma.Context.Cache.value
Tezos_protocol_environment_014_PtKathma.Error_monad.tzresult
Tezos_protocol_environment_014_PtKathma.Lwt.t)
Tezos_protocol_environment_014_PtKathma.Error_monad.tzresult
Tezos_protocol_environment_014_PtKathma.Lwt.t