SlideShare ist ein Scribd-Unternehmen logo
1 von 112
Downloaden Sie, um offline zu lesen
Blockchain
1
Unbiased
Technolab
Blockchain
Blockchain
2
1. Introduction to Blockchain.
● What is Blockchain?
● Working of Blockchain.
● Disadvantages of Current Systems.
● Benefits of Blockchain.
● Applications of Blockchain (At least 5 Applications should be there).
Theory:-
Abstract:
Blockchain is a technology that is developed using a combination of various techniques such as
mathematics, algorithms, cryptography, economic models, and so on. Blockchain is a public ledger
of all cryptocurrency transactions that are digitized and decentralized. All the transactions of
cryptocurrencies are stored in chronological order to help users in tracking the transactions without
maintaining any central record of the transactions.
What is Blockchain?
Blockchain seems complicated, and it definitely can be, but its core concept is really quite simple.
A blockchain is a type of database. To be able to understand blockchain, it helps to first understand
what a database actually is.
A database is a collection of information that is stored electronically on a computer system.
Information, or data, in databases is typically structured in table format to allow for easier
searching and filtering for specific information. What is the difference between someone using a
spreadsheet to store information rather than a database?
Spreadsheets are designed for one person, or a small group of people, to store and access limited
amounts of information. In contrast, a database is designed to house significantly larger amounts
of information that can be accessed, filtered, and manipulated quickly and easily by any number
of users at once.
Large databases achieve this by housing data on servers that are made of powerful computers.
These servers can sometimes be built using hundreds or thousands of computers in order to have
the computational power and storage capacity necessary for many users to access the database
simultaneously. While a spreadsheet or database may be accessible to any number of people, it is
Blockchain
3
often owned by a business and managed by an appointed individual that has complete control over
how it works and the data within it.
Working of Blockchain:
Blockchain consists of three important concepts: blocks, nodes and miners.
Blocks
Every chain consists of multiple blocks and each block has three basic elements:
The data in the block.
A 32-bit whole number called a nonce. The nonce is randomly generated when a block is created,
which then generates a block header hash.
Blockchain
4
The hash is a 256-bit number wedded to the nonce. It must start with a huge number of zeroes (i.e.,
be extremely small).
When the first block of a chain is created, a nonce generates the cryptographic hash. The data in
the block is considered signed and forever tied to the nonce and hash unless it is mined.
Miners
Miners create new blocks on the chain through a process called mining.
In a blockchain every block has its own unique nonce and hash, but also references the hash of the
previous block in the chain, so mining a block isn't easy, especially on large chains.
Miners use special software to solve the incredibly complex math problem of finding a nonce that
generates an accepted hash. Because the nonce is only 32 bits and the hash is 256, there are roughly
four billion possible nonce-hash combinations that must be mined before the right one is found.
When that happens miners are said to have found the "golden nonce" and their block is added to
the chain.
Making a change to any block earlier in the chain requires re-mining not just the block with the
change, but all of the blocks that come after. This is why it's extremely difficult to manipulate
blockchain technology. Think of it as "safety in math" since finding golden nonces requires an
enormous amount of time and computing power.
When a block is successfully mined, the change is accepted by all of the nodes on the network and
the miner is rewarded financially.
Nodes
One of the most important concepts in blockchain technology is decentralization. No one computer
or organization can own the chain. Instead, it is a distributed ledger via the nodes connected to the
chain. Nodes can be any kind of electronic device that maintains copies of the blockchain and
keeps the network functioning.
Blockchain
5
Every node has its own copy of the blockchain and the network must algorithmically approve any
newly mined block for the chain to be updated, trusted and verified. Since blockchains are
transparent, every action in the ledger can be easily checked and viewed. Each participant is given
a unique alphanumeric identification number that shows their transactions.
Combining public information with a system of checks-and-balances helps the blockchain
maintain integrity and creates trust among users. Essentially, blockchains can be thought of as the
scalability of trust via technology.
Disadvantages of Current Systems:
While there are significant upsides to the blockchain, there are also significant challenges to its
adoption. The roadblocks to the application of blockchain technology today are not just technical.
The real challenges are political and regulatory, for the most part, to say nothing of the thousands
of hours (read: money) of custom software design and back-end programming required to integrate
blockchain to current business networks. Here are some of the challenges standing in the way of
widespread blockchain adoption.
Technology Cost
Although blockchain can save users money on transaction fees, the technology is far from free.
The “proof of work” system that bitcoin uses to validate transactions, for example, consumes vast
amounts of computational power. In the real world, the power from the millions of computers on
the bitcoin network is close to what Denmark consumes annually. Assuming electricity costs of
$0.03~$0.05 per kilowatt-hour, mining costs exclusive of hardware expenses are about
$5,000~$7,000 per coin.10.
Despite the costs of mining bitcoin, users continue to drive up their electricity bills in order to
validate transactions on the blockchain. That’s because when miners add a block to the bitcoin
blockchain, they are rewarded with enough bitcoin to make their time and energy worthwhile.
When it comes to blockchains that do not use cryptocurrency, however, miners will need to be
paid or otherwise incentivized to validate transactions.
Some solutions to these issues are beginning to arise. For example, bitcoin mining farms have been
set up to use solar power, excess natural gas from fracking sites, or power from wind farms.
Speed Inefficiency
Bitcoin is a perfect case study for the possible inefficiencies of blockchain. Bitcoin’s “proof of
work” system takes about ten minutes to add a new block to the blockchain. At that rate, it’s
estimated that the blockchain network can only manage about seven transactions per second (TPS).
Blockchain
6
Although other cryptocurrencies such as Ethereum perform better than bitcoin, they are still
limited by blockchain. Legacy brand Visa, for context, can process 24,000 TPS.
Solutions to this issue have been in development for years. There are currently blockchains that
are boasting over 30,000 transactions per second.
Illegal Activity
While confidentiality on the blockchain network protects users from hacks and preserves privacy,
it also allows for illegal trading and activity on the blockchain network. The most cited example
of blockchain being used for illicit transactions is probably the Silk Road, an online “dark web”
drug marketplace operating from February 2011 until October 2013 when it was shut down by the
FBI.6
The website allowed users to browse the website without being tracked using the Tor browser and
make illegal purchases in Bitcoin or other cryptocurrencies. Current U.S. regulations require
financial service providers to obtain information about their customers when they open an account,
verify the identity of each customer, and confirm that customers do not appear on any list of known
or suspected terrorist organizations. This system can be seen as both a pro and a con. It gives
anyone access to financial accounts but also allows criminals to more easily transact. Many have
argued that the good uses of crypto, like banking the unbanked world, outweigh the bad uses of
cryptocurrency, especially when most illegal activity is still accomplished through untraceable
cash.
Regulation
Many in the crypto space have expressed concerns about government regulation over
cryptocurrencies. While it is getting increasingly difficult and near impossible to end something
like Bitcoin as its decentralized network grows, governments could theoretically make it illegal to
own cryptocurrencies or participate in their networks.
Over time this concern has grown smaller as large companies like PayPal begin to allow the
ownership and use of cryptocurrencies on its platform.
Benefits of Blockchain:
Accuracy of the Chain
Transactions on the blockchain network are approved by a network of thousands of computers.
This removes almost all human involvement in the verification process, resulting in less human
Blockchain
7
error and an accurate record of information. Even if a computer on the network were to make a
computational mistake, the error would only be made to one copy of the blockchain. In order for
that error to spread to the rest of the blockchain, it would need to be made by at least 51% of the
network’s computers—a near impossibility for a large and growing network the size of Bitcoin’s.
Cost Reductions
Typically, consumers pay a bank to verify a transaction, a notary to sign a document, or a minister
to perform a marriage. Blockchain eliminates the need for third-party verification and, with it, their
associated costs. Business owners incur a small fee whenever they accept payments using credit
cards, for example, because banks and payment processing companies have to process those
transactions. Bitcoin, on the other hand, does not have a central authority and has limited
transaction fees.
Decentralization
Blockchain does not store any of its information in a central location. Instead, the blockchain is
copied and spread across a network of computers. Whenever a new block is added to the
blockchain, every computer on the network updates its blockchain to reflect the change. By
spreading that information across a network, rather than storing it in one central database,
blockchain becomes more difficult to tamper with. If a copy of the blockchain fell into the hands
of a hacker, only a single copy of the information, rather than the entire network, would be
compromised.
Efficient Transactions
Transactions placed through a central authority can take up to a few days to settle. If you attempt
to deposit a check on Friday evening, for example, you may not actually see funds in your account
until Monday morning. Whereas financial institutions operate during business hours, five days a
week, blockchain is working 24 hours a day, seven days a week, and 365 days a year. Transactions
can be completed in as little as ten minutes and can be considered secure after just a few hours.
This is particularly useful for cross-border trades, which usually take much longer because of time-
zone issues and the fact that all parties must confirm payment processing.
Private Transactions
Many blockchain networks operate as public databases, meaning that anyone with an internet
connection can view a list of the network’s transaction history. Although users can access details
about transactions, they cannot access identifying information about the users making those
Blockchain
8
transactions. It is a common misperception that blockchain networks like bitcoin are anonymous,
when in fact they are only confidential.
That is, when a user makes public transactions, their unique code called a public key, is recorded
on the blockchain, rather than their personal information. If a person has made a Bitcoin purchase
on an exchange that requires identification then the person’s identity is still linked to their
blockchain address, but a transaction, even when tied to a person’s name, does not reveal any
personal information.
Secure Transactions
Once a transaction is recorded, its authenticity must be verified by the blockchain network.
Thousands of computers on the blockchain rush to confirm that the details of the purchase are
correct. After a computer has validated the transaction, it is added to the blockchain block. Each
block on the blockchain contains its own unique hash, along with the unique hash of the block
before it. When the information on a block is edited in any way, that block’s hashcode changes—
however, the hash code on the block after it would not. This discrepancy makes it extremely
difficult for information on the blockchain to be changed without notice.
Transparency
Most blockchains are entirely open-source software. This means that anyone and everyone can
view its code. This gives auditors the ability to review cryptocurrencies like Bitcoin for security.
This also means that there is no real authority on who controls Bitcoin’s code or how it is edited.
Because of this, anyone can suggest changes or upgrades to the system. If a majority of the network
users agree that the new version of the code with the upgrade is sound and worthwhile then Bitcoin
can be updated.
Banking the Unbanked
Perhaps the most profound facet of blockchain and Bitcoin is the ability for anyone, regardless of
ethnicity, gender, or cultural background, to use it. According to the world bank there are nearly 2
billion adults that do not have bank accounts or any means of storing their money or
wealth.5 Nearly all of these individuals live in developing countries where the economy is in its
infancy and entirely dependent on cash.
These people often earn little money that is paid in physical cash. They then need to store this
physical cash in hidden locations in their homes or places of living leaving them subject to robbery
or unnecessary violence. Keys to a bitcoin wallet can be stored on a piece of paper, a cheap cell
Blockchain
9
phone, or even memorized if necessary. For most people, it is likely that these options are more
easily hidden than a small pile of cash under a mattress.
Blockchains of the future are also looking for solutions to not only be a unit of account for wealth
storage, but also to store medical records, property rights, and a variety of other legal contracts.
Applications of Blockchain:
Money Transfer and Payment Processing.
Supply Chains Monitoring.
Retail Programs Based on Loyalty Rewards.
Digital IDs.
Sharing of Data.
Protection of Royalty and Copyright.
Digital voting.
Transfer of Real Estate, Land, and Auto Title.
Blockchain
10
2. Differentiate between Public Blockchain, Private Blockchain, Consortium Blockchain
and Hybrid Blockchain.
Theory:-
Currently, there are at least four types of blockchain networks — public blockchains, private
blockchains, consortium blockchains and hybrid blockchains.
Public blockchains
How it works. The first type of blockchain technology is public blockchain. This is where
cryptocurrency like Bitcoin originated and helped to popularize distributed ledger technology
(DLT). It removes the problems that come with centralization, including less security and
transparency. DLT doesn't store information in any one place, instead distributing it across a peer-
to-peer network. Its decentralized nature requires some method for verifying the authenticity of
data. That method is a consensus algorithm whereby participants in the blockchain reach
agreement on the current state of the ledger. Proof of work (PoW) and proof of stake (PoS) are
two common consensus methods.
Public blockchain is non-restrictive and permissionless, and anyone with internet access can sign
on to a blockchain platform to become an authorized node. This user can access current and past
records and conduct mining activities, the complex computations used to verify transactions and
add them to the ledger. No valid record or transaction can be changed on the network, and anyone
can verify the transactions, find bugs or propose changes because the source code is usually open
source.
Advantages. One of the advantages of public blockchains is that they are completely independent
of organizations, so if the organization that started it ceases to exist the public blockchain will still
be able to run, as long as there are computers still connected to it. "Some blockchains incentivize
users to commit computer power to securing the network by providing a reward," noted James
Godefroy, a senior manager at Rouse, an intellectual property services provider.
Another advantage of public blockchains is the network's transparency. As long as the users follow
security protocols and methods fastidiously, public blockchains are mostly secure.
Blockchain
11
Disadvantages. The network can be slow, and companies can't restrict access or use. If hackers
gain 51% or more of the computing power of a public blockchain network, they can unilaterally
alter it, Godefroy said.
Public blockchains also don't scale well. The network slows down as more nodes join the network.
Use cases. The most common use case for public blockchains is mining and exchanging
cryptocurrencies like Bitcoin. However, it can also be used for creating a fixed record with an
auditable chain of custody, such as electronic notarization of affidavits and public records of
property ownership.
This type of blockchain is ideal for organizations that are built on transparency and trust, such as
social support groups or non-governmental organizations. Because of the public nature of the
network, private businesses will likely want to steer clear.
Private blockchains
How it works. A blockchain network that works in a restrictive environment like a closed network,
or that is under the control of a single entity, is a private blockchain. While it operates like a public
blockchain network in the sense that it uses peer-to-peer connections and decentralization, this
type of blockchain is on a much smaller scale. Instead of just anyone being able to join and provide
computing power, private blockchains typically are operated on a small network inside a company
or organization. They're also known as permissioned blockchains or enterprise blockchains.
Advantages. The controlling organization sets permission levels, security, authorizations and
accessibility. For example, an organization setting up a private blockchain network can determine
which nodes can view, add or change data. It can also prevent third parties from accessing certain
information.
"You can think of private blockchains as being the intranet, while the public blockchains are more
like the internet," Godefroy said.
Because they're limited in size, private blockchains can be very fast and can process transactions
much more quickly than public blockchains.
Disadvantages. The disadvantages of private blockchains include the controversial claim that they
aren't true blockchains, since the core philosophy of blockchain is decentralization. It's also more
difficult to fully achieve trust in the information, since centralized nodes determine what is valid.
Blockchain
12
The small number of nodes can also mean less security. If a few nodes go rogue, the consensus
method can be compromised.
Additionally, the source code from private blockchains is often proprietary and closed. Users can't
independently audit or confirm it, which can lead to less security. There is no anonymity on a
private blockchain, either.
Use cases. The speed of private blockchains makes them ideal for cases where the blockchain
needs to be cryptographically secure but the controlling entity doesn't want the information to be
accessed by the public.
Consortium blockchains
How it works. The fourth type of blockchain, consortium blockchain, also known as a federated
blockchain, is similar to a hybrid blockchain in that it has private and public blockchain features.
But it's different in that multiple organizational members collaborate on a decentralized network.
Essentially, a consortium blockchain is a private blockchain with limited access to a particular
group, eliminating the risks that come with just one entity controlling the network on a private
blockchain.
In a consortium blockchain, the consensus procedures are controlled by preset nodes. It has a
validator node that initiates, receives and validates transactions. Member nodes can receive or
initiate transactions.
Advantages. A consortium blockchain tends to be more secure, scalable and efficient than a public
blockchain network. Like private and hybrid blockchain, it also offers access controls.
Disadvantages. Consortium blockchain is less transparent than public blockchain. It can still be
compromised if a member node is breached, the blockchain's own regulations can impair the
network's functionality.
Use cases. Banking and payments are two uses for this type of blockchain. Different banks can
band together and form a consortium, deciding which nodes will validate the transactions.
Research organizations can create a similar model, as can organizations that want to track food.
It's ideal for supply chains, particularly food and medicine applications.
Blockchain
13
Hybrid blockchains
How it works. Sometimes, organizations will want the best of both worlds, and they'll use hybrid
blockchain, a type of blockchain technology that combines elements of both private and public
blockchain. It lets organizations set up a private, permission-based system alongside a public
permissionless system, allowing them to control who can access specific data stored in the
blockchain, and what data will be opened up publicly.
Typically, transactions and records in a hybrid blockchain are not made public but can be verified
when needed, such as by allowing access through a smart contract. Confidential information is
kept inside the network but is still verifiable. Even though a private entity may own the hybrid
blockchain, it cannot alter transactions.
When a user joins a hybrid blockchain, they have full access to the network. The user's identity is
protected from other users, unless they engage in a transaction. Then, their identity is revealed to
the other party.
Advantages. One of the big advantages of hybrid blockchain is that, because it works within a
closed ecosystem, outside hackers can't mount a 51% attack on the network. It also protects privacy
but allows for communication with third parties. Transactions are cheap and fast, and it offers
better scalability than a public blockchain network.
Disadvantages. This type of blockchain isn't completely transparent because information can be
shielded. Upgrading can also be a challenge, and there is no incentive for users to participate or
contribute to the network.
Use cases. Hybrid blockchain has several strong use cases, including real estate. Companies can
use a hybrid blockchain to run systems privately but show certain information, such as listings, to
the public. Retail can also streamline its processes with hybrid blockchain, and highly regulated
markets like financial services can also see benefits from using it.
Medical records can be stored in a hybrid blockchain, according to Godefroy. The record can't be
viewed by random third parties, but users can access their information through a smart contract.
Governments could also use it to store citizen data privately but share the information securely
between institutions.
Blockchain
14
Blockchain
15
3. Bitcoin - A Cryptocurrency
● Installation and Environmental Setup
● Introduction to Bitcoin
● Bitcoin and Blockchain
● Pros and Cons of Bitcoin
● Transaction in Bitcoin
● Bitcoin Wallet, Exchange and Trading
● Applications of Bitcoin.
Theory:-
Bitcoin - A Cryptocurrency:
Bitcoin (₿) is a decentralized digital currency, without a central bank or single administrator, that
can be sent from user to user on the peer-to-peer bitcoin network without the need for
intermediaries. Transactions are verified by network nodes through cryptography and recorded in
a public distributed ledger called a blockchain. The cryptocurrency was invented in 2008 by an
unknown person or group of people using the name Satoshi Nakamoto. The currency began use in
2009 when its implementation was released as open-source software. 
Bitcoins are created as a reward for a process known as mining. They can be exchanged for other
currencies, products, and services, but the real-world value of the coins is extremely volatile.
Research produced by the University of Cambridge estimated that in 2017, there were 2.9 to 5.8
million unique users using a cryptocurrency wallet, most of them using bitcoin.
Bitcoin has been criticized for its use in illegal transactions, the large amount of electricity (and
thus carbon footprint) used by mining, price volatility, and thefts from exchanges. Some
economists and commentators have characterized it as a speculative bubble at various times.
Bitcoin has also been used as an investment, although several regulatory agencies have issued
investor alerts about bitcoin.
The word bitcoin was defined in a white paper published on 31 October 2008. It is a compound of
the words bit and coin. No uniform convention for bitcoin capitalization exists; some sources use
Blockchain
16
Bitcoin, capitalized, to refer to the technology and network and bitcoin, lowercase, for the unit of
account.
Installation and Environmental Setup:
A full node is a program that fully validates transactions and blocks. Almost all full nodes also
help the network by accepting transactions and blocks from other full nodes, validating those
transactions and blocks, and then relaying them to further full nodes.
Most full nodes also serve lightweight clients by allowing them to transmit their transactions to
the network and by notifying them when a transaction affects their wallet. If not enough nodes
perform this function, clients won’t be able to connect through the peer-to-peer network—they’ll
have to use centralized services instead.
Many people and organizations volunteer to run full nodes using spare computing and bandwidth
resources—but more volunteers are needed to allow Bitcoin to continue to grow. This document
describes how you can help and what helping will cost you.
Setup:
Go to the Bitcoin Core download page and verify you have made a secure connection to the server.
Verify secure connection
Blockchain
17
Click the large blue Download Bitcoin Core button to download the Bitcoin Core installer to your
desktop.
Optional: Verify the release signatures
If you know how to use PGP, you should also click the Verify Release Signatures link on the
download page to download a signed list of SHA256 file hashes. The 0.11 and later releases are
signed by Wladimir J. van der Laan’s releases key with the fingerprint:
01EA 5486 DE18 A882 D4C2 6845 90C8 019E 36C2 E964
Earlier releases were signed by Wladimir J. van der Laan’s regular key. That key’s fingerprint is:
71A3 B167 3540 5025 D447 E8F2 7481 0B01 2346 C9A6
Even earlier releases were signed by Gavin Andresen’s key. His primary key’s fingerprint is:
2664 6D99 CBAE C9B8 1982 EF60 29D9 EE6B 1FC7 30C1
You should verify these keys belong to their owners using the web of trust or other trustworthy
means. Then use PGP to verify the signature on the release signatures file. Finally, use PGP or
another utility to compute the SHA256 hash of the archive you downloaded, and ensure the
computed hash matches the hash listed in the verified release signatures file.
After downloading the file to your desktop or your Downloads folder (C:Users<YOUR USER
NAME>Downloads), run it by double-clicking its icon. Windows will ask you to confirm that
you want to run it. Click Yes and the Bitcoin installer will start. It’s a typical Windows installer,
and it will guide you through the decisions you need to make about where to install Bitcoin Core.
Blockchain
18
Windows 10 installer start….
To continue, choose one of the following options
If you want to use the Bitcoin Core Graphical User Interface (GUI), proceed to the Bitcoin Core
GUI section below.
If you want to use the Bitcoin Core daemon (bitcoind), which is useful for programmers and
advanced users, proceed to the Bitcoin Core Daemon section below.
If you want to use both the GUI and the daemon, read both the GUI instructions and the daemon
instructions. Note that you can’t run both the GUI and the daemon at the same time using the same
configuration directory.
Press the Windows key (⊞ Win) and start typing “bitcoin”. When the Bitcoin Core icon appears
(as shown below), click on it.
Blockchain
19
Starting Bitcoin Core
You will be prompted to choose a directory to store the Bitcoin block chain and your wallet. Unless
you have a separate partition or drive you want to use, click Ok to use the default.
Blockchain
20
Bitcoin-Qt Welcome
Your firewall may block Bitcoin Core from making outbound connections. It’s safe to allow
Bitcoin Core to use all networks. (Note: you will still need to configure inbound connections as
described later in the Network Configuration section.)
Opening outgoing firewall for Bitcoin Core
Bitcoin Core GUI will begin to download the block chain. This step will take at least several days,
and it may take much more time on a slow Internet connection or with a slow computer. During
the download, Bitcoin Core will use a significant part of your connection bandwidth. You can stop
Bitcoin Core at any time by closing it; it will resume from the point where it stopped the next time
you start it.
Blockchain
21
Bitcoin-Qt Initial Block Download
After download is complete, you may use Bitcoin Core as your wallet or you can just let it run to
help support the Bitcoin network.
Optional: Start Your Node At Login
Starting your node automatically each time you login to your computer makes it easy for you to
contribute to the network. The easiest way to do this is to tell Bitcoin Core GUI to start at login.
While running Bitcoin Core GUI, open the Settings menu and choose Options. On the Main tab,
click Start Bitcoin on system login. Click the Ok button to save the new settings.
Choosing to start Bitcoin Core at login
The next time you login to your desktop, Bitcoin Core GUI will be automatically started minimized
in the task bar.
Blockchain
22
Warning: to prevent data corruption, do not force shutdown of your computer from the Windows
shutdown screen when you have Bitcoin Core running.
You have now completed installing Bitcoin Core. If you have any questions, please ask in one of
Bitcoin’s many communities, such as Bitcoin StackExchange, BitcoinTalk technical support, or
the #bitcoin IRC chatroom on Freenode.
To support the Bitcoin network, you also need to allow incoming connections. Please read the
Network Configuration section for details.
Bitcoin Core Daemon
To start Bitcoin Core daemon, first open a command window: press the Windows key (⊞ Win)
and type “cmd”. Choose the option labeled “Command Prompt”.
If you installed Bitcoin Core into the default directory, type the following at the command prompt:
C:Program FilesBitcoindaemonbitcoind
Bitcoin Core daemon should start. To interact with Bitcoin Core daemon, you will use the
command bitcoin-cli (Bitcoin command line interface). If you installed Bitcoin Core into the
default location, type the following at the command prompt to see whether it works:
C:Program FilesBitcoindaemonbitcoin-cli getblockchaininfo
Note: it may take up to several minutes for Bitcoin Core to start, during which it will display the
following message whenever you use bitcoin-cli:
error: {"code":-28,"message":"Verifying blocks..."}
After it starts, you may find the following commands useful for basic interaction with your node:
getblockchaininfo, getnetworkinfo, getnettotals, getwalletinfo, stop, and help.
For example, to safely stop your node, run the following command:
Blockchain
23
C:Program FilesBitcoindaemonbitcoin-cli stop
A complete list of commands is available in the Bitcoin.org developer reference.
When Bitcoin Core daemon first starts, it will begin to download the block chain. This step will
take at least several days, and it may take much more time on a slow Internet connection or with a
slow computer. During the download, Bitcoin Core will use a significant part of your connection
bandwidth. You can stop Bitcoin Core at any time using the stop command; it will resume from
the point where it stopped the next time you start it.
Starting your node automatically each time your computer boots makes it easy for you to contribute
to the network. The easiest way to do this is to start Bitcoin Core daemon when you login to your
computer.
Start File Explorer and go to:
C:ProgramDataMicrosoftWindowsStart MenuProgramsStartUp
Right-click on the File Explorer window and choose New → Text file. Name the file
start_bitcoind.bat. Then right-click on it and choose Open in Notepad (or whatever editor you
prefer). Copy and paste the following line into the file.
C:Program FilesBitcoindaemonbitcoind
(If you installed Bitcoin Core in a non-default directory, use that directory path instead.)
Save the file. The next time you login to your computer, Bitcoin Core daemon will be automatically
started.
Warning: to prevent data corruption, do not force shutdown of your computer from the Windows
shutdown screen when you have Bitcoin Core running.
You have now completed installing Bitcoin Core. If you have any questions, please ask in one of
Bitcoin’s many communities, such as Bitcoin StackExchange, BitcoinTalk technical support, or
the #bitcoin IRC chatroom on Freenode.
Introduction to Bitcoin:
Blockchain
24
Bitcoin is a digital currency or cryptocurrency which has gained popularity since it started in 2009.
It is owned and controlled by its users, peer to peer and has no central control like traditional
currencies. It is enabled using a technology called Blockchain, which is a new kind of database or
list of encrypted digital blocks linked together in a secure way. Bitcoin was the first real world
application of blockchain.
Blockchain allows cryptocurrencies like Bitcoin to function and enhances security. In addition,
Blockchain can be used for, Smart contracts, Financial services, Video games, Energy trading and
the Supply chain.
Blockchain was started by a mystery person (or people) named Satoshi Nakamoto as an open
source technology. Bitcoin was the first and is the most popular cryptocurrency followed by
Ethereum.
Bitcoin and Blockchain:
Blockchain is the technology that underpins the cryptocurrency Bitcoin, but Bitcoin is not the
only version of a blockchain distributed ledger system in the market. There are several other
cryptocurrencies with their own blockchain and distributed ledger architectures.
Meanwhile, the decentralisation of the technology has also led to several schisms or forks within
the Bitcoin network, creating offshoots of the ledger where some miners use a blockchain with
one set of rules, and others use a blockchain with another set of rules.
Alongside the original Bitcoin, Bitcoin Cash, Bitcoin Gold and Bitcoin SV exist as their own
cryptocurrency. With smaller networks, these cryptocurrency blockchains are more vulnerable to
hacking attacks, one of which befell Bitcoin Gold in 2018.
Pros and Cons of Bitcoin:
Pros:
The major benefit is around decentralisation, so for example, organisations or governments cannot
control your Bitcoin. This is quite appealing to many people who are concerned about the way in
which their money is used and controlled. Financial crashes such as the 2008 recession was
Blockchain
25
possible because peoples money and investment was being controlled banks. Cyptocurrencies like
Bitcoin do not use banks or bankers. The stock exchange and finances are increasingly controlled
by risky investments and algorithms, so digital currencies therefore offer a way of people taking
control back. There are also opportunities to make money from these new currencies for people
that know what they are doing. Finally, there could be some potential for currencies like Bitcoin
and blockchain to make a difference to wealth distribution.
Cons:
There are several drawbacks to Bitcoin and other crypto-currencies. This is a new technology and
therefore there are some usability problems. It can require technical expertise to fully grasp using
and working with cryptocurrencies.
Furthermore, organisations such as the Bank of England have questioned it’s value in the long
term. and cautioned against using it. There are still scaling problems, wild currency fluctuations
and technical issues including thefts. Adding layers of usability such as Lightning Network could
help to solve some of those issues in the future. Lightning offers an additional layer to offer
potentially faster transactions and is an additional layer to the blockchain which can help
scalability issues. In addition, the mining of coins (the process of adding transaction records to
Bitcoin’s public ledger of past transactions or blockchain) is a technical task which requires a lot
of power to do it. In fact, it costs more to mine Bitcoin than Gold or Platinum. So again, the addition
of new technologies to help mining and reduce power will be required in the future.
Transaction in Bitcoin:
Bitcoin makes use of public-key cryptography to ensure the integrity of transactions created on the
network. In order to transfer Bitcoin, each participant has pairs of public keys and private keys that
control pieces of bitcoin they own. A public key is a series of letters and numbers that a user must
share in order to receive funds. In contrast, a private key must be kept secret as it authorizes the
spending of any funds received by the associated public key.
Using the private key associated with their bitcoin, a user can sign transactions and thereby transfer
the value to a new owner. The transaction is then broadcast to the network to be included in the
blockchain.
Overview of a Bitcoin Transaction
To better illustrate how value is transferred in the Bitcoin network, we will walk through an
example transaction, where Alice sends .05 bitcoin to Bob.
Blockchain
26
At a high level, a transaction has three main parts:
Inputs. The bitcoin address that contains the bitcoin Alice wants to send. To be more accurate, it
is the address from which Alice had previously received bitcoin to and is now wanting to spend.
Outputs. Bob’s public key or bitcoin address.
Amounts. The amount of bitcoin Alice wants to send.
In order for Alice to send the .05 bitcoin to Bob, she signs a message with the transaction details
using her private key. The message contains the input, output, and amount as described above. The
transaction is then broadcast to the rest of the Bitcoin network where nodes verify that Alice’s
private key is able to access the inputs (by checking that Alice’s private key matches the public
key she is claiming to own).
Once a transaction is broadcasted to a node, this node then passes it along the network until it
reaches a mining node. Miners will then order this transaction into what is called a block template.
This is a blueprint for the block which the miner is attempting to add to the blockchain. If a miner
finds the next block in the chain, then this block template is mined and becomes an immutable
block on the blockchain. Finally, this block is broadcasted to the network’s nodes who will include
it in their copy of the chain.
Bitcoin Wallet, Exchange and Trading:
Wallet:
Bitcoin wallets hold a user’s keys, allowing users to receive bitcoin, sign transactions, and check
their account balance. The private and public keys held in a bitcoin wallet serve two distinct
functions, but are tied together in creation.
Bitcoin wallets contain a user’s keys, not bitcoin. Conceptually, a wallet is like a keychain in the
sense that it holds many pairs of private and public keys. These keys are used to sign transactions,
allowing a user to prove they own transaction outputs on the blockchain, i.e. their bitcoin. All
bitcoin is recorded on the blockchain in the form of transaction outputs.
Blockchain
27
If a user loses their wallet, they can use a mnemonic phrase to restore the wallet. Keeping private
keys and seed phrases secure is essential to protecting against internal and external threats that can
compromise the users bitcoin.
Bitcoin Exchange:
A bitcoin exchange is a digital marketplace where traders can buy and sell bitcoins using
different fiat currencies or altcoins. A bitcoin currency exchange is an online platform that acts
as an intermediary between buyers and sellers of the cryptocurrency.
 A bitcoin exchange acts as the intermediary between a seller and a buyer or, to use
cryptocurrency language, between a "maker" and a "taker."
 A bitcoin exchange works like a brokerage, and you can deposit money via bank transfer,
wire, and other common means of deposit. However, you will often pay a price for this
service.
 If a trader wants to trade between cryptocurrencies, they will pay a currency conversion
fee, similar to institutional banks when you trade money from different countries.
 Purchases and sales are based on the same ordering system as existing brokerages, where
a buyer (taker) places a limit order which is then sold when a corresponding cryptocurrency
is available from the seller (maker).
Blockchain
28
Understanding Bitcoin Exchanges
Bitcoin exchange platforms match buyers with sellers. Like a traditional stock exchange, traders
can opt to buy and sell bitcoin by inputting either a market order or a limit order. When a market
order is selected, the trader is authorizing the exchange to trade the coins for the best available
price in the online marketplace. With a limit order set, the trader directs the exchange to trade coins
for a price below the current ask or above the current bid, depending on whether they are buying
or selling.
To transact in bitcoin on an exchange, a user has to register with the exchange and go through a
series of verification processes to authenticate their identity. Once the authentication is successful,
an account is opened for the user who then has to transfer funds into this account before they can
buy coins.
Different exchanges have different payment methods that can be used for depositing funds
including bank wires, direct bank transfers, credit or debit cards, bank drafts, money orders and
even gift cards. A trader who would like to withdraw money from the account could do so using
the options provided by their exchange, which could include a bank transfer, PayPal transfer, check
mailing, cash delivery, bank wire, or credit card transfer.
Decentralized Exchanges
Decentralized bitcoin exchanges are those that are operated without a central authority. These
exchanges allow peer-to-peer trading of digital currencies without the need for an exchange
authority to facilitate the transactions.
There are a number of benefits to decentralized exchanges. First, many cryptocurrency users feel
that decentralized exchanges better match the decentralized structures of most digital currencies
themselves; many decentralized exchanges also require less personal information from their
members than other types of exchanges. Second, if users transfer assets directly to other users, that
eliminates the need for the transferring of assets to the exchange, thereby reducing the risk of theft
from hacks and other fraud. Third, decentralized exchanges may be less susceptible to price
manipulation and other fraudulent trading activity.
On the other hand, decentralized exchanges (like all cryptocurrency exchanges) must maintain a
fundamental level of user interest in the form of trading volume and liquidity. Not all decentralized
exchanges have been able to achieve these important baseline qualities. Further, users of a
decentralized exchange may have less recourse if they are the victims of fraud than those who
make use of exchanges with centralized authorities.
Blockchain
29
Bitcoin Trading:
Bitcoin trading is how you can speculate on movements in the cryptocurrency’s price. While this
has traditionally involved buying bitcoin through an exchange, hoping that its price will rise in
time, cryptocurrency traders are increasingly using derivatives to speculate on both rising and
falling prices – in order to make the most of bitcoin’s volatility.
With IG, you can take a position on the price of bitcoin with financial derivatives like CFDs.
This product can enable you to take advantage of price movements in either direction without
taking ownership of the underlying coins – meaning you won’t need to take responsibility for the
security of any bitcoin tokens.
Steps to trading bitcoin:
1. Learn what moves bitcoin’s price
2. Pick a bitcoin trading style and strategy
3. Choose how you want to get exposure to bitcoin
4. Decide whether to go long or short
5. Set your stops and limits
6. Open and monitor your trade
7. Close your position to take a profit or cut a loss
Learn what moves bitcoin’s price:
To get in on a surging opportunity or short the latest bubble, you first need to understand the factors
that have an impact on bitcoin’s price:
Bitcoin supply. The current bitcoin supply is capped at 21 million, which is expected to be
exhausted by 2140. A finite supply means that the price of bitcoin could increase if demand rises
in the coming years
Bad press. Any breaking news which concerns bitcoin’s security, value and longevity will have a
negative effect on the coin’s overall market price
Integration. Bitcoin’s public profile depends on its integration into new payment systems and
banking frameworks. If this is carried out successfully, demand might rise which will have a
positive effect on bitcoin’s price
Key events. Regulation changes, security breaches and macroeconomic bitcoin announcements
can all affect prices. Any agreement between users on how to speed the network up could also see
confidence in bitcoin rise – pushing the price up
Pick a bitcoin trading style and strategy:
 Day trading
Blockchain
30
 Trend trading
 Bitcoin hedging
 HODL (or buy and hold)
How to day trade bitcoin
Day trading bitcoin means that you’ll open and close a position within one single trading day – so
you won’t have any bitcoin market exposure overnight. This means that you’ll avoid overnight
funding charges on your position. This strategy could be for you if you’re looking to profit from
bitcoin’s short-term price movements, and it can enable you to make the most of daily volatility in
bitcoin’s price.
How to trade bitcoin
Trend trading means taking a position which matches the current trend. For example, if the market
is in a bullish trend, you’d go long and if the trend was bearish, you’d go short. If this trend started
to slow or reverse, you’d think about closing your position and opening a new one to match the
emerging trend.
Bitcoin trading
Hedging bitcoin means mitigating your exposure to risk by taking an opposing position to one you
already have open. You’d do this if you were concerned about the market moving against you. For
example, if you owned some bitcoins but were concerned about a short-term drop in their value,
you could open a short position on bitcoin with CFDs. If the market price of bitcoin falls, the gains
on your short position would offset some or all of the losses on the coins you own.
Bitcoin trading: hedging
The ‘HODL’ bitcoin strategy involves buying and holding bitcoin. Its name derives from a
misspelling of ‘hold’ on a popular cryptocurrency forum, and it is now often said to stand for ‘hold
on for dear life’. However, this phrase shouldn’t be taken too seriously – you should only buy and
hold bitcoin if you’ve got a positive outlook on its long-term price. If your research or trading plan
indicates that you should sell your positions to take profit or limit loss, you should – or you could
set stop losses to close your positions automatically.
Choose how you want to get exposure to bitcoin:
Blockchain
31
There are a few different ways that you can get exposure to bitcoin:
 Trading bitcoin derivatives
 Buying bitcoin through an exchange
 Crypto 10 index
Trading bitcoin derivatives:
Trading bitcoin derivatives with us means that instead of owning bitcoin outright, you’ll be
speculating on its price with CFDs. As a result, you’ll be able to take a position on bitcoin’s price
rising by ‘going long’ or falling by ‘going short’. Here are other benefits of trading bitcoin
derivatives with us:
Leverage and margin: CFDs are always traded with leverage, which means you’ll only have to put
up a deposit – known as margin – to get full market exposure
Deep liquidity: thanks to our large client base, our bitcoin market is very liquid. This means you’re
more likely to have your orders filled at your desired price – even if you deal in large sizes
Hedging: shorting with derivatives can be an effective way to hedge your portfolio and protect
against market declines
Buying bitcoin through an exchange
Buying bitcoin through an exchange is mainly for those who use a buy-and-hold bitcoin strategy.
This is because buying through an exchange means that you’re taking direct ownership of bitcoin
– with the expectation that its price will rise.
The matching engines and servers on bitcoin exchanges are often unreliable, which can result in
the suspension of markets or reduced execution accuracy
Bitcoin exchanges often impose fees and restrictions on funding and withdrawing from your
exchange account, while accounts themselves can take days to open.
Crypto 10 Index
As well as trading bitcoin derivatives or buying coins directly from an exchange, you can trade
Crypto 10 Index that gives you exposure to 10 major cryptocurrencies like Bitcoin in one single
trade. This index speculates on these Cryptocurrencies and closely tracks or mirrors the underlying
market price of them.
Blockchain
32
Decide whether to go long or short:
Trading financial derivatives makes it possible to go both long or short, depending on the current
market sentiment. Going long means that you expect bitcoin’s price to rise, and going short means
that you expect the price to fall.
Set your stops and limits:
Stops and limits are crucial risk management tools – and you have several to choose from when
you trade with us:
 Normal stops will close out your position at a set level, but they could be liable to slippage
if the underlying market price changes quickly
 Trailing stops follow favourable market movements to lock in profits, while capping your
downside risk. However, they too can be subject to slippage
 Guaranteed stops will close out your position at a set level, regardless of any slippage.
Guaranteed stops are free to set, but you’ll be charged a fee if your guaranteed stop is
triggered
These tools are all available to select via the deal ticket on our trading platform.
Open and monitor your trade:
To open a bitcoin trade, you’d buy if you thought that the price was going to rise or sell if you
thought the price was going to fall. Once your trade is open, you’ll need to monitor the market to
make sure that it’s moving in the way you anticipated.
The technical indicators available on our trading platform can help you to determine what bitcoin’s
price might do next. Indicators can also help you monitor current market conditions like volatility
levels or market sentiment.
Close your position to take a profit or cut a loss:
You can close your position whenever you like to take a profit, or to cut a loss that has reached a
level that makes you uncomfortable. Your profits will be paid directly into your trading account,
while your losses will be deducted from your account balance.
Blockchain
33
Applications of Bitcoin:
The following is a list of applications of bitcoins
 Bitcoins are being used to buy goods and services as more and more stores across the world
are accepting bitcoin payments.
 Bitcoin transactions provide a customized level of anonymity and it is relatively difficult
to trace their trail. So bitcoins are being used to transact anonymously.
 International payments can be made easily and cheaply as bitcoins are not related to any
country or subject to any government regulation.
 There is the freedom of the fact that there is no need of permission from any authority for
your transactions.
 Bitcoins provide a way to transact securely online as they use very strong cryptographic
algorithms.
 Users and businesses like bitcoin payments because there are no credit card fees to pay.
 Bitcoins can be as an investment, expecting that their value will appreciate significantly in
future.
 Bitcoins can be used to gamble on online sites like SatoshiDice, RoyalBitcoin, Bitzino,
Peerbet, etc.
 Bitcoins are being used to shop online as increasing numbers of vendors are allowing
bitcoin transactions. Users now can make payments in bitcoins on their smartphones
through bitcoin wallet apps.
 Unlike credit card or bank payments, there is no need to provide personal information to
complete the transactions. So the hassle of providing identity can be avoided.
Blockchain
34
4. Introduction to Ethereum.
● Installation and Environmental Setup
● introduction to Ethereum
● Ethereum vs Bitcoin
● Pros and Cons of Ethereum
● Transaction in Ethereum Network
● Applications of Ethereum.
Theory:-
Introduction to Ethereum:
In the Ethereum universe, there is a single, canonical computer (called the Ethereum Virtual
Machine, or EVM) whose state everyone on the Ethereum network agrees on. Everyone who
participates in the Ethereum network (every Ethereum node) keeps a copy of the state of this
computer. Additionally, any participant can broadcast a request for this computer to perform
arbitrary computation. Whenever such a request is broadcast, other participants on the network
verify, validate, and carry out ("execute") the computation. This execution causes a state change
in the EVM, which is committed and propagated throughout the entire network.
Requests for computation are called transaction requests; the record of all transactions and the
EVM's present state gets stored on the blockchain, which in turn is stored and agreed upon by all
nodes.
Cryptographic mechanisms ensure that once transactions are verified as valid and added to the
blockchain, they can't be tampered with later. The same mechanisms also ensure that all
transactions are signed and executed with appropriate "permissions" (no one should be able to send
digital assets from Alice's account, except for Alice herself).
Installation and Environmental Setup:
Ethereum Development Key Concepts:
Blockchain
35
1. Setting up your dev environment for Ethereum development takes just a few minutes. It’s
important to have a basic understanding of a few general concepts before we start writing
code.
2. Solidity - The most popular programming language for writing smart contracts on
Ethereum.
3. Web3.js - A JavaScript library for web browsers and Node.js that enables developers to
elegantly read and write to the Ethereum blockchain. Smart contracts written in Solidity
can be executed using JSON RPC from Web3.js.
4. Infura.io - A company that provides an API for simple Ethereum network access through
HTTP and WebSockets. To access the network without a service like Infura’s API, you
must host your own Ethereum network node.
5. Ethereum Networks - The Ethereum Main Network (a.k.a Homestead) is considered to be
the production environment. This is where real Ether (ETH) can be exchanged, burned,
and mined. Also, there are popular public test networks: Ropsten, Göerli, Kovan, and
Rinkeby. All of these networks can be accessed via Infura’s API.
6. Cloudflare’s Ethereum Gateway - Cloudflare, a popular DNS and general web-
infrastructure company provides a free API for accessing the Ethereum Main Net. Unlike
Infura, Cloudflare’s gateway can be used without an account or API. The network can be
interfaced with at https://cloudflare-eth.com. However, you can interface with only
Homestead; not Ropsten, Göerli, Kovan, or Rinkeby.
7. Truffle - A company that creates Ethereum development tools like Truffle, Ganache, and
Drizzle. In this guide, we’ll be installing Ganache CLI so we can run our Solidity and
Web3.js code locally during development.
8. Ganache CLI - A command line interface for running a locally hosted instance of
Ethereum. We can start up a blank Ethereum blockchain, or a fork of a public network’s
blockchain on your local machine.
9. Solc - The Solidity compiler. This turns our human-readable Solidity code into Ethereum
bytecode, which Ethereum network nodes understand how to execute.
10. MetaMask - A web browser extension that facilitates invocation of Ethereum smart
contracts from a web page. MetaMask uses Web3.js under the hood. It is a tool for end
users to use ETH, Ethereum based cryptocurrency tokens, and keep track of their Ethereum
wallets when using decentralized, Web3 applications (a.k.a. DApps).
Ethereum vs Bitcoin:
Bitcoin (BTC) and Ethereum (ETH) are the 2 most widely adopted applications of blockchain
technology in existence today. While many people think it’s Bitcoin vs. Ethereum, it is actually
Bitcoin and Ethereum. Bitcoin is digital gold, while Ethereum is a decentralized computer. Both
Blockchain
36
systems are powered and secured by a decentralized network of individuals across the world
(miners), who are paid to do their part in keeping the network’s secure.
Decentralization is the core principle of blockchain technologies that make Bitcoin revolutionary
compared to the digital dollar, which is centrally controlled by the U.S. government. When
centralized entities failed the world in 2008, Satoshi Nakamoto made bitcoin to decentralize
control of money. Ethereum was inspired by Bitcoin, but took it to the next level. While
decentralized digital gold is cool, a decentralized global computer that can handle an unlimited
number of financial products and services (including money) is even better.
Learning the differences between Bitcoin and Ethereum will lead you down a much deeper path
of technological advancement and where humans are going as a culture. You don’t have to fully
understand blockchain (the fundamental tech behind crypto), Bitcoin or Ethereum to know that we
are on the verge of something special. Let’s take a look at what makes these projects similar,
different and ultimately great in their own respect.
Main Takeaways: Bitcoin vs. Ethereum:
 Bitcoin is a cryptocurrency; Ethereum is a platform. Ether is the native token on
Ethereum’s blockchain.
 Bitcoin transactions are primarily monetary; Ethereum transactions may be executable
code.
 Transactions are much faster on the Ethereum network than on Bitcoin’s.
 Bitcoin is primarily a store of value and medium of exchange; Ethereum is seen as a
general purpose blockchain.
 Ethereum was created as a complement to Bitcoin, not as competition.
Pros and Cons of Ethereum:
Ethereum is a cutting-edge open-source blockchain platform that can handle smart contracts,
decentralized apps (dApps), tokenized assets, and decentralized financial services in addition to
financial transactions. At the time of writing, its native currency, Ether (ETH), is the second-largest
cryptocurrency by market capitalization, a position it has maintained for some years. Ethereum is
a high-risk, high-reward investment. If the value of Ethereum falls, users may lose a portion of
their investment, just like any other investment. Ethereum’s outstanding performance has attracted
both traditional and institutional investors. There are some pros and cons in investing in Ethereum.
Blockchain
37
Pros:
 Volatility: While volatility was once viewed as a negative, astute investors have recognized
market cycle patterns and can profit from the parabolic profits generated by market
bubbles.
 Liquidity: Due to the worldwide creation of trading platforms, exchanges, and online
brokerages, Ethereum is undoubtedly one of the most liquid financial assets. With very
cheap costs, you may quickly exchange Ethereum for cash or valuables such as gold.
 The lower danger of inflation: Ethereum features a clear inflation strategy that is less
susceptible to tampering. There’s no need to be concerned about your cryptocurrency
deflating because the blockchain system is limitless.
Cons:
 Scaling Issues: Unlike Bitcoin, which serves a single purpose, Ethereum serves as a ledger,
a platform for smart contracts, and so on, which can lead to flaws, breakdowns, and hacks.
 Makes Use of a Difficult Programming Language: While Ethereum is Turing complete and
employs a programming language comparable to C++, Python, and Java, learning Solidity,
Ethereum’s native language, can be difficult. One of the primary issues is that beginner-
friendly lessons are difficult to come by.
 Ethereum Investing Can Be Dangerous: Investing in Ethereum, like any other
cryptocurrency, may be hazardous. Cryptocurrencies are extremely volatile, resulting in
both increased gains and numerous losses. The price of Ether has fluctuated a lot in the
past, which might be a major disadvantage for certain investors, especially novices.
Furthermore, Ethereum’s fees fluctuate, which is also troublesome.
Blockchain
38
Transaction in Ethereum Network:
An Ethereum transaction refers to an action initiated by an externally-owned account, in other
words an account managed by a human, not a contract. For example, if Bob sends Alice 1 ETH,
Bob's account must be debited and Alice's must be credited. This state-changing action takes place
within a transaction.
Transactions, which change the state of the EVM, need to be broadcast to the whole network. Any
node can broadcast a request for a transaction to be executed on the EVM; after this happens, a
miner will execute the transaction and propagate the resulting state change to the rest of the
network.
Transactions require a fee and must be mined to become valid. To make this overview simpler
we'll cover gas fees and mining elsewhere.
A submitted transaction includes the following information:
 recipient – the receiving address (if an externally-owned account, the transaction will
transfer value. If a contract account, the transaction will execute the contract code)
 signature – the identifier of the sender. This is generated when the sender's private key
signs the transaction and confirms the sender has authorised this transaction
 value – amount of ETH to transfer from sender to recipient (in WEI, a denomination of
ETH)
 data – optional field to include arbitrary data
Blockchain
39
 gasLimit – the maximum amount of gas units that can be consumed by the transaction.
Units of gas represent computational steps
 maxPriorityFeePerGas - the maximum amount of gas to be included as a tip to the miner
 maxFeePerGas - the maximum amount of gas willing to be paid for the transaction
(inclusive of baseFeePerGas and maxPriorityFeePerGas)
Gas is a reference to the computation required to process the transaction by a miner. Users have to
pay a fee for this computation. The gasLimit, and maxPriorityFeePerGas determine the maximum
transaction fee paid to the miner.
On Ethereum there are a few different types of transactions:
 Regular transactions: a transaction from one wallet to another.
 Contract deployment transactions: a transaction without a 'to' address, where the data
field is used for the contract code.
TRANSACTION LIFECYCLE:
Once the transaction has been submitted the following happens:
 Once you send a transaction, cryptography generates a transaction hash:
0x97d99bc7729211111a21b12c933c949d4f31684f1d6954ff477d0477538ff017
 The transaction is then broadcast to the network and included in a pool with lots of other
transactions.
 A miner must pick your transaction and include it in a block in order to verify the
transaction and consider it "successful".
 You may end up waiting at this stage if the network is busy and miners aren't able
to keep up.
 Your transaction will receive "confirmations". The number of confirmations is the number
of blocks created since the block that included your transaction. The higher the number,
the greater the certainty that the network processed and recognised the transaction.
 Recent blocks may get re-organised, giving the impression the transaction was
unsuccessful; however, the transaction may still be valid but included in a different
block.
 The probability of a re-organisation diminishes with every subsequent block mined,
i.e. the greater the number of confirmations, the more immutable the transaction is.
Blockchain
40
Applications of Ethereum:
Voting Systems:
As we’ve seen with DAO, voting systems are adopting Ethereum. The results of polls are publicly
available, ensuring a transparent and fair democratic process by eliminating voting malpractices.
Banking Systems:
Ethereum is getting adopted widely in banking systems because with Ethereum’s decentralized
system; it is challenging for hackers to gain unauthorized access. It also allows payments on an
Ethereum-based network, so banks are also using Ethereum as a channel to make remittances and
payments.
Shipping:
Deploying Ethereum in shipping helps with the tracking of cargo and prevents goods from being
misplaced or counterfeited. Ethereum provides the provenance and tracking framework for any
asset required in a typical supply chain.
Agreements:
With Ethereum smart contracts, agreements can be maintained and executed without any
alteration. So in an industry that has fragmented participants, is subject to disputes, and requires
digital contracts to be present, Ethereum can be used as a technology for developing smart
contracts and for digitally recording the agreements and the transactions based on them.
Blockchain
41
5. Explain SHA-256 and EtHash in terms of Bitcoin and Ethereum.
Theory:-
What Is SHA-256 in terms of bitcoin?
Secure Hashing Algorithm (SHA) -256 is the hash function and mining algorithm of the Bitcoin
protocol, referring to the cryptographic hash function that outputs a 256 bits long value. It
moderates the creation and management of addresses, and is also used for transaction verification.
Bitcoin uses double SHA-256, meaning that it applies the hash functions twice.
The algorithm is a variant of the SHA-2 (Secure Hash Algorithm 2), developed by the National
Security Agency (NSA). SHA-256 is also used in popular encryption protocols such as SSL,TLS,
SSH and open source operating systems such as Unix/Linux.
The hash algorithm is extremely secure and its workings aren’t known in the public domain. It’s
used by the United States government to protect sensitive information, thanks to its ability to verify
a content of data without revealing it due to the use of digital signatures. Furthermore, it is also
utilized for password verification, since it conveniently does not require the storage of exact
passwords, as the hash values can be stored and matched with the user entry to verify if it’s correct
or not.
In fact, it is nearly impossible to reveal the initial data from a hash value itself. Moreover, a brute
force attack is extremely unlikely to succeed thanks to the astronomical number of potential
combinations. In addition, it’s also severely unlikely that two data values (known as collision)
have the same hash.
If you are a trader or cryptocurrency startup entrepreneur, then you must have heard about
“cryptography” or “hashing algorithms”.
But what do these things have to do with your bitcoin or cryptocurrency network?
Cryptography or hashing algorithms are what keep Bitcoin’s blockchain secure. They are the
building blocks in the cryptocurrency platform.
In this article, we are going to talk about the Secure Hash Algorithm (Bitcoin Hash Algorithm)
256 in detail.
Blockchain
42
To start with, it is important to have a general idea of what a hash & hasing algorithm?
First, we need to understand what is “Hash”?
Hash is a “message digest” – a digitally generated from a string of text, the hash by itself is smaller
than the text, it is almost impossible to build another string of text with the same hash value.
Second, we need to understand what is it “Hashing Algorithm”
The hashing algorithm is a Cryptographic hash function, the numerical algorithm that maps data
of random size to a hash of a fixed size. Hashing algorithm being used for digital signatures and
authentication.
The hashing algorithm has certain unique effects like:
"It is a one-way function and it produces a unique output (or hash)"
The mathematics behind the hash algorithm protect that there is no way to build the original data
from its generated hash. It means the hash only functions in linear growth. A simple term would
be that you can’t produce a real human thumb from a fingerprint.
This is why a hash can be treated as a “digital fingerprint” of the data processed through the hash
function.
To logically end, the same hash will only be developed from the same input data. But if you modify
the data with small things, like a single space or a comma, it will completely change the hash
output. And Bitcoin’s uses this cryptographic hashing algorithm for its blockchain consensus
mechanism.
Blockchain
43
The Most Common Cryptocurrency Mining Algorithm - SHA-256 Algorithm:
What is SHA-256 in term of ethereum?
SHA-256 (secure hash algorithm) is a cryptographic hash function with a digest length of 256 bits.
It is a keyless hash function; that is, an MDC (Manipulation Detection Code).
A message or data is processed by blocks of 512 = 16 × 32 bits, each block requiring 64 rounds.
It generates a unique 256-bit (32-byte) signature for a string text. Block processing time for SHA-
256 generally ranges from 6 to 10 minutes and needs hash values at the Giga hashes per second
(GH/s). SHA-256 hash value is measured by GH/s: Giga Hashes per second.
SHA-256 is used in several different parts of the Bitcoin network like:
Mining uses SHA-256 as the proof-of-work algorithm.
SHA-256 is used in the creation of bitcoin addresses to improve security and privacy.
Here will explain how the Hash function works in Bitcoin?
Hash Functions in Bitcoin
Bitcoin mainly uses the cryptographic hash function SHA-256, which is a stand for Secure Hash
Algorithm 256-bit. The algorithm was originally designed by the United States National Security
Agency (NSA) and the security benefits of this freely available algorithmic process, however,
made it a perfect fit for the Bitcoin network.
And the next thing, The Bitcoin’s proof of work algorithm is based on SHA-256. Using this,
Bitcoin miners solve Computational complexity math problems to add blocks into the blockchain.
And Blocks contain transactions and block header data. When the miner's node gets the new
Blockchain
44
transactions from a particular network, the miner consolidates them into the next block's data and
continues hashing.
Block headers contain 6 things:
1. The miner's client version. Pretty straightforward, the version number of the software the miner
is using.
2. The hash of the previous block in the blockchain. This is what was calculated by the miners
last time, and is now being calculated for the next block.
3. The hash root or Merkle root of all transactions on the block.
4. A timestamp.
5. The target difficulty of the network.
6. A nonce (random number).
All of that data is getting hashed through the SHA256 algorithm into a 256-bit alphanumeric string
and must start with 18 zeros. The target changes as the difficulty change every 2,016 blocks.
And the miners arrive at this particular hash by varying a slight portion of the block’s headers,
which is called a “nonce.” A nonce always starts with random like “0” and is incremented every
time for accessing the required hash or target value.
after all the shifting of the nonce is hit and miss, the chances of getting this particular hash, which
starts with these many zeros, is very low. Therefore, many attempts must be made by a miner by
changing the nonce.
And this needs an enormous amount of computational power and hardware resources which proves
that a large amount of work is achieved before mining any individual block. That’s why this is
called “proof-of-work“.
And in this way, that miner first obtains the correct Bitcoin Hash will win the game of chance and
get the block reward of 12.5 bitcoin.
Blockchain
45
SHA-256 is one of the most important algorithms for creating a new cryptocurrency with secured
blockchain technology.
Ethash in term of Ethereum:
Ethash is a memory hard (i.e. each GPU miner needs 1+ GB of RAM) proof of work mining
algorithm developed for Ethereum 1.0 and currently used by Ethereum, Ethereum Classic, and
several other cryptocurrencies. It is a modified version of Dagger Hashimoto, and was designed
to be ASIC-resistant and efficiently verifiable by a light client - characteristics which are
maintained by Ethash.
The Ethash algorithm is used to dynamically adjust the mining difficulty of the blockchain that
implements it. In other words, Ethash determines roughly how much computational resources
should be spent in order for a miner to be able to find the nonce that allows them to propose a
new block to add to the blockchain.
Ethash is not itself a cryptographic hash function. The hash function used by Ethereum is a
variant of the SHA3 hash and is called Keccak-256. The hash was developed at the same time as
the SHA3 standard and received a late change in the padding of the finalized hash algorithm.
Ethereums SHA3-256 and SHA3-512 are not standard SHA3 hashes, and are often referred to as
Keccak-256 and Keccak-512.
The Ethash algorithm generally follows a route in which a seed can be computed for each block
by scanning through block headers, and which can compute a 16MB pseudorandom cache. Light
clients then store the cache, which eventually is generated into a 1GB dataset and is then stored
by full clients and miners. The dataset grows linearly over time and verification is done on the
dataset until it is updated. The large dataset is updated once every 30,000 blocks.
The parameters for Ethash cache and datasets depend on the block number, as the cache and
dataset sizes grow linearly. The highest prime below the linearly growing threshold is taken in
order to reduce risk of accidental regularities leading to cyclic behaviors.
Blockchain
46
6. Introduction to Smart Contracts.
● Introduction to Smart Contracts
● Characteristics of Smart Contracts
● Types of Oracles
● Proof of Work (PoW)
● Proof of Stake (PoS)
● Examples,
○ Smart Contract in Healthcare Industry
○ Smart Contract in Supply Chain.
Theory:-
Introduction to Smart Contracts:
A "smart contract" is simply a program that runs on the Ethereum blockchain. It's a collection of
code (its functions) and data (its state) that resides at a specific address on the Ethereum
blockchain.
Smart contracts are a type of Ethereum account. This means they have a balance and they can send
transactions over the network. However they're not controlled by a user, instead they are deployed
to the network and run as programmed. User accounts can then interact with a smart contract by
submitting transactions that execute a function defined on the smart contract. Smart contracts can
define rules, like a regular contract, and automatically enforce them via the code. Smart contracts
can not be deleted by default, and interactions with them are irreversible.
Benefits of smart contracts
Certainty and Stability:
In smart contracts, each party understands its obligations, the manner of performance,
consequences of performance or non-performance and converts it into a code. Once the smart
contract is executed, its terms cannot be changed. The code automates the performance of the
contract. The transactions that take place are irreversible. Thus, the execution of the code avoids
any uncertainty that may arise due to the possibility of ambiguity or contradiction in the terms of
the contract written in natural language. They also leave little room for subjective decision-making
and issues resulting from partial, total non-compliance or late compliance of the contractual
obligations.
Blockchain
47
Reduce delay:
Smart contracts allow digital verification, confirmation, control and execution of contracts. This
enables the parties to reduce the delays caused in performance of the contractual obligations,
obviate the need for separate physical documentation of the performance and its submission to the
other party. For example, where a project is divided into phases, the system can digitally capture
and verify the extent of performance of a project and automatically release payment for tasks
completed and grant permissions for carrying out work in the next phase of the project.
Savings:
As the human interface in the performance of the contracts is minimal, smart contracts eliminate
the role of intermediaries through digitalization and automation, resulting in savings.
Backup:
Blockchain technology operates on a distributed-ledger and all documents are duplicated multiple
times allowing recovery of files.
Safety:
Data related to smart contracts can be protected by use of encryption and cryptography.
Accuracy:
As business processes are automated and standardized in smart contracts. The possibility of errors
is minimized by reducing the need for manual work.
Characteristics of Smart Contracts:
Smart contracts have the following characteristics:
 they’re self-verifying due to automated possibilities;
 they’re self-enforcing when the rules are met at all stages;
 they’re tamper-proof, as no one can change what’s been programmed.
Blockchain
48
Types of Oracles:
The notion of oracles — even decentralized oracles — has been around for years and continues to
fuel debate about how to implement them and whether they can be trusted.
Oracles retrieve and verify external data for blockchains and smart contracts through methods such
as web APIs or market data feeds. The type of data required by smart contracts can include
information on price feeds, weather information, or even random number generation for gambling.
Leveraging oracles consists of querying the data source for specific information and subsequently
connecting to that source to interface between the blockchain and the data feed. As a result, smart
contracts can execute based on the particular information flowing from the data feed.
Data feeds in real-world markets and web APIs are usually not deterministic like blockchains and
smart contracts. Oracles act as a bridge that can digest external and non-deterministic information
into a format that a blockchain can understand and execute particular conditions with. Oracles can
even be used for N-of-M multi-signature transactions to reach consensus on which transaction to
sign, in relevant scenarios.
Oracles form the basis of platforms like Augur, which is a decentralized prediction market.
However, Augur is more representative of a complex oracle itself that functions as a data feed
based on the “Wisdom of the Crowd” where participant behavior effectively acts as the data source.
Augur also utilizes oracles for reporting the correct result to prediction markets with an incentive
structure driving honest reporting.
There are several forms of oracles including:
 Hardware Oracles
 Software Oracles
 Consensus Oracles
Blockchain
49
 Inbound Oracles
 Outbound Oracles
Hardware Oracles are sensors integrated with tangible physical objects. Primary examples would
be in supply chain tracking with the use of RFID tags for feeding data like environmental
conditions of products to the blockchain.
Software Oracles are the most common form that pull data from third-party sources such as web
APIs and can include real-world information like flight statuses and weather data.
Consensus Oracles represent a step towards decentralized oracles and rely on aggregating data
from several oracles with proprietary methods for determining their authenticity and accuracy.
Inbound Oracles reflect “if this happens then do that” scenarios associated with software oracles
such as “if this price is met by an asset, then trigger a sell.”
Outbound Oracles allow smart contracts to send data to sources outside of the blockchain network
they exist on and are also software oracles.
The potential ability of oracles to bridge off-chain and on-chain data as an interface between
traditional networks and blockchain networks has important long-term ramifications. However,
the inherent problem is that these oracles are from centralized points of origin that typically require
third-party permission. Additionally, the obstacle of authenticating oracle data is where trust-
minimized systems like blockchains and traditional trust assumptions clash.
Proof of Work (PoW):
Proof of work (PoW) describes a system that requires a not-insignificant but feasible amount of
effort in order to deter frivolous or malicious uses of computing power, such as sending spam
emails or launching denial of service attacks. The concept was subsequently adapted to securing
digital money by Hal Finney in 2004 through the idea of "reusable proof of work" using the SHA-
256 hashing algorithm.
Following its introduction in 2009, Bitcoin became the first widely adopted application of Finney's
PoW idea (Finney was also the recipient of the first bitcoin transaction). Proof of work forms the
basis of many other cryptocurrencies as well, allowing for secure, decentralized consensus.
 Proof of work (PoW) is a decentralized consensus mechanism that requires members of a
network to expend effort solving an arbitrary mathematical puzzle to prevent anybody from
gaming the system.
 Proof of work is used widely in cryptocurrency mining, for validating transactions and
mining new tokens.
 Due to proof of work, Bitcoin and other cryptocurrency transactions can be processed peer-
to-peer in a secure manner without the need for a trusted third party.
Blockchain
50
 Proof of work at scale requires huge amounts of energy, which only increases as more
miners join the network.
 Proof of Stake (POS) was one of several novel consensus mechanisms created as an
alternative to proof of work.
Understanding Proof of Work:
This explanation will focus on proof of work as it functions in the bitcoin network. Bitcoin is a
digital currency that is underpinned by a kind of distributed ledger known as a "blockchain." This
ledger contains a record of all bitcoin transactions, arranged in sequential "blocks," so that no user
is allowed to spend any of their holdings twice. In order to prevent tampering, the ledger is public,
or "distributed"; an altered version would quickly be rejected by other users.
The way that users detect tampering in practice is through hashes, long strings of numbers that
serve as proof of work. Put a given set of data through a hash function (bitcoin uses SHA-256),
and it will only ever generate one hash. Due to the "avalanche effect," however, even a tiny change
to any portion of the original data will result in a totally unrecognizable hash. Whatever the size
of the original data set, the hash generated by a given function will be the same length. The hash
is a one-way function: it cannot be used to obtain the original data, only to check that the data that
generated the hash matches the original data.
Generating just any hash for a set of bitcoin transactions would be trivial for a modern computer,
so in order to turn the process into "work," the bitcoin network sets a certain level of "difficulty."
This setting is adjusted so that a new block is "mined" – added to the blockchain by generating a
valid hash – approximately every 10 minutes. Setting difficulty is accomplished by establishing a
"target" for the hash: the lower the target, the smaller the set of valid hashes, and the harder it is to
generate one. In practice, this means a hash that starts with a very long string of zeros.
Proof of Stake (PoS):
The Proof of Stake (PoS) concept states that a person can mine or validate block transactions
according to how many coins they hold. This means that the more coins owned by a miner, the
more mining power they have.
KEY TAKEAWAYS
Blockchain
51
 With Proof of Stake (POS), cryptocurrency miners can mine or validate block transactions
based on the amount of coins a miner holds.
 Proof of Stake (POS) was created as an alternative to Proof of Work (POW), which is the
original consensus algorithm in Blockchain technology, used to confirm transactions and
add new blocks to the chain.
 Proof of Work (POW) requires huge amounts of energy, with miners needing to sell their
coins to ultimately foot the bill; Proof of Stake (PoS) gives mining power based on the
percentage of coins held by a miner.
 Proof of Stake (POS) is seen as less risky in terms of the potential for miners to attack the
network, as it structures compensation in a way that makes an attack less advantageous for
the miner.
 Bitcoin, the largest cryptocurrency, runs on proof of work rather than proof of stake.
Understanding Proof of Stake (PoS):
The proof of stake was created as an alternative to the proof of work (PoW) concept, to tackle
inherent issues in the latter. Currently, only altcoins use the proof of stake concept. When a
transaction is initiated, the transaction data is fitted into a block with a maximum capacity of 1
megabyte, and then duplicated across multiple computers or nodes on the network. The nodes are
the administrative body of the blockchain and verify the legitimacy of the transactions in each
block.
To carry out the verification step, the nodes or miners would need to solve a computational puzzle,
known as the proof of work problem. The first miner to decrypt each block transaction problem
gets rewarded with a coin. Once a block of transactions has been verified, it is added to the
blockchain, a public transparent ledger.
How Proof of Stake Addresses Mining Power:
Mining requires a great deal of computing power to run different cryptographic calculations to
unlock the computational challenges. The computing power translates into a high amount of
electricity and power needed for the proof of work.
In 2015, it was estimated that one Bitcoin transaction required the amount of electricity needed to
power up 1.57 American households per day. That number has only since gone up. According to
the University of Cambridge's Bitcoin Electricity Consumption Index, Bitcoin consumers about
119.87 terawatt-hours per year, which is more than countries like the United Arab Emirates and
the Netherlands consume annually.1 To foot the electricity bill, miners would usually sell their
Blockchain
52
awarded coins for fiat money, which would lead to a downward movement in the price of the
cryptocurrency.
The proof of stake (PoS) seeks to address this issue by attributing mining power to the proportion
of coins held by a miner. This way, instead of utilizing energy to answer PoW puzzles, a PoS miner
is limited to mining a percentage of transactions that is reflective of their ownership stake. For
instance, a miner who owns 3% of the coins available can theoretically mine only 3% of the blocks.
Examples
Smart Contract in Healthcare Industry
While smart contracts have the potential to benefit any industry, it is particularly useful for the
healthcare industry.
A typical blockchain transaction in healthcare takes place as under:
 A patient interacts with a healthcare organization and creates a new record of his
information such as age, gender, address. The information would be stored on a blockchain
and the patient would be assigned a private key.
 The healthcare organization would provide services to a patient. The data relating to the
procedure performed, doctor’s note, medicine dispensed by pharmacist etc. would be
captured in the patient’s public ID.
 The transaction between the patient and the healthcare organization is completed and
uniquely identified.
 Each transaction is encrypted and given an identity that is stored on the blockchain,
containing the patient’s public (non-identifiable) ID.
 Health organizations and institutions can submit requests for the data via APIs and use the
patient’s public (non-identifiable) ID on the blockchain to retrieve the encrypted data
which can be analyzed for medical research.
 The patient can share his private key with new health organizations to allow them to use it
to decrypt his data. The private key links the patient’s identity to blockchain data and
without the key, the data remain non-identifiable.
Smart Contract in Supply Chain.
Blockchain
53
Blockchain is a distributed ledger technology that records exchanges of value between parties
securely, permanently, and in an easily verifiable manner. It is the technology underlying
cryptocurrencies such as Bitcoin and Ethereum. Although initially used for financial
transactions, blockchain's applications extend beyond finance and can impact a wide variety of
industries.
One such application is in supply chain management. With multiple stakeholders and business
transactions, supply chains are inherently complex. Many challenges exist, including the lack of
transparency and traceability, difficulty in managing risks and disruptions, and the need to build
trust and reputation.
Blockchain technology ushers in the potential to solve these challenges through the use of smart
contracts. Smart contracts are digital agreements between transacting parties that are written in
computer code and deployed to the blockchain, where they will self-execute when predetermined
conditions are met. They reduce complexity in a supply chain through automated verification and
execution of the multiple business transactions involved.
A decentralized, immutable record also ensures all stakeholders have equal access to information
and helps build trust. Smart contracts improve the transparency, traceability and efficiency of a
supply chain, allowing it to be more agile while strengthening relationships among stakeholders.
In this thesis, I create a proof-of-concept to explore the application of smart contracts in supply
chain management.
The proof-of-concept consists of three smart contracts, coded in Solidity, that can be integrated
to determine the provenance of goods, track the chain of custody as goods flow through a supply
chain, automatically execute payment upon fulfillment of criteria, and maintain an open database
of stakeholders with a score indicating their reputation. I validate the proof-of-concept using the
Ethereum platform, which was specially conceived for smart contract and decentralized
application development.
Preliminary testing shows that the contracts are able to interact with one another and execute
their functions as intended. Further testing is necessary to evaluate the performance of the
contracts on the live Ethereum network, and integration with smart sensors should be explored to
create a more viable real-world solution.
Blockchain
54
7. Explain Byzantine Fault Problem.
Theory:-
A Byzantine fault (also interactive consistency, source congruency, error avalanche, Byzantine
agreement problem, Byzantine generals problem, and Byzantine failure[1]) is a condition of a
computer system, particularly distributed computing systems, where components may fail and
there is imperfect information on whether a component has failed. The term takes its name from
an allegory, the "Byzantine Generals Problem",[2] developed to describe a situation in which, in
order to avoid catastrophic failure of the system, the system's actors must agree on a concerted
strategy, but some of these actors are unreliable.
In a Byzantine fault, a component such as a server can inconsistently appear both failed and
functioning to failure-detection systems, presenting different symptoms to different observers. It
is difficult for the other components to declare it failed and shut it out of the network, because they
need to first reach a consensus regarding which component has failed in the first place.
Byzantine fault tolerance (BFT) is the dependability of a fault-tolerant computer system to such
conditions.
Byzantine Generals’ Problem:
The problem was explained aptly in a paper by LESLIE LAMPORT, ROBERT SHOSTAK, and
MARSHALL PEASE at Microsoft Research in 1982:
Imagine that several divisions of the Byzantine army are camped outside an enemy city, each
division commanded by its own general. The generals can communicate with one another only by
messenger. After observing the enemy, they must decide upon a common plan of action. However,
some of the generals may be traitors, trying to prevent the loyal generals from reaching an
agreement. The generals must decide on when to attack the city, but they need a strong majority
of their army to attack at the same time. The generals must have an algorithm to guarantee that
(a) all loyal generals decide upon the same plan of action, and (b) a small number of traitors
cannot cause the loyal generals to adopt a bad plan. The loyal generals will all do what the
algorithm says they should, but the traitors may do anything they wish. The algorithm must
guarantee condition (a) regardless of what the traitors do. The loyal generals should not only
reach agreement, but should agree upon a reasonable plan.
Blockchain
55
Byzantine fault tolerance can be achieved if the correctly working nodes in the network reach an
agreement on their values. There can be a default vote value given to missing messages i.e., we
can assume that the message from a particular node is ‘faulty’ if the message is not received within
a certain time limit. Furthermore, we can also assign a default response if the majority of nodes
respond with a correct value.
Leslie Lamport proved that if we have 3m+1 correctly working processors, a consensus(agreement
on same state) can be reached if atmost m processors are faulty which means that strictly more
than two-thirds of the total number of processors should be honest.
Types of Byzantine Failures:
There are two categories of failures that are considered. One is fail-stop(in which the node fails
and stops operating) and other is arbitrary-node failure. Some of the arbitrary node failures are
given below :
 Failure to return a result
 Respond with an incorrect result
 Respond with a deliberately misleading result
 Respond with a different result to different parts of the system
Advantages of pbft:
Energy efficiency : pBFT can achieve distributed consensus without carrying out complex
mathematical computations(like in PoW). Zilliqa employs pBFT in combination with PoW-like
complex computations round for every 100th block.
Transaction finality : The transactions do not require multiple confirmations(like in case of PoW
mechanism in Bitcoin where every node individually verifies all the transactions before adding the
new block to the blockchain; confirmations can take between 10-60 minutes depending upon how
many entities confirm the new block) after they have been finalized and agreed upon.
Low reward variance : Every node in the network takes part in responding to the request by the
client and hence every node can be incentivized leading to low variance in rewarding the nodes
that help in decision making.
Blockchain
56
How pBFT works ?
pBFT tries to provide a practical Byzantine state machine replication that can work even when
malicious nodes are operating in the system.
Nodes in a pBFT enabled distributed system are sequentially ordered with one node being the
primary(or the leader node) and others referred to as secondary(or the backup nodes). Note here
that any eligible node in the system can become the primary by transitioning from secondary to
primary(typically, in the case of a primary node failure). The goal is that all honest nodes help in
reaching a consensus regarding the state of the system using the majority rule.
A practical Byzantine Fault Tolerant system can function on the condition that the maximum
number of malicious nodes must not be greater than or equal to one-third of all the nodes in the
system. As the number of nodes increase, the system becomes more secure.
pBFT consensus rounds are broken into 4 phases(refer with the image below):
 The client sends a request to the primary(leader) node.
 The primary(leader) node broadcasts the request to the all the secondary(backup) nodes.
 The nodes(primary and secondaries) perform the service requested and then send back a
reply to the client.
 The request is served successfully when the client receives ‘m+1’ replies from different
nodes in the network with the same result, where m is the maximum number of faulty nodes
allowed.
Blockchain
57
The primary(leader) node is changed during every view(pBFT consensus rounds) and can be
substituted by a view change protocol if a predefined quantity of time has passed without the
leading node broadcasting a request to the backups(secondary). If needed, a majority of the honest
nodes can vote on the legitimacy of the current leading node and replace it with the next leading
node in line.
Limitations of pBFT:
The pBFT consensus model works efficiently only when the number of nodes in the distributed
network is small due to the high communication overhead that increases exponentially with every
extra node in the network.
 Sybil attacks : The pBFT mechanisms are susceptible to Sybil attacks, where one
entity(party) controls many identities. As the number of nodes in the network increase,
sybil attacks become increasingly difficult to carry out. But as pBFT mechanisms have
scalability issues too, the pBFT mechanism is used in combination with other
mechanism(s).
 Scaling : pBFT does not scale well because of its communication(with all the other nodes
at every step) overhead. As the number of nodes in the network increase(increases as
O(n^k), where n is the messages and k is the number of nodes), so does the time taken to
respond to the request.
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency
Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency

Weitere ähnliche Inhalte

Was ist angesagt?

Blockchain technology-report-final
Blockchain technology-report-finalBlockchain technology-report-final
Blockchain technology-report-finalRishabhMalik32
 
Blockchain notes b tech aktu by krazy kreation (kulbhushan)
Blockchain notes b tech aktu by krazy kreation (kulbhushan)Blockchain notes b tech aktu by krazy kreation (kulbhushan)
Blockchain notes b tech aktu by krazy kreation (kulbhushan)rahulmondol
 
Blockchain Technology Report 2018
Blockchain Technology Report 2018Blockchain Technology Report 2018
Blockchain Technology Report 2018Ranvijay Singh
 
Blockchain in Insurance 101
Blockchain in Insurance 101Blockchain in Insurance 101
Blockchain in Insurance 101Peter Ing
 
Blockchain Landscape Report 2019
Blockchain Landscape Report 2019Blockchain Landscape Report 2019
Blockchain Landscape Report 2019[x]cube LABS
 
Blockchain technology revolutionising technology
Blockchain technology revolutionising technologyBlockchain technology revolutionising technology
Blockchain technology revolutionising technologySuman Nayak
 
Blockchain Technology Fundamentals
Blockchain Technology FundamentalsBlockchain Technology Fundamentals
Blockchain Technology FundamentalsExperfy
 
Webinar: Blockchain – A Revolution You Can’t Stop | by Intellectsoft
Webinar: Blockchain – A Revolution You Can’t Stop | by IntellectsoftWebinar: Blockchain – A Revolution You Can’t Stop | by Intellectsoft
Webinar: Blockchain – A Revolution You Can’t Stop | by IntellectsoftIntellectsoft
 
Blockchain - part 6 of 7 modern trends that every it pro should know about-
Blockchain  - part 6 of 7 modern trends that every it pro should know about-Blockchain  - part 6 of 7 modern trends that every it pro should know about-
Blockchain - part 6 of 7 modern trends that every it pro should know about-Ibrahim Muhammadi
 
Bitcoin Protocols 1.0 and 2.0 Explained in the Series: Blockchain: The Inform...
Bitcoin Protocols 1.0 and 2.0 Explained in the Series: Blockchain: The Inform...Bitcoin Protocols 1.0 and 2.0 Explained in the Series: Blockchain: The Inform...
Bitcoin Protocols 1.0 and 2.0 Explained in the Series: Blockchain: The Inform...Melanie Swan
 
Blockchain Technology Developments in Government 3.0
Blockchain Technology Developments in Government 3.0Blockchain Technology Developments in Government 3.0
Blockchain Technology Developments in Government 3.0samossummit
 
Introduction to blockchain & cryptocurrencies
Introduction to blockchain & cryptocurrenciesIntroduction to blockchain & cryptocurrencies
Introduction to blockchain & cryptocurrenciesAurobindo Nayak
 
Blockchain technology amplify your enterprise / IBM
Blockchain technology amplify your enterprise / IBMBlockchain technology amplify your enterprise / IBM
Blockchain technology amplify your enterprise / IBMDiego Alberto Tamayo
 
Supply Chain Management using Blockchain
Supply Chain Management using BlockchainSupply Chain Management using Blockchain
Supply Chain Management using BlockchainYugn27
 

Was ist angesagt? (20)

Blockchain technology-report-final
Blockchain technology-report-finalBlockchain technology-report-final
Blockchain technology-report-final
 
Blockchain notes b tech aktu by krazy kreation (kulbhushan)
Blockchain notes b tech aktu by krazy kreation (kulbhushan)Blockchain notes b tech aktu by krazy kreation (kulbhushan)
Blockchain notes b tech aktu by krazy kreation (kulbhushan)
 
Blockchain Technology Report 2018
Blockchain Technology Report 2018Blockchain Technology Report 2018
Blockchain Technology Report 2018
 
Blockchain in Insurance 101
Blockchain in Insurance 101Blockchain in Insurance 101
Blockchain in Insurance 101
 
Blockchain Landscape Report 2019
Blockchain Landscape Report 2019Blockchain Landscape Report 2019
Blockchain Landscape Report 2019
 
Blockchain technology revolutionising technology
Blockchain technology revolutionising technologyBlockchain technology revolutionising technology
Blockchain technology revolutionising technology
 
Blockchain Technology Fundamentals
Blockchain Technology FundamentalsBlockchain Technology Fundamentals
Blockchain Technology Fundamentals
 
Webinar: Blockchain – A Revolution You Can’t Stop | by Intellectsoft
Webinar: Blockchain – A Revolution You Can’t Stop | by IntellectsoftWebinar: Blockchain – A Revolution You Can’t Stop | by Intellectsoft
Webinar: Blockchain – A Revolution You Can’t Stop | by Intellectsoft
 
Blockchain - part 6 of 7 modern trends that every it pro should know about-
Blockchain  - part 6 of 7 modern trends that every it pro should know about-Blockchain  - part 6 of 7 modern trends that every it pro should know about-
Blockchain - part 6 of 7 modern trends that every it pro should know about-
 
Bitcoin Protocols 1.0 and 2.0 Explained in the Series: Blockchain: The Inform...
Bitcoin Protocols 1.0 and 2.0 Explained in the Series: Blockchain: The Inform...Bitcoin Protocols 1.0 and 2.0 Explained in the Series: Blockchain: The Inform...
Bitcoin Protocols 1.0 and 2.0 Explained in the Series: Blockchain: The Inform...
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain Technology
 
Blockchain
BlockchainBlockchain
Blockchain
 
Blockchain Technology Developments in Government 3.0
Blockchain Technology Developments in Government 3.0Blockchain Technology Developments in Government 3.0
Blockchain Technology Developments in Government 3.0
 
The coin tree summarized 10-15
The coin tree   summarized 10-15The coin tree   summarized 10-15
The coin tree summarized 10-15
 
Introduction to blockchain & cryptocurrencies
Introduction to blockchain & cryptocurrenciesIntroduction to blockchain & cryptocurrencies
Introduction to blockchain & cryptocurrencies
 
Blockchain technology
Blockchain technologyBlockchain technology
Blockchain technology
 
The Education Blockchain
The Education BlockchainThe Education Blockchain
The Education Blockchain
 
Blockchain technology amplify your enterprise / IBM
Blockchain technology amplify your enterprise / IBMBlockchain technology amplify your enterprise / IBM
Blockchain technology amplify your enterprise / IBM
 
Blockchain
BlockchainBlockchain
Blockchain
 
Supply Chain Management using Blockchain
Supply Chain Management using BlockchainSupply Chain Management using Blockchain
Supply Chain Management using Blockchain
 

Ähnlich wie Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency

Blockchain Technology Explained
Blockchain Technology ExplainedBlockchain Technology Explained
Blockchain Technology ExplainedMdSaifulIslam289
 
Blockchain- Ammar Ahmad.pdf
Blockchain- Ammar Ahmad.pdfBlockchain- Ammar Ahmad.pdf
Blockchain- Ammar Ahmad.pdfArcadePrinters
 
Blockchain Fundamentals Explained In Simplest Way
Blockchain Fundamentals Explained In Simplest WayBlockchain Fundamentals Explained In Simplest Way
Blockchain Fundamentals Explained In Simplest WayeTailing India
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain TechnologyNimmy Solomon
 
Blockchain Facts_What Is It, How IT Works and How Can It Be Used.pdf
Blockchain Facts_What Is It, How IT Works and How Can It Be Used.pdfBlockchain Facts_What Is It, How IT Works and How Can It Be Used.pdf
Blockchain Facts_What Is It, How IT Works and How Can It Be Used.pdfHarry977415
 
A Primer on Blockchain and its Potential, with a Focus on the GCC
A Primer on Blockchain and its Potential, with a Focus on the GCCA Primer on Blockchain and its Potential, with a Focus on the GCC
A Primer on Blockchain and its Potential, with a Focus on the GCCZeyad T. Al Mudhaf
 
Abhishek jaiswal blockchain
Abhishek jaiswal blockchainAbhishek jaiswal blockchain
Abhishek jaiswal blockchainAbhishek Jaiswal
 
Blockchain Technology And Cryptocurrency
Blockchain Technology And CryptocurrencyBlockchain Technology And Cryptocurrency
Blockchain Technology And CryptocurrencyEno Bassey
 
Blockchain Technology and Its Application in Libraries
Blockchain Technology and Its Application in LibrariesBlockchain Technology and Its Application in Libraries
Blockchain Technology and Its Application in LibrariesNabi Hasan
 
Block chain technology
Block chain technologyBlock chain technology
Block chain technologyRinshi Singh
 
The Potential of Blockchain Technology
The Potential of Blockchain TechnologyThe Potential of Blockchain Technology
The Potential of Blockchain TechnologyPioneers.io
 
cryptocurrency mining and digital currencies Bitcoin, Ethereum underlying te...
cryptocurrency mining and digital currencies  Bitcoin, Ethereum underlying te...cryptocurrency mining and digital currencies  Bitcoin, Ethereum underlying te...
cryptocurrency mining and digital currencies Bitcoin, Ethereum underlying te...rsiyengar.com
 
Blockchain: The Invisible Technology – How We Build a Blockchain
Blockchain: The Invisible Technology – How We Build a BlockchainBlockchain: The Invisible Technology – How We Build a Blockchain
Blockchain: The Invisible Technology – How We Build a BlockchainPriyAnshu Bansal
 
Blockchain could be a data structure that could be a growing list of informat...
Blockchain could be a data structure that could be a growing list of informat...Blockchain could be a data structure that could be a growing list of informat...
Blockchain could be a data structure that could be a growing list of informat...Richa575316
 

Ähnlich wie Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency (20)

Blockchain
BlockchainBlockchain
Blockchain
 
Blockchain Technology Explained
Blockchain Technology ExplainedBlockchain Technology Explained
Blockchain Technology Explained
 
Blockchain- Ammar Ahmad.pdf
Blockchain- Ammar Ahmad.pdfBlockchain- Ammar Ahmad.pdf
Blockchain- Ammar Ahmad.pdf
 
Blockchain Fundamentals Explained In Simplest Way
Blockchain Fundamentals Explained In Simplest WayBlockchain Fundamentals Explained In Simplest Way
Blockchain Fundamentals Explained In Simplest Way
 
blockchain
blockchainblockchain
blockchain
 
Blockchain by Aman Thakur.pptx
Blockchain by Aman Thakur.pptxBlockchain by Aman Thakur.pptx
Blockchain by Aman Thakur.pptx
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain Technology
 
Blockchain Facts_What Is It, How IT Works and How Can It Be Used.pdf
Blockchain Facts_What Is It, How IT Works and How Can It Be Used.pdfBlockchain Facts_What Is It, How IT Works and How Can It Be Used.pdf
Blockchain Facts_What Is It, How IT Works and How Can It Be Used.pdf
 
A Primer on Blockchain and its Potential, with a Focus on the GCC
A Primer on Blockchain and its Potential, with a Focus on the GCCA Primer on Blockchain and its Potential, with a Focus on the GCC
A Primer on Blockchain and its Potential, with a Focus on the GCC
 
Abhishek jaiswal blockchain
Abhishek jaiswal blockchainAbhishek jaiswal blockchain
Abhishek jaiswal blockchain
 
Blockchain Technology And Cryptocurrency
Blockchain Technology And CryptocurrencyBlockchain Technology And Cryptocurrency
Blockchain Technology And Cryptocurrency
 
Define blockchain
Define blockchainDefine blockchain
Define blockchain
 
blockchain-161025100639.pptx
blockchain-161025100639.pptxblockchain-161025100639.pptx
blockchain-161025100639.pptx
 
Blockchaintech
BlockchaintechBlockchaintech
Blockchaintech
 
Blockchain Technology and Its Application in Libraries
Blockchain Technology and Its Application in LibrariesBlockchain Technology and Its Application in Libraries
Blockchain Technology and Its Application in Libraries
 
Block chain technology
Block chain technologyBlock chain technology
Block chain technology
 
The Potential of Blockchain Technology
The Potential of Blockchain TechnologyThe Potential of Blockchain Technology
The Potential of Blockchain Technology
 
cryptocurrency mining and digital currencies Bitcoin, Ethereum underlying te...
cryptocurrency mining and digital currencies  Bitcoin, Ethereum underlying te...cryptocurrency mining and digital currencies  Bitcoin, Ethereum underlying te...
cryptocurrency mining and digital currencies Bitcoin, Ethereum underlying te...
 
Blockchain: The Invisible Technology – How We Build a Blockchain
Blockchain: The Invisible Technology – How We Build a BlockchainBlockchain: The Invisible Technology – How We Build a Blockchain
Blockchain: The Invisible Technology – How We Build a Blockchain
 
Blockchain could be a data structure that could be a growing list of informat...
Blockchain could be a data structure that could be a growing list of informat...Blockchain could be a data structure that could be a growing list of informat...
Blockchain could be a data structure that could be a growing list of informat...
 

Kürzlich hochgeladen

Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 

Kürzlich hochgeladen (20)

Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 

Blockchain Technology | Bitcoin | Ethereum Coin | Cryptocurrency

  • 2. Blockchain 2 1. Introduction to Blockchain. ● What is Blockchain? ● Working of Blockchain. ● Disadvantages of Current Systems. ● Benefits of Blockchain. ● Applications of Blockchain (At least 5 Applications should be there). Theory:- Abstract: Blockchain is a technology that is developed using a combination of various techniques such as mathematics, algorithms, cryptography, economic models, and so on. Blockchain is a public ledger of all cryptocurrency transactions that are digitized and decentralized. All the transactions of cryptocurrencies are stored in chronological order to help users in tracking the transactions without maintaining any central record of the transactions. What is Blockchain? Blockchain seems complicated, and it definitely can be, but its core concept is really quite simple. A blockchain is a type of database. To be able to understand blockchain, it helps to first understand what a database actually is. A database is a collection of information that is stored electronically on a computer system. Information, or data, in databases is typically structured in table format to allow for easier searching and filtering for specific information. What is the difference between someone using a spreadsheet to store information rather than a database? Spreadsheets are designed for one person, or a small group of people, to store and access limited amounts of information. In contrast, a database is designed to house significantly larger amounts of information that can be accessed, filtered, and manipulated quickly and easily by any number of users at once. Large databases achieve this by housing data on servers that are made of powerful computers. These servers can sometimes be built using hundreds or thousands of computers in order to have the computational power and storage capacity necessary for many users to access the database simultaneously. While a spreadsheet or database may be accessible to any number of people, it is
  • 3. Blockchain 3 often owned by a business and managed by an appointed individual that has complete control over how it works and the data within it. Working of Blockchain: Blockchain consists of three important concepts: blocks, nodes and miners. Blocks Every chain consists of multiple blocks and each block has three basic elements: The data in the block. A 32-bit whole number called a nonce. The nonce is randomly generated when a block is created, which then generates a block header hash.
  • 4. Blockchain 4 The hash is a 256-bit number wedded to the nonce. It must start with a huge number of zeroes (i.e., be extremely small). When the first block of a chain is created, a nonce generates the cryptographic hash. The data in the block is considered signed and forever tied to the nonce and hash unless it is mined. Miners Miners create new blocks on the chain through a process called mining. In a blockchain every block has its own unique nonce and hash, but also references the hash of the previous block in the chain, so mining a block isn't easy, especially on large chains. Miners use special software to solve the incredibly complex math problem of finding a nonce that generates an accepted hash. Because the nonce is only 32 bits and the hash is 256, there are roughly four billion possible nonce-hash combinations that must be mined before the right one is found. When that happens miners are said to have found the "golden nonce" and their block is added to the chain. Making a change to any block earlier in the chain requires re-mining not just the block with the change, but all of the blocks that come after. This is why it's extremely difficult to manipulate blockchain technology. Think of it as "safety in math" since finding golden nonces requires an enormous amount of time and computing power. When a block is successfully mined, the change is accepted by all of the nodes on the network and the miner is rewarded financially. Nodes One of the most important concepts in blockchain technology is decentralization. No one computer or organization can own the chain. Instead, it is a distributed ledger via the nodes connected to the chain. Nodes can be any kind of electronic device that maintains copies of the blockchain and keeps the network functioning.
  • 5. Blockchain 5 Every node has its own copy of the blockchain and the network must algorithmically approve any newly mined block for the chain to be updated, trusted and verified. Since blockchains are transparent, every action in the ledger can be easily checked and viewed. Each participant is given a unique alphanumeric identification number that shows their transactions. Combining public information with a system of checks-and-balances helps the blockchain maintain integrity and creates trust among users. Essentially, blockchains can be thought of as the scalability of trust via technology. Disadvantages of Current Systems: While there are significant upsides to the blockchain, there are also significant challenges to its adoption. The roadblocks to the application of blockchain technology today are not just technical. The real challenges are political and regulatory, for the most part, to say nothing of the thousands of hours (read: money) of custom software design and back-end programming required to integrate blockchain to current business networks. Here are some of the challenges standing in the way of widespread blockchain adoption. Technology Cost Although blockchain can save users money on transaction fees, the technology is far from free. The “proof of work” system that bitcoin uses to validate transactions, for example, consumes vast amounts of computational power. In the real world, the power from the millions of computers on the bitcoin network is close to what Denmark consumes annually. Assuming electricity costs of $0.03~$0.05 per kilowatt-hour, mining costs exclusive of hardware expenses are about $5,000~$7,000 per coin.10. Despite the costs of mining bitcoin, users continue to drive up their electricity bills in order to validate transactions on the blockchain. That’s because when miners add a block to the bitcoin blockchain, they are rewarded with enough bitcoin to make their time and energy worthwhile. When it comes to blockchains that do not use cryptocurrency, however, miners will need to be paid or otherwise incentivized to validate transactions. Some solutions to these issues are beginning to arise. For example, bitcoin mining farms have been set up to use solar power, excess natural gas from fracking sites, or power from wind farms. Speed Inefficiency Bitcoin is a perfect case study for the possible inefficiencies of blockchain. Bitcoin’s “proof of work” system takes about ten minutes to add a new block to the blockchain. At that rate, it’s estimated that the blockchain network can only manage about seven transactions per second (TPS).
  • 6. Blockchain 6 Although other cryptocurrencies such as Ethereum perform better than bitcoin, they are still limited by blockchain. Legacy brand Visa, for context, can process 24,000 TPS. Solutions to this issue have been in development for years. There are currently blockchains that are boasting over 30,000 transactions per second. Illegal Activity While confidentiality on the blockchain network protects users from hacks and preserves privacy, it also allows for illegal trading and activity on the blockchain network. The most cited example of blockchain being used for illicit transactions is probably the Silk Road, an online “dark web” drug marketplace operating from February 2011 until October 2013 when it was shut down by the FBI.6 The website allowed users to browse the website without being tracked using the Tor browser and make illegal purchases in Bitcoin or other cryptocurrencies. Current U.S. regulations require financial service providers to obtain information about their customers when they open an account, verify the identity of each customer, and confirm that customers do not appear on any list of known or suspected terrorist organizations. This system can be seen as both a pro and a con. It gives anyone access to financial accounts but also allows criminals to more easily transact. Many have argued that the good uses of crypto, like banking the unbanked world, outweigh the bad uses of cryptocurrency, especially when most illegal activity is still accomplished through untraceable cash. Regulation Many in the crypto space have expressed concerns about government regulation over cryptocurrencies. While it is getting increasingly difficult and near impossible to end something like Bitcoin as its decentralized network grows, governments could theoretically make it illegal to own cryptocurrencies or participate in their networks. Over time this concern has grown smaller as large companies like PayPal begin to allow the ownership and use of cryptocurrencies on its platform. Benefits of Blockchain: Accuracy of the Chain Transactions on the blockchain network are approved by a network of thousands of computers. This removes almost all human involvement in the verification process, resulting in less human
  • 7. Blockchain 7 error and an accurate record of information. Even if a computer on the network were to make a computational mistake, the error would only be made to one copy of the blockchain. In order for that error to spread to the rest of the blockchain, it would need to be made by at least 51% of the network’s computers—a near impossibility for a large and growing network the size of Bitcoin’s. Cost Reductions Typically, consumers pay a bank to verify a transaction, a notary to sign a document, or a minister to perform a marriage. Blockchain eliminates the need for third-party verification and, with it, their associated costs. Business owners incur a small fee whenever they accept payments using credit cards, for example, because banks and payment processing companies have to process those transactions. Bitcoin, on the other hand, does not have a central authority and has limited transaction fees. Decentralization Blockchain does not store any of its information in a central location. Instead, the blockchain is copied and spread across a network of computers. Whenever a new block is added to the blockchain, every computer on the network updates its blockchain to reflect the change. By spreading that information across a network, rather than storing it in one central database, blockchain becomes more difficult to tamper with. If a copy of the blockchain fell into the hands of a hacker, only a single copy of the information, rather than the entire network, would be compromised. Efficient Transactions Transactions placed through a central authority can take up to a few days to settle. If you attempt to deposit a check on Friday evening, for example, you may not actually see funds in your account until Monday morning. Whereas financial institutions operate during business hours, five days a week, blockchain is working 24 hours a day, seven days a week, and 365 days a year. Transactions can be completed in as little as ten minutes and can be considered secure after just a few hours. This is particularly useful for cross-border trades, which usually take much longer because of time- zone issues and the fact that all parties must confirm payment processing. Private Transactions Many blockchain networks operate as public databases, meaning that anyone with an internet connection can view a list of the network’s transaction history. Although users can access details about transactions, they cannot access identifying information about the users making those
  • 8. Blockchain 8 transactions. It is a common misperception that blockchain networks like bitcoin are anonymous, when in fact they are only confidential. That is, when a user makes public transactions, their unique code called a public key, is recorded on the blockchain, rather than their personal information. If a person has made a Bitcoin purchase on an exchange that requires identification then the person’s identity is still linked to their blockchain address, but a transaction, even when tied to a person’s name, does not reveal any personal information. Secure Transactions Once a transaction is recorded, its authenticity must be verified by the blockchain network. Thousands of computers on the blockchain rush to confirm that the details of the purchase are correct. After a computer has validated the transaction, it is added to the blockchain block. Each block on the blockchain contains its own unique hash, along with the unique hash of the block before it. When the information on a block is edited in any way, that block’s hashcode changes— however, the hash code on the block after it would not. This discrepancy makes it extremely difficult for information on the blockchain to be changed without notice. Transparency Most blockchains are entirely open-source software. This means that anyone and everyone can view its code. This gives auditors the ability to review cryptocurrencies like Bitcoin for security. This also means that there is no real authority on who controls Bitcoin’s code or how it is edited. Because of this, anyone can suggest changes or upgrades to the system. If a majority of the network users agree that the new version of the code with the upgrade is sound and worthwhile then Bitcoin can be updated. Banking the Unbanked Perhaps the most profound facet of blockchain and Bitcoin is the ability for anyone, regardless of ethnicity, gender, or cultural background, to use it. According to the world bank there are nearly 2 billion adults that do not have bank accounts or any means of storing their money or wealth.5 Nearly all of these individuals live in developing countries where the economy is in its infancy and entirely dependent on cash. These people often earn little money that is paid in physical cash. They then need to store this physical cash in hidden locations in their homes or places of living leaving them subject to robbery or unnecessary violence. Keys to a bitcoin wallet can be stored on a piece of paper, a cheap cell
  • 9. Blockchain 9 phone, or even memorized if necessary. For most people, it is likely that these options are more easily hidden than a small pile of cash under a mattress. Blockchains of the future are also looking for solutions to not only be a unit of account for wealth storage, but also to store medical records, property rights, and a variety of other legal contracts. Applications of Blockchain: Money Transfer and Payment Processing. Supply Chains Monitoring. Retail Programs Based on Loyalty Rewards. Digital IDs. Sharing of Data. Protection of Royalty and Copyright. Digital voting. Transfer of Real Estate, Land, and Auto Title.
  • 10. Blockchain 10 2. Differentiate between Public Blockchain, Private Blockchain, Consortium Blockchain and Hybrid Blockchain. Theory:- Currently, there are at least four types of blockchain networks — public blockchains, private blockchains, consortium blockchains and hybrid blockchains. Public blockchains How it works. The first type of blockchain technology is public blockchain. This is where cryptocurrency like Bitcoin originated and helped to popularize distributed ledger technology (DLT). It removes the problems that come with centralization, including less security and transparency. DLT doesn't store information in any one place, instead distributing it across a peer- to-peer network. Its decentralized nature requires some method for verifying the authenticity of data. That method is a consensus algorithm whereby participants in the blockchain reach agreement on the current state of the ledger. Proof of work (PoW) and proof of stake (PoS) are two common consensus methods. Public blockchain is non-restrictive and permissionless, and anyone with internet access can sign on to a blockchain platform to become an authorized node. This user can access current and past records and conduct mining activities, the complex computations used to verify transactions and add them to the ledger. No valid record or transaction can be changed on the network, and anyone can verify the transactions, find bugs or propose changes because the source code is usually open source. Advantages. One of the advantages of public blockchains is that they are completely independent of organizations, so if the organization that started it ceases to exist the public blockchain will still be able to run, as long as there are computers still connected to it. "Some blockchains incentivize users to commit computer power to securing the network by providing a reward," noted James Godefroy, a senior manager at Rouse, an intellectual property services provider. Another advantage of public blockchains is the network's transparency. As long as the users follow security protocols and methods fastidiously, public blockchains are mostly secure.
  • 11. Blockchain 11 Disadvantages. The network can be slow, and companies can't restrict access or use. If hackers gain 51% or more of the computing power of a public blockchain network, they can unilaterally alter it, Godefroy said. Public blockchains also don't scale well. The network slows down as more nodes join the network. Use cases. The most common use case for public blockchains is mining and exchanging cryptocurrencies like Bitcoin. However, it can also be used for creating a fixed record with an auditable chain of custody, such as electronic notarization of affidavits and public records of property ownership. This type of blockchain is ideal for organizations that are built on transparency and trust, such as social support groups or non-governmental organizations. Because of the public nature of the network, private businesses will likely want to steer clear. Private blockchains How it works. A blockchain network that works in a restrictive environment like a closed network, or that is under the control of a single entity, is a private blockchain. While it operates like a public blockchain network in the sense that it uses peer-to-peer connections and decentralization, this type of blockchain is on a much smaller scale. Instead of just anyone being able to join and provide computing power, private blockchains typically are operated on a small network inside a company or organization. They're also known as permissioned blockchains or enterprise blockchains. Advantages. The controlling organization sets permission levels, security, authorizations and accessibility. For example, an organization setting up a private blockchain network can determine which nodes can view, add or change data. It can also prevent third parties from accessing certain information. "You can think of private blockchains as being the intranet, while the public blockchains are more like the internet," Godefroy said. Because they're limited in size, private blockchains can be very fast and can process transactions much more quickly than public blockchains. Disadvantages. The disadvantages of private blockchains include the controversial claim that they aren't true blockchains, since the core philosophy of blockchain is decentralization. It's also more difficult to fully achieve trust in the information, since centralized nodes determine what is valid.
  • 12. Blockchain 12 The small number of nodes can also mean less security. If a few nodes go rogue, the consensus method can be compromised. Additionally, the source code from private blockchains is often proprietary and closed. Users can't independently audit or confirm it, which can lead to less security. There is no anonymity on a private blockchain, either. Use cases. The speed of private blockchains makes them ideal for cases where the blockchain needs to be cryptographically secure but the controlling entity doesn't want the information to be accessed by the public. Consortium blockchains How it works. The fourth type of blockchain, consortium blockchain, also known as a federated blockchain, is similar to a hybrid blockchain in that it has private and public blockchain features. But it's different in that multiple organizational members collaborate on a decentralized network. Essentially, a consortium blockchain is a private blockchain with limited access to a particular group, eliminating the risks that come with just one entity controlling the network on a private blockchain. In a consortium blockchain, the consensus procedures are controlled by preset nodes. It has a validator node that initiates, receives and validates transactions. Member nodes can receive or initiate transactions. Advantages. A consortium blockchain tends to be more secure, scalable and efficient than a public blockchain network. Like private and hybrid blockchain, it also offers access controls. Disadvantages. Consortium blockchain is less transparent than public blockchain. It can still be compromised if a member node is breached, the blockchain's own regulations can impair the network's functionality. Use cases. Banking and payments are two uses for this type of blockchain. Different banks can band together and form a consortium, deciding which nodes will validate the transactions. Research organizations can create a similar model, as can organizations that want to track food. It's ideal for supply chains, particularly food and medicine applications.
  • 13. Blockchain 13 Hybrid blockchains How it works. Sometimes, organizations will want the best of both worlds, and they'll use hybrid blockchain, a type of blockchain technology that combines elements of both private and public blockchain. It lets organizations set up a private, permission-based system alongside a public permissionless system, allowing them to control who can access specific data stored in the blockchain, and what data will be opened up publicly. Typically, transactions and records in a hybrid blockchain are not made public but can be verified when needed, such as by allowing access through a smart contract. Confidential information is kept inside the network but is still verifiable. Even though a private entity may own the hybrid blockchain, it cannot alter transactions. When a user joins a hybrid blockchain, they have full access to the network. The user's identity is protected from other users, unless they engage in a transaction. Then, their identity is revealed to the other party. Advantages. One of the big advantages of hybrid blockchain is that, because it works within a closed ecosystem, outside hackers can't mount a 51% attack on the network. It also protects privacy but allows for communication with third parties. Transactions are cheap and fast, and it offers better scalability than a public blockchain network. Disadvantages. This type of blockchain isn't completely transparent because information can be shielded. Upgrading can also be a challenge, and there is no incentive for users to participate or contribute to the network. Use cases. Hybrid blockchain has several strong use cases, including real estate. Companies can use a hybrid blockchain to run systems privately but show certain information, such as listings, to the public. Retail can also streamline its processes with hybrid blockchain, and highly regulated markets like financial services can also see benefits from using it. Medical records can be stored in a hybrid blockchain, according to Godefroy. The record can't be viewed by random third parties, but users can access their information through a smart contract. Governments could also use it to store citizen data privately but share the information securely between institutions.
  • 15. Blockchain 15 3. Bitcoin - A Cryptocurrency ● Installation and Environmental Setup ● Introduction to Bitcoin ● Bitcoin and Blockchain ● Pros and Cons of Bitcoin ● Transaction in Bitcoin ● Bitcoin Wallet, Exchange and Trading ● Applications of Bitcoin. Theory:- Bitcoin - A Cryptocurrency: Bitcoin (₿) is a decentralized digital currency, without a central bank or single administrator, that can be sent from user to user on the peer-to-peer bitcoin network without the need for intermediaries. Transactions are verified by network nodes through cryptography and recorded in a public distributed ledger called a blockchain. The cryptocurrency was invented in 2008 by an unknown person or group of people using the name Satoshi Nakamoto. The currency began use in 2009 when its implementation was released as open-source software.  Bitcoins are created as a reward for a process known as mining. They can be exchanged for other currencies, products, and services, but the real-world value of the coins is extremely volatile. Research produced by the University of Cambridge estimated that in 2017, there were 2.9 to 5.8 million unique users using a cryptocurrency wallet, most of them using bitcoin. Bitcoin has been criticized for its use in illegal transactions, the large amount of electricity (and thus carbon footprint) used by mining, price volatility, and thefts from exchanges. Some economists and commentators have characterized it as a speculative bubble at various times. Bitcoin has also been used as an investment, although several regulatory agencies have issued investor alerts about bitcoin. The word bitcoin was defined in a white paper published on 31 October 2008. It is a compound of the words bit and coin. No uniform convention for bitcoin capitalization exists; some sources use
  • 16. Blockchain 16 Bitcoin, capitalized, to refer to the technology and network and bitcoin, lowercase, for the unit of account. Installation and Environmental Setup: A full node is a program that fully validates transactions and blocks. Almost all full nodes also help the network by accepting transactions and blocks from other full nodes, validating those transactions and blocks, and then relaying them to further full nodes. Most full nodes also serve lightweight clients by allowing them to transmit their transactions to the network and by notifying them when a transaction affects their wallet. If not enough nodes perform this function, clients won’t be able to connect through the peer-to-peer network—they’ll have to use centralized services instead. Many people and organizations volunteer to run full nodes using spare computing and bandwidth resources—but more volunteers are needed to allow Bitcoin to continue to grow. This document describes how you can help and what helping will cost you. Setup: Go to the Bitcoin Core download page and verify you have made a secure connection to the server. Verify secure connection
  • 17. Blockchain 17 Click the large blue Download Bitcoin Core button to download the Bitcoin Core installer to your desktop. Optional: Verify the release signatures If you know how to use PGP, you should also click the Verify Release Signatures link on the download page to download a signed list of SHA256 file hashes. The 0.11 and later releases are signed by Wladimir J. van der Laan’s releases key with the fingerprint: 01EA 5486 DE18 A882 D4C2 6845 90C8 019E 36C2 E964 Earlier releases were signed by Wladimir J. van der Laan’s regular key. That key’s fingerprint is: 71A3 B167 3540 5025 D447 E8F2 7481 0B01 2346 C9A6 Even earlier releases were signed by Gavin Andresen’s key. His primary key’s fingerprint is: 2664 6D99 CBAE C9B8 1982 EF60 29D9 EE6B 1FC7 30C1 You should verify these keys belong to their owners using the web of trust or other trustworthy means. Then use PGP to verify the signature on the release signatures file. Finally, use PGP or another utility to compute the SHA256 hash of the archive you downloaded, and ensure the computed hash matches the hash listed in the verified release signatures file. After downloading the file to your desktop or your Downloads folder (C:Users<YOUR USER NAME>Downloads), run it by double-clicking its icon. Windows will ask you to confirm that you want to run it. Click Yes and the Bitcoin installer will start. It’s a typical Windows installer, and it will guide you through the decisions you need to make about where to install Bitcoin Core.
  • 18. Blockchain 18 Windows 10 installer start…. To continue, choose one of the following options If you want to use the Bitcoin Core Graphical User Interface (GUI), proceed to the Bitcoin Core GUI section below. If you want to use the Bitcoin Core daemon (bitcoind), which is useful for programmers and advanced users, proceed to the Bitcoin Core Daemon section below. If you want to use both the GUI and the daemon, read both the GUI instructions and the daemon instructions. Note that you can’t run both the GUI and the daemon at the same time using the same configuration directory. Press the Windows key (⊞ Win) and start typing “bitcoin”. When the Bitcoin Core icon appears (as shown below), click on it.
  • 19. Blockchain 19 Starting Bitcoin Core You will be prompted to choose a directory to store the Bitcoin block chain and your wallet. Unless you have a separate partition or drive you want to use, click Ok to use the default.
  • 20. Blockchain 20 Bitcoin-Qt Welcome Your firewall may block Bitcoin Core from making outbound connections. It’s safe to allow Bitcoin Core to use all networks. (Note: you will still need to configure inbound connections as described later in the Network Configuration section.) Opening outgoing firewall for Bitcoin Core Bitcoin Core GUI will begin to download the block chain. This step will take at least several days, and it may take much more time on a slow Internet connection or with a slow computer. During the download, Bitcoin Core will use a significant part of your connection bandwidth. You can stop Bitcoin Core at any time by closing it; it will resume from the point where it stopped the next time you start it.
  • 21. Blockchain 21 Bitcoin-Qt Initial Block Download After download is complete, you may use Bitcoin Core as your wallet or you can just let it run to help support the Bitcoin network. Optional: Start Your Node At Login Starting your node automatically each time you login to your computer makes it easy for you to contribute to the network. The easiest way to do this is to tell Bitcoin Core GUI to start at login. While running Bitcoin Core GUI, open the Settings menu and choose Options. On the Main tab, click Start Bitcoin on system login. Click the Ok button to save the new settings. Choosing to start Bitcoin Core at login The next time you login to your desktop, Bitcoin Core GUI will be automatically started minimized in the task bar.
  • 22. Blockchain 22 Warning: to prevent data corruption, do not force shutdown of your computer from the Windows shutdown screen when you have Bitcoin Core running. You have now completed installing Bitcoin Core. If you have any questions, please ask in one of Bitcoin’s many communities, such as Bitcoin StackExchange, BitcoinTalk technical support, or the #bitcoin IRC chatroom on Freenode. To support the Bitcoin network, you also need to allow incoming connections. Please read the Network Configuration section for details. Bitcoin Core Daemon To start Bitcoin Core daemon, first open a command window: press the Windows key (⊞ Win) and type “cmd”. Choose the option labeled “Command Prompt”. If you installed Bitcoin Core into the default directory, type the following at the command prompt: C:Program FilesBitcoindaemonbitcoind Bitcoin Core daemon should start. To interact with Bitcoin Core daemon, you will use the command bitcoin-cli (Bitcoin command line interface). If you installed Bitcoin Core into the default location, type the following at the command prompt to see whether it works: C:Program FilesBitcoindaemonbitcoin-cli getblockchaininfo Note: it may take up to several minutes for Bitcoin Core to start, during which it will display the following message whenever you use bitcoin-cli: error: {"code":-28,"message":"Verifying blocks..."} After it starts, you may find the following commands useful for basic interaction with your node: getblockchaininfo, getnetworkinfo, getnettotals, getwalletinfo, stop, and help. For example, to safely stop your node, run the following command:
  • 23. Blockchain 23 C:Program FilesBitcoindaemonbitcoin-cli stop A complete list of commands is available in the Bitcoin.org developer reference. When Bitcoin Core daemon first starts, it will begin to download the block chain. This step will take at least several days, and it may take much more time on a slow Internet connection or with a slow computer. During the download, Bitcoin Core will use a significant part of your connection bandwidth. You can stop Bitcoin Core at any time using the stop command; it will resume from the point where it stopped the next time you start it. Starting your node automatically each time your computer boots makes it easy for you to contribute to the network. The easiest way to do this is to start Bitcoin Core daemon when you login to your computer. Start File Explorer and go to: C:ProgramDataMicrosoftWindowsStart MenuProgramsStartUp Right-click on the File Explorer window and choose New → Text file. Name the file start_bitcoind.bat. Then right-click on it and choose Open in Notepad (or whatever editor you prefer). Copy and paste the following line into the file. C:Program FilesBitcoindaemonbitcoind (If you installed Bitcoin Core in a non-default directory, use that directory path instead.) Save the file. The next time you login to your computer, Bitcoin Core daemon will be automatically started. Warning: to prevent data corruption, do not force shutdown of your computer from the Windows shutdown screen when you have Bitcoin Core running. You have now completed installing Bitcoin Core. If you have any questions, please ask in one of Bitcoin’s many communities, such as Bitcoin StackExchange, BitcoinTalk technical support, or the #bitcoin IRC chatroom on Freenode. Introduction to Bitcoin:
  • 24. Blockchain 24 Bitcoin is a digital currency or cryptocurrency which has gained popularity since it started in 2009. It is owned and controlled by its users, peer to peer and has no central control like traditional currencies. It is enabled using a technology called Blockchain, which is a new kind of database or list of encrypted digital blocks linked together in a secure way. Bitcoin was the first real world application of blockchain. Blockchain allows cryptocurrencies like Bitcoin to function and enhances security. In addition, Blockchain can be used for, Smart contracts, Financial services, Video games, Energy trading and the Supply chain. Blockchain was started by a mystery person (or people) named Satoshi Nakamoto as an open source technology. Bitcoin was the first and is the most popular cryptocurrency followed by Ethereum. Bitcoin and Blockchain: Blockchain is the technology that underpins the cryptocurrency Bitcoin, but Bitcoin is not the only version of a blockchain distributed ledger system in the market. There are several other cryptocurrencies with their own blockchain and distributed ledger architectures. Meanwhile, the decentralisation of the technology has also led to several schisms or forks within the Bitcoin network, creating offshoots of the ledger where some miners use a blockchain with one set of rules, and others use a blockchain with another set of rules. Alongside the original Bitcoin, Bitcoin Cash, Bitcoin Gold and Bitcoin SV exist as their own cryptocurrency. With smaller networks, these cryptocurrency blockchains are more vulnerable to hacking attacks, one of which befell Bitcoin Gold in 2018. Pros and Cons of Bitcoin: Pros: The major benefit is around decentralisation, so for example, organisations or governments cannot control your Bitcoin. This is quite appealing to many people who are concerned about the way in which their money is used and controlled. Financial crashes such as the 2008 recession was
  • 25. Blockchain 25 possible because peoples money and investment was being controlled banks. Cyptocurrencies like Bitcoin do not use banks or bankers. The stock exchange and finances are increasingly controlled by risky investments and algorithms, so digital currencies therefore offer a way of people taking control back. There are also opportunities to make money from these new currencies for people that know what they are doing. Finally, there could be some potential for currencies like Bitcoin and blockchain to make a difference to wealth distribution. Cons: There are several drawbacks to Bitcoin and other crypto-currencies. This is a new technology and therefore there are some usability problems. It can require technical expertise to fully grasp using and working with cryptocurrencies. Furthermore, organisations such as the Bank of England have questioned it’s value in the long term. and cautioned against using it. There are still scaling problems, wild currency fluctuations and technical issues including thefts. Adding layers of usability such as Lightning Network could help to solve some of those issues in the future. Lightning offers an additional layer to offer potentially faster transactions and is an additional layer to the blockchain which can help scalability issues. In addition, the mining of coins (the process of adding transaction records to Bitcoin’s public ledger of past transactions or blockchain) is a technical task which requires a lot of power to do it. In fact, it costs more to mine Bitcoin than Gold or Platinum. So again, the addition of new technologies to help mining and reduce power will be required in the future. Transaction in Bitcoin: Bitcoin makes use of public-key cryptography to ensure the integrity of transactions created on the network. In order to transfer Bitcoin, each participant has pairs of public keys and private keys that control pieces of bitcoin they own. A public key is a series of letters and numbers that a user must share in order to receive funds. In contrast, a private key must be kept secret as it authorizes the spending of any funds received by the associated public key. Using the private key associated with their bitcoin, a user can sign transactions and thereby transfer the value to a new owner. The transaction is then broadcast to the network to be included in the blockchain. Overview of a Bitcoin Transaction To better illustrate how value is transferred in the Bitcoin network, we will walk through an example transaction, where Alice sends .05 bitcoin to Bob.
  • 26. Blockchain 26 At a high level, a transaction has three main parts: Inputs. The bitcoin address that contains the bitcoin Alice wants to send. To be more accurate, it is the address from which Alice had previously received bitcoin to and is now wanting to spend. Outputs. Bob’s public key or bitcoin address. Amounts. The amount of bitcoin Alice wants to send. In order for Alice to send the .05 bitcoin to Bob, she signs a message with the transaction details using her private key. The message contains the input, output, and amount as described above. The transaction is then broadcast to the rest of the Bitcoin network where nodes verify that Alice’s private key is able to access the inputs (by checking that Alice’s private key matches the public key she is claiming to own). Once a transaction is broadcasted to a node, this node then passes it along the network until it reaches a mining node. Miners will then order this transaction into what is called a block template. This is a blueprint for the block which the miner is attempting to add to the blockchain. If a miner finds the next block in the chain, then this block template is mined and becomes an immutable block on the blockchain. Finally, this block is broadcasted to the network’s nodes who will include it in their copy of the chain. Bitcoin Wallet, Exchange and Trading: Wallet: Bitcoin wallets hold a user’s keys, allowing users to receive bitcoin, sign transactions, and check their account balance. The private and public keys held in a bitcoin wallet serve two distinct functions, but are tied together in creation. Bitcoin wallets contain a user’s keys, not bitcoin. Conceptually, a wallet is like a keychain in the sense that it holds many pairs of private and public keys. These keys are used to sign transactions, allowing a user to prove they own transaction outputs on the blockchain, i.e. their bitcoin. All bitcoin is recorded on the blockchain in the form of transaction outputs.
  • 27. Blockchain 27 If a user loses their wallet, they can use a mnemonic phrase to restore the wallet. Keeping private keys and seed phrases secure is essential to protecting against internal and external threats that can compromise the users bitcoin. Bitcoin Exchange: A bitcoin exchange is a digital marketplace where traders can buy and sell bitcoins using different fiat currencies or altcoins. A bitcoin currency exchange is an online platform that acts as an intermediary between buyers and sellers of the cryptocurrency.  A bitcoin exchange acts as the intermediary between a seller and a buyer or, to use cryptocurrency language, between a "maker" and a "taker."  A bitcoin exchange works like a brokerage, and you can deposit money via bank transfer, wire, and other common means of deposit. However, you will often pay a price for this service.  If a trader wants to trade between cryptocurrencies, they will pay a currency conversion fee, similar to institutional banks when you trade money from different countries.  Purchases and sales are based on the same ordering system as existing brokerages, where a buyer (taker) places a limit order which is then sold when a corresponding cryptocurrency is available from the seller (maker).
  • 28. Blockchain 28 Understanding Bitcoin Exchanges Bitcoin exchange platforms match buyers with sellers. Like a traditional stock exchange, traders can opt to buy and sell bitcoin by inputting either a market order or a limit order. When a market order is selected, the trader is authorizing the exchange to trade the coins for the best available price in the online marketplace. With a limit order set, the trader directs the exchange to trade coins for a price below the current ask or above the current bid, depending on whether they are buying or selling. To transact in bitcoin on an exchange, a user has to register with the exchange and go through a series of verification processes to authenticate their identity. Once the authentication is successful, an account is opened for the user who then has to transfer funds into this account before they can buy coins. Different exchanges have different payment methods that can be used for depositing funds including bank wires, direct bank transfers, credit or debit cards, bank drafts, money orders and even gift cards. A trader who would like to withdraw money from the account could do so using the options provided by their exchange, which could include a bank transfer, PayPal transfer, check mailing, cash delivery, bank wire, or credit card transfer. Decentralized Exchanges Decentralized bitcoin exchanges are those that are operated without a central authority. These exchanges allow peer-to-peer trading of digital currencies without the need for an exchange authority to facilitate the transactions. There are a number of benefits to decentralized exchanges. First, many cryptocurrency users feel that decentralized exchanges better match the decentralized structures of most digital currencies themselves; many decentralized exchanges also require less personal information from their members than other types of exchanges. Second, if users transfer assets directly to other users, that eliminates the need for the transferring of assets to the exchange, thereby reducing the risk of theft from hacks and other fraud. Third, decentralized exchanges may be less susceptible to price manipulation and other fraudulent trading activity. On the other hand, decentralized exchanges (like all cryptocurrency exchanges) must maintain a fundamental level of user interest in the form of trading volume and liquidity. Not all decentralized exchanges have been able to achieve these important baseline qualities. Further, users of a decentralized exchange may have less recourse if they are the victims of fraud than those who make use of exchanges with centralized authorities.
  • 29. Blockchain 29 Bitcoin Trading: Bitcoin trading is how you can speculate on movements in the cryptocurrency’s price. While this has traditionally involved buying bitcoin through an exchange, hoping that its price will rise in time, cryptocurrency traders are increasingly using derivatives to speculate on both rising and falling prices – in order to make the most of bitcoin’s volatility. With IG, you can take a position on the price of bitcoin with financial derivatives like CFDs. This product can enable you to take advantage of price movements in either direction without taking ownership of the underlying coins – meaning you won’t need to take responsibility for the security of any bitcoin tokens. Steps to trading bitcoin: 1. Learn what moves bitcoin’s price 2. Pick a bitcoin trading style and strategy 3. Choose how you want to get exposure to bitcoin 4. Decide whether to go long or short 5. Set your stops and limits 6. Open and monitor your trade 7. Close your position to take a profit or cut a loss Learn what moves bitcoin’s price: To get in on a surging opportunity or short the latest bubble, you first need to understand the factors that have an impact on bitcoin’s price: Bitcoin supply. The current bitcoin supply is capped at 21 million, which is expected to be exhausted by 2140. A finite supply means that the price of bitcoin could increase if demand rises in the coming years Bad press. Any breaking news which concerns bitcoin’s security, value and longevity will have a negative effect on the coin’s overall market price Integration. Bitcoin’s public profile depends on its integration into new payment systems and banking frameworks. If this is carried out successfully, demand might rise which will have a positive effect on bitcoin’s price Key events. Regulation changes, security breaches and macroeconomic bitcoin announcements can all affect prices. Any agreement between users on how to speed the network up could also see confidence in bitcoin rise – pushing the price up Pick a bitcoin trading style and strategy:  Day trading
  • 30. Blockchain 30  Trend trading  Bitcoin hedging  HODL (or buy and hold) How to day trade bitcoin Day trading bitcoin means that you’ll open and close a position within one single trading day – so you won’t have any bitcoin market exposure overnight. This means that you’ll avoid overnight funding charges on your position. This strategy could be for you if you’re looking to profit from bitcoin’s short-term price movements, and it can enable you to make the most of daily volatility in bitcoin’s price. How to trade bitcoin Trend trading means taking a position which matches the current trend. For example, if the market is in a bullish trend, you’d go long and if the trend was bearish, you’d go short. If this trend started to slow or reverse, you’d think about closing your position and opening a new one to match the emerging trend. Bitcoin trading Hedging bitcoin means mitigating your exposure to risk by taking an opposing position to one you already have open. You’d do this if you were concerned about the market moving against you. For example, if you owned some bitcoins but were concerned about a short-term drop in their value, you could open a short position on bitcoin with CFDs. If the market price of bitcoin falls, the gains on your short position would offset some or all of the losses on the coins you own. Bitcoin trading: hedging The ‘HODL’ bitcoin strategy involves buying and holding bitcoin. Its name derives from a misspelling of ‘hold’ on a popular cryptocurrency forum, and it is now often said to stand for ‘hold on for dear life’. However, this phrase shouldn’t be taken too seriously – you should only buy and hold bitcoin if you’ve got a positive outlook on its long-term price. If your research or trading plan indicates that you should sell your positions to take profit or limit loss, you should – or you could set stop losses to close your positions automatically. Choose how you want to get exposure to bitcoin:
  • 31. Blockchain 31 There are a few different ways that you can get exposure to bitcoin:  Trading bitcoin derivatives  Buying bitcoin through an exchange  Crypto 10 index Trading bitcoin derivatives: Trading bitcoin derivatives with us means that instead of owning bitcoin outright, you’ll be speculating on its price with CFDs. As a result, you’ll be able to take a position on bitcoin’s price rising by ‘going long’ or falling by ‘going short’. Here are other benefits of trading bitcoin derivatives with us: Leverage and margin: CFDs are always traded with leverage, which means you’ll only have to put up a deposit – known as margin – to get full market exposure Deep liquidity: thanks to our large client base, our bitcoin market is very liquid. This means you’re more likely to have your orders filled at your desired price – even if you deal in large sizes Hedging: shorting with derivatives can be an effective way to hedge your portfolio and protect against market declines Buying bitcoin through an exchange Buying bitcoin through an exchange is mainly for those who use a buy-and-hold bitcoin strategy. This is because buying through an exchange means that you’re taking direct ownership of bitcoin – with the expectation that its price will rise. The matching engines and servers on bitcoin exchanges are often unreliable, which can result in the suspension of markets or reduced execution accuracy Bitcoin exchanges often impose fees and restrictions on funding and withdrawing from your exchange account, while accounts themselves can take days to open. Crypto 10 Index As well as trading bitcoin derivatives or buying coins directly from an exchange, you can trade Crypto 10 Index that gives you exposure to 10 major cryptocurrencies like Bitcoin in one single trade. This index speculates on these Cryptocurrencies and closely tracks or mirrors the underlying market price of them.
  • 32. Blockchain 32 Decide whether to go long or short: Trading financial derivatives makes it possible to go both long or short, depending on the current market sentiment. Going long means that you expect bitcoin’s price to rise, and going short means that you expect the price to fall. Set your stops and limits: Stops and limits are crucial risk management tools – and you have several to choose from when you trade with us:  Normal stops will close out your position at a set level, but they could be liable to slippage if the underlying market price changes quickly  Trailing stops follow favourable market movements to lock in profits, while capping your downside risk. However, they too can be subject to slippage  Guaranteed stops will close out your position at a set level, regardless of any slippage. Guaranteed stops are free to set, but you’ll be charged a fee if your guaranteed stop is triggered These tools are all available to select via the deal ticket on our trading platform. Open and monitor your trade: To open a bitcoin trade, you’d buy if you thought that the price was going to rise or sell if you thought the price was going to fall. Once your trade is open, you’ll need to monitor the market to make sure that it’s moving in the way you anticipated. The technical indicators available on our trading platform can help you to determine what bitcoin’s price might do next. Indicators can also help you monitor current market conditions like volatility levels or market sentiment. Close your position to take a profit or cut a loss: You can close your position whenever you like to take a profit, or to cut a loss that has reached a level that makes you uncomfortable. Your profits will be paid directly into your trading account, while your losses will be deducted from your account balance.
  • 33. Blockchain 33 Applications of Bitcoin: The following is a list of applications of bitcoins  Bitcoins are being used to buy goods and services as more and more stores across the world are accepting bitcoin payments.  Bitcoin transactions provide a customized level of anonymity and it is relatively difficult to trace their trail. So bitcoins are being used to transact anonymously.  International payments can be made easily and cheaply as bitcoins are not related to any country or subject to any government regulation.  There is the freedom of the fact that there is no need of permission from any authority for your transactions.  Bitcoins provide a way to transact securely online as they use very strong cryptographic algorithms.  Users and businesses like bitcoin payments because there are no credit card fees to pay.  Bitcoins can be as an investment, expecting that their value will appreciate significantly in future.  Bitcoins can be used to gamble on online sites like SatoshiDice, RoyalBitcoin, Bitzino, Peerbet, etc.  Bitcoins are being used to shop online as increasing numbers of vendors are allowing bitcoin transactions. Users now can make payments in bitcoins on their smartphones through bitcoin wallet apps.  Unlike credit card or bank payments, there is no need to provide personal information to complete the transactions. So the hassle of providing identity can be avoided.
  • 34. Blockchain 34 4. Introduction to Ethereum. ● Installation and Environmental Setup ● introduction to Ethereum ● Ethereum vs Bitcoin ● Pros and Cons of Ethereum ● Transaction in Ethereum Network ● Applications of Ethereum. Theory:- Introduction to Ethereum: In the Ethereum universe, there is a single, canonical computer (called the Ethereum Virtual Machine, or EVM) whose state everyone on the Ethereum network agrees on. Everyone who participates in the Ethereum network (every Ethereum node) keeps a copy of the state of this computer. Additionally, any participant can broadcast a request for this computer to perform arbitrary computation. Whenever such a request is broadcast, other participants on the network verify, validate, and carry out ("execute") the computation. This execution causes a state change in the EVM, which is committed and propagated throughout the entire network. Requests for computation are called transaction requests; the record of all transactions and the EVM's present state gets stored on the blockchain, which in turn is stored and agreed upon by all nodes. Cryptographic mechanisms ensure that once transactions are verified as valid and added to the blockchain, they can't be tampered with later. The same mechanisms also ensure that all transactions are signed and executed with appropriate "permissions" (no one should be able to send digital assets from Alice's account, except for Alice herself). Installation and Environmental Setup: Ethereum Development Key Concepts:
  • 35. Blockchain 35 1. Setting up your dev environment for Ethereum development takes just a few minutes. It’s important to have a basic understanding of a few general concepts before we start writing code. 2. Solidity - The most popular programming language for writing smart contracts on Ethereum. 3. Web3.js - A JavaScript library for web browsers and Node.js that enables developers to elegantly read and write to the Ethereum blockchain. Smart contracts written in Solidity can be executed using JSON RPC from Web3.js. 4. Infura.io - A company that provides an API for simple Ethereum network access through HTTP and WebSockets. To access the network without a service like Infura’s API, you must host your own Ethereum network node. 5. Ethereum Networks - The Ethereum Main Network (a.k.a Homestead) is considered to be the production environment. This is where real Ether (ETH) can be exchanged, burned, and mined. Also, there are popular public test networks: Ropsten, Göerli, Kovan, and Rinkeby. All of these networks can be accessed via Infura’s API. 6. Cloudflare’s Ethereum Gateway - Cloudflare, a popular DNS and general web- infrastructure company provides a free API for accessing the Ethereum Main Net. Unlike Infura, Cloudflare’s gateway can be used without an account or API. The network can be interfaced with at https://cloudflare-eth.com. However, you can interface with only Homestead; not Ropsten, Göerli, Kovan, or Rinkeby. 7. Truffle - A company that creates Ethereum development tools like Truffle, Ganache, and Drizzle. In this guide, we’ll be installing Ganache CLI so we can run our Solidity and Web3.js code locally during development. 8. Ganache CLI - A command line interface for running a locally hosted instance of Ethereum. We can start up a blank Ethereum blockchain, or a fork of a public network’s blockchain on your local machine. 9. Solc - The Solidity compiler. This turns our human-readable Solidity code into Ethereum bytecode, which Ethereum network nodes understand how to execute. 10. MetaMask - A web browser extension that facilitates invocation of Ethereum smart contracts from a web page. MetaMask uses Web3.js under the hood. It is a tool for end users to use ETH, Ethereum based cryptocurrency tokens, and keep track of their Ethereum wallets when using decentralized, Web3 applications (a.k.a. DApps). Ethereum vs Bitcoin: Bitcoin (BTC) and Ethereum (ETH) are the 2 most widely adopted applications of blockchain technology in existence today. While many people think it’s Bitcoin vs. Ethereum, it is actually Bitcoin and Ethereum. Bitcoin is digital gold, while Ethereum is a decentralized computer. Both
  • 36. Blockchain 36 systems are powered and secured by a decentralized network of individuals across the world (miners), who are paid to do their part in keeping the network’s secure. Decentralization is the core principle of blockchain technologies that make Bitcoin revolutionary compared to the digital dollar, which is centrally controlled by the U.S. government. When centralized entities failed the world in 2008, Satoshi Nakamoto made bitcoin to decentralize control of money. Ethereum was inspired by Bitcoin, but took it to the next level. While decentralized digital gold is cool, a decentralized global computer that can handle an unlimited number of financial products and services (including money) is even better. Learning the differences between Bitcoin and Ethereum will lead you down a much deeper path of technological advancement and where humans are going as a culture. You don’t have to fully understand blockchain (the fundamental tech behind crypto), Bitcoin or Ethereum to know that we are on the verge of something special. Let’s take a look at what makes these projects similar, different and ultimately great in their own respect. Main Takeaways: Bitcoin vs. Ethereum:  Bitcoin is a cryptocurrency; Ethereum is a platform. Ether is the native token on Ethereum’s blockchain.  Bitcoin transactions are primarily monetary; Ethereum transactions may be executable code.  Transactions are much faster on the Ethereum network than on Bitcoin’s.  Bitcoin is primarily a store of value and medium of exchange; Ethereum is seen as a general purpose blockchain.  Ethereum was created as a complement to Bitcoin, not as competition. Pros and Cons of Ethereum: Ethereum is a cutting-edge open-source blockchain platform that can handle smart contracts, decentralized apps (dApps), tokenized assets, and decentralized financial services in addition to financial transactions. At the time of writing, its native currency, Ether (ETH), is the second-largest cryptocurrency by market capitalization, a position it has maintained for some years. Ethereum is a high-risk, high-reward investment. If the value of Ethereum falls, users may lose a portion of their investment, just like any other investment. Ethereum’s outstanding performance has attracted both traditional and institutional investors. There are some pros and cons in investing in Ethereum.
  • 37. Blockchain 37 Pros:  Volatility: While volatility was once viewed as a negative, astute investors have recognized market cycle patterns and can profit from the parabolic profits generated by market bubbles.  Liquidity: Due to the worldwide creation of trading platforms, exchanges, and online brokerages, Ethereum is undoubtedly one of the most liquid financial assets. With very cheap costs, you may quickly exchange Ethereum for cash or valuables such as gold.  The lower danger of inflation: Ethereum features a clear inflation strategy that is less susceptible to tampering. There’s no need to be concerned about your cryptocurrency deflating because the blockchain system is limitless. Cons:  Scaling Issues: Unlike Bitcoin, which serves a single purpose, Ethereum serves as a ledger, a platform for smart contracts, and so on, which can lead to flaws, breakdowns, and hacks.  Makes Use of a Difficult Programming Language: While Ethereum is Turing complete and employs a programming language comparable to C++, Python, and Java, learning Solidity, Ethereum’s native language, can be difficult. One of the primary issues is that beginner- friendly lessons are difficult to come by.  Ethereum Investing Can Be Dangerous: Investing in Ethereum, like any other cryptocurrency, may be hazardous. Cryptocurrencies are extremely volatile, resulting in both increased gains and numerous losses. The price of Ether has fluctuated a lot in the past, which might be a major disadvantage for certain investors, especially novices. Furthermore, Ethereum’s fees fluctuate, which is also troublesome.
  • 38. Blockchain 38 Transaction in Ethereum Network: An Ethereum transaction refers to an action initiated by an externally-owned account, in other words an account managed by a human, not a contract. For example, if Bob sends Alice 1 ETH, Bob's account must be debited and Alice's must be credited. This state-changing action takes place within a transaction. Transactions, which change the state of the EVM, need to be broadcast to the whole network. Any node can broadcast a request for a transaction to be executed on the EVM; after this happens, a miner will execute the transaction and propagate the resulting state change to the rest of the network. Transactions require a fee and must be mined to become valid. To make this overview simpler we'll cover gas fees and mining elsewhere. A submitted transaction includes the following information:  recipient – the receiving address (if an externally-owned account, the transaction will transfer value. If a contract account, the transaction will execute the contract code)  signature – the identifier of the sender. This is generated when the sender's private key signs the transaction and confirms the sender has authorised this transaction  value – amount of ETH to transfer from sender to recipient (in WEI, a denomination of ETH)  data – optional field to include arbitrary data
  • 39. Blockchain 39  gasLimit – the maximum amount of gas units that can be consumed by the transaction. Units of gas represent computational steps  maxPriorityFeePerGas - the maximum amount of gas to be included as a tip to the miner  maxFeePerGas - the maximum amount of gas willing to be paid for the transaction (inclusive of baseFeePerGas and maxPriorityFeePerGas) Gas is a reference to the computation required to process the transaction by a miner. Users have to pay a fee for this computation. The gasLimit, and maxPriorityFeePerGas determine the maximum transaction fee paid to the miner. On Ethereum there are a few different types of transactions:  Regular transactions: a transaction from one wallet to another.  Contract deployment transactions: a transaction without a 'to' address, where the data field is used for the contract code. TRANSACTION LIFECYCLE: Once the transaction has been submitted the following happens:  Once you send a transaction, cryptography generates a transaction hash: 0x97d99bc7729211111a21b12c933c949d4f31684f1d6954ff477d0477538ff017  The transaction is then broadcast to the network and included in a pool with lots of other transactions.  A miner must pick your transaction and include it in a block in order to verify the transaction and consider it "successful".  You may end up waiting at this stage if the network is busy and miners aren't able to keep up.  Your transaction will receive "confirmations". The number of confirmations is the number of blocks created since the block that included your transaction. The higher the number, the greater the certainty that the network processed and recognised the transaction.  Recent blocks may get re-organised, giving the impression the transaction was unsuccessful; however, the transaction may still be valid but included in a different block.  The probability of a re-organisation diminishes with every subsequent block mined, i.e. the greater the number of confirmations, the more immutable the transaction is.
  • 40. Blockchain 40 Applications of Ethereum: Voting Systems: As we’ve seen with DAO, voting systems are adopting Ethereum. The results of polls are publicly available, ensuring a transparent and fair democratic process by eliminating voting malpractices. Banking Systems: Ethereum is getting adopted widely in banking systems because with Ethereum’s decentralized system; it is challenging for hackers to gain unauthorized access. It also allows payments on an Ethereum-based network, so banks are also using Ethereum as a channel to make remittances and payments. Shipping: Deploying Ethereum in shipping helps with the tracking of cargo and prevents goods from being misplaced or counterfeited. Ethereum provides the provenance and tracking framework for any asset required in a typical supply chain. Agreements: With Ethereum smart contracts, agreements can be maintained and executed without any alteration. So in an industry that has fragmented participants, is subject to disputes, and requires digital contracts to be present, Ethereum can be used as a technology for developing smart contracts and for digitally recording the agreements and the transactions based on them.
  • 41. Blockchain 41 5. Explain SHA-256 and EtHash in terms of Bitcoin and Ethereum. Theory:- What Is SHA-256 in terms of bitcoin? Secure Hashing Algorithm (SHA) -256 is the hash function and mining algorithm of the Bitcoin protocol, referring to the cryptographic hash function that outputs a 256 bits long value. It moderates the creation and management of addresses, and is also used for transaction verification. Bitcoin uses double SHA-256, meaning that it applies the hash functions twice. The algorithm is a variant of the SHA-2 (Secure Hash Algorithm 2), developed by the National Security Agency (NSA). SHA-256 is also used in popular encryption protocols such as SSL,TLS, SSH and open source operating systems such as Unix/Linux. The hash algorithm is extremely secure and its workings aren’t known in the public domain. It’s used by the United States government to protect sensitive information, thanks to its ability to verify a content of data without revealing it due to the use of digital signatures. Furthermore, it is also utilized for password verification, since it conveniently does not require the storage of exact passwords, as the hash values can be stored and matched with the user entry to verify if it’s correct or not. In fact, it is nearly impossible to reveal the initial data from a hash value itself. Moreover, a brute force attack is extremely unlikely to succeed thanks to the astronomical number of potential combinations. In addition, it’s also severely unlikely that two data values (known as collision) have the same hash. If you are a trader or cryptocurrency startup entrepreneur, then you must have heard about “cryptography” or “hashing algorithms”. But what do these things have to do with your bitcoin or cryptocurrency network? Cryptography or hashing algorithms are what keep Bitcoin’s blockchain secure. They are the building blocks in the cryptocurrency platform. In this article, we are going to talk about the Secure Hash Algorithm (Bitcoin Hash Algorithm) 256 in detail.
  • 42. Blockchain 42 To start with, it is important to have a general idea of what a hash & hasing algorithm? First, we need to understand what is “Hash”? Hash is a “message digest” – a digitally generated from a string of text, the hash by itself is smaller than the text, it is almost impossible to build another string of text with the same hash value. Second, we need to understand what is it “Hashing Algorithm” The hashing algorithm is a Cryptographic hash function, the numerical algorithm that maps data of random size to a hash of a fixed size. Hashing algorithm being used for digital signatures and authentication. The hashing algorithm has certain unique effects like: "It is a one-way function and it produces a unique output (or hash)" The mathematics behind the hash algorithm protect that there is no way to build the original data from its generated hash. It means the hash only functions in linear growth. A simple term would be that you can’t produce a real human thumb from a fingerprint. This is why a hash can be treated as a “digital fingerprint” of the data processed through the hash function. To logically end, the same hash will only be developed from the same input data. But if you modify the data with small things, like a single space or a comma, it will completely change the hash output. And Bitcoin’s uses this cryptographic hashing algorithm for its blockchain consensus mechanism.
  • 43. Blockchain 43 The Most Common Cryptocurrency Mining Algorithm - SHA-256 Algorithm: What is SHA-256 in term of ethereum? SHA-256 (secure hash algorithm) is a cryptographic hash function with a digest length of 256 bits. It is a keyless hash function; that is, an MDC (Manipulation Detection Code). A message or data is processed by blocks of 512 = 16 × 32 bits, each block requiring 64 rounds. It generates a unique 256-bit (32-byte) signature for a string text. Block processing time for SHA- 256 generally ranges from 6 to 10 minutes and needs hash values at the Giga hashes per second (GH/s). SHA-256 hash value is measured by GH/s: Giga Hashes per second. SHA-256 is used in several different parts of the Bitcoin network like: Mining uses SHA-256 as the proof-of-work algorithm. SHA-256 is used in the creation of bitcoin addresses to improve security and privacy. Here will explain how the Hash function works in Bitcoin? Hash Functions in Bitcoin Bitcoin mainly uses the cryptographic hash function SHA-256, which is a stand for Secure Hash Algorithm 256-bit. The algorithm was originally designed by the United States National Security Agency (NSA) and the security benefits of this freely available algorithmic process, however, made it a perfect fit for the Bitcoin network. And the next thing, The Bitcoin’s proof of work algorithm is based on SHA-256. Using this, Bitcoin miners solve Computational complexity math problems to add blocks into the blockchain. And Blocks contain transactions and block header data. When the miner's node gets the new
  • 44. Blockchain 44 transactions from a particular network, the miner consolidates them into the next block's data and continues hashing. Block headers contain 6 things: 1. The miner's client version. Pretty straightforward, the version number of the software the miner is using. 2. The hash of the previous block in the blockchain. This is what was calculated by the miners last time, and is now being calculated for the next block. 3. The hash root or Merkle root of all transactions on the block. 4. A timestamp. 5. The target difficulty of the network. 6. A nonce (random number). All of that data is getting hashed through the SHA256 algorithm into a 256-bit alphanumeric string and must start with 18 zeros. The target changes as the difficulty change every 2,016 blocks. And the miners arrive at this particular hash by varying a slight portion of the block’s headers, which is called a “nonce.” A nonce always starts with random like “0” and is incremented every time for accessing the required hash or target value. after all the shifting of the nonce is hit and miss, the chances of getting this particular hash, which starts with these many zeros, is very low. Therefore, many attempts must be made by a miner by changing the nonce. And this needs an enormous amount of computational power and hardware resources which proves that a large amount of work is achieved before mining any individual block. That’s why this is called “proof-of-work“. And in this way, that miner first obtains the correct Bitcoin Hash will win the game of chance and get the block reward of 12.5 bitcoin.
  • 45. Blockchain 45 SHA-256 is one of the most important algorithms for creating a new cryptocurrency with secured blockchain technology. Ethash in term of Ethereum: Ethash is a memory hard (i.e. each GPU miner needs 1+ GB of RAM) proof of work mining algorithm developed for Ethereum 1.0 and currently used by Ethereum, Ethereum Classic, and several other cryptocurrencies. It is a modified version of Dagger Hashimoto, and was designed to be ASIC-resistant and efficiently verifiable by a light client - characteristics which are maintained by Ethash. The Ethash algorithm is used to dynamically adjust the mining difficulty of the blockchain that implements it. In other words, Ethash determines roughly how much computational resources should be spent in order for a miner to be able to find the nonce that allows them to propose a new block to add to the blockchain. Ethash is not itself a cryptographic hash function. The hash function used by Ethereum is a variant of the SHA3 hash and is called Keccak-256. The hash was developed at the same time as the SHA3 standard and received a late change in the padding of the finalized hash algorithm. Ethereums SHA3-256 and SHA3-512 are not standard SHA3 hashes, and are often referred to as Keccak-256 and Keccak-512. The Ethash algorithm generally follows a route in which a seed can be computed for each block by scanning through block headers, and which can compute a 16MB pseudorandom cache. Light clients then store the cache, which eventually is generated into a 1GB dataset and is then stored by full clients and miners. The dataset grows linearly over time and verification is done on the dataset until it is updated. The large dataset is updated once every 30,000 blocks. The parameters for Ethash cache and datasets depend on the block number, as the cache and dataset sizes grow linearly. The highest prime below the linearly growing threshold is taken in order to reduce risk of accidental regularities leading to cyclic behaviors.
  • 46. Blockchain 46 6. Introduction to Smart Contracts. ● Introduction to Smart Contracts ● Characteristics of Smart Contracts ● Types of Oracles ● Proof of Work (PoW) ● Proof of Stake (PoS) ● Examples, ○ Smart Contract in Healthcare Industry ○ Smart Contract in Supply Chain. Theory:- Introduction to Smart Contracts: A "smart contract" is simply a program that runs on the Ethereum blockchain. It's a collection of code (its functions) and data (its state) that resides at a specific address on the Ethereum blockchain. Smart contracts are a type of Ethereum account. This means they have a balance and they can send transactions over the network. However they're not controlled by a user, instead they are deployed to the network and run as programmed. User accounts can then interact with a smart contract by submitting transactions that execute a function defined on the smart contract. Smart contracts can define rules, like a regular contract, and automatically enforce them via the code. Smart contracts can not be deleted by default, and interactions with them are irreversible. Benefits of smart contracts Certainty and Stability: In smart contracts, each party understands its obligations, the manner of performance, consequences of performance or non-performance and converts it into a code. Once the smart contract is executed, its terms cannot be changed. The code automates the performance of the contract. The transactions that take place are irreversible. Thus, the execution of the code avoids any uncertainty that may arise due to the possibility of ambiguity or contradiction in the terms of the contract written in natural language. They also leave little room for subjective decision-making and issues resulting from partial, total non-compliance or late compliance of the contractual obligations.
  • 47. Blockchain 47 Reduce delay: Smart contracts allow digital verification, confirmation, control and execution of contracts. This enables the parties to reduce the delays caused in performance of the contractual obligations, obviate the need for separate physical documentation of the performance and its submission to the other party. For example, where a project is divided into phases, the system can digitally capture and verify the extent of performance of a project and automatically release payment for tasks completed and grant permissions for carrying out work in the next phase of the project. Savings: As the human interface in the performance of the contracts is minimal, smart contracts eliminate the role of intermediaries through digitalization and automation, resulting in savings. Backup: Blockchain technology operates on a distributed-ledger and all documents are duplicated multiple times allowing recovery of files. Safety: Data related to smart contracts can be protected by use of encryption and cryptography. Accuracy: As business processes are automated and standardized in smart contracts. The possibility of errors is minimized by reducing the need for manual work. Characteristics of Smart Contracts: Smart contracts have the following characteristics:  they’re self-verifying due to automated possibilities;  they’re self-enforcing when the rules are met at all stages;  they’re tamper-proof, as no one can change what’s been programmed.
  • 48. Blockchain 48 Types of Oracles: The notion of oracles — even decentralized oracles — has been around for years and continues to fuel debate about how to implement them and whether they can be trusted. Oracles retrieve and verify external data for blockchains and smart contracts through methods such as web APIs or market data feeds. The type of data required by smart contracts can include information on price feeds, weather information, or even random number generation for gambling. Leveraging oracles consists of querying the data source for specific information and subsequently connecting to that source to interface between the blockchain and the data feed. As a result, smart contracts can execute based on the particular information flowing from the data feed. Data feeds in real-world markets and web APIs are usually not deterministic like blockchains and smart contracts. Oracles act as a bridge that can digest external and non-deterministic information into a format that a blockchain can understand and execute particular conditions with. Oracles can even be used for N-of-M multi-signature transactions to reach consensus on which transaction to sign, in relevant scenarios. Oracles form the basis of platforms like Augur, which is a decentralized prediction market. However, Augur is more representative of a complex oracle itself that functions as a data feed based on the “Wisdom of the Crowd” where participant behavior effectively acts as the data source. Augur also utilizes oracles for reporting the correct result to prediction markets with an incentive structure driving honest reporting. There are several forms of oracles including:  Hardware Oracles  Software Oracles  Consensus Oracles
  • 49. Blockchain 49  Inbound Oracles  Outbound Oracles Hardware Oracles are sensors integrated with tangible physical objects. Primary examples would be in supply chain tracking with the use of RFID tags for feeding data like environmental conditions of products to the blockchain. Software Oracles are the most common form that pull data from third-party sources such as web APIs and can include real-world information like flight statuses and weather data. Consensus Oracles represent a step towards decentralized oracles and rely on aggregating data from several oracles with proprietary methods for determining their authenticity and accuracy. Inbound Oracles reflect “if this happens then do that” scenarios associated with software oracles such as “if this price is met by an asset, then trigger a sell.” Outbound Oracles allow smart contracts to send data to sources outside of the blockchain network they exist on and are also software oracles. The potential ability of oracles to bridge off-chain and on-chain data as an interface between traditional networks and blockchain networks has important long-term ramifications. However, the inherent problem is that these oracles are from centralized points of origin that typically require third-party permission. Additionally, the obstacle of authenticating oracle data is where trust- minimized systems like blockchains and traditional trust assumptions clash. Proof of Work (PoW): Proof of work (PoW) describes a system that requires a not-insignificant but feasible amount of effort in order to deter frivolous or malicious uses of computing power, such as sending spam emails or launching denial of service attacks. The concept was subsequently adapted to securing digital money by Hal Finney in 2004 through the idea of "reusable proof of work" using the SHA- 256 hashing algorithm. Following its introduction in 2009, Bitcoin became the first widely adopted application of Finney's PoW idea (Finney was also the recipient of the first bitcoin transaction). Proof of work forms the basis of many other cryptocurrencies as well, allowing for secure, decentralized consensus.  Proof of work (PoW) is a decentralized consensus mechanism that requires members of a network to expend effort solving an arbitrary mathematical puzzle to prevent anybody from gaming the system.  Proof of work is used widely in cryptocurrency mining, for validating transactions and mining new tokens.  Due to proof of work, Bitcoin and other cryptocurrency transactions can be processed peer- to-peer in a secure manner without the need for a trusted third party.
  • 50. Blockchain 50  Proof of work at scale requires huge amounts of energy, which only increases as more miners join the network.  Proof of Stake (POS) was one of several novel consensus mechanisms created as an alternative to proof of work. Understanding Proof of Work: This explanation will focus on proof of work as it functions in the bitcoin network. Bitcoin is a digital currency that is underpinned by a kind of distributed ledger known as a "blockchain." This ledger contains a record of all bitcoin transactions, arranged in sequential "blocks," so that no user is allowed to spend any of their holdings twice. In order to prevent tampering, the ledger is public, or "distributed"; an altered version would quickly be rejected by other users. The way that users detect tampering in practice is through hashes, long strings of numbers that serve as proof of work. Put a given set of data through a hash function (bitcoin uses SHA-256), and it will only ever generate one hash. Due to the "avalanche effect," however, even a tiny change to any portion of the original data will result in a totally unrecognizable hash. Whatever the size of the original data set, the hash generated by a given function will be the same length. The hash is a one-way function: it cannot be used to obtain the original data, only to check that the data that generated the hash matches the original data. Generating just any hash for a set of bitcoin transactions would be trivial for a modern computer, so in order to turn the process into "work," the bitcoin network sets a certain level of "difficulty." This setting is adjusted so that a new block is "mined" – added to the blockchain by generating a valid hash – approximately every 10 minutes. Setting difficulty is accomplished by establishing a "target" for the hash: the lower the target, the smaller the set of valid hashes, and the harder it is to generate one. In practice, this means a hash that starts with a very long string of zeros. Proof of Stake (PoS): The Proof of Stake (PoS) concept states that a person can mine or validate block transactions according to how many coins they hold. This means that the more coins owned by a miner, the more mining power they have. KEY TAKEAWAYS
  • 51. Blockchain 51  With Proof of Stake (POS), cryptocurrency miners can mine or validate block transactions based on the amount of coins a miner holds.  Proof of Stake (POS) was created as an alternative to Proof of Work (POW), which is the original consensus algorithm in Blockchain technology, used to confirm transactions and add new blocks to the chain.  Proof of Work (POW) requires huge amounts of energy, with miners needing to sell their coins to ultimately foot the bill; Proof of Stake (PoS) gives mining power based on the percentage of coins held by a miner.  Proof of Stake (POS) is seen as less risky in terms of the potential for miners to attack the network, as it structures compensation in a way that makes an attack less advantageous for the miner.  Bitcoin, the largest cryptocurrency, runs on proof of work rather than proof of stake. Understanding Proof of Stake (PoS): The proof of stake was created as an alternative to the proof of work (PoW) concept, to tackle inherent issues in the latter. Currently, only altcoins use the proof of stake concept. When a transaction is initiated, the transaction data is fitted into a block with a maximum capacity of 1 megabyte, and then duplicated across multiple computers or nodes on the network. The nodes are the administrative body of the blockchain and verify the legitimacy of the transactions in each block. To carry out the verification step, the nodes or miners would need to solve a computational puzzle, known as the proof of work problem. The first miner to decrypt each block transaction problem gets rewarded with a coin. Once a block of transactions has been verified, it is added to the blockchain, a public transparent ledger. How Proof of Stake Addresses Mining Power: Mining requires a great deal of computing power to run different cryptographic calculations to unlock the computational challenges. The computing power translates into a high amount of electricity and power needed for the proof of work. In 2015, it was estimated that one Bitcoin transaction required the amount of electricity needed to power up 1.57 American households per day. That number has only since gone up. According to the University of Cambridge's Bitcoin Electricity Consumption Index, Bitcoin consumers about 119.87 terawatt-hours per year, which is more than countries like the United Arab Emirates and the Netherlands consume annually.1 To foot the electricity bill, miners would usually sell their
  • 52. Blockchain 52 awarded coins for fiat money, which would lead to a downward movement in the price of the cryptocurrency. The proof of stake (PoS) seeks to address this issue by attributing mining power to the proportion of coins held by a miner. This way, instead of utilizing energy to answer PoW puzzles, a PoS miner is limited to mining a percentage of transactions that is reflective of their ownership stake. For instance, a miner who owns 3% of the coins available can theoretically mine only 3% of the blocks. Examples Smart Contract in Healthcare Industry While smart contracts have the potential to benefit any industry, it is particularly useful for the healthcare industry. A typical blockchain transaction in healthcare takes place as under:  A patient interacts with a healthcare organization and creates a new record of his information such as age, gender, address. The information would be stored on a blockchain and the patient would be assigned a private key.  The healthcare organization would provide services to a patient. The data relating to the procedure performed, doctor’s note, medicine dispensed by pharmacist etc. would be captured in the patient’s public ID.  The transaction between the patient and the healthcare organization is completed and uniquely identified.  Each transaction is encrypted and given an identity that is stored on the blockchain, containing the patient’s public (non-identifiable) ID.  Health organizations and institutions can submit requests for the data via APIs and use the patient’s public (non-identifiable) ID on the blockchain to retrieve the encrypted data which can be analyzed for medical research.  The patient can share his private key with new health organizations to allow them to use it to decrypt his data. The private key links the patient’s identity to blockchain data and without the key, the data remain non-identifiable. Smart Contract in Supply Chain.
  • 53. Blockchain 53 Blockchain is a distributed ledger technology that records exchanges of value between parties securely, permanently, and in an easily verifiable manner. It is the technology underlying cryptocurrencies such as Bitcoin and Ethereum. Although initially used for financial transactions, blockchain's applications extend beyond finance and can impact a wide variety of industries. One such application is in supply chain management. With multiple stakeholders and business transactions, supply chains are inherently complex. Many challenges exist, including the lack of transparency and traceability, difficulty in managing risks and disruptions, and the need to build trust and reputation. Blockchain technology ushers in the potential to solve these challenges through the use of smart contracts. Smart contracts are digital agreements between transacting parties that are written in computer code and deployed to the blockchain, where they will self-execute when predetermined conditions are met. They reduce complexity in a supply chain through automated verification and execution of the multiple business transactions involved. A decentralized, immutable record also ensures all stakeholders have equal access to information and helps build trust. Smart contracts improve the transparency, traceability and efficiency of a supply chain, allowing it to be more agile while strengthening relationships among stakeholders. In this thesis, I create a proof-of-concept to explore the application of smart contracts in supply chain management. The proof-of-concept consists of three smart contracts, coded in Solidity, that can be integrated to determine the provenance of goods, track the chain of custody as goods flow through a supply chain, automatically execute payment upon fulfillment of criteria, and maintain an open database of stakeholders with a score indicating their reputation. I validate the proof-of-concept using the Ethereum platform, which was specially conceived for smart contract and decentralized application development. Preliminary testing shows that the contracts are able to interact with one another and execute their functions as intended. Further testing is necessary to evaluate the performance of the contracts on the live Ethereum network, and integration with smart sensors should be explored to create a more viable real-world solution.
  • 54. Blockchain 54 7. Explain Byzantine Fault Problem. Theory:- A Byzantine fault (also interactive consistency, source congruency, error avalanche, Byzantine agreement problem, Byzantine generals problem, and Byzantine failure[1]) is a condition of a computer system, particularly distributed computing systems, where components may fail and there is imperfect information on whether a component has failed. The term takes its name from an allegory, the "Byzantine Generals Problem",[2] developed to describe a situation in which, in order to avoid catastrophic failure of the system, the system's actors must agree on a concerted strategy, but some of these actors are unreliable. In a Byzantine fault, a component such as a server can inconsistently appear both failed and functioning to failure-detection systems, presenting different symptoms to different observers. It is difficult for the other components to declare it failed and shut it out of the network, because they need to first reach a consensus regarding which component has failed in the first place. Byzantine fault tolerance (BFT) is the dependability of a fault-tolerant computer system to such conditions. Byzantine Generals’ Problem: The problem was explained aptly in a paper by LESLIE LAMPORT, ROBERT SHOSTAK, and MARSHALL PEASE at Microsoft Research in 1982: Imagine that several divisions of the Byzantine army are camped outside an enemy city, each division commanded by its own general. The generals can communicate with one another only by messenger. After observing the enemy, they must decide upon a common plan of action. However, some of the generals may be traitors, trying to prevent the loyal generals from reaching an agreement. The generals must decide on when to attack the city, but they need a strong majority of their army to attack at the same time. The generals must have an algorithm to guarantee that (a) all loyal generals decide upon the same plan of action, and (b) a small number of traitors cannot cause the loyal generals to adopt a bad plan. The loyal generals will all do what the algorithm says they should, but the traitors may do anything they wish. The algorithm must guarantee condition (a) regardless of what the traitors do. The loyal generals should not only reach agreement, but should agree upon a reasonable plan.
  • 55. Blockchain 55 Byzantine fault tolerance can be achieved if the correctly working nodes in the network reach an agreement on their values. There can be a default vote value given to missing messages i.e., we can assume that the message from a particular node is ‘faulty’ if the message is not received within a certain time limit. Furthermore, we can also assign a default response if the majority of nodes respond with a correct value. Leslie Lamport proved that if we have 3m+1 correctly working processors, a consensus(agreement on same state) can be reached if atmost m processors are faulty which means that strictly more than two-thirds of the total number of processors should be honest. Types of Byzantine Failures: There are two categories of failures that are considered. One is fail-stop(in which the node fails and stops operating) and other is arbitrary-node failure. Some of the arbitrary node failures are given below :  Failure to return a result  Respond with an incorrect result  Respond with a deliberately misleading result  Respond with a different result to different parts of the system Advantages of pbft: Energy efficiency : pBFT can achieve distributed consensus without carrying out complex mathematical computations(like in PoW). Zilliqa employs pBFT in combination with PoW-like complex computations round for every 100th block. Transaction finality : The transactions do not require multiple confirmations(like in case of PoW mechanism in Bitcoin where every node individually verifies all the transactions before adding the new block to the blockchain; confirmations can take between 10-60 minutes depending upon how many entities confirm the new block) after they have been finalized and agreed upon. Low reward variance : Every node in the network takes part in responding to the request by the client and hence every node can be incentivized leading to low variance in rewarding the nodes that help in decision making.
  • 56. Blockchain 56 How pBFT works ? pBFT tries to provide a practical Byzantine state machine replication that can work even when malicious nodes are operating in the system. Nodes in a pBFT enabled distributed system are sequentially ordered with one node being the primary(or the leader node) and others referred to as secondary(or the backup nodes). Note here that any eligible node in the system can become the primary by transitioning from secondary to primary(typically, in the case of a primary node failure). The goal is that all honest nodes help in reaching a consensus regarding the state of the system using the majority rule. A practical Byzantine Fault Tolerant system can function on the condition that the maximum number of malicious nodes must not be greater than or equal to one-third of all the nodes in the system. As the number of nodes increase, the system becomes more secure. pBFT consensus rounds are broken into 4 phases(refer with the image below):  The client sends a request to the primary(leader) node.  The primary(leader) node broadcasts the request to the all the secondary(backup) nodes.  The nodes(primary and secondaries) perform the service requested and then send back a reply to the client.  The request is served successfully when the client receives ‘m+1’ replies from different nodes in the network with the same result, where m is the maximum number of faulty nodes allowed.
  • 57. Blockchain 57 The primary(leader) node is changed during every view(pBFT consensus rounds) and can be substituted by a view change protocol if a predefined quantity of time has passed without the leading node broadcasting a request to the backups(secondary). If needed, a majority of the honest nodes can vote on the legitimacy of the current leading node and replace it with the next leading node in line. Limitations of pBFT: The pBFT consensus model works efficiently only when the number of nodes in the distributed network is small due to the high communication overhead that increases exponentially with every extra node in the network.  Sybil attacks : The pBFT mechanisms are susceptible to Sybil attacks, where one entity(party) controls many identities. As the number of nodes in the network increase, sybil attacks become increasingly difficult to carry out. But as pBFT mechanisms have scalability issues too, the pBFT mechanism is used in combination with other mechanism(s).  Scaling : pBFT does not scale well because of its communication(with all the other nodes at every step) overhead. As the number of nodes in the network increase(increases as O(n^k), where n is the messages and k is the number of nodes), so does the time taken to respond to the request.