Unit 1
Unit 1
Unit 1
Blockchain can be defined as the Chain of Blocks that contain some specific
Information. Thus, a Blockchain is a ledger i.e file that constantly grows and keeps the
record of all transactions permanently. This process takes place in a secure,
chronological (Chronological means every transaction happens after the previous one)
and immutable way. Each time when a block is completed in storing information, a
new block is generated.
The blockchain technology was described in 1991 by the research scientist Stuart
Haber and W. Scott Stornetta. They wanted to introduce a computationally
practical solution for time-stamping digital documents so that they could not be
backdated or tampered. They develop a system using the concept
of cryptographically secured chain of blocks to store the time-stamped documents.
The evolution of blockchains has been steady and promising. The words block and
chain were used separately in Satoshi Nakamoto's original paper but were eventually
popularized as a single word, the Blockchain, by 2016. In recent time, the file size of
cryptocurrency blockchain containing records of all transactions occurred on the
network has grown from 20 GB to 100 GB.
These networks do not involve a large number of nodes, usually less than
12. All the computers in the network store their own data but this data is
accessible by the group.
Unlike client-server networks, P2P uses resources and also provides them.
This results in additional resources if the number of nodes increases. It
requires specialized software. It allows resource sharing among the
network.
Since the nodes act as clients and servers, there is a constant threat of
attack.
Almost all OS today support P2P networks.
In the P2P network architecture, the computers connect with each other in a
workgroup to share files, and access to internet and printers.
Each computer in the network has the same set of responsibilities and
capabilities.
Each device in the network serves as both a client and server.
The architecture is useful in residential areas, small offices, or small
companies where each computer act as an independent workstation and
stores the data on its hard drive.
Each computer in the network has the ability to share data with other
computers in the network.
The architecture is usually composed of workgroups of 12 or more
computers.
How Does P2P Network Work?
Firstly secure your network via privacy solutions. Below are some of the measures to
keep the P2P network secure:
Share and download legal files: Double-check the files that are being
downloaded before sharing them with other employees. It is very important
to make sure that only legal files are downloaded.
Design strategy for sharing: Design a strategy that suits the underlying
architecture in order to manage applications and underlying data.
Keep security practices up-to-date: Keep a check on the cyber security
threats which might prevail in the network. Invest in good quality software
that can sustain attacks and prevent the network from being exploited.
Update your software regularly.
Scan all downloads: This is used to constantly check and scan all the files
for viruses before downloading them. This helps to ensure that safe files are
being downloaded and in case, any file with potential threat is detected then
report to the IT Staff.
Proper shutdown of P2P networking after use: It is very important to
correctly shut down the software to avoid unnecessary access to third
persons to the files in the network. Even if the windows are closed after file
sharing but the software is still active then the unauthorized user can still
gain access to the network which can be a major security breach in the
network.
Double spending can never arise physically. It can happen in online transactions. This
mostly occurs when there is no authority to verify the transaction. It can also happen if
the user’s wallet is not secured. Suppose a user wants to avail of services from
Merchant ‘A’ and Merchant ‘B’.
The user first made a digital transaction with Merchant ‘A’.
The copy of the cryptocurrency is stored on the user’s computer.
So the user uses the same cryptocurrency to pay Merchant ‘B’
Now both the merchants have the illusion that the money has been credited
since the transactions were not confirmed by the miners.
This is the case of double spending.
Example: Suppose a user has 1 BTC. He/She wants to avail of services from
merchant A and merchant B. The user creates multiple copies of the same BTC and
stores it. The user first sends the original BTC to Merchant A and gets the service.
Simultaneously, the user sends the copied version of 1 BTC to Merchant B. Since the
second transaction was not confirmed by other miners, the merchant accepts the
bitcoin and sends the service. But the cryptocurrency that was sent is invalid. This is
the case of Double Spending.
Types Of Double Spending Attacks
Bitcoin is one of the most popular blockchains. To combat Double spending it uses
some security measures. There are two types of examples of double spending in BTC.
1. The first case is making duplicates of the same bitcoin and sending it to
multiple users.
2. The second case is performing the transaction and reversing the already sent
transaction after getting the service.
To tackle these double-spending issues, some security measures are taken. They are:
Validation: Validation of transactions by a maximum number of nodes in
the network. Once a block is created, it is added to a list of pending
transactions. Users send validation for the block. If the verifications are
done then only the block is added to the blockchain.
Timestamp: The confirmed transactions are timestamped, therefore they
are irreversible. If a transaction is involved with a bitcoin it is verified and
done. But in the future, if other transactions are made with the same bitcoin,
the transactions will be canceled.
Block Confirmations: Merchants get block confirmations so that they are
assured that there was no case of double spending. In bitcoin, a minimum of
6 confirmations are done.
Saving copies: A copy of each transaction is kept at each node so in case of
network failure the whole network does not go down.
These security features have reduced double spending to a large extent. Let us discuss
a detailed example of how bitcoin handles double-spending.
A user wants to spend 2 BTC. He/She can create multiple copies of the
same cryptocurrency.
The user can send the same cryptocurrency to two different addresses say
‘Bob’ and ‘Alice’.
Both of these transactions are sent to the pool of unconfirmed transactions.
The first transaction T1 would be approved via the confirmation
mechanism.
The confirmation mechanism states that a minimum of six confirmations by
miners should be done for block validation. The block is added to the
network.
However, the second transaction T2 didn’t get sufficient confirmation so it
would be recognized as invalid by the confirmation process. The block with
the highest number of confirmations is accepted and the other one is
rejected. So transaction T1 is valid, and Alice received the bitcoin.
Solutions To Prevent Double Spending
Double spending has been minimized to a large extent as companies are using many
security features. But we as users also have some responsibility so that such attacks
don’t happen.
Any user should wait for a minimum of six confirmations of the transaction
before performing another transaction. In the blockchain, more the
confirmations by different users, lesser will be double spending attacks.
Users should keep their hardware resources safe so that hackers do not
misuse them for their own purposes. Often hackers target the hardware part
because the hardware is costly. If they somehow steal the hardware, they
can roll back any transaction or alter information.
Users should delete spam mails and avoid phishing to avoid unnecessary
malware attacks Phishing is a very common attack by hackers as hackers
target login credentials.
Software should be updated regularly with the latest antivirus installed. If
the software is not up to date then the bugs present can cause major
damage.
With the increasing dependency on the blockchain, double spending attacks have also
become a major problem. Many companies have adopted security features.
Features like confirmation of the transaction by the nodes have been
adopted. A minimum of six confirmations is required to approve the
transaction.
The blocks once created are immutable. They are made irreversible so that
no transaction is reverted back.
The network’s distributed ledger of transactions autonomously records each
transaction. Each node has a copy of all transactions that are being done in
the network.
Verification of each transaction’s authenticity is done by Blockchain
protocols to prevent double-spending. The concept of hashing is adopted.
Here each block has a unique hash.
Features of Blockchain
A blockchain is a chain of blocks that contains information. Most people think that
Blockchain is Bitcoin and vice-versa. But it’s not the case. In fact, Bitcoin is a digital
currency or cryptocurrency that works on Blockchain Technology. Blockchain was
invented by Satoshi Nakamoto. As the name suggests, Each block consists of a
number of transactions, and each transaction is recorded in the form of a Hash. Hash
is a unique address assigned to each block during its creation and any further
modification in the block will lead to a change in its hash.
Features of Blockchain
Let’s have a look at the primary features of the blockchain technology:
1. Immutable
2. Distributed
All network participants have a copy of the ledger for complete transparency. A public
ledger will provide complete information about all the participants on the network and
transactions. The distributed computational power across the computers ensures a
better outcome.
Distributed ledger is one of the important features of blockchains due to many
reasons like:
In distributed ledger tracking what’s happening in the ledger is easy as
changes propagate really fast in a distributed ledger.
Every node on the blockchain network must maintain the ledger and
participate in the validation.
Any change in the ledger will be updated in seconds or minutes and due to
no involvement of intermediaries in the blockchain, the validation for the
change will be done quickly.
If a user wants to add a new block then other participating nodes have to
verify the transaction. For a new block to be added to the blockchain
network it must be approved by a majority of the nodes on the network.
In a blockchain network, no node will get any sort of special treatment or
favors from the network. Everyone will have to follow the standard
procedure to add a new block to the network.
3. Decentralized
Blockchain technology is a decentralized system, which means that there is no central
authority controlling the network. Instead, the network is made up of a large number
of nodes that work together to verify and validate transactions. Each and every node in
the blockchain network will have the same copy of the ledger.
Decentralization property offers many advantages in the blockchain network:
As a blockchain network does not depend on human calculations it is fully
organized and fault-tolerant.
The blockchain network is less prone to failure due to the decentralized
nature of the network. Attacking the system is more expensive for the
hackers hence it is less likely to fail.
There is no third-party involved hence no added risk in the system.
The decentralized nature of blockchain facilitates creating a transparent
profile for every participant on the network. Thus, every change is
traceable, and more concreate.
Users now have control over their properties and they don’t have to rely on
third-party to maintain and manage their assets.
4. Secure
All the records in the blockchain are individually encrypted. Using encryption adds
another layer of security to the entire process on the blockchain network. Since there
is no central authority, it does not mean that one can simply add, update or delete data
on the network.
Every information on the blockchain is hashed cryptographically which means that
every piece of data has a unique identity on the network. All the blocks contain a
unique hash of their own and the hash of the previous block. Due to this property, the
blocks are cryptographically linked with each other. Any attempt to modify the data
means to change all the hash IDs which is quite impossible.
5. Consensus
Every blockchain has a consensus to help the network to make quick and unbiased
decisions. Consensus is a decision-making algorithm for the group of nodes active on
the network to reach an agreement quickly and faster and for the smooth functioning
of the system. Nodes might not trust each other but they can trust the algorithm that
runs at the core of the network to make decisions. There are many consensus
algorithms available each with its pros and cons. Every blockchain must have a
consensus algorithm otherwise it will lose its value.
6. Unanimous
All the network participants agree to the validity of the records before they can be
added to the network. When a node wants to add a block to the network then it must
get majority voting otherwise the block cannot be added to the network. A node
cannot simply add, update, or delete information from the network. Every record is
updated simultaneously and the updations propagate quickly in the network. So it is
not possible to make any change without consent from the majority of nodes in the
network.
7. Faster Settlement
Traditional banking systems are prone to many reasons for fallout like taking days to
process a transaction after finalizing all settlements, which can be corrupted easily. On
the other hand, blockchain offers a faster settlement compared to traditional banking
systems. This blockchain feature helps make life easier.
Blockchain technology is increasing and improving day by day and has a really bright
future in the upcoming years. The transparency, trust, and temper proof characteristics
have led to many applications of it like bitcoin, Ethereum, etc. It is a pillar in making
the business and governmental procedures more secure, efficient, and effective.
More Features of Blockchain
Types of Blockchain
The basic application of the blockchain is to perform transactions in a secure
network. That’s why people use blockchain and ledger technology in different
scenarios. One can set up multichain to prevent unauthorized access to sensitive data.
It is not available to the public, and can only be available to authorized entities in the
organization. It depends on the organization which type it requires to choose for their
work.
By using blockchain we can track orders and payments from end to end.
Advantage using blockchain :
1. It provides greater trust among users.
2. It provides greater security among data.
3. Reduce the cost of production.
4. Improve Speed.
5. Invocation and tokenization.
6. It provides immutable records.
7. Smart contracts
Disadvantages using blockchain :
1. Data modification is not possible.
2. It requires large storage for a large database.
3. The owner cannot access the private key again if they forget or lose it.
Real life application of blockchain :
Permissionless Blockchain
Permissioned Blockchain
These are the closed network only a set of groups are allowed to validate transactions
or data in a given blockchain network. These are used in the network where high
privacy and security are required.
Characteristics:
A major feature is a transparency based on the objective of the organization.
Another feature is the lack of anatomy as only a limited number of users are
allowed.
It does not have a central authority.
Developed by private authority.
Advantages:
This blockchain tends to be faster as it has some nodes for validations.
They can offer customizability.
Strong Privacy as permission is needed for accessing transaction
information.
As few nodes are involved performance and scalability are increased.
Disadvantages:
Not truly decentralized as it requires permission
Risk of corruption as only a few participants are involved.
Anytime owner and operator can change the rules as per their need.
Types of Blockchain
1. Public Blockchain
These blockchains are completely open to following the idea of decentralization. They
don’t have any restrictions, anyone having a computer and internet can participate in
the network.
As the name is public this blockchain is open to the public, which means it
is not owned by anyone.
Anyone having internet and a computer with good hardware can participate
in this public blockchain.
All the computer in the network hold the copy of other nodes or block
present in the network
In this public blockchain, we can also perform verification of transactions
or records
Advantages:
Trustable: There are algorithms to detect no fraud. Participants need not
worry about the other nodes in the network
Secure: This blockchain is large in size as it is open to the public. In a large
size, there is greater distribution of records
Anonymous Nature: It is a secure platform to make your transaction
properly at the same time, you are not required to reveal your name and
identity in order to participate.
Decentralized: There is no single platform that maintains the network,
instead every user has a copy of the ledger.
Disadvantages:
Processing: The rate of the transaction process is very slow, due to its large
size. Verification of each node is a very time-consuming process.
Energy Consumption: Proof of work is high energy-consuming. It requires
good computer hardware to participate in the network
Acceptance: No central authority is there so governments are facing the
issue to implement the technology faster.
Use Cases: Public Blockchain is secured with proof of work or proof of stake they
can be used to displace traditional financial systems. The more advanced side of this
blockchain is the smart contract that enabled this blockchain to support
decentralization. Examples of public blockchain are Bitcoin, Ethereum.
2. Private Blockchain
These blockchains are not as decentralized as the public blockchain only selected
nodes can participate in the process, making it more secure than the others.
These are not as open as a public blockchain.
They are open to some authorized users only.
These blockchains are operated in a closed network.
In this few people are allowed to participate in a network within a
company/organization.
Advantages:
Speed: The rate of the transaction is high, due to its small size. Verification
of each node is less time-consuming.
Scalability: We can modify the scalability. The size of the network can be
decided manually.
Privacy: It has increased the level of privacy for confidentiality reasons as
the businesses required.
Balanced: It is more balanced as only some user has the access to the
transaction which improves the performance of the network.
Disadvantages:
Security- The number of nodes in this type is limited so chances of
manipulation are there. These blockchains are more vulnerable.
Centralized- Trust building is one of the main disadvantages due to its
central nature. Organizations can use this for malpractices.
Count- Since there are few nodes if nodes go offline the entire system of
blockchain can be endangered.
Use Cases: With proper security and maintenance, this blockchain is a great asset to
secure information without exposing it to the public eye. Therefore companies use
them for internal auditing, voting, and asset management. An example of private
blockchains is Hyperledger, Corda.
3. Hybrid Blockchain
It is the mixed content of the private and public blockchain, where some part is
controlled by some organization and other makes are made visible as a public
blockchain.
It is a combination of both public and private blockchain.
Permission-based and permissionless systems are used.
User access information via smart contracts
Even a primary entity owns a hybrid blockchain it cannot alter the
transaction
Advantages:
Ecosystem: Most advantageous thing about this blockchain is its hybrid
nature. It cannot be hacked as 51% of users don’t have access to the
network
Cost: Transactions are cheap as only a few nodes verify the transaction. All
the nodes don’t carry the verification hence less computational cost.
Architecture: It is highly customizable and still maintains integrity,
security, and transparency.
Operations: It can choose the participants in the blockchain and decide
which transaction can be made public.
Disadvantages:
Efficiency: Not everyone is in the position to implement a hybrid
Blockchain. The organization also faces some difficulty in terms of
efficiency in maintenance.
Transparency: There is a possibility that someone can hide information
from the user. If someone wants to get access through a hybrid blockchain it
depends on the organization whether they will give or not.
Ecosystem: Due to its closed ecosystem this blockchain lacks the
incentives for network participation.
Use Case: It provides a greater solution to the health care industry, government, real
estate, and financial companies. It provides a remedy where data is to be accessed
publicly but needs to be shielded privately. Examples of Hybrid Blockchain are
Ripple network and XRP token.
4. Consortium Blockchain
It is a creative approach that solves the needs of the organization. This blockchain
validates the transaction and also initiates or receives transactions.
Also known as Federated Blockchain.
This is an innovative method to solve the organization’s needs.
Some part is public and some part is private.
In this type, more than one organization manages the blockchain.
Advantages:
Speed: A limited number of users make verification fast. The high speed
makes this more usable for organizations.
Authority: Multiple organizations can take part and make it decentralized
at every level. Decentralized authority, makes it more secure.
Privacy: The information of the checked blocks is unknown to the public
view. but any member belonging to the blockchain can access it.
Flexible: There is much divergence in the flexibility of the blockchain.
Since it is not a very large decision can be taken faster.
Disadvantages:
Approval: All the members approve the protocol making it less flexible.
Since one or more organizations are involved there can be differences in the
vision of interest.
Transparency: It can be hacked if the organization becomes corrupt.
Organizations may hide information from the users.
Vulnerability: If few nodes are getting compromised there is a greater
chance of vulnerability in this blockchain
Use Cases: It has high potential in businesses, banks, and other payment processors.
Food tracking of the organizations frequently collaborates with their sectors making it
a federated solution ideal for their use. Examples of consortium Blockchain are
Tendermint and Multichain.