package octez-shell-libs

  1. Overview
  2. Docs
Octez shell libraries

Install

Dune Dependency

Authors

Maintainers

Sources

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

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

Module Tezos_shell.Bootstrap_pipelineSource

The bootstrap pipeline works as follows: 1. From a locator, it computes a list of subchains (identified by a Block_locator.step) to fetch. 2. A worker starts to fetch all the headers (top to bottom) from a subchain, starting with the top subchain. 3. A worker starts to download the list of operations by batch of blocks once a batch of headers is available. 4. A worker validates blocks one by one (bottom to top).

These three workers work concurrently.

Sourcetype t

create ?notify_new_block ~block_header_timeout ~block_operations_timeout validator peer ddb locator initializes a bootstrap_pipeline for a locator sent by peer. It uses the Distributed_db to fetch the data needed and validator to validate blocks one by one with the function Block_validator.validate.

Moreover:

  • notify_new_block is a called everytime a valid block is received.
  • block_header_timeout is the timeout to fetch a block_header.
  • block_operations_timeout is the timeout to fetch a block operation.

If a timeout is triggered, the whole bootstrap_pipeline is canceled.

Sourceval wait : t -> unit Tezos_base.TzPervasives.tzresult Lwt.t
Sourceval cancel : t -> unit Lwt.t

length pipeline returns the number of the headers and blocks fetched

OCaml

Innovation. Community. Security.