Now a days everyone is talking about Blockchain but very few really understand about it. We are writing series of blogs to make you aware about Blockchain and its potential.
Blocks in Blockchain
Blockchain is combination of two words, Block and Chain so it is chain of blocks tied together that store the data in decentralized way. Each block store the transnational data and there can be n number of transactions in a block stored in Merkle tree format, Refer this article to know more about Merkle tree. Every Blockchain (Bitcoin, Ethereum, Hyperledger etc.) has different block size, block timing and transaction count in block but below we are talking about block in general.
What is Gensis Block ?
Very first block in Blockchain is known as Gensis block and all other blocks gets appended to that genesis block.
Block Structure in Blockchain
Block mainly has two parts
- block header
Generally contains below items
- previous block hash
- merkle root hash
Now let's try to understand it in detail.
previous block hash
Immutable is one of the main feature of Blockchain, that means once information added to Blockchain, it is impossible to change the information. This is achieved in Blockchain with "pointer to previous block hash" section in the block. Here reference to previous block is added to current block and that is similar to link list concept.
Timestamp is the epoch Unix time of the time of block initialization.
Below is the definition from Wikipedia.
"In cryptography, a nonce is an arbitrary number that can be used just once. It is similar in spirit to a nonce word, hence the name. It is often a random or pseudo-random number issued in an authentication protocol to ensure that old communications cannot be reused in replay attacks. They can also be useful as initialization vectors and in cryptographic hash functions. Also known as a 'Crypto Nonce' ".
In short, it is integer value that miner use when they perform mining to generate required hash.
Merkle root hash
Merkle root hash is hash of top node of Merkle tree. To read more about it refer this article.
This is difficulty level set in the block to mine it. This gets adjusted during mining if block mining taking time.