Ethereum blocks store every transaction happening on the Ethereum network. All the blocks are chained together by adding the previous block's hash to the next block's header. This chaining makes the data in the previous blocks immutable because changing any information in the earlier blocks will change the hash of that block and cause unchaining of the blockchain.
Every block in the Ethereum blockchain follows a standard format, which is illustrated below:
Every Ethereum block consists of two main parts:
Header
Body
A block's header contains some information about the miner, the block, and the current state of the network. Every block header contains the following fields:
Parent block's hash: It is the Keccak 256-bit hash of its
Uncle block's hash: It is the Keccak 256-bit hash of the list of
Beneficiary address: It is the 160-bit account address of the miner of this block to which all the mining fees from this block will be transferred.
State root: It is the Keccak 256-bit hash of the root node of the
Transaction root: It is the Keccak 256-bit hash of the root node of the Merkle root trie populated by all the transactions present in that block's body.
Receipt root: The Keccak 256-bit hash of the root of the Merkel root trie that is populated by the receipts of all the transactions in that block.
Logs bloom: A Bloom filter consisting of indexable log entries from the receipt of each transaction from the list of transactions present in the body of the block.
Block number: The length of the blockchain or the number of blocks in the blockchain. A positive whole number equals the number of ancestor blocks of this block where the genesis block is block 0.
Gas limit: The current upper limit on the gas used in the block.
Gas used: Total gas used in transactions in this block.
Difficulty: It is the difficulty of the network to mine this block. Miners' have to mine a block whose header's hash is less than the network's difficulty at that time. Miners do this by changing the
Mix hash: A unique identifier for the block. When combined with the nonce proves that a sufficient amount of work has been done by the miner (proof of work).
Timestamp: The time in
Base fee per gas: The minimum fee required per gas for the transaction to be included in the block.
Extra data: A byte array containing data relevant to this block. This must be less than 32 bytes.
The structure of the Ethereum block header is shown below:
The body of an Ethereum block contains the list of uncle block headers and a list of transactions (both are described below).
Uncle block headers: This is a list of uncle block headers (same format as a block header described above).
Note: Every miner is trying to mine a block at the same time. In the end, only one block will be accepted and other blocks will become uncle blocks. In Ethereum uncle blocks also get paid.
Transactions: This is a list of actual Ethereum transactions stored in the block.
Free Resources