Understanding Blockchain

 

T

he blockchain is a peer to peer distributed ledger and tracks various transactions. Let me clear that blockchain is not bitcoin and vice versa.

 

Example of blockchain

Suppose one person has some type of digital assets in his wallet (it can be bitcoin or anything else) and he wants to transfer it from his wallet to someone else wallet. The person will initiate a distributed ledger transaction (which will be shown on blockchain) and the payment will move from peer to peer network and also no bank can have control on this transaction.

The above transactions are grouped in a block.

Also, note that there are lot of nodes/systems monitoring these transactions(blockchain) and a single block can have more than one transaction as well.

Using blockchain we can establish a new generation of transactional application. That can establish:

  1. trust
  2. accountability
  3. transparency at their core

    Blockchain syncing

    The process of blockchains syncing up have to do with a concept of consensus - an agreement among the network peers. Each and every machine in blockchain has a copy of a transaction that is processed in the chain.

    As we have seen Distributed Ledger Transaction(DLT) is not exactly blockchain and vice versa. Let's see the difference between two:

    We can think of DLT as a decentralized database where everyone has a copy of transaction that is kept in sync at all point of time.

     And blockchain is the specific term for above data structure.

    In the Bitcoin network, miners must solve a cryptographic challenge to propose the next block. This process is known as 'proof of work', and requires significant computing power. We shall discuss the proof of work in more detail in the Consensus Algorithms section. 

    Timestamping

    Timestamping is another key feature of blockchain technology. Each block is timestamped, with each new block referring to the previous block. And these blocks are connected with cryptographic hashes, hence making it really difficult or impossible to make any harmful changes in the chain. Therefore making transaction network immutable from the very first block.
     

    We have been talking a lot about blocks. Let's see what block in blockchain actually is made up of:

    1. The reference to the previous block
    2. The proof of work, also known as a nonce
    3. The timestamp
    4. The Merkle tree root for the transactions included in this block.

    The Merkle tree, also known as a binary hash tree, is a data structure that is used to store hashes of the individual data in large datasets in a way to make the verification of the dataset efficient. It is the algorithm which makes sure that blockchain network is not modified.

    As we have seen so far that cryptography plays a significant role to make blockchain network secure. On high level there are two ways where cryptography plays a significant role:

    1. Generating hashes for the block
    2. Solving proof of transactions

    What makes blockchain secure?

    It is extremely hard to change the transactions in a blockchain because each block is linked to the previous block hash. This hash includes the Merkle root hash of all the transactions in the previous block. If a single transaction is changed, it would change the Merkle root hash and also the hash contained in the changed block. Therefore making blockchain really secure.

    And if someone just changed hash of one block without doing any extra work, it is very easy to recalculate the hash.

    We have been talking a lot about bitcoin. Let's see what's the major difference between centralized databases and blockchain:

    1. In centralized databases, there is one admin who can control the database and provides service to the client.
    2. In blockchain, each and every individual in blockchain has his own copy of the database. Therefore making it peer to peer network.

    Types of Blockchains

    There are two types of blockchains. These are:

    1. Permissionless
    2. Permissioned

    Let's see the difference between two:

    In permissionless blockchain, anyone can join as it is public blockchain(like Bitcoin). But in Permissioned blockchain pre-verification is required of the parties who want to join as it is private blockchain.

    I have tried to cover basics of blockchain and I hope that it helped you understand what blockchain is and how it works. Stay tuned for upcoming posts on the blockchain.

    Author Info

    Tavish Aggarwal

    Website: http://tavishaggarwal.com

    Tavish Aggarwal is a front-end Developer working in a Hyderabad. He is very passionate about technology and loves to work in a team.

    Category