package tezos-protocol-015-PtLimaPt
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc
doc/tezos-protocol-015-PtLimaPt.raw/Tezos_raw_protocol_015_PtLimaPt/Raw_context/Proof/Stream/index.html
Module Proof.Stream
Stream proofs represent an explicit traversal of a Merle tree proof. Every element (a node, a value, or a shallow pointer) met is first "compressed" by shallowing its children and then recorded in the proof.
As stream proofs directly encode the recursive construction of the Merkle root hash is slightly simpler to implement: verifier simply need to hash the compressed elements lazily, without any memory or choice.
Moreover, the minimality of stream proofs is trivial to check. Once the computation has consumed the compressed elements required, it is sufficient to check that no more compressed elements remain in the proof.
However, as the compressed elements contain all the hashes of their shallow children, the size of stream proofs is larger (at least double in size in practice) than tree proofs, which only contains the hash for intermediate shallow pointers.
type elt =
| Value of value
| Node of (step * kinded_hash) list
| Inode of hash inode
| Inode_extender of hash inode_extender
The type for elements of stream proofs.
Value v
is a proof that the next element read in the store is the value v
.
Node n
is a proof that the next element read in the store is the node n
.
Inode i
is a proof that the next element read in the store is the inode i
.
Inode_extender e
is a proof that the next element read in the store is the node extender e
.
The type for stream proofs.
The sequence e_1 ... e_n
proves that the e_1
, ..., e_n
are read in the store in sequence.