package tezos-protocol-013-PtJakart
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b
doc/tezos-protocol-013-PtJakart.raw/Tezos_raw_protocol_013_PtJakart/Apply/index.html
Module Tezos_raw_protocol_013_PtJakart.ApplySource
This module supports advancing the ledger state by applying operations.
Each operation application takes and returns an Alpha_context.t, representing the old and new state, respectively.
The Main module provides wrappers for the functionality in this module, satisfying the Protocol signature.
type Tezos_protocol_environment_013_PtJakart.Error_monad.error += | Internal_operation_replay of Apply_results.packed_internal_contents| Gas_quota_exceeded_init_deserialize| Tx_rollup_feature_disabled| Tx_rollup_invalid_transaction_amount| Tx_rollup_non_internal_transaction| Sc_rollup_feature_disabled| Inconsistent_counters| Forbidden_zero_ticket_quantity
val begin_partial_construction :
Alpha_context.context ->
predecessor_level:Alpha_context.Level.t ->
toggle_vote:Liquidity_baking_repr.liquidity_baking_toggle_vote ->
(Alpha_context.t
* Apply_results.packed_successful_manager_operation_result list
* Alpha_context.Liquidity_baking.Toggle_EMA.t)
Tezos_protocol_environment_013_PtJakart.Error_monad.tzresult
Tezos_protocol_environment_013_PtJakart.Lwt.ttype 'a full_construction = {ctxt : Alpha_context.context;protocol_data : 'a;payload_producer : Tezos_protocol_environment_013_PtJakart.Signature.public_key_hash;block_producer : Tezos_protocol_environment_013_PtJakart.Signature.public_key_hash;round : Alpha_context.Round.t;implicit_operations_results : Apply_results.packed_successful_manager_operation_result list;liquidity_baking_toggle_ema : Alpha_context.Liquidity_baking.Toggle_EMA.t;
}val begin_full_construction :
Alpha_context.context ->
predecessor_timestamp:Tezos_protocol_environment_013_PtJakart.Time.t ->
predecessor_level:Alpha_context.Level.t ->
predecessor_round:Alpha_context.Round.t ->
round:Alpha_context.Round.t ->
Alpha_context.Block_header.contents ->
Alpha_context.Block_header.contents full_construction
Tezos_protocol_environment_013_PtJakart.Error_monad.tzresult
Tezos_protocol_environment_013_PtJakart.Lwt.tval begin_application :
Alpha_context.context ->
Tezos_protocol_environment_013_PtJakart.Chain_id.t ->
Alpha_context.Block_header.t ->
Alpha_context.Fitness.t ->
predecessor_timestamp:Tezos_protocol_environment_013_PtJakart.Time.t ->
predecessor_level:Alpha_context.Level.t ->
predecessor_round:Alpha_context.Round.t ->
(Alpha_context.t
* Tezos_protocol_environment_013_PtJakart.Signature.public_key
* Tezos_protocol_environment_013_PtJakart.Signature.public_key_hash
* Apply_results.packed_successful_manager_operation_result list
* Alpha_context.Liquidity_baking.Toggle_EMA.t)
Tezos_protocol_environment_013_PtJakart.Error_monad.tzresult
Tezos_protocol_environment_013_PtJakart.Lwt.ttype apply_mode = | Application of {predecessor_block : Tezos_protocol_environment_013_PtJakart.Block_hash.t;payload_hash : Block_payload_hash.t;locked_round : Alpha_context.Round.t option;predecessor_level : Alpha_context.Level.t;predecessor_round : Alpha_context.Round.t;round : Alpha_context.Round.t;
}| Full_construction of {predecessor_block : Tezos_protocol_environment_013_PtJakart.Block_hash.t;payload_hash : Block_payload_hash.t;predecessor_level : Alpha_context.Level.t;predecessor_round : Alpha_context.Round.t;round : Alpha_context.Round.t;
}| Partial_construction of {predecessor_level : Alpha_context.Level.t;predecessor_round : Alpha_context.Round.t;grand_parent_round : Alpha_context.Round.t;
}
val apply_operation :
Alpha_context.context ->
Tezos_protocol_environment_013_PtJakart.Chain_id.t ->
apply_mode ->
Script_ir_translator.unparsing_mode ->
payload_producer:Alpha_context.public_key_hash ->
Tezos_protocol_environment_013_PtJakart.Operation_list_hash.elt ->
'a Alpha_context.operation ->
(Alpha_context.context * 'a Apply_results.operation_metadata,
Tezos_protocol_environment_013_PtJakart.Error_monad.error
Tezos_protocol_environment_013_PtJakart.Error_monad.trace)
Tezos_protocol_environment_013_PtJakart.Pervasives.result
Tezos_protocol_environment_013_PtJakart.Lwt.ttype finalize_application_mode = | Finalize_full_construction of {level : Alpha_context.Raw_level.t;predecessor_round : Alpha_context.Round.t;
}| Finalize_application of Alpha_context.Fitness.t
val finalize_application :
Alpha_context.context ->
finalize_application_mode ->
Alpha_context.Block_header.contents ->
payload_producer:Alpha_context.public_key_hash ->
block_producer:Alpha_context.public_key_hash ->
Alpha_context.Liquidity_baking.Toggle_EMA.t ->
Apply_results.packed_successful_manager_operation_result list ->
round:Alpha_context.Round.t ->
predecessor:Tezos_protocol_environment_013_PtJakart.Block_hash.t ->
migration_balance_updates:Alpha_context.Receipt.balance_updates ->
(Alpha_context.context
* Alpha_context.Fitness.t
* Apply_results.block_metadata,
Tezos_protocol_environment_013_PtJakart.Error_monad.error
Tezos_protocol_environment_013_PtJakart.Error_monad.trace)
Tezos_protocol_environment_013_PtJakart.Pervasives.result
Tezos_protocol_environment_013_PtJakart.Lwt.tval apply_manager_contents_list :
Alpha_context.context ->
Script_ir_translator.unparsing_mode ->
payload_producer:Alpha_context.public_key_hash ->
Tezos_protocol_environment_013_PtJakart.Chain_id.t ->
'a Alpha_context.Kind.manager Apply_results.prechecked_contents_list ->
(Alpha_context.context
* 'a Alpha_context.Kind.manager Apply_results.contents_result_list)
Tezos_protocol_environment_013_PtJakart.Lwt.tval apply_contents_list :
Alpha_context.context ->
Tezos_protocol_environment_013_PtJakart.Chain_id.t ->
apply_mode ->
Script_ir_translator.unparsing_mode ->
payload_producer:Alpha_context.public_key_hash ->
'kind Alpha_context.operation ->
'kind Alpha_context.contents_list ->
(Alpha_context.context * 'kind Apply_results.contents_result_list)
Tezos_protocol_environment_013_PtJakart.Error_monad.tzresult
Tezos_protocol_environment_013_PtJakart.Lwt.tval precheck_manager_contents_list :
Alpha_context.context ->
'kind Alpha_context.Kind.manager Alpha_context.contents_list ->
mempool_mode:bool ->
(Alpha_context.context
* 'kind Alpha_context.Kind.manager Apply_results.prechecked_contents_list)
Tezos_protocol_environment_013_PtJakart.Error_monad.tzresult
Tezos_protocol_environment_013_PtJakart.Lwt.tprecheck_manager_contents_list validation_state contents_list Returns an updated context, and a list of prechecked contents containing balance updates for fees related to each manager operation in contents_list
If mempool_mode, the function checks whether the total gas limit of this batch of operation is below the gas_limit of a block and fails with a permanent error when above. Otherwise, the gas limit of the batch is removed from the one of the block (when possible) before moving on.
val value_of_key :
Alpha_context.context ->
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.tvalue_of_key ctxt k builds a value identified by key k so that it can be put into the cache.
val are_endorsements_required :
Alpha_context.context ->
level:Alpha_context.Raw_level.t ->
bool Tezos_protocol_environment_013_PtJakart.Error_monad.tzresult
Tezos_protocol_environment_013_PtJakart.Lwt.tCheck if endorsements are required for a given level.
val check_minimum_endorsements :
endorsing_power:int ->
minimum:int ->
unit Tezos_protocol_environment_013_PtJakart.Error_monad.tzresultCheck if a block's endorsing power is at least the minim required.
val check_manager_signature :
Alpha_context.context ->
Tezos_protocol_environment_013_PtJakart.Chain_id.t ->
'a Alpha_context.Kind.manager Alpha_context.contents_list ->
'b Alpha_context.operation ->
(unit,
Tezos_protocol_environment_013_PtJakart.Error_monad.error
Tezos_protocol_environment_013_PtJakart.Error_monad.trace)
Tezos_protocol_environment_013_PtJakart.Pervasives.result
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.