Unit 1
Unit 1
What is Bitcoin? 6
Need of Blockchain
o
o Further, in 2008, Satoshi Nakamoto conceptualized the theory
of distributed blockchains. He improves the design in a unique way to
add blocks to the initial chain without requiring them to be signed by
trusted parties. The modified trees would contain a secure history of data
exchanges. It utilizes a peer-to-peer network for timestamping and
verifying each exchange. It could be managed autonomously without
requiring a central authority. These improvements were so beneficial that
makes blockchains as the backbone of cryptocurrencies. Today, the design
serves as the public ledger for all transactions in the cryptocurrency space.
o 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.
What is Bitcoin?
When you send an email to another person, you just type an email address
and can communicate directly to that person. It is the same thing when you
send an instant message. This type of communication between two parties is
commonly known as Peer-to-Peer communication.
Whenever you want to transfer money to someone over the internet, you
need to use a service of third-party such as banks, a credit card, a PayPal, or
some other type of money transfer services. The reason for using third-party
is to ensure that you are transferring that money. In other words, you need to
be able to verify that both parties have done what they need to do in real
exchange.
For example, Suppose you click on a photo that you want to send it to
another person, so you can simply attach that photo to an email, type the
receiver email address and send it. The other person will receive the photo,
and you think it would end, but it is not. Now, we have two copies of photo,
one is a simple email, and another is an original file which is still on my
computer. Here, we send the copy of the file of the photo, not the original
file. This issue is commonly known as the double-spend problem.
The double-spend problem provides a challenge to determine whether a
transaction is real or not. How you can send a bitcoin to someone over the
internet without needing a bank or some other institution to certify the
transfer took place. The answer arises in a global network of thousands of
computers called a Bitcoin Network and a special type of decentralized laser
technology called blockchain.
Blockchain Version
The idea of creating money through solving computational puzzles was first
introduced in 2005 by Hal Finney, who created the first concept for
cryptocurrencies (The implementation of distributed ledger technology).
This ledger allows financial transactions based on blockchain technology or
DLT to be executed with Bitcoin. Bitcoin is the most prominent example in
this segment. It is being used as cash for the Internet and seen as the
enabler of an Internet of Money.
The main issues that came with Bitcoin are wasteful mining and lack of
network scalability. To overcome these issues, this version extends the
concept of Bitcoin beyond currency. The new key concepts are Smart
Contracts. It is small computer programs that "live" in the blockchain. They
are free computer programs which executed automatically and checked
conditions which are defined earlier like facilitation, verification or
enforcement. The big advantage of this technology that blockchain offers,
making it impossible to tamper or hack Smart Contracts. A most prominent
example is the Ethereum Blockchain, which provides a platform where the
developer community can build distributed applications for the Blockchain
network.
AD
Bitcoin Mining
Within the bitcoin networks, there are a group of people known as Miners. In
miners, there was a process and confirm transactions. Anybody can apply for
a minor, and you could run the client yourself. However, these minors use
very powerful computers that are specifically designed to
mine bitcoin transaction. They do this by actually solving math problems and
resolving cryptographic issues because every transaction needs to be
cryptographically encoded and secured. These mathematical problems ensure
that nobody is tampering with that data.
Additionally, for this task, the minors are paid in bitcoins, which is the key
component in bitcoin. In Bitcoin, you cannot create money as like you create
regular fiat currencies such as Dollar, Euro, and Yuan. The bitcoin is created
by rewarding these minors for their work in solving the mathematical and
cryptographical problems.
AD
The role of a minor is to build the blockchain of records that forms the
bitcoin ledger. These ledgers are called blocks, and each block contains all
the different transactions that have taken place. A new block is added in
every 10 minutes as a new Bitcoin Transaction takes place. So, as the minors
process these different transactions, they build the block, and when a block is
confirmed, it gets added to the blockchain. The bitcoin blockchain provides a
permanent record of all bitcoin transactions to the beginning.
If we type any character in the data section, we will observe its corresponding
cryptographic hash in the hash section.
For example: We have type in data section: This is a great tutorial.
It will generate the corresponding Hash:
759831720aa978c890b11f62ae49d2417f600f26aaa51b3291a8d21a4216582a
In this section, we are going to learn how SHA-256 applies to build a block
within a blockchain. We will discuss here in the context of the Bitcoin
blockchain and understand how this ties into the role of miners. The minors
are actually in the process of building blocks, and these blocks are added to a
blockchain to build out what the Bitcoin blockchain will be.
In the below image, you can see that this block is composed of a block
number, data field, cryptographic hash associated with it and a Nonce.
If the newly generating hash does not have four leading zeroes, then it will
not a valid block. To make the block valid, we will do it by using the field
called nonce.
A nonce is basically a random number which figures out how you can
actually make this specific block provide you with a valid hash. The way you
can do this is by changing the nonce manually. Generally, the miner starts
with a Nonce value of 1 and keeps on incrementing it until the generated hash
meets the specified criterion. Thus, it may take several iterations until the
desired hash with four leading zeros is generated. The expected time for
generating a block in the bitcoin system is 10 minutes. Once the miner
successfully mines the block, he releases that block in the system and making
it the last block in the chain.
The private key, which is securely held by the data owner, grants access
to the data stored on the blockchain. This ownership and control over the
private key empower individuals and organizations to manage their own
data, eliminating the need to trust centralized entities with sensitive
information. Users can share selective access to their data by granting
temporary or permanent cryptographic permissions, thereby enhancing
data privacy and control.
o Proof of Zero-Knowledge : Zero Knowing Proof is an excellent method
for safeguarding private information in the Blockchain system. This
strategy allows a person to demonstrate to other people that a particular
assertion is true without revealing any extra information. In an exchange,
the prover must demonstrate to the verifier whether a certain value (also
referred to to both the provide and the verifier) is accurate and reliable,
while eliminating any extraneous information.
o It's like proving to somebody that you know the secret without
actually telling them the secret.
o Smart Contracts and Permissioned Blockchains: Smart contracts, self-
executing programs running on blockchain networks, provide an
additional layer of privacy and control over data. Smart contracts enable
predefined rules and conditions to be enforced automatically, eliminating
the need for intermediaries. By embedding privacy features within smart
contracts, sensitive information can be securely shared and processed
without exposing it to unauthorized parties.
In permissioned blockchains, access to the network and data is restricted to
trusted participants, enhancing privacy and confidentiality. These private
blockchains are particularly useful in enterprise settings, where specific data
privacy requirements need to be met. By carefully managing access control and
permissions, organizations can ensure that only authorized entities can
participate and access sensitive data.
Data privacy Threads in blockchain :
o Pseudonymity versus Anonymity: One of the fundamental
characteristics of blockchain is the pseudonymous nature of transactions.
While users are represented by cryptographic addresses rather than their
real identities, the transparency of the blockchain can still enable the
linkage of transactions to specific individuals or entities. With the
increasing availability of external data sources and sophisticated analysis
techniques, the pseudonymous nature of blockchain transactions may be
compromised, jeopardizing the privacy of participants.
o Data Leakage through Off-Chain Activities: Although blockchain
itself provides a secure environment for data storage, certain interactions
and activities related to blockchain may occur off-chain. Off-chain data
includes information shared through external platforms, communication
channels, or smart contracts that interact with external systems. These
off-chain activities can potentially expose sensitive data, such as personal
details or transactional information, to vulnerabilities outside the
blockchain environment. Consequently, the privacy of participants' data
becomes dependent on the security measures implemented in these
external components.
o Inadequate Implementation of Privacy Protocols: While blockchain
offers potential solutions for privacy concerns, the implementation of
privacy protocols and techniques is not standardized across all blockchain
networks. Privacy features such as zero-knowledge proofs, ring
signatures, or stealth addresses can enhance confidentiality, but their
usage and effectiveness can vary depending on the specific blockchain
implementation. Inadequate implementation or misconfiguration of
privacy protocols can lead to unintended data exposure, rendering the
blockchain susceptible to privacy breaches.
o Public versus Private Blockchains: Public blockchains, such as Bitcoin
and Ethereum, maintain transparent transaction records visible to anyone
in the network. While these blockchains provide strong security
guarantees, they inherently sacrifice privacy to achieve decentralization
and transparency. On the other hand, private or permissioned blockchains
limit access to trusted participants, enabling greater privacy control.
However, even in private blockchains, data privacy can be compromised
if participants do not adhere to strict access controls or if malicious actors
infiltrate the network.
o Storage of Immutable Data: The immutability of data recorded on the
blockchain, a key feature ensuring data integrity, can also pose challenges
to privacy. Once information is written on the blockchain, it cannot be
altered or deleted. In cases where personal or sensitive data is
inadvertently stored on the blockchain, eradicating that information
becomes extremely challenging. This immutability feature conflicts with
the "right to be forgotten" principle, which is a crucial aspect of data
privacy regulations such as the General Data Protection Regulation
(GDPR).
The way we understand and handle digital transactions has been revolutionized
by blockchain technology. The possibilities of blockchain technology have been
further improved by the introduction of smart contracts, a self-executing piece
of code. Digital contracts that are effective, transparent, and impenetrable have
entered a new era thanks to smart contracts.
A blockchain-encoded digital contract between two or more parties is known as
a smart contract. The conditions of the agreement between the buyer and seller
are directly encoded into lines of code, making it a self-executing contract. The
contract cannot be changed after it is deployed since both the code and the
agreements it contains are on a decentralized blockchain network.
Smart contracts work by having a set of predetermined circumstances that,
when satisfied, cause the contract's obligations to be automatically carried out.
The time and expenses related to conventional contract administration are
decreased since this automation removes the need for middlemen like attorneys,
banks, or brokers.
The transparency of smart contracts is one of its most important benefits. A
smart contract's execution results in its recording on the blockchain, where it is
accessible to everybody on the network. This openness makes sure that
everyone participating in the deal has the same information at their disposal and
that the provisions of the contract are strictly adhered to.
The potential of smart contracts to automate complicated procedures is another
important benefit. Smart contracts have the ability to be programmed to carry
out a sequence of operations when certain criteria are satisfied. For instance, if a
certain set of circumstances are satisfied, a smart contract may be set up to
automatically transfer money from one party to another.
There are several applications for smart contracts, including supply chain
management, real estate transactions, and digital identity verification. The
banking sector is one area where smart contracts are becoming more and more
popular. Banks and other financial institutions are investigating the use of smart
contracts to automate many of their current procedures, including clearing and
settlement, in order to cut down on time and expenses.
Despite all of its advantages, smart contracts are not without drawbacks. The
absence of standards is one major problem. Since smart contracts are a
relatively new kind of technology, they are not required to go by any particular
set of norms or guidelines. Due to the absence of standardization, it may be
challenging for various blockchains' smart contracts to communicate with one
another.
The potential for bugs or other weaknesses in the code is another difficulty. Any
flaws or weaknesses in the code might have serious repercussions because smart
contracts are self-executing and cannot be changed once they are deployed. To
reduce these risks, developers must make sure that the code is extensively tested
and audited.
Blockchain technology, a distributed ledger that is maintained by a network of
nodes, provides the foundation for smart contracts. Every node has a copy of the
ledger, and any updates are added after being approved by the network. The
blockchain's security and integrity are guaranteed by this verification procedure.
Traditional contract management procedures are significantly impacted by smart
contracts. They do away with the necessity for middlemen, which lowers the
price and time of contract administration. Furthermore, there is no doubt or
misunderstanding regarding the contract's conditions because they are encoded
in the code. This lessens the possibility of disagreements and legal conflicts.
Smart contracts may also be used to carry out intricate corporate procedures. A
smart contract, for instance, may automate the tracking of items from the
manufacturer to the customer in supply chain management. The smart contract
updates the ledger each time the products are exchanged, guaranteeing that
everyone in the supply chain has access to the same data.
Digital identity verification may also be accomplished with smart contracts. The
blockchain may be used to store a person's identifying data in a smart contract.
Anyone on the network may then access and verify this information. As a result,
there is no longer a need for centralized identity verification agencies, and the
likelihood of identity fraud is decreased.
Decentralized finance (DeFi) is another area where smart contracts may be used.
DeFi is a term used to describe financial apps created using blockchain
technology. Automating financial procedures like lending, borrowing, and
trading is possible using smart contracts.
A smart contract may be used to carry out a loan arrangement between two
parties, for instance. The code contains the conditions of the loan arrangement,
such as the interest rate and payback timeline. The smart contract automatically
distributes the money to the lender once the borrower pays back the loan.
To summarize, smart contracts are a powerful and transnational technology that
has the ability to revolutionize the way we handle contracts and carry out
business procedures. Their efficiency, transparency, and automation make them
a popular choice in a variety of businesses. While there are certain hurdles to
overcome, such as standardization and code vulnerabilities, the advantages of
smart contracts are considerable and have the potential to revolutionize the way
we do business for the better.
What Is a 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.
Cryptography is employed to connect a collection of records known as blocks.
Every transaction is independently validated via peer-to-peer computer
networks, time-stamped, and added to the ledger; the information that has been
recorded can't be changed easily.
Blockchains are well recognized for playing a key role in cryptocurrency
systems like Bitcoin in keeping a secured and decentralized history of
transactions. In contrast to databases, which typically organize information/data
into tables, a blockchain, as the name suggests, organizes data into
chunks/blocks that are linked together.
How does Blockchain work?
Transaction Process
(i) Facilitating a Transaction
A new transaction has been requested for the blockchain network, where all data
that requires to be transferred is double encrypted by the use of public and
private keys.
(ii) Transaction Verification
After that, the transaction is sent through the global network of peer-to-peer
computers, where all of the network's nodes will verify the transaction's
legitimacy, including if there is enough balance available to complete the
transaction.
(iii) New Block Formation
The blockchain network has multiple nodes, and numerous transactions are
confirmed simultaneously. A block is made up of several mempools, each of
which contains all the validated transactions at a specific node, and the
transaction will be included in the mempool after it has been reviewed and
confirmed as valid.
(iv) Consensus Algorithm
The nodes that create a block will attempt to add it to the network in order to
make it permanent; however, if every node is permitted to add blocks in this
way, the blockchain network's functionality will be disrupted. In order to
address this issue, the nodes employ a consensus method to make sure that each
new block added to the chain represents the single version of the information
validated by all the nodes and that only a legitimate block is safely linked to the
chain; a hash code for that block is generated by the consensus method and is
necessary for adding the block to the chain.
(v) New Block Addition
The newly formed block is now set to be added to the chain after receiving its
hash value and being validated; a blockchain is made up of blocks that are
cryptographically connected to one another by the hash value of the preceding
block, which is included in each block and the open end of the blockchain
receives a new block.
(vi) Completion of Transaction
The transaction is finished as soon as the block is added to the chain, and the
data is then recorded there permanently; the transaction's information can be
accessed and verified by anybody.
Attributes of Blockchain
Though blockchains are typically used to keep the history of cryptocurrency
transactions, they also have the potential to store other data, such as digital
assets or product inventories.
o It has intrinsic value since it offers a reliable, safe, and quick means of
transferring value with minimal to no cost.
o It has no physical form since it only exists on the immutable blockchain.
o The majority of the participants in a cryptocurrency's decentralized
network, rather than a single centralized authority, make the decision
based on a cryptocurrency's attributes, like its total supply.
Features of Blockchain
Below mentioned are some of the primary features of the Blockchain:
Immutable
The blockchain is considered immutable as it can't be altered or modified. It is
therefore said to be a permanent network.
o 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.
o 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.
o 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:
o A blockchain network is completely structured and fault-tolerant because
it doesn't rely on human computations.
o It makes it less vulnerable to failure due to its decentralized nature.
o There is no involvement/interference of a third party or middlemen;
therefore, there is no additional risk associated.
o It makes it simpler to create a transparent profile for every network user;
as a result, each change is traceable and more concrete.
o 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.
Benefits of Blockchain
The below mentioned are some of the blockchain benefits:
o One of the primary benefits of blockchains is that it is open to all; this
implies that anybody can contribute to this technology, and joining the
distributed network doesn't need permission from anyone.
o Blockchain can be used to record data in a decentralized way so that
anyone may check the accuracy of the data by employing zero-knowledge
proof, wherein one party verifies the accuracy of information to another
party while not revealing anything regarding the information.
o Since blockchain is a decentralized system with a large number of trusted
nodes, data/information recorded using it is permanent. This implies that
one doesn't need to be concerned about losing their data since duplicate
copies are maintained at every local node.
o Because it is not controlled by a single party, blockchain is regarded as
censorship-free. Furthermore, it uses the concept of trusted nodes for
verification and consensus algorithms that validate transactions using
smart contracts.
o Since every transaction is stored on a block linked to the others using
hashing methods, blockchain provides a higher level of security.
o Due to the decentralized nature of blockchain, it is difficult to alter data;
if any alterations are done, it is immediately reflected throughout all
nodes, making theft impossible. Therefore, it can be said that transactions
are impervious to tampering.
o It makes transaction records visible everywhere since every node in the
network has a copy of every transaction, and if there are any
modifications made to the transaction, the other nodes can see it.
o Blockchain eliminates any third-party interference in transactions and
eliminates errors, making the system more effective and quick. Also,
settlement is facilitated and made easy this way.
o Blockchain lowers costs for businesses and builds trust with other
partners because it doesn't require a third party.
Applications of Blockchain
Blockchain technology has a wide range of uses in various categories/ fields,
some of which are mentioned below:
Healthcare
With smart contracts, blockchain can have a significant effect on the healthcare
industry. A contract between two parties can be established through smart
contracts without the necessity of a middleman, and the contract's terms are
known to all parties, and when its criteria are satisfied, it is immediately put into
effect. This could be highly helpful in the healthcare industry since it allows for
the encryption of personal health records using Blockchain technology, making
them only accessible to primary healthcare practitioners with a key.
Internet of Things
IoT is a system of interconnected devices that can communicate with one
another and gather information that may be utilized to obtain valuable insights.
The Smart Home, in which all home appliances like lights, air conditioners,
speakers, etc., may be linked together on a single platform, could be one of the
examples of IoT. Blockchain technology can be utilized to secure this
enormously dispersed system; the security of an IoT system can only be as
strong as finding the weakest link. In this case, blockchain can be used to make
sure that the information collected by IoT devices is secure and accessible to
only the right/trusted people.
Food and Medical Industry
Companies may trace their food items/products using blockchain technology
from the time they are harvested or manufactured until the point at which they
are received by consumers. Blockchain technology could aid in the creation of a
digital certificate for every food product, indicating where it originated from
and where it has been. As a result, if any contamination is found and the
manufacturer decides to return a batch of product due to particular quality
concerns, they may track the problem back to its source. A mechanism like this
might be used in other sectors too. It could be used to track pharmaceuticals and
other common products, as well as to combat counterfeit products by allowing
anybody to check to see if the item is from a genuine and authentic
manufacturer.
Logistics and Supply Chain Tracking
There are numerous advantages to employing blockchain technology to track
products as they move through a logistics or supply chain network.
Firstly, it enables easier communication among parties since information is
available on a secure public ledger. It also offers increased security and data
integrity due to the immutability of the information on the blockchain. As a
result, participants in the logistics and supply chain can collaborate more readily
and with more assurance that the information being sent to them is relevant and
updated.
Non-Fungible Tokens
NFTs are generally regarded as a means of acquiring ownership of digital art.
Due to the blockchain's precluding against information existing in two places,
posting an NFT on it assures that there is only a single copy of digital artwork.
While NFTs have many applications, at their base, they are a method of
transferring ownership over anything that may be represented by data.