Skip to main content

Proof

Generic Merkle proof structure for verifying inclusion in a Merkle tree.

Overview

Proof represents a Merkle proof consisting of a leaf value and an array of sibling hashes forming the path from leaf to root. This generic structure serves as the basis for more specific proof types like StateProof and StorageProof.

Type Definition

Usage

Create Proof

Compare Proofs

API Reference

Constructors

Methods

Merkle Proof Verification

A Merkle proof demonstrates that a leaf exists in a tree without revealing the entire tree:
To prove Leaf1 exists:
  1. Provide Leaf1 (the value)
  2. Provide proof: [Hash0, Hash23]
  3. Verifier computes: hash(Hash0 || hash(Leaf1)) = Hash01
  4. Verifier computes: hash(Hash01 || Hash23) = Root Hash
  5. Compare with known root

Verification Process

This generic Proof type is the foundation for Ethereum-specific proofs:

See Also