-1

I was reading about blockchain Merkle tree and level DB. my query is related to the tree used in blockchain. As in most of the blockchain, level-DB is used to store the data in key-value pair structure and even level DB use merge log-tree. So why it is required to use Merkle tree even level DB is also use a tree structure to store data.

nagaraj
  • 797
  • 1
  • 6
  • 29

1 Answers1

-1

Merkle tree is needed for quickly recompute Merkle root for block hash, when mempool contains is changed. Just aware: To a miner, each second come in new transaction, and miner must add these transaction into mempool, and maybe - remove some "non interesting" transactions from a mempool. As result, after each update, miner must recompute block hash. And there is performance affecting - rehash linearly entire block (~1MB), or just Merkle branch only (<1K).

Storing block within wallet DB - this is another task, irrelevant to MT-structure within block.

olegarch
  • 3,670
  • 1
  • 20
  • 19