Enforced 1-sentence per line for existing pages.

All pages except BIPs are conform to 1-sentence per line.
This commit is contained in:
Josh Green
2019-12-22 17:37:40 -05:00
committed by bitcoin
parent 0d0a122c8f
commit 48f022edfa
10 changed files with 162 additions and 63 deletions
+9 -4
View File
@@ -1,9 +1,14 @@
# Merkle Tree
A [merkle tree](https://en.wikipedia.org/wiki/Merkle_tree) is a data structure designed to build a hash of many separate pieces of data and allowing efficient recalculation of the hash when items are added, removed, or changed.
A [Merkle Tree](https://en.wikipedia.org/wiki/Merkle_tree) is a data structure designed to build a hash of many separate pieces of data and allowing efficient recalculation of the hash when items are added, removed, or changed.
In Bitcoin Cash, the transactions in a [block](/protocol/blockchain/block) are built into a merkle tree. The root of this tree, or **merkle root**, is a hash representing a compound, indirect hash of all of the items added to the merkle tree (i.e. transactions) and is included in the [block header](/protocol/blockchain/block/block-header), ensuring the block hash is dependent (indirectly) on all of the transactions that are included in the block.
In Bitcoin Cash, the transactions in a [Block](/protocol/blockchain/block) are built into a Merkle Tree.
The root of this tree, or *Merkle Root*, is a hash representing a compound, indirect hash of all of the items added to the Merkle Tree (i.e. transactions) and is included in the [Block Header](/protocol/blockchain/block/block-header), ensuring the block hash is dependent (indirectly) on all of the transactions that are included in the block.
Using a merkle tree to manage hashing the transactions in a block enables efficient addition of newly submitted transactions to a block being mined. Rather than re-hashing the entirety of the data of the transactions to be included in the block, the new transaction can be hash and then a small number of hashes can be recalculated, leading up to the merkle root. For large blocks this can heavily reduce the amount of data to be (re-)hashed.
Using a Merkle Tree to manage hashing the transactions in a Block enables efficient addition of newly submitted Transactions to a Block being mined.
Rather than re-hashing the entirety of the data of the Transactions to be included in the Block, the new Transaction can be hashed and then a small number of hashes can be recalculated, leading up to the Merkle Root.
For large Blocks this can heavily reduce the amount of data to be (re-)hashed.
Using merkle trees also allows for transferring only a subset of a block while still providing confidence that the data provided in fact appeared in the block in question. For more information, see [Merkle Block](/protocol/network/messages/merkleblock).
Using Merkle Trees also allows for transferring only a subset of a Block while still providing confidence that the data provided in fact appeared in the Block in question.
For more information, see [Merkle Block](/protocol/network/messages/merkleblock).