Bitcoin Tutorials - Herong's Tutorial Notes
∟Bitcoin Data Structure
This chapter introduces Bitcoin data structure.
Data Fields of Bitcoin Block
Merkle Root of Bitcoin Block
Verify Merkle Root with Python
Data Structure of Bitcoin Block
"getblock blockhash 0" - Serialized Hex Blcok Data
Block Hash Calculation Algorithm
Block Hash Calculation in Python
Conclusion:
- Bitcoin block has a block header and a list of transactions.
- The Merkle root hash of the transaction list is included in the block header
to lock transactions.
- The hash of the previous block is included in the block header
to establish block sequence.
- A nonce value is used in the block header to ensure a valid block hash.
- Only the block header is used to calculate the block hash.
- Bitcoin uses double-SHA256 algorithm to calculate hashes.
- Bitcoin uses little-endian in internal storage.
- Bitcoin uses big-endian in display tools.
Table of Contents
About This Book
Introduction of Bitcoin
Bitcoin Blockchain
Bitcoin Wallet
Bitcoin Core
Bitcoin Transaction
Bitcoin-Qt - Bitcoin Core GUI
►Bitcoin Data Structure
References
PDF Printing Version