Skip to content

Commit

Permalink
Fix merkle multiproof documentation (#3928)
Browse files Browse the repository at this point in the history
  • Loading branch information
EchoAlice authored Sep 20, 2024
1 parent d14fb52 commit 0c5ad81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ssz/merkle-proofs.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ We define a Merkle multiproof as a minimal subset of nodes in a Merkle tree need
x x . . . . x *
```

. are unused nodes, * are used nodes, x are the values we are trying to prove. Notice how despite being a multiproof for 3 values, it requires only 3 auxiliary nodes, only one node more than would be required to prove a single value. Normally the efficiency gains are not quite that extreme, but the savings relative to individual Merkle proofs are still significant. As a rule of thumb, a multiproof for k nodes at the same level of an n-node tree has size `k * (n/k + log(n/k))`.
. are unused nodes, * are used nodes, x are the values we are trying to prove. Notice how despite being a multiproof for 3 values, it requires only 3 auxiliary nodes, the same amount required to prove a single value. Normally the efficiency gains are not quite that extreme, but the savings relative to individual Merkle proofs are still significant. As a rule of thumb, a multiproof for k nodes at the same level of an n-node tree has size `k * (n/k + log(n/k))`.

First, we provide a method for computing the generalized indices of the auxiliary tree nodes that a proof of a given set of generalized indices will require:

Expand Down

0 comments on commit 0c5ad81

Please sign in to comment.