mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2024-11-22 16:18:11 +00:00
block and merkle diagrams
This commit is contained in:
parent
4a010418db
commit
bf5e12fba2
@ -74,13 +74,43 @@ $ bitcoind getblock 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8c
|
||||
| 4 bytes | Nonce | A counter used for the proof-of-work algorithm
|
||||
|=======
|
||||
|
||||
=== Linking Blocks in a Chain
|
||||
|
||||
[[chain_of_blocks]]
|
||||
.Blocks linked in a chain, by reference to the previous block header hash
|
||||
image::images/ChainOfBlocks.png["chain_of_blocks"]
|
||||
|
||||
|
||||
=== The Genesis Block
|
||||
=== Merkle Trees
|
||||
|
||||
A _Merkle Tree_ is a data structure created by Ralph Merkle used for efficiently summarizing and verifying the integrity of large sets of data. Merkle Trees are binary trees containing cryptographic hashes. When N data elements are hashed and summarized in a Merkle Tree, you can check to see if any one data element is included in the tree with at most +log(N)+ calculations, making this a very efficient data structure.
|
||||
|
||||
[[simple_merkle]]
|
||||
.Calculating the nodes in a Merkle Tree
|
||||
image::images/MerkleTree.png["merkle_tree"]
|
||||
|
||||
[[merkle_tree_odd]]
|
||||
.An even number of data elements, by duplicating one data element
|
||||
image::images/MerkleTreeOdd.png["merkle_tree_odd"]
|
||||
|
||||
[[merkle_tree_large]]
|
||||
.A Merkle Tree summarizing many data elements
|
||||
image::images/MerkleTreeLarge.png["merkle_tree_large"]
|
||||
|
||||
[[merkle_tree_path]]
|
||||
.A Merkle Path used to prove inclusion of a data element
|
||||
image::images/MerkleTreePathToK.png["merkle_tree_path"]
|
||||
|
||||
=== Proof-of-Work (Mining) and Consensus
|
||||
==== Consensus Mechanism
|
||||
==== Proof-of-Work Algorithm
|
||||
==== Difficulty Target and Re-Targetting
|
||||
==== Blockchain Forks
|
||||
|
||||
[[chainforks]]
|
||||
.A blockchain showing two instances of forking
|
||||
image::images/BlockChainWithForks.png["chainforks"]
|
||||
|
||||
==== Highest Difficulty Chain Selection
|
||||
==== Competition and Coinbase
|
||||
==== Mining Pools
|
||||
@ -90,7 +120,7 @@ $ bitcoind getblock 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8c
|
||||
==== Consensus Attacks
|
||||
===== 51% Attack
|
||||
===== Selfish Mining Attack
|
||||
=== Chain Forking
|
||||
|
||||
==== Normal Forks
|
||||
==== Soft Forks
|
||||
==== Hard Forks
|
||||
|
BIN
images/BlockChainWithForks.png
Executable file
BIN
images/BlockChainWithForks.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
BIN
images/ChainOfBlocks.png
Executable file
BIN
images/ChainOfBlocks.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
BIN
images/MerkleTree.png
Executable file
BIN
images/MerkleTree.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
BIN
images/MerkleTreeLarge.png
Executable file
BIN
images/MerkleTreeLarge.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
BIN
images/MerkleTreeOdd.png
Executable file
BIN
images/MerkleTreeOdd.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
BIN
images/MerkleTreePathToK.png
Executable file
BIN
images/MerkleTreePathToK.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
Loading…
Reference in New Issue
Block a user