top of page
Search
Writer's pictureShruti Jain

Structure of a Block...


You might be wondering. What's inside a block? DATA? DUHH!!!....But there's more....


Basically, a block is divided into two parts - Block header and body.

The body simply contains the data or transactions (txs). But what defines a block are the attributes of its header.

Lets understand these block attributes one by one.


BlockNumber:

This is the most obvious attribute which specifies the height of the block, i.e., the number of blocks before that particular block + 1. This is therefore a unique attribute as Blockchain has a linear structure and two blocks cannot have same height.


PreviousHash:

As the name suggests, it is the hash of the previous block. This attribute is used to link two blocks and is responsible for preserving the resistance to any kind of tampering.

This may not be a unique attribute.


YES! There is a concept of uncle blocks. This tends to occur when multiple valid blocks are created after a same previous block. So we refer to them as uncles. Although only one is accepted but still the previousHash attributes of all the uncles is same. We will study more about it later in further posts.


MerkleRootHash:

This attribute contains the hash value of the root of the merkle tree that is formed by all the transactions present in that particular block. This attribute is used to save the block memory by keeping just the merkle root hash instead of storing all the hashes seperately.


TimeStamp:

This field specifies the exact time the block was created. This field is useful to identify most recent data and makes it easy for peers to trace back.


Nonce(Number Only Once):

This is the most important field of the block header. It is responsible for the validation of the Block. All the peers validate the Block by using this number.

This number is calculated by the Miner (The creator of the block). We will talk about mining later. Right now it is enough to understand that this number is generated by solving a cryptographic puzzle or rather guessing using a huge range of random values. The nonce is the number which when put into the hashing algorithm along with other parameters of the block produces a hash that matches the difficulty (explained below).


Difficulty:

This field specifies the condition that needs to be fulfilled while calculating nonce, only then the block is considered to be mined(created and ready to be broadcasted). This is set by the Blockchain architecture and is manipulated by the algorithm itself which is based on the time taken to compute the nonce(mining rate). If the time taken exceeds the mining rate the difficulty is lowered and vice versa.

For example, if the difficulty is set to 3 initially, this means that the hash produced with nonce should start with 3 zeroes (000.......), only then the block is said to be mined.


BlockReward:

This field specifies the reward that a miner gets for finding the nonce. To encourage peers to participate in the network the Blockchain offers reward to the miners that is small amount of crypto. Every time a miner creates a block a transaction to the miner occurs with the reward value. This how crypto supply increases into circulation. The reward may be lowered after a certain timeframe to prevent excess supply and decrease in value. For example, Bitcoin reward gets halved every four years. It started from 50 BTC per block in 2009. Now its 6.25 BTC per block.


Miner:

The public key of the creator of the Block.


Uncles:

Numbers of uncle blocks along with there positions in the Blockchain.


Size:

The size of the Block.


Confirmations:

The number of blocks created ahead of a particular Block. This confirms the acceptance of the Block. Higher the confirmations, deeper the block in the Blockchain, and more are the chances of it being a part of the longest accepted chain.


TotalFeeReward:

This field contains the sum total of all the transactions' fees. Every transaction is associated with a fee that is paid by the creator of the transaction. Greater the fee, greater are the chances of that tx to get included in the next block because this fee is redeemed by the miner. Hence, a miner would like to include the txs with higher fee in their block. We will study more about this in Structure of a transaction.


These are the most common parameters of a block. There can be more, being specific to a particular Blockchain.


Next we will look into the functioning of the Blockchain to get a more clear picture of How it Works...

Till then STAY TUNED AND KEEP READING....



51 views0 comments

Recent Posts

See All

Comments


Post: Blog2_Post
bottom of page