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
| Function | Description |
|---|---|
from(proof) | Create from ProofLike object |
Methods
| Function | Description |
|---|---|
equals(a, b) | Check if two proofs are equal |
Merkle Proof Verification
A Merkle proof demonstrates that a leaf exists in a tree without revealing the entire tree:- Provide Leaf1 (the value)
- Provide proof: [Hash0, Hash23]
- Verifier computes: hash(Hash0 || hash(Leaf1)) = Hash01
- Verifier computes: hash(Hash01 || Hash23) = Root Hash
- Compare with known root
Verification Process
Related Proof Types
This generic Proof type is the foundation for Ethereum-specific proofs:| Type | Description |
|---|---|
| StateProof | EIP-1186 account state proofs |
| StorageProof | EIP-1186 storage slot proofs |
See Also
- StateProof - Account state proofs
- StorageProof - Storage slot proofs
- StateRoot - State trie root hash
- Hash - Hash primitives

