Block-Chain: What is it?

Block-Chain: What is it?

·

4 min read

“An open and distributed ledger which can record transactions between two parties in a permanent way, accessible by anyone.”

From the word, pictorially it should be like a chain of blocks right? You got that right to some extent but let’s put things in a bit more perspective.

The Idea of a Block

Imagine a box with different data fields inside it, like a DB record. Now these blocks contain the following kinds of data:

  1. Data
  2. Previous Hash
  3. Hash

A block might store multiple pieces of information within itself. The “hash” value belongs to the current block and is a “fingerprint” value of sorts that uniquely identifies that block in the complete chain. The first block of a blockchain is called the “Genesis” block. The second block contains the hash of this first block in its “Previous Hash” parameter that links these blocks in a sequence. Now we should be able to understand this better for why is it called a Blockchain, since every consecutive block that gets formed is linked with the previous block through these virtual chains in a sequential manner, thus derives the word — Blockchain.

Following upon the idea that we formed of a blockchain, let us try and understand how these blocks are actually formed. In technical terms, the formation of these sequential blocks is called mining. A block in any blockchain (such as Ethereum, Solana etc.) contains a field which we call as the “nonce”.

Mining

When a miner wants to add a new block to the blockchain, they gather a set of unconfirmed transactions and create a block. This block includes a reference to the previous block’s header, a timestamp, and a nonce (a 32-bit integer). The miner’s goal is to find a value for the nonce that, when combined with the other fields in the header, results in a hash value that is less than or equal to the current difficulty target. To find a valid nonce, the miner starts by hashing the block header with a cryptographic hash function (such as SHA-256) and examines the resulting hash value. If the hash value is greater than the difficulty target, the miner increments the nonce by 1 and tries again.

This process continues until the miner finds a nonce that produces a hash value that is less than or equal to the difficulty target.Once a miner finds a valid nonce, they broadcast the new block to the network, and other nodes can verify the validity of the block by hashing it themselves and checking that the resulting hash value meets the current difficulty target. If the block is valid, it is added to the blockchain, and the miner is rewarded with a certain amount of cryptocurrency. This complete process is referred to as mining.

Types of Blockchains

There are 3 types of blockchains:

  1. Public Blockchains: Public blockchains are open and permissionless networks where anyone can participate, view and validate transactions. They are secured by consensus algorithms that require a majority of nodes to agree on the validity of transactions.
  2. Private Blockchains: Private blockchains are permissioned networks where only specific parties have access to view and validate transactions. They are often used by enterprises for internal processes and to maintain data privacy.
  3. Tokenized v/s Token-less Blockchains: Tokenized blockchains are networks that use tokens as a means of value transfer and access control. Tokens can be used for a variety of purposes such as representing assets, enabling voting, and accessing network resources. Tokenless blockchains, on the other hand, do not have a native token and are often used for data storage or as a backbone for other blockchain networks.

Smart Contracts

Smart contracts are the means that enables a blockchain to move from single purpose such as cryptocurrency to multipurpose platform used to deploy various decentralized applications. They provide absolute transparency in the exchange of assets between any number of parties, thus removing the need for any middle men.

In simpler words, these are programs or code running on blockchain that can execute automatically when certain conditions are met. This allows developers to build more sophisticated functionality, these are called dApps or Decentralized Applications.

Creating monetary banking services that allow issuance of stable coins, providing peer-to-peer or pooled lending and borrowing platforms. Crowd sourcing of funds, and forming decentralized autonomous organizations (DAOs) are examples from one of the major field that has grown since the birth of smart contracts and this is called as DeFi or Decentralized Finance.

Did you find this article valuable?

Support hexbyte by becoming a sponsor. Any amount is appreciated!