<p>The edit is completely correct. However, there are two known quirks you might be interested:</p>

<ul>
<li><p>This quirk happens if the number of transaction is not <code>2^n</code>. You can read more about it <a href="https://github.com/bitcoin/bitcoin/blob/master/src/consensus/merkle.cpp#L9" rel="nofollow noreferrer">here</a>. This was known by the creator of Bitcoin.</p></li>
<li><p>This attack (may) happen in the case where a transaction with length 64 bytes is an element of a Merkle tree. Details can be found <a href="https://bitslog.wordpress.com/2018/06/09/leaf-node-weakness-in-bitcoin-merkle-tree-design/" rel="nofollow noreferrer">here</a>.</p></li>
</ul>

CC BY-SA 4.0
2018-09-01T16:58:49.297Z
2018-09-01T16:58:49.297Z
MCCCS
<p>When I get it right, each block in Bitcoins block chain contains a prev hash and a new block hash that includes this prev hash. So the genesis block only has itself and from there on each hash of the prev block is hashed again together with some transactions etc.
So the Merkle tree is in this case a List?</p>

<p>@Edit:
Found out that the Merkle Tree seems not to work globally, it seems to hash all transactions included in a block separately and use them as leaves and then build a binary tree upon them. Where each hash is created over the hash of their children.</p>

<p>So it seems it isn't a special kind of tree and instead a simple binary tree.</p>

<p>Is this all or did I miss something important?</p>

<blockchain><merkle-tree>
Bitcoin and Merkle Tree - is in Bitcoin the Merkle Tree actually a List (which of course is a special form of a tree)?
baxbear
# Bitcoin and Merkle Tree - is in Bitcoin the Merkle Tree actually a List (which of course is a special form of a tree)?

(Asked by: username_0 on 2018-09-01)

When I get it right, each block in Bitcoins block chain contains a prev hash and a new block hash that includes this prev hash. So the genesis block only has itself and from there on each hash of the prev block is hashed again together with some transactions etc.
So the Merkle tree is in this case a List?

@Edit:
Found out that the Merkle Tree seems not to work globally, it seems to hash all transactions included in a block separately and use them as leaves and then build a binary tree upon them. Where each hash is created over the hash of their children.

So it seems it isn't a special kind of tree and instead a simple binary tree.

Is this all or did I miss something important?

**Tags:** blockchain, merkle-tree


---

## 1 answers

### Answer by username_1 on 2018-09-01. Score: 2 | Accepted answer

The edit is completely correct. However, there are two known quirks you might be interested:

* This quirk happens if the number of transaction is not `2^n`. You can read more about it [here](https://github.com/bitcoin/bitcoin/blob/master/src/consensus/merkle.cpp#L9). This was known by the creator of Bitcoin.
* This attack (may) happen in the case where a transaction with length 64 bytes is an element of a Merkle tree. Details can be found [here](https://bitslog.wordpress.com/2018/06/09/leaf-node-weakness-in-bitcoin-merkle-tree-design/).


---

