package tezos-protocol-012-Psithaca
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f
doc/tezos-protocol-012-Psithaca.raw/Tezos_raw_protocol_012_Psithaca/Main/index.html
Module Tezos_raw_protocol_012_Psithaca.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;
}| 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_construction of {predecessor : Tezos_protocol_environment_012_Psithaca.Block_hash.t;predecessor_fitness : Tezos_protocol_environment_012_Psithaca.Fitness.t;predecessor_level : Alpha_context.Level.t;predecessor_round : Alpha_context.Round.t;
}| Full_construction of {predecessor : Tezos_protocol_environment_012_Psithaca.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_012_Psithaca.Int32.t;round : Alpha_context.Round.t;predecessor_level : Alpha_context.Level.t;predecessor_round : Alpha_context.Round.t;
}
type validation_state = {mode : validation_mode;chain_id : Tezos_protocol_environment_012_Psithaca.Chain_id.t;ctxt : Alpha_context.t;op_count : int;migration_balance_updates : Alpha_context.Receipt.balance_updates;liquidity_baking_escape_ema : Tezos_protocol_environment_012_Psithaca.Int32.t;implicit_operations_results : Apply_results.packed_successful_manager_operation_result list;
}type operation = Alpha_context.packed_operation = {shell : Tezos_protocol_environment_012_Psithaca.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_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.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_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.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_012_Psithaca.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_012_Psithaca.Data_encoding.ttype block_header = Alpha_context.Block_header.t = {shell : Tezos_protocol_environment_012_Psithaca.Block_header.shell_header;protocol_data : block_header_data;
}val block_header_metadata_encoding :
block_header_metadata Tezos_protocol_environment_012_Psithaca.Data_encoding.tval operation_data_encoding :
operation_data Tezos_protocol_environment_012_Psithaca.Data_encoding.tval operation_receipt_encoding :
operation_receipt Tezos_protocol_environment_012_Psithaca.Data_encoding.tval operation_data_and_receipt_encoding :
(operation_data * operation_receipt)
Tezos_protocol_environment_012_Psithaca.Data_encoding.tval begin_partial_application :
chain_id:Tezos_protocol_environment_012_Psithaca.Chain_id.t ->
ancestor_context:Tezos_protocol_environment_012_Psithaca.Context.t ->
predecessor_timestamp:Tezos_protocol_environment_012_Psithaca.Time.t ->
predecessor_fitness:Tezos_protocol_environment_012_Psithaca.Fitness.t ->
block_header ->
validation_state Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tval begin_application :
chain_id:Tezos_protocol_environment_012_Psithaca.Chain_id.t ->
predecessor_context:Tezos_protocol_environment_012_Psithaca.Context.t ->
predecessor_timestamp:Tezos_protocol_environment_012_Psithaca.Time.t ->
predecessor_fitness:Tezos_protocol_environment_012_Psithaca.Fitness.t ->
block_header ->
validation_state Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tval begin_construction :
chain_id:Tezos_protocol_environment_012_Psithaca.Chain_id.t ->
predecessor_context:Tezos_protocol_environment_012_Psithaca.Context.t ->
predecessor_timestamp:Tezos_protocol_environment_012_Psithaca.Time.t ->
predecessor_level:Tezos_protocol_environment_012_Psithaca.Int32.t ->
predecessor_fitness:Tezos_protocol_environment_012_Psithaca.Fitness.t ->
predecessor:Tezos_protocol_environment_012_Psithaca.Block_hash.t ->
timestamp:Tezos_protocol_environment_012_Psithaca.Time.t ->
?protocol_data:block_header_data ->
unit ->
validation_state Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tval finalize_block :
validation_state ->
Tezos_protocol_environment_012_Psithaca.Block_header.shell_header option ->
(Tezos_protocol_environment_012_Psithaca.Updater.validation_result
* block_header_metadata)
Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tval init :
Tezos_protocol_environment_012_Psithaca.Context.t ->
Tezos_protocol_environment_012_Psithaca.Block_header.shell_header ->
Tezos_protocol_environment_012_Psithaca.Updater.validation_result
Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tval value_of_key :
chain_id:Tezos_protocol_environment_012_Psithaca.Chain_id.t ->
predecessor_context:Tezos_protocol_environment_012_Psithaca.Context.t ->
predecessor_timestamp:Tezos_protocol_environment_012_Psithaca.Time.t ->
predecessor_level:Tezos_protocol_environment_012_Psithaca.Int32.t ->
predecessor_fitness:Tezos_protocol_environment_012_Psithaca.Fitness.t ->
predecessor:Tezos_protocol_environment_012_Psithaca.Block_hash.t ->
timestamp:Tezos_protocol_environment_012_Psithaca.Time.t ->
(Tezos_protocol_environment_012_Psithaca.Context.Cache.key ->
Tezos_protocol_environment_012_Psithaca.Context.Cache.value
Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.t)
Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.t