Legend:
Library
Module
Module type
Parameter
Class
Class type
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.