Structure of a Block in Blockchain

Block in Blockchain
- A block is actually the building block or the key element of a blockchain.
- The definition of a blockchain is based on its blocks. As I defined in my previous posts, a blockchain is a chain of multiple blocks.
- Blocks contain transactions. Each block contains a different number of transactions.
- These transactions are contained in blocks so that they would be added to the distributed ledger.
- The number of transactions is limited by the block size and gas limit. Generally, the block contains more than 500 transactions.
- Other than transactions, a block also consists of some metadata. This metadata is stored in the header of the blockchain.
- The size of a block header is 80 bytes, the detail of which is given in the upcoming sections of this article.
- Let’s first define a parent block in the next part.
Parent Block in Blockchain
- The block size: The size of this field is 4 bytes and it contains the size of the block.
- The block header: The size of a block header is 80 bytes. It further contains different fields.
- The transaction counter: This field contains the number of transactions and the size of it is between 1-9 bytes.
- The transactions: This field contains transactions of the block and its size is variable.
Block Header in Blockchain
- Hash of the previous block: Every block header gives information about the previous or parent block. This field contains the hash value of the previous block and this reference connects all the blocks. The size of this field is 32 bytes.
- Version: This field stores the version number to show software upgrades. The size of the version field is 4 bytes.
- Difficulty: The mining difficulty at the time of the block creation is stored in this field. The concept of mining would be explained in the upcoming articles. Its size is 4 bytes.
- Timestamp: This field contains the time at which the block was created. The size of this field is 4 bytes.
- Nonce: A nonce is a value used during the mining of the block. This field’s size is also 4 bytes.
- Merkle tree root: A Merkle tree is a structure obtained from hashing the transactional data of a block. The root of this tree is stored in the block header under this field. 32 bytes is the size of the Merkle tree root field.
Properties of a Block:
Difficulty Property:
- As I mentioned earlier, this property gives the difficulty level of solving the puzzle to mine the block.
totalDifficulty Property:
- This property of the block tells us the total difficulty of the blockchain.
gasLimit Property:
- This property tells us the maximum gas allowed by the block which in turn tells us about the number of transactions that the block can accommodate.
gasUsed Property:
- The gasUsed property gives the amount of gas used by the block for executing all of its transactions.
Number Property:
The number shows the block number in the list of blocks.Transactions Property:
- This means all of the transactions contained in the block.
Hash Property:
- This property shows the hash of the block.
parentHash Property:
- This property saves the hash of the previous block.
Nonce Property:
- Nonce property shows the nonce value that I defined earlier. It is a variable used in mining the block.
Miner Property:
- The miner property gives information about the miner of the block. This gives the account of the block miner.
Block Identification:
1. Block Hash
Block hash is the main identification parameter of a block. This value is obtained by cryptographic hashing of the header of the block. The hashing operation is performed twice. The header of the block contains metadata of the block and when this data is hashed the result is the block hash, whose size is 32 bytes. The hash of the block is not stored in the block’s data whether the block is being transmitted to the other nodes or it is stored as part of the blockchain on some node. When a node receives a block from the network, it computes its hash itself.2. Block Height
The second parameter used for identifying a block is its height. As we already know that the blocks are linked together in a list type structure starting from the genesis block. The genesis block is given a height 0 zero. The second block in the blockchain or the first block after the genesis block is at height 1 and so on. In this article, I have explained the structure of an Ethereum block. The article explained the header and some properties of the blocks. I hope you have learned something new from it. Take care!×
![]()





































































