package octez-shell-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=55ea1fb8bb3273a7fc270ca8f650d45c56449665619482aad9bc12f3ea736b7e
sha512=fec850fc2d17d7490bbabd5147d62aad13b3aaed8774270f8a38ab419670ed03e0fd30cf8642a97984eca5c2446726fe590ad99c015f7ec50919dc7652f25053
doc/octez-shell-libs.validation/Tezos_validation/Protocol_plugin/No_plugin/Plugin/index.html
Module No_plugin.Plugin
Source
Static internal information needed by pre_filter
.
It depends on the head
block upon which a mempool is built.
val init :
Tezos_protocol_environment.Context.t ->
head:Tezos_base.Block_header.shell_header ->
info Tezos_base.TzPervasives.tzresult Lwt.t
val flush :
info ->
head:Tezos_base.Block_header.shell_header ->
info Tezos_base.TzPervasives.tzresult Lwt.t
Perform some syntactic checks on the operation.
To be used mostly as an exceptional mechanism to prevent ill-formed operations to block block application.
Note that the functions exposed in the output of proto_with_validation_plugin
already call syntactic_check
when appropriate.
val pre_filter :
info ->
config ->
operation ->
[ `Passed_prefilter of [ `High | `Medium | `Low of Q.t list ]
| `Branch_delayed of Tezos_base.TzPervasives.tztrace
| `Branch_refused of Tezos_base.TzPervasives.tztrace
| `Refused of Tezos_base.TzPervasives.tztrace
| `Outdated of Tezos_base.TzPervasives.tztrace ]
Lwt.t
Perform some light preliminary checks on the operation.
If successful, return `Passed_prefilter
with the priority of the operation, based on the operation kind and potentially its fee, gas, and size. If not, return a classification containing the encountered error.
Should be called on arrival of an operation and after a flush of the prevalidator.
Return a conflict handler for Mempool.add_operation
.
See the documentation of type Mempool.conflict_handler
in e.g. lib_protocol_environment/sigs/v8/updater.mli
.
Precondition: both operations must be individually valid (required by the protocol's operation comparison on which the implementation of this function relies).
The purpose of this module is to provide the fee_needed_to_replace_by_fee
function. For this function to be correct, the caller must maintain the state of type t
by calling update
on each successfully validated operation and its induced replacements.
val fee_needed_to_overtake :
op_to_overtake:operation ->
candidate_op:operation ->
int64 option
Compute the minimal fee (expressed in mutez) that candidate_op
would need to have in order to be strictly greater than op_to_overtake
according to compare_operations
.
Return None
when at least one operation is not a manager operation.
Also return None
if both operations are manager operations but there was an error while computing the needed fee. However, note that this cannot happen when both manager operations have been successfully validated by the protocol.