5

I am reading about the Merkle tree, I've read that in a block we store just the root of the tree. To check if a ttransaction is included in the Merkle tree we need to use the transaction's Merkle path. The question is where the Merkle tree is stored? How would a node given a path check if the leaf belongs to the Merkel tree?

Murch
  • 75,206
  • 34
  • 186
  • 622
katapulte
  • 85
  • 5

1 Answers1

7

The Merkle tree is not stored anywhere.

It is implicitly defined by the transactions in a block. Whenever needed, the portion of it that is needed is computed on the fly using the transaction identifiers.

Pieter Wuille
  • 105,497
  • 9
  • 194
  • 308