diff --git a/doc/mmr.md b/doc/mmr.md index 62bd9b4ba..fcdcf3af9 100644 --- a/doc/mmr.md +++ b/doc/mmr.md @@ -94,6 +94,8 @@ total size). We process iteratively for a MMR of size 11: 2^4 - 1 = 15, and 15 is not < 11 ``` +(This can also be calculated non-iteratively as `2^(binary logarithm of size + 1) - 1` + Therefore the first peak is 7. To find the next peak, we then need to "jump" to its right sibling. If that node is not in the MMR (and it won't), take its left child. If that child is not in the MMR either, keep taking its left child