In the first part, you must have got some basic idea about P2P network and the distributed ledger system. Now let’s dig into the details of the same. Before that let us discuss about a small definition of Blockchain.
‘Blockchain is a database, which can be private or public (based on the scenario and implementation) and which is decentralized as well as secure, and works on the principle of consensus’.
If you can remember the structure of blockchain in previous part, which is nothing but a ledger which consists of many transactions and secured by SHA256 encryption technology. There was a hashcode(a code unique for that particular block) mentioned in the block, and each block contains the hash of previous block (if you are from computer science or IT background this might be easier for you to understand through linked list, but only difference here is: to add a block you need a nonce which is unique and any possible combination of number can be a nonce, which needs a super computer to find out). Moreover, due to this Blockchain is immutable and as the hashcode of a block is chained with the next block, the tampering of data can be found out, which makes the ledger system trust-less and immutable.
Now, let me explain a bit about the bitcoin, rather how does bitcoin works using the blockchain technology.
- Bitcoin is a public blockchain implementation which is based on cryptocurrency.
- I often get questions from people about “who is the authorized body to put money in bitcoin?”. Now let me explain this thing in a simple and effective way: None put money in bitcoin. The value of bitcoin is created due to high demand. As an example, you can think that, Gold is very less in amount all over the world and due to the limited supply and huge demand the amount of the same increases. Same happens for Bitcoin. Here replace gold with bitcoin and you have your answer.
- Every 10 minutes a new block is added in the existing ledger based on the consensus principle.
- Adding a block in bitcoin chain requires huge effort as the unique matching number, which is known as nonce, needs to be matched with the block. This computation needs trillions of combinations check. Which requires huge power with the small amount of time. And the person who adds a ledger in the chain, is credited in terms of bitcoin.
Why we need Blockchain over traditional systems?
Well, with the traditional system approach there is always a worry of data hacking. At the end, anyways there is an admin, and if the admin credentials are leaked then the data is at stake. In case of Blockchain, that is not the case as Blockchain is trustless. To sum up the advantages of blockchain:
- No need of a moderator or third party to verify transactions
- Security (due to encryption)
- Fault tolerant
- Almost no downtime due to availability
- Auditability and open access to anyone
Let’s go back to square one to reiterate the building block of blockchain. The fundamental idea of blockchain is to create a trustless, secure system of distributed ledger of infinite size. Yes, you heard it right! Its literally infinite and the fun part is nothing is centralized in it! Well, well! Then you must be thinking, how does it happen? The short answer for this is, Mining, which is nothing but adding another bloc in the chain which is already present. Again, you must be thinking, its open to all and infinite in length then can anyone add whatever block they want to add? Well, the question is genuine one. But the answer is No. You need to play a mathematical puzzle and solve to add the block. Tada! Not so easy, you see! This is called Proof-of-Work. And yes, for the hard work that you do to add a block in the chain, you will be rewarded (at present 12.5 Bitcoin for bitcoin Blockchain and for Ethereum its 5 per block). And mining is not mandatory to add a block in the blockchain ledger (example is hyperledger Fabric).
Go to https://blockchain.info/ and check the latest blocks in the ledger. Click on any of the block and get all the details related to the block, even all the transactions! See, told you its open and encrypted at the same time.
To be contd…