A Blockchain is a distributed public ledger that keeps a record of all transactions in a transparent fashion. Anyone can verify the transaction and any transaction processed on blockchain lives forever. The blockchain ledger is immutable. There is no going back once a block becomes part of blockchain.
Blockchain technology is being adopted in all walks of life and we keep on hearing different terms related to blockchain.
The aim of this post is to give an overview of terms related to blockchain.
Blockchain Terms Explained
Blockchain introduces the terms like mining, blocks, transactions which must be understood for understanding working of blockchains. Lets see these terms one by one.
What is a Blockchain transaction?
A blockchain transaction is a computational process that results in changing of the state of the blockchain. In the case of Bitcoin, it is the exchange of bitcoins.
A Block in Blockchain
A block in a blockchain is a set of historical transactions that have been verified by the blockchain. A block has its header and is linked with the previous block by means of its hash. It also contains the Merkle root hash of the transactions contained in the block.
What exactly is mining in Blockchains?
Mining is a process of validating transactions, making the transactions part of a block, and then broadcasting the block to all nodes. The block is selected to be added to the blockchain on basis of some consensus protocol. For example in Bitcoin, the block is added with proof of work in which a node has to solve computational expensive cryptographic calculations.
Types of Nodes in Blockchains
There are three types of nodes in blockchain lite nodes, full nodes, and miner nodes. They are distinguished based on the computational power and storage they possess. Lite nodes only perform transactions on the blockchain whereas miner nodes participate in validating and adding blocks to the blockchain.
Lite nodes can only process the transactions and may contain the data related to their processed transaction only.
Full Nodes have higher computational power and storage than lite nodes. They keep full copies of blockchain and participate in the verification of transactions that are being carried on the blockchain.
Miner nodes have the highest computation power among the three. Miner nodes work to add a block to the blockchain and in return earn rewards in form of cryptocurrencies newly minted along with transaction fees of the transactions. Mining nodes in case of proof of work consensus algorithm, perform highly computational tasks to solve a cryptographic puzzle and propagate their block with the result.
Types of Blockchains
There are three types of Blockchains.
- Public Blockchains
- Private Blockchains
- Hybrid Blockchains
Public blockchain like Bitcoin and Ethereum allows anyone to join as a node and add to the security and practicality of a blockchain. The data on the public blockchains is visible to everyone. However, they suffer from privacy and scalability issues.
In a Private blockchain, the number of miner nodes is controlled and people processing transactions on the blockchain are also limited. For example, some of the universities are maintaining private blockchains for the verification of academic records.
Hybrid or consortium Blockchains are a mix of both public and private blockchains. Hybrid blockchains are established between different organizations where each organization controls a node and helps in the processing of transactions.
What are blockchain forks?
Most of the blockchains suffer from forming of forks problem. If a miner node forms a block but the rest of the network rejects it then we see forming of forks. Over the period of time, these forks are eliminated and the longest chain is followed in the blockchain.
There are two types of forks in blockchain. Soft forks, which are resolved by following the longest chain on the blockchain, and hard forks which are permanent. They are formed due to network up gradation and some of the nodes deciding not to upgrade. For example after the “The DAO” attack on Ethereum, we saw a hard fork on the Ethereum blockchain resulting in Ethereum classic and Ethereum blockchains.
Purpose of PoW consensus
The purpose of PoW (Proof of Work) consensus is to maintain the security of the blockchain network collaboratively and avoid inflation. The blockchain is collaboratively maintained by anonymous peers on the network. Blockchains on PoW consensus require that each block that is created has a lot of work invested in its creation. Anyone who wants to modify a previous block has to do a lot of work in generating a chain of blocks by itself. As a result, the work require to change a block increases with every new block added to the blockchain.
How do forks affect a blockchain?
Forks add latency to the blockchain. Once the stale blocks are removed and the longest chain is followed, the transactions in the stale blocks are required to be re-added to the blockchain which increases the latency.
What is the difference between Ethereum Classic and Ethereum Blockchain?
In 2016, the DAO attack took place in which attackers were able to exploit the bug in Ethereum DAO code and took away a handsome amount of money. To mitigate the effects, a hard fork was formed on Ethereum but some of the nodes refused to upgrade resulting in two separate blockchains Ethereum and Ethereum classic.
What are the types of Nodes in blockchain?
There are three types of nodes in blockchains. Lite nodes that only carry out simple transactions. Full nodes that keep a record of complete blockchain and participate in transaction and block validation and miner nodes that actually perform all computations to add a block to the blockchain.