Does the Merkle Root get constantly updated inside the block or does it only get added once the block is completed?


So, pretty much just the title. I'm just wondering how the Merkle Root works exactly. I know it's the result of pairing transactions and then hashing them until the last transaction in the block, but when is this done? Is it constantly updated while the block is getting mined, or is the Merkle Root only calculated when the block is completed?



Posted 2021-02-02T19:43:01.420

Reputation: 49



Once the mining pool has the list of all of the transactions they are including in that block, they calculate the merkle root for this list of transactions, then they distribute the block header, that includes the merkle root, to miners to work on.

So, no, it's not constantly being updated, unless for some reason a new transaction was being added or removed from the list of transactions being included in the block.


Posted 2021-02-02T19:43:01.420

Reputation: 1 443