An Introduction to the Blockchain technology.
What is Blockchain Technology?
A Blockchain contains several blocks that are linked to gather to form a chain. It is a chain of blocks that contains meaningful information. Blockchain is Distributed Ledger Technology. Which avoids data/resource tempering and it is transparent.
In a simple word in the blockchain, the list of the transaction will be shared with a group of people/nodes. The list itself will be decentralized distributed instead of copied or transferred.
Three root elements of Blockchain are blocks, nodes and miners.
A Blockchain contains several blocks and each block has three key elements as mentioned below:
- The data in the block (The content needed to pass or the principal information related to the process). In the case of the messaging system, the message is the ‘core/pure’ data.
- The hash is a 256/512-bit number wedded to the data (Based on the hashing algorithm used in the Blockchain SHA 256 – SHA 512 or any other).
- Hash of the previous block.
Miners legalize new transaction and add them on the Blockchain, through a process called mining.
In a blockchain, every block has its own inimitable data, hash and hash of the previous block in the chain.
Miners use special software, CPUs and GPUs to resolve the complex algorithm of finding data and its hash. For mining newly added block will take lots of electrical power and computing power. When a miner solves the puzzle, it is game over for other miners who are finding the ‘Golden nonce’.
Altering/Modifying any block earlier in the chain needs re-mining, not the changed block, but all the blocks that come after. This way it’s extremely tough to hack blockchain technology.
When a block is successfully mined, the changed list will be propagated in the network and will be accepted by all the nodes on the network and the miner is rewarded financially.
Blockchain technology is decentralized. No one computer or organization can own the chain. Nodes can be a mobile, iPad, Desktop or Laptop (It can be any kind of electronic device that maintains copies of the blockchain). All node contains its own copy of the Blockchain.
How Blockchain Work?
When a new block is added or a new transaction is recorded, there will be a race between all the miners and miners will start solving the extremally complex algorithm. With this process, all miners will try to validate the newly added block.
The miner who wins will validate and add the new block in the blockchain. The adding process of the block is decided based on the consensus algorithm mentioned in the blockchain.
A consensus algorithm is a mechanism through which all nodes in the network reach an agreement. Public (decentralized) blockchains are distributed. The distributed nodes need to agree on the authenticity of transactions. This is where consensus algorithms come into play.
Type of consensus algorithms:
- Proof of Work (PoW)
- Proof of Stake (PoS)
- Proof of Burn (PoB)
- Proof of Capacity
- Practical Byzantine Fault Tolerance (PBFT)
In Blockchain data is stored on the number of electric devices on the network, Thus the hacking and the technical failure of the data is next to impossible.
If a hacker tries to change data in any of the blocks, the hash of the block will be changed thus that block will become invalid as the old hash is already stored in the linked block. So, a hacker needs to alter the current block and the entire trail of related blocks. In the big picture, this is for just a single node there may be thousands of the node which one needs to make malicious.
This makes blockchain the secure technology to store the financial or any other kind of records where backtracking of the records is needed.
In Blockchain the blocks are linked/connected so tracing and backtracking to particular data/transaction is easily possible.
The transaction/data transfer is instant, it is way faster than the 3rd party trusted organization.
In such an attack if hackers manage to control more than 50% of the network, that will allow them to disrupt the network by altering/modifying the content in the blocks.
Despite being hypothetically possible, there was never a successful 51% attack on the Bitcoin blockchain. When the network grows bigger the security increases.
Fun fact: To-do 51% attack on the blockchain min $1,005,000,990 and min 470,000 hardware units which need continuous power supply...!! That’s tuff, right?
Especially those are using Proof of Work as a consensus algorithm, It is highly ineffective. When a new block is added to the blockchain there will be a race condition and it is highly competitive. In the end, there will be a lone winner every ten minutes, the work of every other miner is wasted.
Fun fact: The resources utilized by the Bitcoin network in the last few years, can provide energy to many countries, such as Denmark, Ireland, and Nigeria.
The newer block is recorded the space need to store them will grow. As the blockchain is distributed and all nodes will have its copy. So, the size is a concern.