1 of 36

An Introduction to Blockchain

By

Nidhi Sharma

2 of 36

Quick Reference

  • Block - is used to store the transaction along with their hash value and data
  • Transaction- Any state change occurred in a blockchain
  • Smart contract- self executing contract with terms and conditions written in lines of codes
  • Ledger -Blockchain ledger is used to record the transactions in a blockchain

3 of 36

Quick Reference

  • Token- Digital asset
  • Cryptocurrency -Digital asset
  • Bitcoin - Most popular cryptocurrency
  • Hash - The encrypted value of the data in the block.
  • SHA256 - Hashing Algorithm
  • Node- Each computer connected to the blockchain network

4 of 36

Quick Reference

  • Solidity- Programming language for writing smart contracts in Ethereum
  • Hyperledger- Blockchain platform
  • Ethereum - blockchain platform
  • Baas -Blockchain as a service
  • ERC20 -Ethereum token standard
  • ICO- Initial coin offering
  • Dapp -Decentralized applications

5 of 36

Quick Reference

  • IoT -Internet of things
  • PoW - Proof of work
  • PoS - Proof of stake
  • Mining- The validation process in a blockchain (in Bitcoin and Ethereum)
  • Miner- The nodes which perform mining
  • Wallets- Digital wallet to store, send and receive cryptocurrencies and other digital assets.
  • Testnet- Test blockchain networks for development and testing purpose

6 of 36

Quick Reference

  • BFT - Byzantine fault tolerance principle.
  • BIP -Bitcoin improvement proposal
  • Genesis block -First block in the blockchain
  • Composer-blockchain development framework in hyperledger fabric
  • Participants-Those who have an account in the blockchain and performing any transactions.
  • Peer2Peer(P2P)- Decentralized network architecture. There is no dedicated server in this case

7 of 36

The idea was initially intended for time-stamping digital documents such that backdating them will not be possible thereafter.

8 of 36

  • Bitcoin is the first blockchain came into existence and it was in 2009. In the following years, the bitcoin became popular, and the underlying technology became even more popular. So the confusion and lack of clarity among people start from the origin itself; a product and its related terminologies went viral before the technology behind it. And when the blockchain displayed its real potential, people were trying to relate it with the bitcoin terminologies; the result was total misconception and confusion. But it is the other way; start from blockchain and then try to understand bitcoin.

9 of 36

Advantages

  • Decentralization. Within a distributed network, participants don’t need to know one another, and each member has access to data presented in the form of a distributed ledger. If the information is somehow corrupted, most participants can reject it, which means minimized possibilities of fraud. 
  • Immutability. Once performed, a transaction is recorded with no further alterations or removal. Time and date stamps ease data tracking in the long run. Therefore, blockchain ensures reliable data audits.

10 of 36

  • Traceability. Tracing the origin of products and managing inventories more efficiently is of high importance for retailers. Due to the transparency blockchain can bring to the supply chain, environmental contamination issues won’t be a problem anymore.

11 of 36

  • Cybersecurity. Due to powerful encryption and immediate recording, the probability of attacks performed by malicious intruders falls to its lowest level.  
  • Cost reduction. Organizations, especially those from the BFSI industry, can decrease operational expenses due to eliminating facilitators, an ability to process transactions efficiently, automatic data aggregation, as well as eased reporting and auditing processes. 

12 of 36

Limitations 

  • Low Scalability 

The problem is that transaction speed depends largely on network congestion, which means that the more people or nodes are involved, the slower the pace is. Here’s an example: Centralized payment systems can process tens of thousands of transactions per second, while Bitcoin can only manage seven.  

It happens so often because, in the centralized architecture, the controlling unit doesn’t notify other members about transactions, thus increasing the speed. In the blockchain, on the contrary, most nodes need to authorize the transaction. Therefore, organizations should consider the performance factor prior to implementing blockchain-enabled solutions. 

  • Implementation Challenge 

It’s all about initial financial investments. For some businesses, implementation costs may turn out to be overwhelming. Even though most existing solutions are free of charge, a vast contribution is a must when involving proficient software engineers engrossed in diverse aspects of blockchain development, licensing costs in case of switching to a chargeable software version, overall maintenance and more. If companies aren’t ready to allocate a large budget, maybe it’s better to postpone the blockchain introduction.

13 of 36

  • Shortage Of Talent Pipeline 

According to estimates, each year, the need for high-skilled blockchain developers skyrockets by 300-500%. It’s a global issue that countries from the USA to Singapore suffer equally. As this technology is still evolving, a development community requires some time to compose the relevant educational programs and alleviate the market demand. 

  • Private Key Issues

In the decentralized environment, private keys owned by individuals may become a weak spot. Once generated during a wallet creation, they provide access to all the data stored. If stolen, it puts both sensitive data and finances in jeopardy. If lost, then wallet access is gone forever.  

14 of 36

  • Problematic Integration With Legacy Systems 

If the blockchain solution is to be integrated with outdated systems already in use, possible data loss or corruption risks arise, especially if organizations have no seasoned specialist in place. To avoid operational disruption, before performing this transition, it’s worth asking a question, “Will it be a good fit for my infrastructure, or am I just following the hype?” 

  • High Energy Consumption 

Most blockchain-based solutions, like Bitcoin, use a proof-of-work consensus algorithm for validating transactions, which utilizes excessive computing power comparable to the yearly electricity consumption of a country like Denmark. With the resources needed to cool down the equipment, prices are only rising. So, if proof-of-work is your only option, you’ll have to pay for it with energy costs. 

  • Blockchain: To Be Or Not To Be? 

Despite the multiple business benefits this technology brings to companies, still, it’s important to introduce it wisely rather than run with the crowd. 

15 of 36

Data Structure of Blockchain

  • Data
  • Previous Hash
  • Hash

16 of 36

Block Validators

Block validators are the nodes which participates in the process of block validation. The validators are rewarded for their effort, ( In fact they are rewarded for the computational power they spent). Different blockchain protocols adopt different methodologies for selecting the validator from available pool of nodes.

17 of 36

Methods

  • PoW (Proof of Work)
  • PoS (Proof of Stake)
  • Proof of Activity
  • Proof of Elapsed Time
  • Proof of Burn

18 of 36

Methods

  • PoW (Proof of Work) In PoW, the mining challenge is open to all. All the miners compete each other to add the next block. A fixed reward is given to the miner who finds the solution first. In fact, the node with more computational power usually wins the race. Bitcoin uses the PoW algorithm.

19 of 36

  • PoS (Proof of Stake) It is a common alternative of PoW. Here, the validators are chosen based on the fraction of coins they own in the system. The nodes with more number of coins have more chance to be selected than the node with lesser number of coins. In PoS the reward is in the form of transaction fee, new coins are not created for paying the validators. Presently, Blackcoin, NXT and Peercoin blockchains uses the PoS algorithm. Ethereum is also planning to shift to this method by 2018.

20 of 36

Methods

  • Proof of Activity PoA is a hybrid approach and it is introduced to overcome some of the problems in PoS and PoW. In this method, the mining begins with PoW and at some point the process is switched PoS. Presently, ‘Decred’ is the only coin that is using a variation of proof of activity.

21 of 36

  • Proof of Elapsed Time In this method, the network uses a lottery functions for implementing consensus. A lottery algorithm is used for finding the leaders from a set of nodes. So the validators are selected randomly from the pool. Hyperledger Sawtooth blockchain uses PoET method.

22 of 36

  • Proof of Burn In this method, the aspiring validators increase their stake in the system by sending their coins to an irretrievable location (thus the name burn). The validators are selected randomly, but those who has more stake in the system has high probability to get selected. Over the time the earned stake decays and the nodes has to burn more currency to increase their stake. The only coin that uses proof of burn mechanism is slimcoin.

23 of 36

Blockchain Merkle Tree�

  • Merkle tree is a fundamental part of blockchain technology. It is a mathematical data structure composed of hashes of different blocks of data, and which serves as a summary of all the transactions in a block.

24 of 36

How do Merkle trees work?�

  • A Merkle tree stores all the transactions in a block by producing a digital fingerprint of the entire set of transactions. It allows the user to verify whether a transaction can be included in a block or not.
  • Merkle trees are created by repeatedly calculating hashing pairs of nodes until there is only one hash left. This hash is called the Merkle Root, or the Root Hash. The Merkle Trees are constructed in a bottom-up approach.

25 of 36

  • Every leaf node is a hash of transactional data, and the non-leaf node is a hash of its previous hashes. Merkle trees are in a binary tree, so it requires an even number of leaf nodes. If there is an odd number of transactions, the last hash will be duplicated once to create an even number of leaf nodes.

26 of 36

27 of 36

28 of 36

Merkle trees have three benefits:

  • It provides a means to maintain the integrity and validity of data.
  • It helps in saving the memory or disk space as the proofs, computationally easy and fast.
  • Their proofs and management require tiny amounts of information to be transmitted across networks.

29 of 36

Consensus

  • Consensus for blockchain is a procedure in which the peers of a Blockchain network reach agreement about the present state of the data in the network. Through this, consensus algorithms establish reliability and trust in the Blockchain network. 

30 of 36

  • In order to guarantee that all participants (‘nodes’) in a blockchain network agree on a single version of history, blockchain networks like Bitcoin and Ethereum implement what’s known as consensus mechanisms (also known as consensus protocols or consensus algorithms). These mechanisms aim to make the system fault-tolerant.

31 of 36

Consensus Mechanisms�

  • There are many different types of consensus mechanisms, depending on the blockchain and its application. While they differ in their energy usage, security, and scalability, they all share one purpose: to ensure that records are true and honest. Here’s an overview of some of the best known

32 of 36

33 of 36

Proof of Work (PoW)

  • Used by Bitcoin, Ethereum, and many other public blockchains, proof of work (PoW) was the very first consensus mechanism created.
  • In PoW, miners essentially compete against one another to solve extremely complex computational puzzles using high-powered computers.
  • As it requires large amounts of computational resources and energy in order to generate new blocks, the operating costs behind PoW are notoriously high. This acts as a barrier of entry for new miners, leading to concerns about centralisation and scalability limitations.

34 of 36

Proof of Stake (PoS)

  • As the name suggests, this popular method of consensus revolves around a process known as staking. In a proof of stake (PoS) system, miners are required to pledge a ‘stake’ of digital currency for a chance to be randomly chosen as a validator. The process is not unlike a lottery whereby the more coins you stake, the better your odds. 
  • PoS has drawn criticism for its potential to lead to centralisation. Prominent PoS platforms include Cardano (ADA), Solana (SOL), and Tezos (XTC).

Delegated Proof of Stake (DPoS)

  • A modification of the PoS consensus mechanism, delegated proof of stake (DPoS) relies upon a reputation-based voting system to achieve consensus. Users of the network ‘vote’ to select ‘witnesses’ (also known as ‘block producers’) to secure the network on their behalf

35 of 36

Proof of Activity (PoA)

  • Proof of activity (PoA)  is a hybrid of the PoW and PoS consensus mechanisms. It is used by the Decred (DCR) and Espers (ESP) blockchain projects.

36 of 36

Proof of Authority (PoA)

  • Not to be confused with proof of activity (also ‘PoA’), proof of authority (PoA) works by selecting its validators based on reputation.