SlideShare una empresa de Scribd logo
1 de 90
Bitcoin
8/14/2022
Bitcoin
• “Bitcoin: A Peer-to-Peer Electronic Cash System.”- Satoshi
Nakamoto.
• 8 pages, 8 references.
8/14/2022
References of Satoshi’s Paper
1. W. Dai, "b-money," http://www.weidai.com/bmoney.txt, 1998.
2. H. Massias, X.S. Avila, and J.-J. Quisquater, "Design of a secure timestamping service
with minimal trust requirements," In 20th Symposium on Information Theory in the
Benelux, May 1999.
3. S. Haber, W.S. Stornetta, "How to time-stamp a digital document," In Journal of
Cryptology, vol 3, no 2, pages 99-111, 1991.
4. D. Bayer, S. Haber, W.S. Stornetta, "Improving the efficiency and reliability of digital
time-stamping,“ In Sequences II: Methods in Communication, Security and Computer
Science, pages 329-334, 1993.
5. S. Haber, W.S. Stornetta, "Secure names for bit-strings," In Proceedings of the 4th ACM
Conference on Computer and Communications Security, pages 28-35, April 1997.
6. A. Back, "Hashcash - a denial of service counter-measure,“
http://www.hashcash.org/papers/hashcash.pdf, 2002.
7. R.C. Merkle, "Protocols for public key cryptosystems," In Proc. 1980 Symposium on
Security and Privacy, IEEE Computer Society, pages 122-133, April 1980.
8. W. Feller, "An introduction to probability theory and its applications," 1957.
8/14/2022
What is B-Money?
• First revealed in 1998 by computer scientist Wei Dai, b-money
was intended to be an anonymous, distributed electronic cash
system.
• Wei Dai, a computer engineer and graduate of the University of
Washington, published an essay in 1998 introducing the concept
of b-money.
• Although it was never officially launched, b-money endeavored to
provide many of the same services and features that
contemporary cryptocurrencies today do as well.
8/14/2022
• Dai's concept for b-money included:
– the requirement for computational work in order to facilitate the digital
currency,
– the stipulation that this work must be verified by the community in a
collective ledger,
– rewarding workers for their input.
• Wei is the smallest denomination of ether—the cryptocurrency
coin used on the Ethereum network. One ether =
1,000,000,000,000,000,000 wei (1018). The other way to look at it
is one wei is one quintillionth of an ether.
• The satoshi is the smallest unit of the bitcoin cryptocurrency.
The satoshi to bitcoin ratio is 100 million satoshis to one bitcoin.
As of Sept.
• 1 bitcoin (BTC) = 1,000 millibitcoins (mBTC) = 1,000,000
microbitcoins (μBTC) =100,000,000 satoshis.
8/14/2022
References of Satoshi’s Paper
1. W. Dai, "b-money," http://www.weidai.com/bmoney.txt, 1998.
2. H. Massias, X.S. Avila, and J.-J. Quisquater, "Design of a secure timestamping service
with minimal trust requirements," In 20th Symposium on Information Theory in the
Benelux, May 1999.
3. S. Haber, W.S. Stornetta, "How to time-stamp a digital document," In Journal of
Cryptology, vol 3, no 2, pages 99-111, 1991.
4. D. Bayer, S. Haber, W.S. Stornetta, "Improving the efficiency and reliability of digital
time-stamping,“ In Sequences II: Methods in Communication, Security and Computer
Science, pages 329-334, 1993.
5. S. Haber, W.S. Stornetta, "Secure names for bit-strings," In Proceedings of the 4th ACM
Conference on Computer and Communications Security, pages 28-35, April 1997.
6. A. Back, "Hashcash - a denial of service counter-measure,“
http://www.hashcash.org/papers/hashcash.pdf, 2002.
7. R.C. Merkle, "Protocols for public key cryptosystems," In Proc. 1980 Symposium on
Security and Privacy, IEEE Computer Society, pages 122-133, April 1980.
8. W. Feller, "An introduction to probability theory and its applications," 1957.
8/14/2022
8/14/2022
8/14/2022
8/14/2022
Bitcoin
• What is the price of an Bitcoin today?
– $43980.50 = €37565.19 = 3274183.39
• What is the original price?
– Bitcoin first started trading from around $0.0008 to $0.08 per coin in July
2010.
• What is the highest price Bitcoin has reached?
– Bitcoin reached a price of $64,863 on April 14, 2021.
8/14/2022
Bitcoin – abstract from Satoshi’s Paper
• A purely peer-to-peer version of electronic cash would allow online
payments to be sent directly from one party to another without going
through a financial institution. Digital signatures provide part of the
solution, but the main benefits are lost if a trusted third party is still
required to prevent double-spending. We propose a solution to the
double-spending problem using a peer-to-peer network. The network
timestamps transactions by hashing them into an ongoing chain of
hash-based proof-of-work, forming a record that cannot be changed
without redoing the proof-of-work. The longest chain not only serves as
proof of the sequence of events witnessed, but proof that it came from
the largest pool of CPU power. As long as a majority of CPU power is
controlled by nodes that are not cooperating to attack the network,
they'll generate the longest chain and outpace attackers. The network
itself requires minimal structure. Messages are broadcast on a best
effort basis, and nodes can leave and rejoin the network at will,
accepting the longest proof-of-work chain as proof of what happened
while they were gone.
8/14/2022
Double spending
• A technical issue that arises with the notion of a digital currency is the
ability for somebody to duplicate the digital money and spend it
simultaneously at two or more places. Double-spending is the risk that
a digital currency can be spent twice.
• It is a potential problem unique to digital currencies because digital
information can be reproduced relatively easily by savvy individuals
who understand the blockchain network and the computing power
necessary to manipulate it.
• This 'double-spend' problem is prevented in blockchain-based
cryptocurrencies such as Bitcoin by using a consensus mechanism
known as proof-of-work (PoW).
• This PoW is carried out by a decentralized network of 'miners' who not
only secure the fidelity of the past transactions on the blockchain's
ledger but also detect and prevent double-spending.
8/14/2022
8/14/2022
Dealing with Double Spending
• You have 1 BTC
• You attempt to spend it twice in two separate transactions.
• Both of these transactions will go into the pool of unconfirmed
transactions.
• The first transaction would be approved via the confirmation
mechanism and then verified into the subsequent block.
• However, the second transaction would be recognized as invalid by the
confirmation process and would not be verified.
• If both transactions are pulled from the pool for confirmation
simultaneously, the transaction with the highest number of
confirmations will be included in the blockchain, while the other one
will be discarded.
8/14/2022
Common double spending approaches
• 51% attacks: An attacker manages to take control of over 50
percent of the hash rate—or the measure of the Bitcoin network’s
processing power.
• Finney attacks: This happens when a miner, who has already
mined a block, did not broadcast the mined block immediately to
the network but spent it instead on another transaction, which
then negates the payment.
• Race attacks: This is when an attacker or hacker uses the same
coin in two different transactions, but only one transaction gets
verified and confirmed—leaving the other one invalidated.
8/14/2022
• Security measure 1: Whichever transaction gets the maximum
number of network confirmations (typically a minimum of six)
will be included in the blockchain, while others are discarded
• Security measure 2: Once confirmations and transactions are put
on the blockchain they are time-stamped, rendering them
irreversible and impossible to alter
8/14/2022
What is 51% attack
• A 51% attack is quite possibly the problem most feared in the
entire blockchain industry
• In a 51% attack, one miner or mining group gains or purchases
enough hash power to take control of 51% or more of a
blockchain network and double-spend the cryptocurrency
involved.
• No successful 51% attack has been carried out on the Bitcoin
blockchain so far, but it has happened in other cryptocurrency
networks with far less hash power and poor network security.
8/14/2022
Bitcoin Mining
• The process of using sophisticated computers to verify the
legitimacy of Bitcoin transactions and to enter new bitcoin in the
circulations.
8/14/2022
How to Mine Bitcoins
• Get a Bitcoin mining rig.
• Get a Bitcoin wallet
• Join a mining pool
• Get a mining program for your computer
• Start mining
8/14/2022
How to Mine Bitcoins
• Get a Bitcoin mining rig.
• Get a Bitcoin wallet
• Join a mining pool
• Get a mining program for your computer
• Start mining
8/14/2022
Mining Rig
• ASIC (Application-Specific Integrated Circuit chips) - Special
hardware designated just for mining Bitcoins or other currencies
based on the same algorithm.
– uses less energy
– mines Bitcoins much faster
– expensive
– manufacturing is time-consuming
– speed is astonishing.
8/14/2022
How to Mine Bitcoins
• Get a Bitcoin mining rig.
• Get a Bitcoin wallet
• Join a mining pool
• Get a mining program for your computer
• Start mining
8/14/2022
Bitcoin Wallet
• A Bitcoin wallet is a type of digital wallet used to send and
receive Bitcoins.
• Bitcoin wallets contain the private keys needed to sign Bitcoin
transactions. Anyone who knows the private key can control the
coins associated with that address.
8/14/2022
Different types of wallets
• Desktop wallets
– Desktop wallets are installed on a desktop or laptop computer and provide the user with
complete control over the wallet.
– relatively insecure
– Some well-known desktop wallets are Bitcoin Core, Armory, Hive OS X, and Electrum.
• Mobile wallets
– same functions as a desktop wallet, but on a smartphone or other mobile device.
– can facilitate quick payments in physical stores through near field communication (NFC) or
by scanning a QR code.
– Example: Bitcoin Wallet, Hive Android, and Mycelium Bitcoin Wallet
• Web wallets
– an online service that can send and store cryptocurrency on your behalf.
– security is a major concern - Many Bitcoin users have logged in to a third-party service, only
to find out that their Bitcoins have vanished.
• Hardware wallets
– by far the most secure type of Bitcoin wallet,
– store private keys on a physical device that cannot access the Internet.
– plug in device.
8/14/2022
• There are two kinds of software wallets
– full ones which download the whole Blockchain
• requires a lot of space and memory.
• Secure.
• Gives full control
– light-weight ones which store only relevant transactions.
• connected with Blockchain managed by a third party
• can´t fully control it.
8/14/2022
How to Mine Bitcoins
• Get a Bitcoin mining rig.
• Get a Bitcoin wallet
• Join a mining pool
• Get a mining program for your computer
• Start mining
8/14/2022
Mining Pool
• Miners provide their computing
power to a group
• the gain is divided among
members according to a given
power.
• The income is lower but
regular.
• members of a pool have to pay
a fee to an operator of the pool,
the price of fees is usually
around 0 and 2% of the
received reward.
8/14/2022
How to Mine Bitcoins
• Get a Bitcoin mining rig.
• Get a Bitcoin wallet
• Join a mining pool
• Get a mining program for your computer
• Start mining
8/14/2022
Mining Program
• It connects you to the Blockchain and Bitcoin network.
• delivers work to miners,
• collects complete results of their work
• adds all information back to the Blockchain.
• In addition to that, Bitcoin mining software monitors miner´s
activities and shows basic statistics like temperature, cooling,
hash rate, and average mining speed.
• Some mining pools also have their own software.
8/14/2022
How to Mine Bitcoins
• Get a Bitcoin mining rig.
• Get a Bitcoin wallet
• Join a mining pool
• Get a mining program for your computer
• Start mining
8/14/2022
• To earn bitcoins, miners
need to meet two
conditions:
1. matter of effort
2. matter of luck
• You have to verify ~1MB
worth of transactions.
• You have to be the first
miner to arrive at the
right answer, or closest
answer, to a numeric
problem.
8/14/2022
Orphan Block
• An orphan block is a block that has been solved within the
blockchain network but was not accepted due to a lag within the
network itself.
• There can be two miners who solve for a block simultaneously.
The miner who has a more detailed proof-of-work sheet is the
one who is awarded the block's reward.
• There is no reward for solving a block which is then determined
to be an orphan block.
8/14/2022
Mining and Bitcoin circulation
• Mining is the only way to release new cryptocurrency into circulation.
In other words, miners are basically "minting" currency. For example,
as of Nov. 2020, there were around 18.5 million bitcoins in circulation.
• Aside from the coins minted via the genesis block (the very first block,
which was created by founder Satoshi Nakamoto), every single one of
those bitcoins came into being because of miners.
• In the absence of miners, but there would never be any additional
bitcoin.
• The total number of bitcoins will be capped at 21 million.
• The last bitcoin won't be circulated until around the year 2140.
• A coin miner can have "voting" power when changes are proposed in
the Bitcoin network protocol. In other words, miners have a degree of
influence on the decision-making process on such matters as forking.
8/14/2022
How Much a Miner Earns
• After every 210,000 blocks mined, or roughly every four years,
the block reward given to Bitcoin miners for processing
transactions is cut in half.
• When bitcoin was first mined in 2009, mining one block would
earn you 50 BTC.
• In 2012, this was halved to 25 BTC. By 2016, this was halved
again to 12.5 BTC. On May 11, 2020, the reward halved again to
6.25 BTC.
• In November of 2020, the price of Bitcoin was about $17,900 per
bitcoin, which means you'd earn $111,875 (6.25 x 17,900) for
completing a block.
8/14/2022
Bitcoin Halving
• The reward is halved → half the inflation → lower available
supply → higher demand → higher price → miners incentive still
remains, regardless of smaller rewards, as the value of Bitcoin is
increased In the process
8/14/2022
Forking
8/14/2022
Forking
• The consensus algorithm behind a blockchain is the foundation
of a decentralized network for maintaining a public ledger of
transactions without requiring a third party
• Forks result if the consensus algorithm behind a blockchain is
changed
• A hard fork happens if a new blockchain permanently splits from
the original blockchain - all users in the network need to upgrade
their software to keep participating
• A soft fork is a divergence that occurs if some miners still follow
the old version of a blockchain while some follow the new version
8/14/2022
Hard Fork
• A hard fork refers to a radical change to the protocol of a
blockchain network that effectively results in two branches, one
that follows the previous protocol and one that follows the new
version.
• In a hard fork, holders of tokens in the original blockchain will
be granted tokens in the new fork as well, but miners must
choose which blockchain to continue verifying.
• A hard fork can occur in any blockchain, and not only Bitcoin
(where hard forks have created Bitcoin Cash and Bitcoin SV,
among several others, for example).
8/14/2022
Hard Fork
8/14/2022
Reasons for a Hard Fork
• To correct important security risks found in older versions of the
software,
• to add new functionality,
• to reverse transactions - Ethereum blockchain created a hard
fork to reverse the hack on the Decentralized Autonomous
Organization (DAO).
8/14/2022
Major Bitcoin Hard Forks
• The Bitcoin Cash Hard Fork
– occurred on August 1, 2017.
– designed to overcome the problems that Bitcoin was experiencing with delayed
transactions and lag.
– it uses 8-megabyte blocks instead of the 1-megabyte blocks used by the
original Bitcoin, making it easier to scale as more people interact with the
service.
• The Bitcoin Gold Hard Fork
– Occurred in October 2017.
– Designed to make Bitcoin mining a more equitable process that requires only
basic equipment.
– It’s mined on standard graphics processing units instead ASICs
– The idea here was to increase the independence and decentralization inherent
to the original Bitcoin concept.
8/14/2022
Other Bitcoin Hard Forks
• Bitcoin Diamond: November 2017
• Super Bitcoin: December 2017
• Bitcoin Atom: January 2018
• Bitcore: November 2017
• Bitcoin God: December 2017
• Bitcoin Private: January 2018
• Bitcoin Zeo: September 2018
• Bitcoin Post-Quantum: December 2018
8/14/2022
Two types of Hard Fork
• Strictly expanding hard forks
– strictly expand the set of transactions that is valid,
– the old rules are a soft fork with respect to the new rules.
• Bilateral hard forks,
– the two rulesets are incompatible both ways.
8/14/2022
Soft Fork
• A soft fork is a change to the software protocol where only
previously valid transaction blocks are made invalid.
• As old nodes will recognize the new blocks as valid, a soft fork is
backwards-compatible.
• This kind of fork requires only a majority of the miners
upgrading to enforce the new rules.
8/14/2022
8/14/2022
Examples of Soft Fork
• New transaction types can be added as soft forks, where the
participants (e.g. sender and receiver) and miners understand
the new transaction type.
• The new transaction appear to older clients as a "pay-to-
anybody" transaction (of a special form)
• The miners agree to reject blocks including these transactions
unless the transaction validates under the new rules.
• Example - pay-to-script hash (P2SH).
• A soft fork can also occur at times due to a temporary divergence
in the blockchain when miners using non-upgraded nodes violate
a new consensus rule their nodes don’t know about.
8/14/2022
Pay-to-script hash (P2SH)
• Pay to script hash (P2SH) is an advanced type of transaction
used in Bitcoin and other similar cryptocurrencies. Unlike
P2PKH, it allows sender to commit funds to a hash of an
arbitrary valid script.
• Pay-to-Public-Key-Hash (P2PKH) is the basic type of transaction
used in Bitcoin and other similar cryptocurrencies.
8/14/2022
Soft Fork
• Soft forks don't require any nodes to upgrade to maintain consensus.
• Soft forks cannot be reversed without a hard fork since a soft fork by
definition only allows the set of valid blocks to be a proper subset of
what was valid pre-fork.
– If users upgrade to a post-soft fork client and for some reason a majority of
miners switch back to the pre-soft fork client, the post-soft fork client users
would break consensus as soon as a block came along that didn't follow their
clients' new rules. In order for a soft fork to work, a majority of the mining
power needs to be running a client recognizing the fork. The more miners that
accept the new rules, the more secure the network is post-fork. If you have 3/4
of miners recognizing the fork, 1/4 blocks created aren't guaranteed to follow
the new rules. These 1/4 blocks will be valid to old nodes that aren't aware of
the new rules, but they will be ignored by new nodes.
• Soft forks have been used on the bitcoin and ethereum blockchains,
among others, to implement new and upgraded functionalities that are
backward compatible.
8/14/2022
Example of Soft Fork
• Segregated Witness (SegWit) fork
– occurred shortly after the Bitcoin/Bitcoin Cash split.
– changed the format of blocks and transactions.
– Old nodes could still validate blocks and transactions (the formatting
didn’t break the rules), but they just wouldn’t understand them.
– Some fields are only readable when nodes switch to the newer software,
which allows them to parse additional data.
• Even two years after SegWit activation, not all nodes have
upgraded. There are advantages to doing so, but there’s no real
urgency since there’s no network-breaking change.
8/14/2022
Hard Forks vs. Soft Forks
8/14/2022
“Chain Split in Ethereum…”
• A bug on the Ethereum blockchain’s most popular software client,
Geth, has created a fork in the network.
• Ethereum blockchain is currently processing two chains
simultaneously.
• The bug in question is only present in older versions of the client, or
those that came before the Geth v1.10.8 update. The update is also
called “Hades Gamma.”
• At the moment, there are 5,289 Ethereum nodes. Of that sum, the
Geth client is the most popular software at 3,947 users.
• 74% of the Ethereum network using the Geth client, and 73% of those
users (2,858) using older versions of the Geth client.
• More than half of all nodes on Ethereum are affected by this bug.
8/14/2022
CONSENSUS
8/14/2022
Properties of a Distributed System
• Concurrency
8/14/2022
8/14/2022
Lamport, L (1978).
Time, Clocks and
Ordering of Events
in a Distributed
System
Properties of a Distributed System
• Concurrency
• Lack of Global Clock
• Independent failure of components
– Crash-fail: The component stops working without warning (e.g., the computer crashes).
– Omission: The component sends a message but it is not received by the other nodes
(e.g., the message was dropped).
– Byzantine: The component behaves arbitrarily. This type of fault is irrelevant in
controlled environments (e.g., Google or Amazon data centers) where there is
presumably no malicious behavior. Instead, these faults occur in what’s known as an
“adversarial context.” Basically, when a decentralized set of independent actors serve as
nodes in the network, these actors may choose to act in a “Byzantine” manner. This
means they maliciously choose to alter, block, or not send messages at all.
• Message passing
– Synchronous
– Asynchronous
8/14/2022
The Consensus Problem
• An algorithm achieves consensus if it satisfies the following
conditions:
– Agreement: All non-faulty nodes decide on the same output value.
– Termination: All non-faulty nodes eventually decide on some output value.
• It must do so despite the fact that:
– Some of the computers are faulty.
– The network is not reliable and messages may fail to deliver, be delayed, or
be out of order.
– There is no global clock to help determine the order of events.
8/14/2022
• consensus algorithms typically assume three types of actors in a
system:
– Proposers, often called leaders or coordinators.
– Acceptors, processes that listen to requests from proposers and respond
with values.
– Learners, other processes in the system which learn the final values that
are decided upon.
8/14/2022
• Generally, we can define a consensus algorithm by three steps:
• Step 1: Elect
• Processes elect a single process (i.e., a leader) to make decisions.
• The leader proposes the next valid output value.
• Step 2: Vote
• The non-faulty processes listen to the value being proposed by the leader,
validate it, and propose it as the next valid value.
• Step 3: Decide
• The non-faulty processes must come to a consensus on a single correct output
value. If it receives a threshold number of identical votes which satisfy some
criteria, then the processes will decide on that value.
• Otherwise, the steps start over.
8/14/2022
FLP impossibility
• Reaching consensus in a synchronous environment is possible
because we can make assumptions about the maximum time it
takes for messages to get delivered.
• In reality, most environments don’t allow us to make the
synchronous assumption. So we must design for asynchronous
environments.
• In 1985, researchers Fischer, Lynch, and Paterson (aka FLP)
show how even a single faulty process makes it impossible to
reach consensus among deterministic asynchronous processes.
Basically, because processes can fail at unpredictable times, it’s
also possible for them to fail at the exact opportune time that
prevents consensus from occurring. (“Impossibility of Distributed
Consensus with One Faulty Process,”)
8/14/2022
8/14/2022
God
• there are two ways to circumvent FLP impossibility:
– Use synchrony assumptions.
– Use non-determinism.
8/14/2022
Use synchrony assumptions: Paxos
• Introduced in the 1990s,
• the first real-world, practical, fault-tolerant consensus
algorithm.
• proven correct by Leslie Lamport and has been used by global
internet companies like Google and Amazon to build distributed
services.
8/14/2022
8/14/2022
• Phase 1: Prepare request
– The proposer chooses a new proposal version number (n) and sends a “prepare request”
to the acceptors.
– If acceptors receive a prepare request (“prepare,” n) with n greater than that of any
prepare request they had already responded to, the acceptors send out (“ack,” n, n’, v’) or
(“ack,” n, ^ , ^).
– Acceptors respond with a promise not to accept any more proposals numbered less than
n.
– Acceptors suggest the value (v) of the highest-number proposal that they have accepted,
if any. Or else, they respond with ^.
• Phase 2: Accept request
– If the proposer receives responses from a majority of the acceptors, then it can issue an
accept request (“accept,” n, v) with number n and value v.
– n is the number that appeared in the prepare request.
– v is the value of the highest-numbered proposal among the responses.
– If the acceptor receives an accept request (“accept,” n, v), it accepts the proposal unless
it has already responded to a prepare request with a number greater than n.
• Phase 3: Learning phase
– Whenever an acceptor accepts a proposal, it responds to all learners (“accept,” n, v).
– Learners receive (“accept,” n, v) from a majority of acceptors, decide v, and send
(“decide,” v) to all other learners.
– Learners receive (“decide,” v) and the decided v.
8/14/2022
Shortcomings of Paxos
• if a proposer failed (e.g., because there was an omission fault),
then decisions could be delayed. Paxos dealt with this by starting
with a new version number in Phase 1, even if previous attempts
never ended.
8/14/2022
• where did the synchrony assumption comes in.
– In Paxos, although timeouts are not explicit in the algorithm, when it
comes to the actual implementation, electing a new proposer after some
timeout period is necessary to achieve termination. Otherwise, we couldn’t
guarantee that acceptors would output the next value, and the system
could come to a halt.
8/14/2022
Consensus in Blockchain
• A consensus mechanism refers to any number of methodologies
used to achieve agreement, trust, and security across a
decentralized computer network.
• In the context of blockchains and cryptocurrencies, proof-of-work
(PoS) and proof-of-stake (PoS) are two of the most prevalent
consensus mechanisms.
• Critics of Bitcoin miners have argued that PoW is overly energy-
intensive, which has sparked the creation of new and more
efficient mechanisms.
8/14/2022
Byzantine General Problem
8/14/2022
Proof of Work (PoW)
• 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.
• 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.
• 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.
8/14/2022
Properties of PoW
• The miners solve cryptographic puzzles to “mine” a block in
order to add to the blockchain.
• This process requires immense amount of energy and
computational usage. The puzzles have been designed in a way
which makes it hard and taxing on the system.
• When a miner solves the puzzle, they present their block to the
network for verification.
• Verifying whether the block belongs to the chain or not is an
extremely simple process.
8/14/2022
Disadvantages of PoW
• PoW is an extremely inefficient
process because of the sheer
amount of power and energy that it
eats up.
• People and organizations that can
afford faster and more powerful
ASICs usually have better chance
of mining than the others. As a
result of this, bitcoin isn’t as
decentralized as it wants to be.
• Big mining pools can simply team
up with each other and launch a
51% on the bitcoin network.
8/14/2022
Proof of Stake (PoS)
• 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.
8/14/2022
PoS
• The validators will have to lock up some of their coins as stake.
• After that, they will start validating the blocks. Meaning, when
they discover a block which they think can be added to the chain,
they will validate it by placing a bet on it.
• If the block gets appended, then the validators will get a reward
proportionate to their bets.
8/14/2022
Risk of Network Attack
• PoW system suffers from the Tragedy of Commons. The Tragedy
of Commons refers to a future point in time when there will be
fewer bitcoin miners available due to little to no block reward
from mining.
• With a PoS, the attacker would need to obtain 51% of the
cryptocurrency to carry out a 51% attack.
• The proof of stake avoids this ‘tragedy’ by making it
disadvantageous for a miner with a 51% stake in a
cryptocurrency to attack the network.
• If the value of the cryptocurrency falls, this means that the value
of their holdings would also fall, and so the majority stake owner
would be more incentivized to maintain a secure network.
8/14/2022
Disadvantages of PoS: Nothing at Stake
Problem
• The nothing-at-stake problem
describes a scenario where block
creators on generic proof-of-stake
protocols have nothing to lose when
the network forks.
• Miners can follow both chains and
reap the rewards at no additional
cost to their original deposit.
• When each miner acts in their own
self-interests, they neglect the
integrity and security of the network
as a whole.
8/14/2022
Solution to Nothing at Stake: Casper
• Casper is the POS protocol that Ethereum has chosen to go with.
Vlad Zamfir is often credited as being the “Face of Casper”.
– The validators stake a portion of their Ethers as stake.
– After that, they will start validating the blocks. Meaning, when they
discover a block which they think can be added to the chain, they will
validate it by placing a bet on it.
– If the block gets appended, then the validators will get a reward
proportionate to their bets.
– However, if a validator acts in a malicious manner and tries to do a
“nothing at stake”, they will immediately be reprimanded and all of their
stake is going to get slashed.
8/14/2022
Different Consensus Protocols
• Delegated Proof of Stake:
– users can stake their coins and vote for a particular number of delegates.
– if a user ‘X’ stakes 20 coins for a delegate and another user ‘Y’ stakes 2,
then X’s vote will have more weight compared to that of Y.
– The delegate that receives the highest number of votes gets a chance to
produce new blocks.
– (DPOS) mechanism is one of the fastest blockchain consensus mechanisms.
This mechanism can handle a higher number of transactions compared to
Proof of Work mechanism.
– Due to its stake-weighted voting system, DPOS is often considered as a
digital democracy.
8/14/2022
• Proof of Capacity
– Plotting: solutions to complex mathematical puzzles are stored in digital
storages such as hard disks.
– After a storage device is filled with solutions for mathematical puzzles, users
can utilize it for producing blocks.
– Users who are fastest in finding the solutions get a chance to create a new
block.
• Proof of Elapsed Time
– randomly and fairly decides the producer of a new block based on the time they
have spent waiting.
– the mechanism provides a random wait time for each user and the user whose
wait time finishes the earliest will produce a new block.
– only works if the system can verify that no users can run multiple nodes and
the wait time is truly random.
8/14/2022
• Proof of Identity
– Proof of Identity compares the private key of a user with an authorized identity.
– Any identified user from a blockchain network can create a block of data that can be
presented to anyone in the network.
– Proof of Identity ensures integrity and authenticity of created data.
• Proof of Authority
– Proof of Authority mechanism is a modified version of Proof of Stake where the
identities of validators in the network are at stake.
– the identity is the correspondence between validators’ personal identification and their
official documentation to help verify their identity.
– In Proof of Authority, the nodes that become validators are the only ones allowed to
produce new blocks.
– Validators whose identity is at stake are incentivized to secure and preserve the
blockchain network.
– the number of validators is fairly small (i.e. 25 or less).
8/14/2022
• Proof of Activity
– Proof of Activity mechanism is the combination of Proof of Work and Proof of
Stake.
– miners try to find the solution to a puzzle and claim their reward.
– However, the blocks created in Proof of Activity mechanism are simple
templates with mining reward address and header information.
– The header information is then used to choose a random group of validators for
signing a block.
– The validators with larger stakes will have greater odds of being selected to
sign a new block.
– Once the selected validators sign a new block, it becomes a part of the
network.
– In case the block stays unsigned by some validators, it gets discarded and a
new block is utilized.
– The network fees generated in the process are distributed between the
winning miner and the validators.
8/14/2022
Some Important topics in Bitcoin:
Wallet
• Wallet: A Bitcoin wallet(digital wallet) is a software program
where Bitcoins are stored.
• Various types of Wallet:
– Mobile Wallet, Desktop Wallet, Hardware Wallet, Web Wallet…
• Bitcoin.org: https://bitcoin.org/en/
8/14/2022
Some Important topics in Bitcoin: Full
Node and Light-weight Node
• Security is key for most cryptocurrencies, including bitcoin.
• On the Bitcoin network, transactions are validated in each node.
• However, this is a time-intensive approach, thus nodes are
divided into lightweight and full to help speed up the process.
• Full nodes confirm all transactions by downloading all
transactions, while lightweight nodes only download key data.
• There are three key ways to set up a full node—the cloud, local,
and pre-configured.
• There is another special type of nodes: Master node.
8/14/2022
Some Important topics in Bitcoin:
Bitcoin Addresses
• A Bitcoin address indicates the source or destination of a Bitcoin payment. Similar to
sending an email, if you want to send bitcoins to your friend, you would send your
bitcoins from your Bitcoin address to your friend’s Bitcoin address.
• Bitcoin addresses are 26-35 characters long, consist of alphabetic and numeric
characters, and either begin with “1”, “3”, or “bc1”.Currently, there are three Bitcoin
address formats in use:
– P2PKH (address starts with the number “1”)
– Example: 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2
– P2SH (address starts with the number “3”)
– Example: 3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy
– Bech32 (address starts with “bc1”)
– Example: bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq
8/14/2022
Some Important topics in Bitcoin:
SegWit
• SegWit is an action pertaining to Bitcoin that is designed to help
increase the block size limit on a blockchain.
• SegWit helps increase the block size limit by pulling signature
data from Bitcoin transactions.
• The term SegWit refers to segregate, or separate, and to
witnesses, which are the transaction signatures.
• On a basic level, SegWit is a process that changes the way data
are stored, therefore helping the Bitcoin network to run faster
and more smoothly.
• The concept of SegWit was formulated by bitcoin developer
Pieter Wuille.
8/14/2022
Some Important topics in Bitcoin:
Lightning Network
• Bitcoin's Lightning Network (LN) is a second layer added to
Bitcoin's network enabling transactions to be done off of the
blockchain.
• Lightning Network is designed to speed up transaction
processing times and decrease the associated costs of Bitcoin’s
blockchain.
• However, Lightning Network still has costs associated with it
and can be susceptible to fraud or malicious attacks.
• Bitcoin's price swings may prevent the crypto from becoming a
popular method of payment limiting the use of Lightning
Network.
8/14/2022
Advantages of Bitcoin
• It is accepted worldwide at the same rates, and there is no risk of
depreciation or appreciation.
• It has the lowest transactional fees in the world.
• It has fewer risks and irreversible transaction benefitting
merchants.
• It is fully Secured and control by the cryptographic encryption
algorithm.
• It is the transparent & neutral mode of administration as anyone
can check data in real-time.
8/14/2022
Disadvantages of Bitcoin
• Degree of Acceptance: In Bitcoin, the Degree of Acceptance is
very low because many people are still unaware of its benefits.
• Volatile: Total number of Bitcoins in circulation is very small, so
even a small change can make the price of the Bitcoin volatile.
• Ongoing Development: Bitcoins software is still in beta form, and
many incomplete features are in active development
8/14/2022
Bitcoin – abstract from Satoshi’s Paper
• A purely peer-to-peer version of electronic cash would allow online
payments to be sent directly from one party to another without going
through a financial institution. Digital signatures provide part of the
solution, but the main benefits are lost if a trusted third party is still
required to prevent double-spending. We propose a solution to the
double-spending problem using a peer-to-peer network. The network
timestamps transactions by hashing them into an ongoing chain of
hash-based proof-of-work, forming a record that cannot be changed
without redoing the proof-of-work. The longest chain not only serves as
proof of the sequence of events witnessed, but proof that it came from
the largest pool of CPU power. As long as a majority of CPU power is
controlled by nodes that are not cooperating to attack the network,
they'll generate the longest chain and outpace attackers. The network
itself requires minimal structure. Messages are broadcast on a best
effort basis, and nodes can leave and rejoin the network at will,
accepting the longest proof-of-work chain as proof of what happened
while they were gone.
8/14/2022
Bitcoin – key features
• Peer-to-peer
• Digital signature
• Double spending
• Timestamp
• Hashing
• Chain of hash based proof of work
• Pool of CPU power
8/14/2022

Más contenido relacionado

Similar a Bitcoin(8-15).pptx

Blockchain technology and its’ usecases in computer networks
Blockchain technology and its’ usecases in computer networksBlockchain technology and its’ usecases in computer networks
Blockchain technology and its’ usecases in computer networksSabidur Rahman
 
Disruption In Foreign Payment Systems via Trusted Bitcoin
Disruption In Foreign Payment Systems via Trusted BitcoinDisruption In Foreign Payment Systems via Trusted Bitcoin
Disruption In Foreign Payment Systems via Trusted BitcoinNinara Mirbabayeva
 
The Greatest Invention Since Electricity
The Greatest Invention Since ElectricityThe Greatest Invention Since Electricity
The Greatest Invention Since ElectricityMeg Montgomery
 
WHAT IS CRYPTOCURRENCY EXPECTED APPLICATIONS.
WHAT IS CRYPTOCURRENCY  EXPECTED APPLICATIONS.WHAT IS CRYPTOCURRENCY  EXPECTED APPLICATIONS.
WHAT IS CRYPTOCURRENCY EXPECTED APPLICATIONS.Qutomatic
 
Bitcoin and Ransomware Analysis
Bitcoin and Ransomware AnalysisBitcoin and Ransomware Analysis
Bitcoin and Ransomware AnalysisInderjeet Singh
 
Bitcoin and Ransomware Analysis
Bitcoin and Ransomware AnalysisBitcoin and Ransomware Analysis
Bitcoin and Ransomware Analysisinder_barara
 
Cryptocurrency-Bitcoin
Cryptocurrency-BitcoinCryptocurrency-Bitcoin
Cryptocurrency-BitcoinSatwikaHotwani
 
Bitcoin: The Internet of Money
Bitcoin: The Internet of MoneyBitcoin: The Internet of Money
Bitcoin: The Internet of Moneywinklevosscap
 
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
 
Introduction to the World of Cryptocurrency (Summary)
Introduction to the World of Cryptocurrency (Summary)Introduction to the World of Cryptocurrency (Summary)
Introduction to the World of Cryptocurrency (Summary)Syeirabani Hatta
 
#blockchain_hashin_bitcoin_cryptocurranies
#blockchain_hashin_bitcoin_cryptocurranies#blockchain_hashin_bitcoin_cryptocurranies
#blockchain_hashin_bitcoin_cryptocurraniesMoaaz Mohamed
 
Landgate Presentation on Blockchain
Landgate Presentation on BlockchainLandgate Presentation on Blockchain
Landgate Presentation on BlockchainJunran Cao
 
What is bitcoin?
What is bitcoin?What is bitcoin?
What is bitcoin?Suraj Bora
 
Seminarreportonbitcoinapp02
Seminarreportonbitcoinapp02Seminarreportonbitcoinapp02
Seminarreportonbitcoinapp02Mayuresh Singh
 
Introduction to blockchain_hcmc_20170820
Introduction to blockchain_hcmc_20170820Introduction to blockchain_hcmc_20170820
Introduction to blockchain_hcmc_20170820HATCH! PROGRAM
 
Keynote: Blockchain Technology: a Sustainable Concept for the Future?
Keynote: Blockchain Technology: a Sustainable Concept for the Future?Keynote: Blockchain Technology: a Sustainable Concept for the Future?
Keynote: Blockchain Technology: a Sustainable Concept for the Future?Ingo Weber
 

Similar a Bitcoin(8-15).pptx (20)

BITCOIN EXPLAINED
BITCOIN EXPLAINEDBITCOIN EXPLAINED
BITCOIN EXPLAINED
 
Blockchain technology and its’ usecases in computer networks
Blockchain technology and its’ usecases in computer networksBlockchain technology and its’ usecases in computer networks
Blockchain technology and its’ usecases in computer networks
 
Disruption In Foreign Payment Systems via Trusted Bitcoin
Disruption In Foreign Payment Systems via Trusted BitcoinDisruption In Foreign Payment Systems via Trusted Bitcoin
Disruption In Foreign Payment Systems via Trusted Bitcoin
 
The Greatest Invention Since Electricity
The Greatest Invention Since ElectricityThe Greatest Invention Since Electricity
The Greatest Invention Since Electricity
 
WHAT IS CRYPTOCURRENCY EXPECTED APPLICATIONS.
WHAT IS CRYPTOCURRENCY  EXPECTED APPLICATIONS.WHAT IS CRYPTOCURRENCY  EXPECTED APPLICATIONS.
WHAT IS CRYPTOCURRENCY EXPECTED APPLICATIONS.
 
Bitcoin and Ransomware Analysis
Bitcoin and Ransomware AnalysisBitcoin and Ransomware Analysis
Bitcoin and Ransomware Analysis
 
Bitcoin and Ransomware Analysis
Bitcoin and Ransomware AnalysisBitcoin and Ransomware Analysis
Bitcoin and Ransomware Analysis
 
Cryptocurrency-Bitcoin
Cryptocurrency-BitcoinCryptocurrency-Bitcoin
Cryptocurrency-Bitcoin
 
Bitcoin: The Internet of Money
Bitcoin: The Internet of MoneyBitcoin: The Internet of Money
Bitcoin: The Internet of Money
 
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
 
Introduction to the World of Cryptocurrency (Summary)
Introduction to the World of Cryptocurrency (Summary)Introduction to the World of Cryptocurrency (Summary)
Introduction to the World of Cryptocurrency (Summary)
 
Blockchain.pptx
Blockchain.pptxBlockchain.pptx
Blockchain.pptx
 
#blockchain_hashin_bitcoin_cryptocurranies
#blockchain_hashin_bitcoin_cryptocurranies#blockchain_hashin_bitcoin_cryptocurranies
#blockchain_hashin_bitcoin_cryptocurranies
 
Digital currency
Digital currencyDigital currency
Digital currency
 
Landgate Presentation on Blockchain
Landgate Presentation on BlockchainLandgate Presentation on Blockchain
Landgate Presentation on Blockchain
 
What is bitcoin?
What is bitcoin?What is bitcoin?
What is bitcoin?
 
Seminarreportonbitcoinapp02
Seminarreportonbitcoinapp02Seminarreportonbitcoinapp02
Seminarreportonbitcoinapp02
 
A bitcoin-primer
A bitcoin-primerA bitcoin-primer
A bitcoin-primer
 
Introduction to blockchain_hcmc_20170820
Introduction to blockchain_hcmc_20170820Introduction to blockchain_hcmc_20170820
Introduction to blockchain_hcmc_20170820
 
Keynote: Blockchain Technology: a Sustainable Concept for the Future?
Keynote: Blockchain Technology: a Sustainable Concept for the Future?Keynote: Blockchain Technology: a Sustainable Concept for the Future?
Keynote: Blockchain Technology: a Sustainable Concept for the Future?
 

Último

SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 

Último (20)

SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 

Bitcoin(8-15).pptx

  • 2. Bitcoin • “Bitcoin: A Peer-to-Peer Electronic Cash System.”- Satoshi Nakamoto. • 8 pages, 8 references. 8/14/2022
  • 3. References of Satoshi’s Paper 1. W. Dai, "b-money," http://www.weidai.com/bmoney.txt, 1998. 2. H. Massias, X.S. Avila, and J.-J. Quisquater, "Design of a secure timestamping service with minimal trust requirements," In 20th Symposium on Information Theory in the Benelux, May 1999. 3. S. Haber, W.S. Stornetta, "How to time-stamp a digital document," In Journal of Cryptology, vol 3, no 2, pages 99-111, 1991. 4. D. Bayer, S. Haber, W.S. Stornetta, "Improving the efficiency and reliability of digital time-stamping,“ In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993. 5. S. Haber, W.S. Stornetta, "Secure names for bit-strings," In Proceedings of the 4th ACM Conference on Computer and Communications Security, pages 28-35, April 1997. 6. A. Back, "Hashcash - a denial of service counter-measure,“ http://www.hashcash.org/papers/hashcash.pdf, 2002. 7. R.C. Merkle, "Protocols for public key cryptosystems," In Proc. 1980 Symposium on Security and Privacy, IEEE Computer Society, pages 122-133, April 1980. 8. W. Feller, "An introduction to probability theory and its applications," 1957. 8/14/2022
  • 4. What is B-Money? • First revealed in 1998 by computer scientist Wei Dai, b-money was intended to be an anonymous, distributed electronic cash system. • Wei Dai, a computer engineer and graduate of the University of Washington, published an essay in 1998 introducing the concept of b-money. • Although it was never officially launched, b-money endeavored to provide many of the same services and features that contemporary cryptocurrencies today do as well. 8/14/2022
  • 5. • Dai's concept for b-money included: – the requirement for computational work in order to facilitate the digital currency, – the stipulation that this work must be verified by the community in a collective ledger, – rewarding workers for their input. • Wei is the smallest denomination of ether—the cryptocurrency coin used on the Ethereum network. One ether = 1,000,000,000,000,000,000 wei (1018). The other way to look at it is one wei is one quintillionth of an ether. • The satoshi is the smallest unit of the bitcoin cryptocurrency. The satoshi to bitcoin ratio is 100 million satoshis to one bitcoin. As of Sept. • 1 bitcoin (BTC) = 1,000 millibitcoins (mBTC) = 1,000,000 microbitcoins (μBTC) =100,000,000 satoshis. 8/14/2022
  • 6. References of Satoshi’s Paper 1. W. Dai, "b-money," http://www.weidai.com/bmoney.txt, 1998. 2. H. Massias, X.S. Avila, and J.-J. Quisquater, "Design of a secure timestamping service with minimal trust requirements," In 20th Symposium on Information Theory in the Benelux, May 1999. 3. S. Haber, W.S. Stornetta, "How to time-stamp a digital document," In Journal of Cryptology, vol 3, no 2, pages 99-111, 1991. 4. D. Bayer, S. Haber, W.S. Stornetta, "Improving the efficiency and reliability of digital time-stamping,“ In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993. 5. S. Haber, W.S. Stornetta, "Secure names for bit-strings," In Proceedings of the 4th ACM Conference on Computer and Communications Security, pages 28-35, April 1997. 6. A. Back, "Hashcash - a denial of service counter-measure,“ http://www.hashcash.org/papers/hashcash.pdf, 2002. 7. R.C. Merkle, "Protocols for public key cryptosystems," In Proc. 1980 Symposium on Security and Privacy, IEEE Computer Society, pages 122-133, April 1980. 8. W. Feller, "An introduction to probability theory and its applications," 1957. 8/14/2022
  • 10. Bitcoin • What is the price of an Bitcoin today? – $43980.50 = €37565.19 = 3274183.39 • What is the original price? – Bitcoin first started trading from around $0.0008 to $0.08 per coin in July 2010. • What is the highest price Bitcoin has reached? – Bitcoin reached a price of $64,863 on April 14, 2021. 8/14/2022
  • 11. Bitcoin – abstract from Satoshi’s Paper • A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they'll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone. 8/14/2022
  • 12. Double spending • A technical issue that arises with the notion of a digital currency is the ability for somebody to duplicate the digital money and spend it simultaneously at two or more places. Double-spending is the risk that a digital currency can be spent twice. • It is a potential problem unique to digital currencies because digital information can be reproduced relatively easily by savvy individuals who understand the blockchain network and the computing power necessary to manipulate it. • This 'double-spend' problem is prevented in blockchain-based cryptocurrencies such as Bitcoin by using a consensus mechanism known as proof-of-work (PoW). • This PoW is carried out by a decentralized network of 'miners' who not only secure the fidelity of the past transactions on the blockchain's ledger but also detect and prevent double-spending. 8/14/2022
  • 14. Dealing with Double Spending • You have 1 BTC • You attempt to spend it twice in two separate transactions. • Both of these transactions will go into the pool of unconfirmed transactions. • The first transaction would be approved via the confirmation mechanism and then verified into the subsequent block. • However, the second transaction would be recognized as invalid by the confirmation process and would not be verified. • If both transactions are pulled from the pool for confirmation simultaneously, the transaction with the highest number of confirmations will be included in the blockchain, while the other one will be discarded. 8/14/2022
  • 15. Common double spending approaches • 51% attacks: An attacker manages to take control of over 50 percent of the hash rate—or the measure of the Bitcoin network’s processing power. • Finney attacks: This happens when a miner, who has already mined a block, did not broadcast the mined block immediately to the network but spent it instead on another transaction, which then negates the payment. • Race attacks: This is when an attacker or hacker uses the same coin in two different transactions, but only one transaction gets verified and confirmed—leaving the other one invalidated. 8/14/2022
  • 16. • Security measure 1: Whichever transaction gets the maximum number of network confirmations (typically a minimum of six) will be included in the blockchain, while others are discarded • Security measure 2: Once confirmations and transactions are put on the blockchain they are time-stamped, rendering them irreversible and impossible to alter 8/14/2022
  • 17. What is 51% attack • A 51% attack is quite possibly the problem most feared in the entire blockchain industry • In a 51% attack, one miner or mining group gains or purchases enough hash power to take control of 51% or more of a blockchain network and double-spend the cryptocurrency involved. • No successful 51% attack has been carried out on the Bitcoin blockchain so far, but it has happened in other cryptocurrency networks with far less hash power and poor network security. 8/14/2022
  • 18.
  • 19. Bitcoin Mining • The process of using sophisticated computers to verify the legitimacy of Bitcoin transactions and to enter new bitcoin in the circulations. 8/14/2022
  • 20. How to Mine Bitcoins • Get a Bitcoin mining rig. • Get a Bitcoin wallet • Join a mining pool • Get a mining program for your computer • Start mining 8/14/2022
  • 21. How to Mine Bitcoins • Get a Bitcoin mining rig. • Get a Bitcoin wallet • Join a mining pool • Get a mining program for your computer • Start mining 8/14/2022
  • 22. Mining Rig • ASIC (Application-Specific Integrated Circuit chips) - Special hardware designated just for mining Bitcoins or other currencies based on the same algorithm. – uses less energy – mines Bitcoins much faster – expensive – manufacturing is time-consuming – speed is astonishing. 8/14/2022
  • 23. How to Mine Bitcoins • Get a Bitcoin mining rig. • Get a Bitcoin wallet • Join a mining pool • Get a mining program for your computer • Start mining 8/14/2022
  • 24. Bitcoin Wallet • A Bitcoin wallet is a type of digital wallet used to send and receive Bitcoins. • Bitcoin wallets contain the private keys needed to sign Bitcoin transactions. Anyone who knows the private key can control the coins associated with that address. 8/14/2022
  • 25. Different types of wallets • Desktop wallets – Desktop wallets are installed on a desktop or laptop computer and provide the user with complete control over the wallet. – relatively insecure – Some well-known desktop wallets are Bitcoin Core, Armory, Hive OS X, and Electrum. • Mobile wallets – same functions as a desktop wallet, but on a smartphone or other mobile device. – can facilitate quick payments in physical stores through near field communication (NFC) or by scanning a QR code. – Example: Bitcoin Wallet, Hive Android, and Mycelium Bitcoin Wallet • Web wallets – an online service that can send and store cryptocurrency on your behalf. – security is a major concern - Many Bitcoin users have logged in to a third-party service, only to find out that their Bitcoins have vanished. • Hardware wallets – by far the most secure type of Bitcoin wallet, – store private keys on a physical device that cannot access the Internet. – plug in device. 8/14/2022
  • 26. • There are two kinds of software wallets – full ones which download the whole Blockchain • requires a lot of space and memory. • Secure. • Gives full control – light-weight ones which store only relevant transactions. • connected with Blockchain managed by a third party • can´t fully control it. 8/14/2022
  • 27. How to Mine Bitcoins • Get a Bitcoin mining rig. • Get a Bitcoin wallet • Join a mining pool • Get a mining program for your computer • Start mining 8/14/2022
  • 28. Mining Pool • Miners provide their computing power to a group • the gain is divided among members according to a given power. • The income is lower but regular. • members of a pool have to pay a fee to an operator of the pool, the price of fees is usually around 0 and 2% of the received reward. 8/14/2022
  • 29. How to Mine Bitcoins • Get a Bitcoin mining rig. • Get a Bitcoin wallet • Join a mining pool • Get a mining program for your computer • Start mining 8/14/2022
  • 30. Mining Program • It connects you to the Blockchain and Bitcoin network. • delivers work to miners, • collects complete results of their work • adds all information back to the Blockchain. • In addition to that, Bitcoin mining software monitors miner´s activities and shows basic statistics like temperature, cooling, hash rate, and average mining speed. • Some mining pools also have their own software. 8/14/2022
  • 31. How to Mine Bitcoins • Get a Bitcoin mining rig. • Get a Bitcoin wallet • Join a mining pool • Get a mining program for your computer • Start mining 8/14/2022
  • 32. • To earn bitcoins, miners need to meet two conditions: 1. matter of effort 2. matter of luck • You have to verify ~1MB worth of transactions. • You have to be the first miner to arrive at the right answer, or closest answer, to a numeric problem. 8/14/2022
  • 33. Orphan Block • An orphan block is a block that has been solved within the blockchain network but was not accepted due to a lag within the network itself. • There can be two miners who solve for a block simultaneously. The miner who has a more detailed proof-of-work sheet is the one who is awarded the block's reward. • There is no reward for solving a block which is then determined to be an orphan block. 8/14/2022
  • 34. Mining and Bitcoin circulation • Mining is the only way to release new cryptocurrency into circulation. In other words, miners are basically "minting" currency. For example, as of Nov. 2020, there were around 18.5 million bitcoins in circulation. • Aside from the coins minted via the genesis block (the very first block, which was created by founder Satoshi Nakamoto), every single one of those bitcoins came into being because of miners. • In the absence of miners, but there would never be any additional bitcoin. • The total number of bitcoins will be capped at 21 million. • The last bitcoin won't be circulated until around the year 2140. • A coin miner can have "voting" power when changes are proposed in the Bitcoin network protocol. In other words, miners have a degree of influence on the decision-making process on such matters as forking. 8/14/2022
  • 35. How Much a Miner Earns • After every 210,000 blocks mined, or roughly every four years, the block reward given to Bitcoin miners for processing transactions is cut in half. • When bitcoin was first mined in 2009, mining one block would earn you 50 BTC. • In 2012, this was halved to 25 BTC. By 2016, this was halved again to 12.5 BTC. On May 11, 2020, the reward halved again to 6.25 BTC. • In November of 2020, the price of Bitcoin was about $17,900 per bitcoin, which means you'd earn $111,875 (6.25 x 17,900) for completing a block. 8/14/2022
  • 36. Bitcoin Halving • The reward is halved → half the inflation → lower available supply → higher demand → higher price → miners incentive still remains, regardless of smaller rewards, as the value of Bitcoin is increased In the process 8/14/2022
  • 38. Forking • The consensus algorithm behind a blockchain is the foundation of a decentralized network for maintaining a public ledger of transactions without requiring a third party • Forks result if the consensus algorithm behind a blockchain is changed • A hard fork happens if a new blockchain permanently splits from the original blockchain - all users in the network need to upgrade their software to keep participating • A soft fork is a divergence that occurs if some miners still follow the old version of a blockchain while some follow the new version 8/14/2022
  • 39. Hard Fork • A hard fork refers to a radical change to the protocol of a blockchain network that effectively results in two branches, one that follows the previous protocol and one that follows the new version. • In a hard fork, holders of tokens in the original blockchain will be granted tokens in the new fork as well, but miners must choose which blockchain to continue verifying. • A hard fork can occur in any blockchain, and not only Bitcoin (where hard forks have created Bitcoin Cash and Bitcoin SV, among several others, for example). 8/14/2022
  • 41. Reasons for a Hard Fork • To correct important security risks found in older versions of the software, • to add new functionality, • to reverse transactions - Ethereum blockchain created a hard fork to reverse the hack on the Decentralized Autonomous Organization (DAO). 8/14/2022
  • 42. Major Bitcoin Hard Forks • The Bitcoin Cash Hard Fork – occurred on August 1, 2017. – designed to overcome the problems that Bitcoin was experiencing with delayed transactions and lag. – it uses 8-megabyte blocks instead of the 1-megabyte blocks used by the original Bitcoin, making it easier to scale as more people interact with the service. • The Bitcoin Gold Hard Fork – Occurred in October 2017. – Designed to make Bitcoin mining a more equitable process that requires only basic equipment. – It’s mined on standard graphics processing units instead ASICs – The idea here was to increase the independence and decentralization inherent to the original Bitcoin concept. 8/14/2022
  • 43. Other Bitcoin Hard Forks • Bitcoin Diamond: November 2017 • Super Bitcoin: December 2017 • Bitcoin Atom: January 2018 • Bitcore: November 2017 • Bitcoin God: December 2017 • Bitcoin Private: January 2018 • Bitcoin Zeo: September 2018 • Bitcoin Post-Quantum: December 2018 8/14/2022
  • 44. Two types of Hard Fork • Strictly expanding hard forks – strictly expand the set of transactions that is valid, – the old rules are a soft fork with respect to the new rules. • Bilateral hard forks, – the two rulesets are incompatible both ways. 8/14/2022
  • 45. Soft Fork • A soft fork is a change to the software protocol where only previously valid transaction blocks are made invalid. • As old nodes will recognize the new blocks as valid, a soft fork is backwards-compatible. • This kind of fork requires only a majority of the miners upgrading to enforce the new rules. 8/14/2022
  • 47. Examples of Soft Fork • New transaction types can be added as soft forks, where the participants (e.g. sender and receiver) and miners understand the new transaction type. • The new transaction appear to older clients as a "pay-to- anybody" transaction (of a special form) • The miners agree to reject blocks including these transactions unless the transaction validates under the new rules. • Example - pay-to-script hash (P2SH). • A soft fork can also occur at times due to a temporary divergence in the blockchain when miners using non-upgraded nodes violate a new consensus rule their nodes don’t know about. 8/14/2022
  • 48. Pay-to-script hash (P2SH) • Pay to script hash (P2SH) is an advanced type of transaction used in Bitcoin and other similar cryptocurrencies. Unlike P2PKH, it allows sender to commit funds to a hash of an arbitrary valid script. • Pay-to-Public-Key-Hash (P2PKH) is the basic type of transaction used in Bitcoin and other similar cryptocurrencies. 8/14/2022
  • 49. Soft Fork • Soft forks don't require any nodes to upgrade to maintain consensus. • Soft forks cannot be reversed without a hard fork since a soft fork by definition only allows the set of valid blocks to be a proper subset of what was valid pre-fork. – If users upgrade to a post-soft fork client and for some reason a majority of miners switch back to the pre-soft fork client, the post-soft fork client users would break consensus as soon as a block came along that didn't follow their clients' new rules. In order for a soft fork to work, a majority of the mining power needs to be running a client recognizing the fork. The more miners that accept the new rules, the more secure the network is post-fork. If you have 3/4 of miners recognizing the fork, 1/4 blocks created aren't guaranteed to follow the new rules. These 1/4 blocks will be valid to old nodes that aren't aware of the new rules, but they will be ignored by new nodes. • Soft forks have been used on the bitcoin and ethereum blockchains, among others, to implement new and upgraded functionalities that are backward compatible. 8/14/2022
  • 50. Example of Soft Fork • Segregated Witness (SegWit) fork – occurred shortly after the Bitcoin/Bitcoin Cash split. – changed the format of blocks and transactions. – Old nodes could still validate blocks and transactions (the formatting didn’t break the rules), but they just wouldn’t understand them. – Some fields are only readable when nodes switch to the newer software, which allows them to parse additional data. • Even two years after SegWit activation, not all nodes have upgraded. There are advantages to doing so, but there’s no real urgency since there’s no network-breaking change. 8/14/2022
  • 51. Hard Forks vs. Soft Forks 8/14/2022
  • 52. “Chain Split in Ethereum…” • A bug on the Ethereum blockchain’s most popular software client, Geth, has created a fork in the network. • Ethereum blockchain is currently processing two chains simultaneously. • The bug in question is only present in older versions of the client, or those that came before the Geth v1.10.8 update. The update is also called “Hades Gamma.” • At the moment, there are 5,289 Ethereum nodes. Of that sum, the Geth client is the most popular software at 3,947 users. • 74% of the Ethereum network using the Geth client, and 73% of those users (2,858) using older versions of the Geth client. • More than half of all nodes on Ethereum are affected by this bug. 8/14/2022
  • 54. Properties of a Distributed System • Concurrency 8/14/2022
  • 55. 8/14/2022 Lamport, L (1978). Time, Clocks and Ordering of Events in a Distributed System
  • 56. Properties of a Distributed System • Concurrency • Lack of Global Clock • Independent failure of components – Crash-fail: The component stops working without warning (e.g., the computer crashes). – Omission: The component sends a message but it is not received by the other nodes (e.g., the message was dropped). – Byzantine: The component behaves arbitrarily. This type of fault is irrelevant in controlled environments (e.g., Google or Amazon data centers) where there is presumably no malicious behavior. Instead, these faults occur in what’s known as an “adversarial context.” Basically, when a decentralized set of independent actors serve as nodes in the network, these actors may choose to act in a “Byzantine” manner. This means they maliciously choose to alter, block, or not send messages at all. • Message passing – Synchronous – Asynchronous 8/14/2022
  • 57. The Consensus Problem • An algorithm achieves consensus if it satisfies the following conditions: – Agreement: All non-faulty nodes decide on the same output value. – Termination: All non-faulty nodes eventually decide on some output value. • It must do so despite the fact that: – Some of the computers are faulty. – The network is not reliable and messages may fail to deliver, be delayed, or be out of order. – There is no global clock to help determine the order of events. 8/14/2022
  • 58. • consensus algorithms typically assume three types of actors in a system: – Proposers, often called leaders or coordinators. – Acceptors, processes that listen to requests from proposers and respond with values. – Learners, other processes in the system which learn the final values that are decided upon. 8/14/2022
  • 59. • Generally, we can define a consensus algorithm by three steps: • Step 1: Elect • Processes elect a single process (i.e., a leader) to make decisions. • The leader proposes the next valid output value. • Step 2: Vote • The non-faulty processes listen to the value being proposed by the leader, validate it, and propose it as the next valid value. • Step 3: Decide • The non-faulty processes must come to a consensus on a single correct output value. If it receives a threshold number of identical votes which satisfy some criteria, then the processes will decide on that value. • Otherwise, the steps start over. 8/14/2022
  • 60. FLP impossibility • Reaching consensus in a synchronous environment is possible because we can make assumptions about the maximum time it takes for messages to get delivered. • In reality, most environments don’t allow us to make the synchronous assumption. So we must design for asynchronous environments. • In 1985, researchers Fischer, Lynch, and Paterson (aka FLP) show how even a single faulty process makes it impossible to reach consensus among deterministic asynchronous processes. Basically, because processes can fail at unpredictable times, it’s also possible for them to fail at the exact opportune time that prevents consensus from occurring. (“Impossibility of Distributed Consensus with One Faulty Process,”) 8/14/2022
  • 62. • there are two ways to circumvent FLP impossibility: – Use synchrony assumptions. – Use non-determinism. 8/14/2022
  • 63. Use synchrony assumptions: Paxos • Introduced in the 1990s, • the first real-world, practical, fault-tolerant consensus algorithm. • proven correct by Leslie Lamport and has been used by global internet companies like Google and Amazon to build distributed services. 8/14/2022
  • 65. • Phase 1: Prepare request – The proposer chooses a new proposal version number (n) and sends a “prepare request” to the acceptors. – If acceptors receive a prepare request (“prepare,” n) with n greater than that of any prepare request they had already responded to, the acceptors send out (“ack,” n, n’, v’) or (“ack,” n, ^ , ^). – Acceptors respond with a promise not to accept any more proposals numbered less than n. – Acceptors suggest the value (v) of the highest-number proposal that they have accepted, if any. Or else, they respond with ^. • Phase 2: Accept request – If the proposer receives responses from a majority of the acceptors, then it can issue an accept request (“accept,” n, v) with number n and value v. – n is the number that appeared in the prepare request. – v is the value of the highest-numbered proposal among the responses. – If the acceptor receives an accept request (“accept,” n, v), it accepts the proposal unless it has already responded to a prepare request with a number greater than n. • Phase 3: Learning phase – Whenever an acceptor accepts a proposal, it responds to all learners (“accept,” n, v). – Learners receive (“accept,” n, v) from a majority of acceptors, decide v, and send (“decide,” v) to all other learners. – Learners receive (“decide,” v) and the decided v. 8/14/2022
  • 66. Shortcomings of Paxos • if a proposer failed (e.g., because there was an omission fault), then decisions could be delayed. Paxos dealt with this by starting with a new version number in Phase 1, even if previous attempts never ended. 8/14/2022
  • 67. • where did the synchrony assumption comes in. – In Paxos, although timeouts are not explicit in the algorithm, when it comes to the actual implementation, electing a new proposer after some timeout period is necessary to achieve termination. Otherwise, we couldn’t guarantee that acceptors would output the next value, and the system could come to a halt. 8/14/2022
  • 68. Consensus in Blockchain • A consensus mechanism refers to any number of methodologies used to achieve agreement, trust, and security across a decentralized computer network. • In the context of blockchains and cryptocurrencies, proof-of-work (PoS) and proof-of-stake (PoS) are two of the most prevalent consensus mechanisms. • Critics of Bitcoin miners have argued that PoW is overly energy- intensive, which has sparked the creation of new and more efficient mechanisms. 8/14/2022
  • 70. Proof of Work (PoW) • 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. • 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. • 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. 8/14/2022
  • 71. Properties of PoW • The miners solve cryptographic puzzles to “mine” a block in order to add to the blockchain. • This process requires immense amount of energy and computational usage. The puzzles have been designed in a way which makes it hard and taxing on the system. • When a miner solves the puzzle, they present their block to the network for verification. • Verifying whether the block belongs to the chain or not is an extremely simple process. 8/14/2022
  • 72. Disadvantages of PoW • PoW is an extremely inefficient process because of the sheer amount of power and energy that it eats up. • People and organizations that can afford faster and more powerful ASICs usually have better chance of mining than the others. As a result of this, bitcoin isn’t as decentralized as it wants to be. • Big mining pools can simply team up with each other and launch a 51% on the bitcoin network. 8/14/2022
  • 73. Proof of Stake (PoS) • 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. 8/14/2022
  • 74. PoS • The validators will have to lock up some of their coins as stake. • After that, they will start validating the blocks. Meaning, when they discover a block which they think can be added to the chain, they will validate it by placing a bet on it. • If the block gets appended, then the validators will get a reward proportionate to their bets. 8/14/2022
  • 75. Risk of Network Attack • PoW system suffers from the Tragedy of Commons. The Tragedy of Commons refers to a future point in time when there will be fewer bitcoin miners available due to little to no block reward from mining. • With a PoS, the attacker would need to obtain 51% of the cryptocurrency to carry out a 51% attack. • The proof of stake avoids this ‘tragedy’ by making it disadvantageous for a miner with a 51% stake in a cryptocurrency to attack the network. • If the value of the cryptocurrency falls, this means that the value of their holdings would also fall, and so the majority stake owner would be more incentivized to maintain a secure network. 8/14/2022
  • 76. Disadvantages of PoS: Nothing at Stake Problem • The nothing-at-stake problem describes a scenario where block creators on generic proof-of-stake protocols have nothing to lose when the network forks. • Miners can follow both chains and reap the rewards at no additional cost to their original deposit. • When each miner acts in their own self-interests, they neglect the integrity and security of the network as a whole. 8/14/2022
  • 77. Solution to Nothing at Stake: Casper • Casper is the POS protocol that Ethereum has chosen to go with. Vlad Zamfir is often credited as being the “Face of Casper”. – The validators stake a portion of their Ethers as stake. – After that, they will start validating the blocks. Meaning, when they discover a block which they think can be added to the chain, they will validate it by placing a bet on it. – If the block gets appended, then the validators will get a reward proportionate to their bets. – However, if a validator acts in a malicious manner and tries to do a “nothing at stake”, they will immediately be reprimanded and all of their stake is going to get slashed. 8/14/2022
  • 78. Different Consensus Protocols • Delegated Proof of Stake: – users can stake their coins and vote for a particular number of delegates. – if a user ‘X’ stakes 20 coins for a delegate and another user ‘Y’ stakes 2, then X’s vote will have more weight compared to that of Y. – The delegate that receives the highest number of votes gets a chance to produce new blocks. – (DPOS) mechanism is one of the fastest blockchain consensus mechanisms. This mechanism can handle a higher number of transactions compared to Proof of Work mechanism. – Due to its stake-weighted voting system, DPOS is often considered as a digital democracy. 8/14/2022
  • 79. • Proof of Capacity – Plotting: solutions to complex mathematical puzzles are stored in digital storages such as hard disks. – After a storage device is filled with solutions for mathematical puzzles, users can utilize it for producing blocks. – Users who are fastest in finding the solutions get a chance to create a new block. • Proof of Elapsed Time – randomly and fairly decides the producer of a new block based on the time they have spent waiting. – the mechanism provides a random wait time for each user and the user whose wait time finishes the earliest will produce a new block. – only works if the system can verify that no users can run multiple nodes and the wait time is truly random. 8/14/2022
  • 80. • Proof of Identity – Proof of Identity compares the private key of a user with an authorized identity. – Any identified user from a blockchain network can create a block of data that can be presented to anyone in the network. – Proof of Identity ensures integrity and authenticity of created data. • Proof of Authority – Proof of Authority mechanism is a modified version of Proof of Stake where the identities of validators in the network are at stake. – the identity is the correspondence between validators’ personal identification and their official documentation to help verify their identity. – In Proof of Authority, the nodes that become validators are the only ones allowed to produce new blocks. – Validators whose identity is at stake are incentivized to secure and preserve the blockchain network. – the number of validators is fairly small (i.e. 25 or less). 8/14/2022
  • 81. • Proof of Activity – Proof of Activity mechanism is the combination of Proof of Work and Proof of Stake. – miners try to find the solution to a puzzle and claim their reward. – However, the blocks created in Proof of Activity mechanism are simple templates with mining reward address and header information. – The header information is then used to choose a random group of validators for signing a block. – The validators with larger stakes will have greater odds of being selected to sign a new block. – Once the selected validators sign a new block, it becomes a part of the network. – In case the block stays unsigned by some validators, it gets discarded and a new block is utilized. – The network fees generated in the process are distributed between the winning miner and the validators. 8/14/2022
  • 82. Some Important topics in Bitcoin: Wallet • Wallet: A Bitcoin wallet(digital wallet) is a software program where Bitcoins are stored. • Various types of Wallet: – Mobile Wallet, Desktop Wallet, Hardware Wallet, Web Wallet… • Bitcoin.org: https://bitcoin.org/en/ 8/14/2022
  • 83. Some Important topics in Bitcoin: Full Node and Light-weight Node • Security is key for most cryptocurrencies, including bitcoin. • On the Bitcoin network, transactions are validated in each node. • However, this is a time-intensive approach, thus nodes are divided into lightweight and full to help speed up the process. • Full nodes confirm all transactions by downloading all transactions, while lightweight nodes only download key data. • There are three key ways to set up a full node—the cloud, local, and pre-configured. • There is another special type of nodes: Master node. 8/14/2022
  • 84. Some Important topics in Bitcoin: Bitcoin Addresses • A Bitcoin address indicates the source or destination of a Bitcoin payment. Similar to sending an email, if you want to send bitcoins to your friend, you would send your bitcoins from your Bitcoin address to your friend’s Bitcoin address. • Bitcoin addresses are 26-35 characters long, consist of alphabetic and numeric characters, and either begin with “1”, “3”, or “bc1”.Currently, there are three Bitcoin address formats in use: – P2PKH (address starts with the number “1”) – Example: 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2 – P2SH (address starts with the number “3”) – Example: 3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy – Bech32 (address starts with “bc1”) – Example: bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq 8/14/2022
  • 85. Some Important topics in Bitcoin: SegWit • SegWit is an action pertaining to Bitcoin that is designed to help increase the block size limit on a blockchain. • SegWit helps increase the block size limit by pulling signature data from Bitcoin transactions. • The term SegWit refers to segregate, or separate, and to witnesses, which are the transaction signatures. • On a basic level, SegWit is a process that changes the way data are stored, therefore helping the Bitcoin network to run faster and more smoothly. • The concept of SegWit was formulated by bitcoin developer Pieter Wuille. 8/14/2022
  • 86. Some Important topics in Bitcoin: Lightning Network • Bitcoin's Lightning Network (LN) is a second layer added to Bitcoin's network enabling transactions to be done off of the blockchain. • Lightning Network is designed to speed up transaction processing times and decrease the associated costs of Bitcoin’s blockchain. • However, Lightning Network still has costs associated with it and can be susceptible to fraud or malicious attacks. • Bitcoin's price swings may prevent the crypto from becoming a popular method of payment limiting the use of Lightning Network. 8/14/2022
  • 87. Advantages of Bitcoin • It is accepted worldwide at the same rates, and there is no risk of depreciation or appreciation. • It has the lowest transactional fees in the world. • It has fewer risks and irreversible transaction benefitting merchants. • It is fully Secured and control by the cryptographic encryption algorithm. • It is the transparent & neutral mode of administration as anyone can check data in real-time. 8/14/2022
  • 88. Disadvantages of Bitcoin • Degree of Acceptance: In Bitcoin, the Degree of Acceptance is very low because many people are still unaware of its benefits. • Volatile: Total number of Bitcoins in circulation is very small, so even a small change can make the price of the Bitcoin volatile. • Ongoing Development: Bitcoins software is still in beta form, and many incomplete features are in active development 8/14/2022
  • 89. Bitcoin – abstract from Satoshi’s Paper • A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they'll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone. 8/14/2022
  • 90. Bitcoin – key features • Peer-to-peer • Digital signature • Double spending • Timestamp • Hashing • Chain of hash based proof of work • Pool of CPU power 8/14/2022