|
November 29, 2011, 02:13:56 PM |
|
Transactions are not "stored" in a hash tree, but rather the proof-of-work that says a block is authentic is based on hashing the Merkle tree input of all the transactions. The Merkle root and a nonce (salt) is what miners are hashing to find a high-difficulty solution. Since the final Merkle root hash is always a 32 byte word size, this gives several desirable properties:
1. The Merkle root input is always the same small size, making it a consistent amount of work, easily transmittable for pooled mining, and simplifying writing hashing algorithms and the dataset size used in hardware.
2. The "shape" of the input data looks nothing like transactions, so if there was a preimage attack for SHA256, the obfuscating layers of hashing make it more impenetrable.
3. The Merkle tree gives several layers of checksumming that could be used to validate individual transactions, verify the tree, or verify the block.
4. Transactions are broken into blocks, and the previous block's hash is included in the current block, making a long strong blockchain of valid transactions.
It's not really much hashing, considering that you only need recalculate it once per new transaction a miner receives, and generating a block typically takes 5000 trillion hashes anyway.
|