package octez-shell-libs

  1. Overview
  2. Docs
Octez shell libraries

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-18.0.tar.gz
sha256=dbc3b675aee59c2c574e5d0a771193a2ecfca31e7a5bc5aed66598080596ce1c
sha512=b97ed762b9d24744305c358af0d20f394376b64bfdd758dd4a81775326caf445caa57c4f6445da3dd6468ff492de18e4c14af6f374dfcbb7e4d64b7b720e5e2a

doc/octez-shell-libs.proxy/Tezos_proxy/Proxy_getter/RequestsTree/index.html

Module Proxy_getter.RequestsTreeSource

The point of this data structure is as follows:

Suppose Make.cache is like this, because key A has been requested already and the tree at A has two nodes B and C:

A-B \ C

If proxy_getter receives a request for A-D, there's no point doing a request, even if it's not there; because as A has been requested already; if A-D was available, it would be there already.

This is a crucial optimisation that reduces the number of .../raw/bytes RPC requests by 90% when executing baking_rights&?all=true locally, after the chain starts having more than a few cycles. More specifically, in baking_rights, the client keeps looking for (missing) keys of the form rolls;owner;snapshot;10;1;74;5;1354 while the parent key rolls;owner;snapshot;10;1 has been obtained before.

This structure has the invariant that all leaves are All nodes. If requests A;B and A;C have been done, the tree is as follows:

APartial -> BAll \ \-------> CAll

If then request A is done, the tree becomes:

AAll

Sourcetype tree =
  1. | Partial of tree StringMap.t
  2. | All
Sourceval empty : tree
Sourceval add : tree -> string list -> tree
Sourceval find_opt : tree -> string list -> tree option
OCaml

Innovation. Community. Security.