<p>Unlike binary Merkle trees, ternary have 3 leaf nodes. I wanted to understand how do we eventually get to the Root Merkle node -- is it by concatenating in the pair of 3 (considering 3 leaves in every set) or do we still make pairs (of 2)?</p>
<p>I would appreciate if someone would explain this. Thanks!</p>

CC BY-SA 4.0
2021-11-16T21:33:41.287Z
Which ternary Merkle tree? What design are you talking about? Bitcoin only uses binary Merkle trees to the best of my knowledge.
Pieter Wuille
CC BY-SA 4.0
2021-11-16T22:15:15.820Z
That's right! Bitcoin only uses binary merkle trees, however, in general there is a concept of ternary merkle trees as well and I wanted to understand if it works similarly by hashing then grouping individual nodes. If so, does it group and hash the hashes of all three child nodes together?
user128829
<bitcoin-core><blockchain><merkle-tree>
Ternary Merkle Tree - concatenation and Merkle Proof?
user128829
# Ternary Merkle Tree - concatenation and Merkle Proof?

(Asked by: username_0 on 2021-11-16)

Unlike binary Merkle trees, ternary have 3 leaf nodes. I wanted to understand how do we eventually get to the Root Merkle node -- is it by concatenating in the pair of 3 (considering 3 leaves in every set) or do we still make pairs (of 2)?

I would appreciate if someone would explain this. Thanks!

**Tags:** bitcoin-core, blockchain, merkle-tree

> **Comments:**
> **username_1**: Which ternary Merkle tree? What design are you talking about? Bitcoin only uses binary Merkle trees to the best of my knowledge.  
> **username_0**: That's right! Bitcoin only uses binary merkle trees, however, in general there is a concept of ternary merkle trees as well and I wanted to understand if it works similarly by hashing then grouping individual nodes. If so, does it group and hash the hashes of all three child nodes together?  

---

## 0 answers

