A block header is a collection of various valuable information, which defines the existence of the block in the Ethereum blockchain. Take a look at the following:
- Parent hash: The Keccak 256-bit hash of the parent block's header.
- Ommers hash: The Keccak 256-bit hash of the ommers (uncles) list of this block.
- Beneficiary: The 160-bit address to which all fees from the mining of this block are collected.
- State root: The Keccak 256-bit hash of the root node of the state trie. It is calculated once all the transactions are processed and executed.
- Transactions root: The keccak 256-bit hash of the root node of the trie structure. The transaction trie represents the list of transactions included in this block.
- Receipts root: This is the keccak 256-bit hash of the root node of the trie structure. This trie is formed of receipts of all the transactions included in the block. The receipts are generated after a successful execution of each transaction.
- Logs bloom: This is a bloom filter that is composed of the logger address and the log topics from the logs of each transaction receipt of the included transaction list of the block.
- Difficulty: This is the difficulty level of each block. This is calculated by the previous block's difficulty and timestamp.
- Number: This is the total number of the previous blocks; the genesis block has a number of zero.
- Gas limit: The limit set on the gas consumption of the current block.
- Gas used: The total gas consumed by the transactions included in the block.
- Timestamp: This is the epoch Unix time of the time of the block initialization.
- Extra data: This file can be used to store arbitrary data related to this block. It must be 32 bytes max in size.
- Mixhash: This contains a 256-bit hash that is combined with the nonce; it is used to prove that sufficient computation power is consumed to mine the block, part of the PoW mechanism.
- Nonce: This is a 64-bit hash that is used to prove (along with the mix hash field) that adequate computation effort has been spent to create this block.
The following diagram shows the structure of a block's headers:
