package tezos-protocol-013-PtJakart
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f
doc/tezos-protocol-013-PtJakart.raw/Tezos_raw_protocol_013_PtJakart/Main/index.html
Module Tezos_raw_protocol_013_PtJakart.MainSource
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_applicationis use in chain bootstrapping - not all checks are done. Special case ofApplicationto allow quick rejection of bad blocks. SeeTezos_protocol_environment_sigs.V5.T.Updater.PROTOCOL.begin_partial_application| Partial_construction of {predecessor : Tezos_protocol_environment_013_PtJakart.Block_hash.t;predecessor_fitness : Tezos_protocol_environment_013_PtJakart.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_013_PtJakart.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_013_PtJakart.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.
TODO: #2536 Add some documentation for the different modes.
type validation_state = {mode : validation_mode;chain_id : Tezos_protocol_environment_013_PtJakart.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;
}type operation = Alpha_context.packed_operation = {shell : Tezos_protocol_environment_013_PtJakart.Operation.shell_header;protocol_data : operation_data;
}val check_manager_signature :
validation_state ->
'b Alpha_context.Kind.manager Alpha_context.contents_list ->
'a Alpha_context.operation ->
unit Tezos_protocol_environment_013_PtJakart.Error_monad.tzresult
Tezos_protocol_environment_013_PtJakart.Lwt.tcheck_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.
val precheck_manager :
validation_state ->
'a Alpha_context.Kind.manager Alpha_context.contents_list ->
unit Tezos_protocol_environment_013_PtJakart.Error_monad.tzresult
Tezos_protocol_environment_013_PtJakart.Lwt.tprecheck_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
include Tezos_protocol_environment_013_PtJakart.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 block_header_data_encoding :
block_header_data Tezos_protocol_environment_013_PtJakart.Data_encoding.ttype block_header = Alpha_context.Block_header.t = {shell : Tezos_protocol_environment_013_PtJakart.Block_header.shell_header;protocol_data : block_header_data;
}val block_header_metadata_encoding :
block_header_metadata Tezos_protocol_environment_013_PtJakart.Data_encoding.tval operation_data_encoding :
operation_data Tezos_protocol_environment_013_PtJakart.Data_encoding.tval operation_receipt_encoding :
operation_receipt Tezos_protocol_environment_013_PtJakart.Data_encoding.tval operation_data_and_receipt_encoding :
(operation_data * operation_receipt)
Tezos_protocol_environment_013_PtJakart.Data_encoding.tval begin_partial_application :
chain_id:Tezos_protocol_environment_013_PtJakart.Chain_id.t ->
ancestor_context:Tezos_protocol_environment_013_PtJakart.Context.t ->
predecessor_timestamp:Tezos_protocol_environment_013_PtJakart.Time.t ->
predecessor_fitness:Tezos_protocol_environment_013_PtJakart.Fitness.t ->
block_header ->
validation_state Tezos_protocol_environment_013_PtJakart.Error_monad.tzresult
Tezos_protocol_environment_013_PtJakart.Lwt.tval begin_application :
chain_id:Tezos_protocol_environment_013_PtJakart.Chain_id.t ->
predecessor_context:Tezos_protocol_environment_013_PtJakart.Context.t ->
predecessor_timestamp:Tezos_protocol_environment_013_PtJakart.Time.t ->
predecessor_fitness:Tezos_protocol_environment_013_PtJakart.Fitness.t ->
block_header ->
validation_state Tezos_protocol_environment_013_PtJakart.Error_monad.tzresult
Tezos_protocol_environment_013_PtJakart.Lwt.tval begin_construction :
chain_id:Tezos_protocol_environment_013_PtJakart.Chain_id.t ->
predecessor_context:Tezos_protocol_environment_013_PtJakart.Context.t ->
predecessor_timestamp:Tezos_protocol_environment_013_PtJakart.Time.t ->
predecessor_level:Tezos_protocol_environment_013_PtJakart.Int32.t ->
predecessor_fitness:Tezos_protocol_environment_013_PtJakart.Fitness.t ->
predecessor:Tezos_protocol_environment_013_PtJakart.Block_hash.t ->
timestamp:Tezos_protocol_environment_013_PtJakart.Time.t ->
?protocol_data:block_header_data ->
unit ->
validation_state Tezos_protocol_environment_013_PtJakart.Error_monad.tzresult
Tezos_protocol_environment_013_PtJakart.Lwt.tval finalize_block :
validation_state ->
Tezos_protocol_environment_013_PtJakart.Block_header.shell_header option ->
(Tezos_protocol_environment_013_PtJakart.Updater.validation_result
* block_header_metadata)
Tezos_protocol_environment_013_PtJakart.Error_monad.tzresult
Tezos_protocol_environment_013_PtJakart.Lwt.tval init :
Tezos_protocol_environment_013_PtJakart.Context.t ->
Tezos_protocol_environment_013_PtJakart.Block_header.shell_header ->
Tezos_protocol_environment_013_PtJakart.Updater.validation_result
Tezos_protocol_environment_013_PtJakart.Error_monad.tzresult
Tezos_protocol_environment_013_PtJakart.Lwt.tval value_of_key :
chain_id:Tezos_protocol_environment_013_PtJakart.Chain_id.t ->
predecessor_context:Tezos_protocol_environment_013_PtJakart.Context.t ->
predecessor_timestamp:Tezos_protocol_environment_013_PtJakart.Time.t ->
predecessor_level:Tezos_protocol_environment_013_PtJakart.Int32.t ->
predecessor_fitness:Tezos_protocol_environment_013_PtJakart.Fitness.t ->
predecessor:Tezos_protocol_environment_013_PtJakart.Block_hash.t ->
timestamp:Tezos_protocol_environment_013_PtJakart.Time.t ->
(Tezos_protocol_environment_013_PtJakart.Context.Cache.key ->
Tezos_protocol_environment_013_PtJakart.Context.Cache.value
Tezos_protocol_environment_013_PtJakart.Error_monad.tzresult
Tezos_protocol_environment_013_PtJakart.Lwt.t)
Tezos_protocol_environment_013_PtJakart.Error_monad.tzresult
Tezos_protocol_environment_013_PtJakart.Lwt.t