package octez-shell-libs

  1. Overview
  2. Docs
Octez shell libraries

Install

Dune Dependency

Authors

Maintainers

Sources

octez-19.1.tar.gz
sha256=55ea1fb8bb3273a7fc270ca8f650d45c56449665619482aad9bc12f3ea736b7e
sha512=fec850fc2d17d7490bbabd5147d62aad13b3aaed8774270f8a38ab419670ed03e0fd30cf8642a97984eca5c2446726fe590ad99c015f7ec50919dc7652f25053

doc/octez-shell-libs.shell/Tezos_shell/Prevalidator_bounding/index.html

Module Tezos_shell.Prevalidator_boundingSource

Bound the valid operations in the mempool by limiting both their cardinal and their total byte size.

Sourcetype config = {
  1. max_operations : int;
    (*

    Maximal allowed number of valid operations in the mempool.

    *)
  2. max_total_bytes : int;
    (*

    Maximal allowed sum of the byte sizes of all valid operations in the mempool.

    *)
}

Mempool bounds.

They can be retrieved/set using RPCs GET/POST /chains/<chain>/mempool/filter.

Sourceval default_max_total_bytes : int

Default max_total_bytes is 10_000_000.

A block can have at most around 700k bytes of operations (see validation_passes in proto_xxx/lib_protocol/main.ml). So with this bound, a mempool can have the content of more than 10 blocks, which is more than enough.

Sourceval default_max_operations : int

Default max_operations is 10_000.

The smallest operations are around 140 bytes (e.g. 139 bytes for a (pre)attestation, 146 bytes for a delegation) so a block can have at most around 5_000 operations. But many operations are much larger, so in practice a block contains much less operations, so keeping 10_000 of them in the mempool is enough.

Sourceval default_config : config

Default bounds.

Sourceval config_encoding : config Tezos_base.TzPervasives.Data_encoding.t

Encoding for config.

It is internally an object without any variable field, so it is possible to use it in a Data_encoding.merge_objs.

Sourcemodule type T = sig ... end

Interface of a mempool bounding module.

Build a mempool bounding module.

Sourcemodule Internal_for_tests : sig ... end
OCaml

Innovation. Community. Security.