0% found this document useful (0 votes)
34 views37 pages

BT - Unit 2

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 37

UNIT 2

• Working with Consensus in Bitcoin


• Distributed consensus in open environments
• Consensus in a Bitcoin network
• CREATION OF COINS • Proof of Work (PoW)
• PAYMENTS AND DOUBLE • basic introduction
SPENDING • Hashcash PoW
• Bitcoin PoW
• BITCOIN SCRIPTS AND BITCOIN
• Attacks on PoW
P2P NETWORK
• the monopoly problem
• TRANSACTION IN BITCOIN • Proof of Stake
NETWORK • Proof of Burn and Proof of Elapsed Time

• The life of a Bitcoin Miner


• Mining Difficulty,
• Mining Pool.
Bitcoin and Blockchain
 Bitcoin is a decentralized digital currency that enables instant
payments to anyone, anywhere in the world.
 The primary objective was to design Bitcoin to have a cross-
country payment system such that no government organization
will have control over it.
 It uses a permission-less model.
•A normal user role is to transfer or receive bitocoins from others within
Normal the bitcoin network and validate the transactions received from other
User peers and forward the valid transactions to other peers except where it
received.
• However, if the received transaction is for him/her, then he/she
updates their wallet with the transaction amount.

•A Miner plays an important role in the bitcoin network. He listens to


all the transactions for approximately 10 minutes, validates all the
transactions, combines them, and places them into a block.
• Later he appends the newly generated block to the bitcoin blockchain
and forwards it to the peers within the bitcoin network. Once others
Miner accept the newly appended block, the system generates a reward, and
this reward is the only mechanism through which money is generated
in the bitcoin network.
Consensus algorithm
 The objective of the consensus algorithm is to agree unanimously on
the validity of transitions of the newly added block in the existing
blockchain.
video

 https://www.google.com/search?q=types+of+consensus+algorithm
s&source=lmns&tbm=vid&bih=757&biw=1423&hl=en&sa=X&ved=2a
hUKEwimwqrJl_OAAxXlz6ACHRa8BZQQ0pQJKAJ6BAgBEAY#fpstate=i
ve&vld=cid:5869abca,vid:sXP-8pD7PG4
Blockchain Double Spending
 Double spending means spending the same money twice. As we know, any transaction can be processed only in
two ways. One is offline, and another is online.
 Offline: A transaction which involves physical currency or cash is known as an offline transaction.
 Online: A transaction which involves digital cash is known as an online transaction.

Bitcoin handles
the double-
spending problem
by implementing
a confirmation
mechanism and
maintaining a
universal ledger.
The Monopoly Problem
 Proof of Work depends on the computing resources available to a miner.
 If a miner can possess a huge amount of computational resources, then there
is a possibility that the miner can control the entire network or gain control
over the network.
 It may happen that a minor can gradually generate a lot of blocks in the
current blockchain. If a huge number of blocks in the blockchain go from a
particular miner, then that particular miner can control the entire flow of
transactions in the blockchain. This particular problem is called the
monopoly problem in the bitcoin network.
 Such a monopoly can increase over time from an economic perspective.
Attacks On The Proof Of Work (PoW):

1.Sybil Attack
 The attacker tries to fill the network with the clients under his control and
the attacker can succeed in his intention.
 Here ,the attacker can actually control or get the monopoly over the
network. Consequently, he can compromise the distributed consensus,
which is based on the Proof of Work mechanism.
 A more powerful attacker can include multiple nodes in the different
networks that can collectively compromise the entire ecosystem.
2.Denial of Service (DoS) Attack
The attacker sends a lot of data to a particular node. As a consequence, the node will not be
able to process the normal bitcoin transactions. This is a typical denial of service attack in
the bitcoin network.

To solve denial of service attack, the bitcoin architecture proposed a set of rules, and a
few of those are as follows:
 No forwarding of orphaned blocks
 No forwarding of double-spend transactions
 No forwarding of same block or transactions
 Disconnect a peer that sends too many messages
 Restrict the block size.
 Limit the size of each script.
IMPACT OF DoS:
3.Breaking Bitcoin Proof of Work (PoW)

 Bitcoin PoW is computationally difficult to break but not impossible.


 The attackers can deploy high-power servers to do more work than the total
work of the blockchain.
 EXAMPLE:
A known case of successful double-spending was discovered in Nov
2013. The GHash.io mining pool (a mining pool means a set of miners coming
together collectively and are trying to mine a new block) appeared to be
engaging in repeated payment fraud against BetCoin Dice, a gambling site.
Types of Proof-of-Stake

Delegated Proof-of-Stake (DPOS) Nominated Proof-of-Stake (NPOS)

 Delegated Proof of Stake is a  Nominated Proof-of-Stake is a variation of the


blockchain consensus mechanism original Proof of Stake mechanism first
where network users vote and elect created for the Polkadot network.
delegates to validate the next block.  NPoS works similarly to its parent
mechanism,however it also allows token
 DPoS uses a collateral staking holders to nominate validators to represent
system. them in the block validation process.
 It also uses a specific democratic  Only nominated validators can participate in
process that aims to make the block formation, and each individual
nominator can nominate up to a certain
transaction process more fair. number of validators, a total of 16 for the
 DPoS networks use a weighting Polkadot network.
mechanism to decide power
 NPoS networks automatically distribute the
stake amongst participating validators evenly.
Drawbacks of Proof-of-Stake (PoS)
 More Centralized than Proof-of-Work
As a system that favours validators with the largest stake, Proof-of-Stake networks will tend toward
centralization. With no upper limit on how much one validator can stake, this can lead to significant power
being concentrated in the hands of a few very large validators. This makes for a network that is less resistant
to potential 51% attacks by validator nodes.

 Not Battle Tested


At the time of writing, although Proof-of-Stake has been successfully used by multiple blockchains, it has
never been battle tested to the same scale as Proof-of-Work. Bitcoin and other PoW networks have secured
more than $1Trillion – a figure far greater than that stored by current Proof-of-Stake blockchains. With a
greater tendency toward centralization, Proof-of-Stake’s capacity to maintain security at this scale is a
question worth paying attention to for users and developers alike, and will only be known over time.
Blockchains Using Proof-of-Stake (PoS)

Ehthereum
(ETH)
 Proof of Stake
networks open up the Polkadot(D Tezos
door for users wanting OT) (XTZ)
to accrue awards.

 There’s no crypto
staking without Proof-
Pos
of-Stake.
Algorand(A Tron
LGO) (TRX)

Cosmos
(ATOM)
•OBJECTIVE: Validating transaction
information and maintaining the integrity
of the blockchain

• Incentive: Bitcoin reward

•Bitcoin mining is necessary to maintain


the ledger of transactions upon which
Bitcoin is based.

•Miners have become very sophisticated


over the past several years, using complex
machinery to speed up mining operations.

•Bitcoin mining has generated


controversy because it is not considered
environmentally friendly.
Every blockchain has a mining process by which miners can generate Mining difficulty
fresh coins. An algorithm regulates how difficult it is for the miners to mine
a certain block. This difficulty is known as mining difficulty.

Benefits of Mining difficulty

• As the mining difficulty increases, it becomes more difficult for a hacker to


conduct a malicious attack on the network.
Security of the • Due to the increasing difficulty, miners use special ASIC mining computers
that make trillions of guesses each second to find the correct hash for a block.
network • A mining pool has scores of such systems on its floor to conduct the process.
• It is very difficult for hackers to get enough computing power for majority
control and launch an attack.

• A miner’s computing power differs from person to person and pool to pool.
• Thus to maintain parity in the mining process, the blockchain network raises or
A steady lowers its mining difficulty.
• This ensures that the network is generating blocks at a steady rate.
mining rate
Cryptocurrency mining pools are groups of
miners who share their computational
resources.

Mining pools utilize these combined


resources to strengthen the probability of
finding a block or otherwise successfully
mining for cryptocurrency.

If the mining pool is successful and


receives a reward, that reward is
divided among participants in the pool.
 Individually, participants in a mining pool contribute their processing power toward
the effort of finding a block. If the pool is successful in these efforts, they receive a
reward, typically in the form of the associated cryptocurrency.

 Rewards are usually divided between the individuals who contributed, according to the
proportion of each individual's processing power or work relative to the whole group.
In some cases, individual miners must show proof of work in order to receive their
rewards.

 Rewards are usually split among the miners based on the agreed terms and on their
respective contributions to the mining activity.

 Anyone who wants to make a profit through cryptocurrency mining has the choice to
either go solo with their own dedicated devices or to join a mining pool where multiple
miners and their devices combine to enhance their hashing output.

You might also like