package octez-protocol-018-Proxford-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val load_context : context_path:string -> Abstract_context_index.t Tezos_base.TzPervasives.tzresult Lwt.t

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

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.

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.