0% found this document useful (0 votes)
4 views

module 1 _- Introduction to Blockchain

Module 1 provides an introduction to blockchain technology, defining it as a secure, immutable digital ledger that facilitates direct transactions without intermediaries. It outlines the components of blockchain, including nodes, ledgers, wallets, nonces, and hashes, while emphasizing its features such as decentralization, security, and consensus mechanisms. The module also discusses various consensus algorithms like Proof of Work and Proof of Stake, which are essential for maintaining the integrity and reliability of the blockchain network.

Uploaded by

mabhijeet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

module 1 _- Introduction to Blockchain

Module 1 provides an introduction to blockchain technology, defining it as a secure, immutable digital ledger that facilitates direct transactions without intermediaries. It outlines the components of blockchain, including nodes, ledgers, wallets, nonces, and hashes, while emphasizing its features such as decentralization, security, and consensus mechanisms. The module also discusses various consensus algorithms like Proof of Work and Proof of Stake, which are essential for maintaining the integrity and reliability of the blockchain network.

Uploaded by

mabhijeet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Module 1 :- Introduction to Blockchain

Blockchain:- The term "blockchain" refers to a digital transaction ledger maintained by a network of
computers in a way that makes it difficult to tamper with or modify the data. By eliminating the
middleman or other third party, the technology provides a safe way for people to transact with one
another.

Figure :-Blockchain

A blockchain is a constantly growing ledger which keeps a permanent record of all the transactions
that have taken place in a secure, chronological, and immutable way.

Let's breakdown the definition,

○ Ledger: It is a file that is constantly growing.

○ Permanent: It means once the transaction goes inside a blockchain, you can put up it
permanently in the ledger.
○ Secure: Blockchain places information in a secure way. It uses very advanced cryptography to
make sure that the information is locked inside the blockchain.

○ Chronological: Chronological means every transaction happens after the previous one.

○ Immutable: It means as you build all the transactions onto the blockchain, this ledger can never
be changed.

A blockchain is a chain of blocks which contain information. Each block records all of the recent
transactions, and once completed goes into the blockchain as a permanent database. Each time a
block gets completed, a new block is generated.

Need of Blockchain

Blockchain technology has become popular because of the following.

○ Time reduction: In the financial industry, blockchain can allow the quicker settlement of trades.
It does not take a lengthy process for verification, settlement, and clearance. It is because of a single
version of agreed-upon data available between all stakeholders.

○ Unchangeable transactions: Blockchain register transactions in a chronological order which


certifies the inalterability of all operations, meaning when a new block is added to the chain of
ledgers, it cannot be removed or modified.
○ Reliability: Blockchain certifies and verifies the identities of each interested party. This removes
double records, reducing rates and accelerates transactions.

○ Security: Blockchain uses very advanced cryptography to make sure that the information is
locked inside the blockchain. It uses Distributed Ledger Technology where each party holds a copy
of the original chain, so the system remains operative, even if the large number of other nodes fall.

○ Collaboration: It allows each party to transact directly with each other without requiring a third-
party intermediary.

○ Decentralized: It is decentralized because there is no central authority supervising anything.


There are standard rules on how every node exchanges the blockchain information. This method
ensures that all transactions are validated, and all valid transactions are added one by one.

Components of Blockchain
The components of a Blockchain network –

1. Node

2. Ledger

3. Wallet

4. Nonce

5. Hash

1. Node –
It is of two types – Full Node and Partial Node.

● Full Node –
It maintains a full copy of all the transactions. It has the capacity to validate, accept and reject the
transactions.

● Partial Node –
It is also called a Lightweight Node because it doesn’t maintain the whole copy of the blockchain
ledger. It maintains only the hash value of the transaction. The whole transaction is accessed using
this hash value only. These nodes have low storage and low computational power.

2. Ledger –
It is a digital database of information. Here, we have used the term ‘digital’ because the currency
exchanged between different nodes is digital i.e cryptocurrency. There are three types of ledger.
They are –

1. Public Ledger –
It is open and transparent to all. Anyone in the blockchain network can read or write something.

2. Distributed Ledger –
In this ledger, all nodes have a local copy of the database. Here, a group of nodes collectively
execute the job i.e verify transactions, add blocks in the blockchain.

3. Decentralized Ledger –
In this ledger, no one node or group of nodes has a central control. Every node participates in the
execution of the job.

3. Wallet –
It is a digital wallet that allows user to store their cryptocurrency. Every node in the blockchain
network has a Wallet. Privacy of a wallet in a blockchain network is maintained using public and
private key pairs. In a wallet, there is no need for currency conversion as the currency in the wallet is
universally acceptable. Cryptocurrency wallets are mainly of two types –

1. Hot Wallet –
These wallets are used for online day-to-day transactions connected to the internet. Hackers can
attack this wallet as it is connected to the internet. Hot wallets are further classified into two types –
a. Online/ Web wallets –
These wallets run on the cloud platform. Examples – MyEther Wallet, MetaMask Wallet.
b. Software wallets –
It consists of desktop wallets and mobile wallets. Desktop wallets can be downloaded on a desktop
and the user has full control of the wallet. An example of a desktop wallet is Electrum.
c. Mobile wallets –
They are designed to operate on smartphone devices. Example – mycelium.
2. Cold Wallet –
These wallets are not connected to the internet. It is very safe and hackers cannot attack it. These
wallets are purchased by the user. Example – Paper wallet, hardware wallet.
a. Paper wallet –
They are offline wallets in which a piece of paper is used that contains the crypto address. The
private key is printed in QR code format. QR code is scanned for cryptocurrency transactions.
b. Hardware wallet –
It is a physical electronic device that uses a random number generator that is associated with the
wallet.

The focus of wallets is on these three things –

1. Privacy

2. Transactions should be secure

3. Easy to use

Privacy of a wallet is maintained using public and private key pairs. Transactions are made secure as
a private key is used both to send funds and to open the encrypted message.
4. Nonce –
A nonce is an abbreviation for “number only used once,” which is a number added to a hashed or
encrypted block in a blockchain. It is the 32-bit number generated randomly only one time that
assists to create a new block or validate a transaction. It is used to make the transaction more secure.
It is hard to select the number which can be used as the nonce. It requires a vital amount of trial-and-
error. First, a miner guesses a nonce. Then, it appends the guessed nonce to the hash of the current
header. After that, it rehashes the value and compares this to the target hash. Now it checks whether
the resulting hash value meets the requirements or not. If all the conditions are met, it means that the
miner has created an answer and is granted the block.
5. Hash –
The data is mapped to a fixed size using hashing. It plays a very important role in cryptography. In a
blockchain network hash value of one transaction is the input of another transaction. Properties of
the hash function are as follows –

● Collision resistant

● Hiding
● Puzzle friendliness

Features of Blockchain

Immutable

The blockchain is considered immutable as it can't be altered or modified. It is therefore said to be a


permanent network.

○ Blockchain technology works by utilizing a network of nodes; every network node has a copy of
the digital ledger, and it assesses a transaction prior to adding it to the network.

○ If the majority of the nodes accept that it is authentic, the transaction is added. It implies that no
transaction blocks can be added to the ledger without obtaining the approval of the majority of
nodes.

○ Any records/data that have been verified can't be changed or reversed; this indicates that they
cannot be edited, changed, or deleted by any user on the network.

Decentralized
The blockchain network is decentralized, indicating that not only one entity will be in charge of
making all of the choices. Instead, a group of nodes creates and maintains the network, and each
node has an identical copy of the ledger. The blockchain network's decentralization feature offers
several benefits:

○ A blockchain network is completely structured and fault-tolerant because it doesn't rely on


human computations.

○ It makes it less vulnerable to failure due to its decentralized nature.

○ There is no involvement/interference of a third party or middlemen; therefore, there is no


additional risk associated.

○ It makes it simpler to create a transparent profile for every network user; as a result, each change
is traceable and more concrete.

○ Users can have control over their properties and do not need to depend on third-party to maintain
and administer them.

Secure

Each record on the blockchain is individually encrypted, further enhancing the security of the
network's process. As there is no centralized authority, it isn't possible to simply add, modify, or
remove data from the network.

All the information on the chain is hashed using cryptography, providing each one a unique identity
on the network. Any attempt to modify the information would necessitate modifying every hash ID,
which is simply not possible. Each block contains its own special hash and the previous block's hash.
The blocks are "cryptographically" connected together due to this feature.

Consensus

Consensus is a method of making decisions that allow a group of network nodes to reach an
agreement swiftly and effectively, ensuring the system's smooth functioning. Every blockchain has a
consensus system that enables the network to make decisions quickly and unbiasedly. Even though
nodes may not have much trust in one another, they might have trust in the network's central
algorithm. A consensus algorithm is required for any blockchain, or it will lose value. There are
numerous available consensus algorithms, each having advantages and disadvantages.

Before records are approved into the network, all the participants must concur that they are
legitimate. A node should receive the consent of the majority in order to add a block to the network,
or else, the block can't be added. It is not possible for a node to simply insert, alter, or erase data
from the network. Every record is updated at once, spreading quickly across the network. Thus, no
modifications can be performed until a majority of the network's nodes consent to them.
Blockchain and Block Header
Blockchain is a database, or broadly distributed database, used mainly for concurrent transactions
and one of the most popular implementations of blockchain is Bitcoin. Blockchain has several
blocks, also called nodes, and all the blocks are managed with the help of the block header.

Constituents of Block Header are :

1. Timestamp
2. Version
3. Merkle Root
4. Difficulty Target
5. Nonce
6. Previous Hash

Size Field Description

A version number to track software/protocol


4 bytes Version
upgrades.

32 A reference to the hash of the previous (parent)


Previous Block Hash
bytes block in the chain.

32 A hash of the root of the merkle tree of this


Merkle Root
bytes block’s transaction.

4 byttes Timestamp The approximate creation time of the block.

The proof of work algorithm difficulty target for


4 bytes Difficulty Target
this block
4 bytes Nounce A counter used for the proof of work algorithm.

Timestamp :

Timestamp in the blockchain is used as proof that the particular block is used at what instance of a
time, also this timestamp is used as a parameter to verify the authenticity of any block.

Version :

It states the version that the particular block is using, there are three types of Blockchain version.

1. Blockchain Version 1.0(cryptocurrency)-It used a public ledger to store the data, for example,
Bitcoin.
2. Blockchain Version 2.0(smart Contract)- It is called smart contracts which is self-executing
programs, for example, Ethereum.
3. Blockchain Version 3.0(DAPPS)- It is used to create a decentralized structure, for example, tor
Browser.
4. Blockchain Version 4.0(Blockchain for Industry)- It is used to create a scalable, affordable
blockchain network such that more people could use it.

Merkle Root :

A Merkle root uses mathematical formulas to check if the data is not corrupted, hacked, or
manipulated. For example, Suppose one block has 10 transactions, then to identify that block we
need 10 transactions to combine and form one Hash Value, so it uses the concept of the binary tree
to create the hash of the block and that value is called the Merkle Root(Please refer article
Introduction to Merkle tree).

Difficulty Target :

It specifies the complexity and the computation power required to mine the network, if we are
having a high difficulty target then it implies that we need more a computationally expensive
machine to mine it. For example, in order to increase the difficulty target algorithms such as SHA-2,
SHA-3. RIPEMD, MD5,BLAKE2 is used.
Nonce :

It is abbreviated as ‘number only used once’ and it is a number which blockchain miners are finding
and on average, it takes almost 10 times to find out the correct nonce. A nonce is a 32-bit number,
having the maximum value as 2^(32) total possible value, so the job of the bitcoins miners is to find
out the correct integer value which is a random integer between 0 and 2^(32), so it becomes
computationally expensive.

Previous Hash :

As Blockchain is a collection of several interconnected nodes also called a block, so previous hash
stores the hashed value of the previous node’s address, First block in the blockchain is called the
Genesis Block and has no previous block hash value.

Consensus Algorithms in Blockchain


Prerequisites: Introduction to Blockchain technology | Set 1, Set 2 We know that Blockchain is a
distributed decentralized network that provides immutability, privacy, security, and transparency.
There is no central authority present to validate and verify the transactions, yet every transaction in
the Blockchain is considered to be completely secured and verified. This is possible only because of
the presence of the consensus protocol which is a core part of any Blockchain network. A
consensus algorithm is a procedure through which all the peers of the Blockchain network reach a
common agreement about the present state of the distributed ledger. In this way, consensus
algorithms achieve reliability in the Blockchain network and establish trust between unknown peers
in a distributed computing environment. Essentially, the consensus protocol makes sure that every
new block that is added to the Blockchain is the one and only version of the truth that is agreed upon
by all the nodes in the Blockchain. The Blockchain consensus protocol consists of some specific
objectives such as coming to an agreement, collaboration, cooperation, equal rights to every node,
and mandatory participation of each node in the consensus process. Thus, a consensus algorithm
aims at finding a common agreement that is a win for the entire network. Now, we will discuss
various consensus algorithms and how they work.

1. Proof of Work (PoW): This consensus algorithm is used to select a miner for the next block
generation. Bitcoin uses this PoW consensus algorithm. The central idea behind this algorithm is to
solve a complex mathematical puzzle and easily give out a solution. This mathematical puzzle
requires a lot of computational power and thus, the node who solves the puzzle as soon as possible
gets to mine the next block. For more details on PoW, please read Proof of Work (PoW) Consensus
2. Practical Byzantine Fault Tolerance (PBFT): Please refer to the existing article on practical
Byzantine Fault Tolerance(pBFT).
3. Proof of Stake (PoS): This is the most common alternative to PoW. Ethereum has shifted from
PoW to PoS consensus. In this type of consensus algorithm, instead of investing in expensive
hardware to solve a complex puzzle, validators invest in the coins of the system by locking up some
of their coins as stakes. After that, all the validators will start validating the blocks. Validators will
validate blocks by placing a bet on them if they discover a block that they think can be added to the
chain. Based on the actual blocks added in the Blockchain, all the validators get a reward
proportionate to their bets, and their stake increase accordingly. In the end, a validator is chosen to
generate a new block based on its economic stake in the network. Thus, PoS encourages validators
through an incentive mechanism to reach to an agreement.
4. Delegated Proof Of Stake (DPoS): This is another type of Proof of Stake consensus algorithm.
This type of consensus mechanism depends on the basis of the delegation of votes. The users
delegate their votes to other users. Whichever user then mines the block will distribute the rewards
to the users who delegated to that particular vote. Refer to the article Delegated Proof of Stake for
more.
5. Proof of Burn (PoB): With PoB, instead of investing in expensive hardware equipment,
validators ‘burn’ coins by sending them to an address from where they are irretrievable. By
committing the coins to an unreachable address, validators earn the privilege to mine on the system
based on a random selection process. Thus, burning coins here means that validators have a long-
term commitment in exchange for their short-term loss. Depending on how the PoB is implemented,
miners may burn the native currency of the Blockchain application or the currency of an alternative
chain, such as bitcoin. The more coins they burn, the better their chances of being selected to mine
the next block. While PoB is an interesting alternative to PoW, the protocol still wastes resources
needlessly. And it is also questioned that mining power simply goes to those who are willing to burn
more money.
6. Proof of Capacity: In the Proof of Capacity consensus, validators are supposed to invest their
hard drive space instead of investing in expensive hardware or burning coins. The more hard drive
space validators have, the better their chances of getting selected for mining the next block and
earning the block reward.
7. Proof of Elapsed Time: PoET is one of the fairest consensus algorithms which chooses the next
block using fair means only. It is widely used in permissioned Blockchain networks. In this
algorithm, every validator on the network gets a fair chance to create their own block. All the nodes
do so by waiting for a random amount of time, adding proof of their wait in the block. The created
blocks are broadcasted to the network for others’ consideration. The winner is the validator which
has the least timer value in the proof part. The block from the winning validator node gets appended
to the Blockchain. There are additional checks in the algorithm to stop nodes from always winning
the election, and stop nodes from generating the lowest timer value.

Advantages of Blockchain Technology:


This section discusses the advantages of blockchain technology.

1. Open: One of the major advantages of blockchain technology is that it is accessible to all means
anyone can become a participant in the contribution to blockchain technology, one does not require
any permission from anybody to join the distributed network.

2. Verifiable: Blockchain technology is used to store information in a decentralized manner so


everyone can verify the correctness of the information by using zero-knowledge proof through
which one party proves the correctness of data to another party without revealing anything about
data.

3. Permanent: Records or information which is stored using blockchain technology is permanent


means one needs not worry about losing the data because duplicate copies are stored at each local
node as it is a decentralized network that has a number of trustworthy nodes.
4. Free from Censorship: Blockchain technology is considered free from censorship as it does not
have control of any single party rather it has the concept of trustworthy nodes for validation and
consensus protocols that approve transactions by using smart contracts.

5. Tighter Security: Blockchain uses hashing techniques to store each transaction on a block that
is connected to each other so it has tighter security. It uses SHA 256 hashing technique for storing
transactions.

6. Immutability: Data cannot be tampered with in blockchain technology due to its decentralized
structure so any change will be reflected in all the nodes so one cannot do fraud here, hence it can be
claimed that transactions are tamper-proof.

7. Transparency: It makes histories of transactions transparent everywhere all the nodes in the
network have a copy of the transaction in the network. If any changes occur in the transaction it is
visible to the other nodes.

8. Efficiency: Blockchain removes any third-party intervention between transactions and removes
the mistake making the system efficient and faster. Settlement is made easier and smooth.

9. Cost Reduction: As blockchain needs no third man it reduces the cost for the businesses and
gives trust to the other partner.

Disadvantages of Blockchain Technology:


This section discusses the disadvantages of blockchain technology.

1. Scalability: It is one of the biggest drawbacks of blockchain technology as it cannot be scaled


due to the fixed size of the block for storing information. The block size is 1 MB due to which it can
hold only a couple of transactions on a single block.

2. Immaturity: Blockchain is only a couple-year-old technology so people do not have much


confidence in it, they are not ready to invest in it yet several applications of blockchain are doing
great in different industries but still it needs to win the confidence of even more people to be
recognized for its complete utilization.
3. Energy Consuming: For verifying any transaction a lot of energy is used so it becomes a
problem according to the survey it is considered that 0.3 percent of the world’s electricity had been
used by 2018 in the verification of transactions done using blockchain technology.

4. Time-Consuming: To add the next block in the chain miners need to compute nonce values
many times so this is a time-consuming process and needs to be speed up to be used for industrial
purposes.

5. Legal Formalities: In some countries, the use of blockchain technology applications is banned
like cryptocurrency due to some environmental issues they are not promoting to use blockchain
technology in the commercial sector.

6. Storage: Blockchain databases are stored on all the nodes of the network creates an issue with
the storage, increasing number of transactions will require more storage.

7. Regulations: Blockchain faces challenges with some financial institution. Other aspects of
technology will be required in order to adopt blockchain in wider aspect.

Advantages of Blockchain Technology:


Scalability:

● Transaction Speed: Current blockchain networks, like Bitcoin and Ethereum, have limited
transaction processing capabilities. For instance, Bitcoin processes about 7 transactions per second
(TPS), while Ethereum handles around 30 TPS. This is far below traditional payment systems like
Visa, which processes thousands of TPS.
● Network Congestion: High demand can lead to network congestion, resulting in slower
transaction times and higher fees.

Energy Consumption:

● Proof of Work (PoW): Many blockchains, especially Bitcoin, use PoW for consensus, which
requires significant computational power and energy. This leads to environmental concerns due to
the high energy consumption of mining activities.

Security Concerns:

● 51% Attacks: If a single entity or group controls more than 50% of the network's mining power,
they can potentially manipulate the blockchain, reversing transactions and double-spending.
● Smart Contract Vulnerabilities: Bugs in smart contracts can lead to significant financial losses,
as seen in the DAO hack on the Ethereum network.

Regulatory and Legal Issues:


● Uncertain Regulations: The regulatory landscape for blockchain and cryptocurrencies is still
evolving. Different countries have different approaches, ranging from supportive to outright bans.
● Legal Recognition: Blockchain-based records and contracts may not always be recognized as
legally binding, creating uncertainty for businesses.

Interoperability:

● Multiple Blockchains: There are numerous blockchain networks, each with its own protocols
and standards. Ensuring seamless communication and interaction between these networks is
challenging.

Privacy Issues:

● Public Ledgers: While transactions on public blockchains are pseudonymous, they are not
entirely private. Sophisticated analysis can sometimes link transactions to individuals.
● Data Protection: Compliance with data protection regulations, like GDPR, can be difficult since
data recorded on a blockchain is immutable.

User Experience:

● Complexity: The technology can be complex and difficult for the average user to understand and
use effectively.
● Usability: Wallet management, private key security, and transaction processes can be
cumbersome for users.

Adoption and Integration:

● Business Integration: Integrating blockchain with existing business processes and systems can
be challenging and costly.
● Network Effects: The value of a blockchain network increases with the number of users.
Achieving critical mass for widespread adoption is difficult.

Cost:

● Development and Maintenance: Developing and maintaining a blockchain network can be


expensive. This includes costs for developers, hardware, and ongoing maintenance.

You might also like