package octez-protocol-019-PtParisB-libs

  1. Overview
  2. Docs
Octez protocol 019-PtParisB libraries

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-octez-v20.1.tag.bz2
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65

doc/octez-protocol-019-PtParisB-libs.baking/Tezos_baking_019_PtParisB/Baking_simulator/index.html

Module Tezos_baking_019_PtParisB.Baking_simulatorSource

Sourcetype incremental = {
  1. predecessor : Baking_state.block_info;
  2. context : Tezos_protocol_environment.Context.t;
  3. state : Tezos_protocol_019_PtParisB.Protocol.validation_state * Tezos_protocol_019_PtParisB.Protocol.application_state option;
  4. rev_operations : Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Operation.packed list;
  5. header : Tezos_base.Block_header.shell_header;
}
Sourceval load_context : context_path:string -> Abstract_context_index.t Tezos_base.TzPervasives.tzresult Lwt.t
Sourceval check_context_consistency : Abstract_context_index.t -> Tezos_base.TzPervasives.Context_hash.t -> unit Tezos_base.TzPervasives.tzresult Lwt.t

Make sure that the given context is consistent by trying to read in it

Sourceval begin_construction : timestamp:Tezos_base.TzPervasives.Time.Protocol.t -> protocol_data:Tezos_protocol_019_PtParisB.Protocol.block_header_data -> force_apply:bool -> pred_resulting_context_hash:Tezos_base.TzPervasives.Context_hash.t -> Abstract_context_index.t -> Baking_state.block_info -> Tezos_base.TzPervasives.Chain_id.t -> incremental Tezos_base.TzPervasives.tzresult Lwt.t

begin_construction ~timestamp ~protocol_data ~force_apply abstract_context predecessor chain_id creates a new incremental value with an empty operation list. A context is recovered from the abstract_index and the resulting_context_hash from predecessor. This context is used to create a validation_state and an application_state (if force_apply is set). A partial shell_header is created from predecessor information and timestamp.

Sourceval add_operation : incremental -> Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Operation.packed -> (incremental * Tezos_protocol_019_PtParisB.Protocol.operation_receipt option) Tezos_base.TzPervasives.tzresult Lwt.t

add_operation incremental op validates op in incremental.validation_state without checking its signature. Indeed, the operation has already been validated in the node so it has a correct signature. We still need to validate it again because the context may be different. op is also applied if incremental has been created with force_apply set. This function returns an incremental with updated operations list and validation_state (and application_state).

finalize_construction incremental calls the finalize_validation of the protocol on the validation_state from incremental. If incremental has been created with force_apply set, finalize_application is also called and its results returned.

OCaml

Innovation. Community. Security.