package octez-shell-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/octez-shell-libs.shell/Tezos_shell/Shell_operation/index.html
Module Tezos_shell.Shell_operation
Source
This module provides the operation representation used by the prevalidator and its dependencies. It also contains tools for parsing an operation into this representation, and updating the latter.
type 'protocol_operation operation = private {
hash : Tezos_base.TzPervasives.Operation_hash.t;
(*Hash of an operation.
*)raw : Tezos_base.Operation.t;
(*Raw representation of an operation (from the point view of the shell).
*)protocol : 'protocol_operation;
(*Economic protocol specific data of an operation. It is the unserialized representation of
*)raw.protocol_data
. For convenience, the type associated to this type may beunit
if we do not have deserialized the operation yet.signature_checked : bool;
(*This field is initially
*)false
. It is set totrue
when the operation is successfully validated in any context. While this does not guarantee that the operation will still be valid in another validation context, it notably means that the signature is correct. Therefore, when this field istrue
, we can tell the protocol to skip signature checks.size : int;
(*Size of the operation in bytes.
*)
}
Representation of a parsed operation, used only in the shell.
val record_successful_signature_check :
'protocol_operation operation ->
'protocol_operation operation
Return the operation with the signature_checked
field set to true
.
The purpose of this module type is to provide the parse
function, whose return type depends on the protocol.
module MakeParser
(Proto : Tezos_protocol_environment.PROTOCOL) :
PARSER with type protocol_operation = Proto.operation
Create a PARSER
tailored to a given protocol.