KEMBAR78
The Basic Theories of Blockchain | PPTX
The Basic Theories of Blockchain
Mainly Bitcoin
Sota Watanabe
The purpose of this document is to understand the basic systems and
theories of Blockchain. I believe that Blockchain is one of the main
general purpose technologies in the following decades.
Purpose
2
01
02
03
04
Agenda
3
Preface
Basic System
Practical System
Use cases
Preface
5
Sota Watanabe
Hello. I am a student at Keio university and San
Francisco State University.
Ex-SoftBank Robotics Intern, Ex-VALUENEX Intern, Ex-NPO.ETIC. Intern.
https://www.facebook.com/SotaWatana
be0426
Facebook
https://medium.com/new-story
Medium
https://twitter.com/souta__watanabe?lang
=ja
Twitter
Bitcoin : Price
6
Cyprus Crisis
https://www.coindesk.com/price/
Reward : 50BTC Reward : 25BTC Reward : 12.5BTC
Currently, the price is $4,351 / 1 BTC
Mt.Gox
Bitcoin : Basic Knowledge
7
Half-life period
In terms of Bitcoin, The reward of mining is
reduced by half in every 210,000 blocks,
and a block is made every single 10 minutes.
-2012 : 50BTC
-2016 : 25BTC
-NOW: 12.5BTC
The total amount of Bitcoin is 21,000,000BTC.
And, the number of last block will be 6,929,999.
Mining
Miners are participating Proof of Work
and get rewards, if they can contribute to the
network. (correct answers)
Ability of processing
Bitcoin : 7 tps (transaction per second.)
Cf. VISA : 4000〜6000tps
Private Blockchain (mijin) : 3000tps
The aim of Bitcoin
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.
Source: https://bitcoin.org/bitcoin.pdf
Bitcoin : Basic Knowledge
8
• A maximum number of Bitcoins is 20,999,999.
• The maximum will be reached in 2140.
9
The innovative solution of Bitcoin is not cost reduction,
but to minimize the user-charges by making a new value
(BTC) in a virtual ecosystem.
Innovation
10
Bitcoin is the first practical solution to a longstanding problem in
computer science called the Byzantine Generals Problem.
Mark Andreessen
https://dealbook.nytimes.com/2014/01/21/why-bitcoin-matters/
Bitcoin is just one of the use cases of Blockchain.
Basic System
Satoshi Nakamoto Research Paper(2008)
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.
Features of Blockchain
14Source: MITI
• It is nearly impossible to tamper the transactions.
• All transactions are opened to participants.
• Trustless system (Without 3rd party)
3 Core Characteristics
15
Genesis
Block
BlockBlock
BlockBlockBlock
Contract : A→B $10
①Connect each block which was proved
to be correct.
②P2P system.
Every node has the same ledger.
③Consensus algorithm
PoW, PoS
The former block’s
hash value
Transactions in
about 10 minutes.
The former block’s
hash value.
PoW
N transactions
New Block
Workflow System①
16
Participants : A, B, C, D, E, F, G
Miners : α, β, γ, δ, ε
A
B
C D
E
F
α
β
γ
ε
δ
Blockchain
Workflow System②
17
A send 10BTC to C, C send 5BTC to F, E send 8BTC to D
A→C, C→F, E→ D
A
B
C D
E
F
α
β
γ
ε
δ
Workflow System③
18
A
B
C D
E
F
α
β
γ
ε
δ
The transactions are broadcasted to participants and miners at the same time.
Transactions like A→C, C→F, E→D are also the same.
Workflow System④
19
A
B
C D
E
F
α
β
γ
ε
δ
The miners which received transactions confirm signatures and start to find Nance.
Workflow System⑤
2020
A
B
C D
E
F
α
β
γ
ε
δ
The one who finds Nance will make a new block and broadcast it to all participants and miners.
Workflow System⑥
21
A
B
C D
E
F
α
β
γ
ε
δ
Miners which received the block confirm it and add it to own blocks.
*Reference : Miner
22
Source: bitflyer
• A miner is a agent who tries to mine blocks.
• When a miner mines a block, the block
is broadcasted to the network. If the block
is part of the longest chain, the miner can
get reward with bitcoin.
Types of Blockchain
23https://www.jbs.cam.ac.uk/fileadmin/user_upload/research/centres/alternative-finance/downloads/2017-09-27-ccaf-globalbchain.pdf
• Read (who can access the ledger and see transactions)
• Write (who can generate transactions and send them to the network)
• Commit (who can update the state of the ledger).
Practical System
The Structure of Blocks
25
Former block’s hash value Former block’s hash value Former block’s hash value
Nance Nance Nance
Transaction Transaction
TransactionTransaction
Transaction Transaction
TransactionTransaction
Transaction Transaction
Transaction Transaction
• A block is including transactions in a certain period of time.
• A block is including the former block’s hash value.
Therefore, it looks like a chain structure.
• The hash is recomputed for each value until a hash containing the
required number of zero bits is found. (set by “the difficulty”)
☓
☓
*Reference : Nance
26
• The nance in a bitcoin is a 32bit (4byte).
• In terms of bitcoin, the difficulty of finding “nance”
is set. It is about 10 minutes.
Hash
Hash
Hash
Nance : aaaaaa
Nance : aaaaaa
Nance : aaaaaa
Other data : bbbbbbbbbbbb
Other data : bbbbbbbbbbbb
Other data : bbbbbbbbbbbb
21333508fdw9cujsighweh・・・
000000000000000012ec2h93・・
0000012dwvf344brthhh64・・・10 min
P2P
27
Hybrid model is a combination of peer-to-peer and
client-server models.
There is a central server that helps peers find each other.
Hybrid P2P
Index information
P2P P2P
P2P is a decentralized model whereby two individuals
Interact directly with each other, without intermediation
by a third-party
Pure P2P
Consensus Algorithm : PoW in Bitcoin
28
A proof of work is a piece of data which is difficult (costly, time-consuming) to produce but easy for others to verify and which satisfies certain
requirements. Producing a proof of work can be a random process with low probability so that a lot of trial and error is required on average before a valid
proof of work is generated. Bitcoin uses the Hashcash proof of work system.
One application of this idea is using Hashcash as a method to preventing email spam, requiring a proof of work on the email's contents (including the To
address), on every email. Legitimate emails will be able to do the work to generate the proof easily (not much work is required for a single email), but mass
spam emailers will have difficulty generating the required proofs (which would require huge computational resources).
Hashcash proofs of work are used in Bitcoin for block generation. In order for a block to be accepted by network participants, miners must complete a proof
of work which covers all of the data in the block. The difficulty of this work is adjusted so as to limit the rate at which new blocks can be generated by the
network to one every 10 minutes. Due to the very low probability of successful generation, this makes it unpredictable which worker computer in the network
will be able to generate the next block.
For a block to be valid it must hash to a value less than the current target; this means that each block indicates that work has been done generating it. Each
block contains the hash of the preceding block, thus each block has a chain of blocks that together contain a large amount of work. Changing a block (which
can only be done by making a new block containing the same predecessor) requires regenerating all successors and redoing the work they contain. This
protects the block chain from tampering.
The most widely used proof-of-work scheme is based on SHA-256 and was introduced as a part of Bitcoin. Some other hashing algorithms that are used for
proof-of-work include Scrypt, Blake-256, CryptoNight, HEFTY1, Quark, SHA-3, scrypt-jane, scrypt-n, and combinations thereof.
https://en.bitcoin.it/wiki/Proof_of_work
The Problems of PoW
29
51% Attack
Finality Problem
Performance limit
Heavy Capacity
If a miner or a pool got more than 50%
of the network’s mining hashrate, they would
be able to prevent new transactions and reverse
the transactions.
Public blockchains are an acceptable settlement mechanism
and layer for financial instruments. But public blockchains
by design cannot definitively guarantee settlement finality,
and as a result, they are currently not a reliable option for the
clearing and settling of financial instruments.
Tim Swanson
https://login.tabbgroup.com/login?service=http%3A%2F%2Ftabbforum.com%2Fopinions%2
Fsettlement-risks-involving-public-blockchains%3Fprint_preview%3Dtrue%26single%3Dtrue
Vitalik Buterin’s response:
https://blog.ethereum.org/2016/05/09/on-settlement-finality/
Bitcoin : 7tps
VISA : 4000〜6000tps
Participants must have the whole transactions.
The capacity is more than 70〜80GB
* Reference :51% Attack
30
@Berkeley Blockchain
Usually, a Miner joins a pool which is a team of other miners and cooperates to mine.
Miner’s share
• Currently, there are no pools which get
more than 50%.
• Miners are mainly from China and the other
countries which the electronic bills are so low.
*Reference : Finality
31
Invalid
Invalid
● The majority decision is represented by the longest chain, which has the greatest proof-of-work effort
invested in it.
● Nodes always consider the longest chain to be the correct one and will keep working on
extending it.
Satoshi Nakamoto (2008)
Other Consensus Algorithms
32
Consensus Algorithm System
Proof of Work Bitcoin Core
Proof of Stake Etereum, mijin
Paxos Google Chubby
Raft RAMCloud
PBFT Hyperledger Fabric
Sieve Hyperledger Fabric
*Reference :
33
Crypto currency Others
Hyper Ledger Fabric
EthereumBitcoin
Use cases
International Remittance
35
Bank A Bank B
Account Account
Blockchain
$→ B
Withdraw
B→¥
Deposit
Payment Payment
Fast and Cheap
Bank A
$
$→¥
Correspondent Bank
Bank B Bank C
¥
Long and Expensive
Trade
36
ImportExport
Blockchain
Funding
37
I have a new idea!
Blockchain
Smart Contract
Investor Investor
register
Payment
Payment
return
Energy
38
TransActive Grid Project
Sell and buy electronic power without 3rd party
Transaction
Smart Mater
Register
Blockchain

The Basic Theories of Blockchain

  • 1.
    The Basic Theoriesof Blockchain Mainly Bitcoin Sota Watanabe
  • 2.
    The purpose ofthis document is to understand the basic systems and theories of Blockchain. I believe that Blockchain is one of the main general purpose technologies in the following decades. Purpose 2
  • 3.
  • 4.
  • 5.
    5 Sota Watanabe Hello. Iam a student at Keio university and San Francisco State University. Ex-SoftBank Robotics Intern, Ex-VALUENEX Intern, Ex-NPO.ETIC. Intern. https://www.facebook.com/SotaWatana be0426 Facebook https://medium.com/new-story Medium https://twitter.com/souta__watanabe?lang =ja Twitter
  • 6.
    Bitcoin : Price 6 CyprusCrisis https://www.coindesk.com/price/ Reward : 50BTC Reward : 25BTC Reward : 12.5BTC Currently, the price is $4,351 / 1 BTC Mt.Gox
  • 7.
    Bitcoin : BasicKnowledge 7 Half-life period In terms of Bitcoin, The reward of mining is reduced by half in every 210,000 blocks, and a block is made every single 10 minutes. -2012 : 50BTC -2016 : 25BTC -NOW: 12.5BTC The total amount of Bitcoin is 21,000,000BTC. And, the number of last block will be 6,929,999. Mining Miners are participating Proof of Work and get rewards, if they can contribute to the network. (correct answers) Ability of processing Bitcoin : 7 tps (transaction per second.) Cf. VISA : 4000〜6000tps Private Blockchain (mijin) : 3000tps The aim of Bitcoin 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. Source: https://bitcoin.org/bitcoin.pdf
  • 8.
    Bitcoin : BasicKnowledge 8 • A maximum number of Bitcoins is 20,999,999. • The maximum will be reached in 2140.
  • 9.
    9 The innovative solutionof Bitcoin is not cost reduction, but to minimize the user-charges by making a new value (BTC) in a virtual ecosystem. Innovation
  • 10.
    10 Bitcoin is thefirst practical solution to a longstanding problem in computer science called the Byzantine Generals Problem. Mark Andreessen https://dealbook.nytimes.com/2014/01/21/why-bitcoin-matters/
  • 11.
    Bitcoin is justone of the use cases of Blockchain.
  • 12.
  • 13.
    Satoshi Nakamoto ResearchPaper(2008) 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.
  • 14.
    Features of Blockchain 14Source:MITI • It is nearly impossible to tamper the transactions. • All transactions are opened to participants. • Trustless system (Without 3rd party)
  • 15.
    3 Core Characteristics 15 Genesis Block BlockBlock BlockBlockBlock Contract: A→B $10 ①Connect each block which was proved to be correct. ②P2P system. Every node has the same ledger. ③Consensus algorithm PoW, PoS The former block’s hash value Transactions in about 10 minutes. The former block’s hash value. PoW N transactions New Block
  • 16.
    Workflow System① 16 Participants :A, B, C, D, E, F, G Miners : α, β, γ, δ, ε A B C D E F α β γ ε δ Blockchain
  • 17.
    Workflow System② 17 A send10BTC to C, C send 5BTC to F, E send 8BTC to D A→C, C→F, E→ D A B C D E F α β γ ε δ
  • 18.
    Workflow System③ 18 A B C D E F α β γ ε δ Thetransactions are broadcasted to participants and miners at the same time. Transactions like A→C, C→F, E→D are also the same.
  • 19.
    Workflow System④ 19 A B C D E F α β γ ε δ Theminers which received transactions confirm signatures and start to find Nance.
  • 20.
    Workflow System⑤ 2020 A B C D E F α β γ ε δ Theone who finds Nance will make a new block and broadcast it to all participants and miners.
  • 21.
    Workflow System⑥ 21 A B C D E F α β γ ε δ Minerswhich received the block confirm it and add it to own blocks.
  • 22.
    *Reference : Miner 22 Source:bitflyer • A miner is a agent who tries to mine blocks. • When a miner mines a block, the block is broadcasted to the network. If the block is part of the longest chain, the miner can get reward with bitcoin.
  • 23.
    Types of Blockchain 23https://www.jbs.cam.ac.uk/fileadmin/user_upload/research/centres/alternative-finance/downloads/2017-09-27-ccaf-globalbchain.pdf •Read (who can access the ledger and see transactions) • Write (who can generate transactions and send them to the network) • Commit (who can update the state of the ledger).
  • 24.
  • 25.
    The Structure ofBlocks 25 Former block’s hash value Former block’s hash value Former block’s hash value Nance Nance Nance Transaction Transaction TransactionTransaction Transaction Transaction TransactionTransaction Transaction Transaction Transaction Transaction • A block is including transactions in a certain period of time. • A block is including the former block’s hash value. Therefore, it looks like a chain structure. • The hash is recomputed for each value until a hash containing the required number of zero bits is found. (set by “the difficulty”)
  • 26.
    ☓ ☓ *Reference : Nance 26 •The nance in a bitcoin is a 32bit (4byte). • In terms of bitcoin, the difficulty of finding “nance” is set. It is about 10 minutes. Hash Hash Hash Nance : aaaaaa Nance : aaaaaa Nance : aaaaaa Other data : bbbbbbbbbbbb Other data : bbbbbbbbbbbb Other data : bbbbbbbbbbbb 21333508fdw9cujsighweh・・・ 000000000000000012ec2h93・・ 0000012dwvf344brthhh64・・・10 min
  • 27.
    P2P 27 Hybrid model isa combination of peer-to-peer and client-server models. There is a central server that helps peers find each other. Hybrid P2P Index information P2P P2P P2P is a decentralized model whereby two individuals Interact directly with each other, without intermediation by a third-party Pure P2P
  • 28.
    Consensus Algorithm :PoW in Bitcoin 28 A proof of work is a piece of data which is difficult (costly, time-consuming) to produce but easy for others to verify and which satisfies certain requirements. Producing a proof of work can be a random process with low probability so that a lot of trial and error is required on average before a valid proof of work is generated. Bitcoin uses the Hashcash proof of work system. One application of this idea is using Hashcash as a method to preventing email spam, requiring a proof of work on the email's contents (including the To address), on every email. Legitimate emails will be able to do the work to generate the proof easily (not much work is required for a single email), but mass spam emailers will have difficulty generating the required proofs (which would require huge computational resources). Hashcash proofs of work are used in Bitcoin for block generation. In order for a block to be accepted by network participants, miners must complete a proof of work which covers all of the data in the block. The difficulty of this work is adjusted so as to limit the rate at which new blocks can be generated by the network to one every 10 minutes. Due to the very low probability of successful generation, this makes it unpredictable which worker computer in the network will be able to generate the next block. For a block to be valid it must hash to a value less than the current target; this means that each block indicates that work has been done generating it. Each block contains the hash of the preceding block, thus each block has a chain of blocks that together contain a large amount of work. Changing a block (which can only be done by making a new block containing the same predecessor) requires regenerating all successors and redoing the work they contain. This protects the block chain from tampering. The most widely used proof-of-work scheme is based on SHA-256 and was introduced as a part of Bitcoin. Some other hashing algorithms that are used for proof-of-work include Scrypt, Blake-256, CryptoNight, HEFTY1, Quark, SHA-3, scrypt-jane, scrypt-n, and combinations thereof. https://en.bitcoin.it/wiki/Proof_of_work
  • 29.
    The Problems ofPoW 29 51% Attack Finality Problem Performance limit Heavy Capacity If a miner or a pool got more than 50% of the network’s mining hashrate, they would be able to prevent new transactions and reverse the transactions. Public blockchains are an acceptable settlement mechanism and layer for financial instruments. But public blockchains by design cannot definitively guarantee settlement finality, and as a result, they are currently not a reliable option for the clearing and settling of financial instruments. Tim Swanson https://login.tabbgroup.com/login?service=http%3A%2F%2Ftabbforum.com%2Fopinions%2 Fsettlement-risks-involving-public-blockchains%3Fprint_preview%3Dtrue%26single%3Dtrue Vitalik Buterin’s response: https://blog.ethereum.org/2016/05/09/on-settlement-finality/ Bitcoin : 7tps VISA : 4000〜6000tps Participants must have the whole transactions. The capacity is more than 70〜80GB
  • 30.
    * Reference :51%Attack 30 @Berkeley Blockchain Usually, a Miner joins a pool which is a team of other miners and cooperates to mine. Miner’s share • Currently, there are no pools which get more than 50%. • Miners are mainly from China and the other countries which the electronic bills are so low.
  • 31.
    *Reference : Finality 31 Invalid Invalid ●The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. ● Nodes always consider the longest chain to be the correct one and will keep working on extending it. Satoshi Nakamoto (2008)
  • 32.
    Other Consensus Algorithms 32 ConsensusAlgorithm System Proof of Work Bitcoin Core Proof of Stake Etereum, mijin Paxos Google Chubby Raft RAMCloud PBFT Hyperledger Fabric Sieve Hyperledger Fabric
  • 33.
    *Reference : 33 Crypto currencyOthers Hyper Ledger Fabric EthereumBitcoin
  • 34.
  • 35.
    International Remittance 35 Bank ABank B Account Account Blockchain $→ B Withdraw B→¥ Deposit Payment Payment Fast and Cheap Bank A $ $→¥ Correspondent Bank Bank B Bank C ¥ Long and Expensive
  • 36.
  • 37.
    Funding 37 I have anew idea! Blockchain Smart Contract Investor Investor register Payment Payment return
  • 38.
    Energy 38 TransActive Grid Project Selland buy electronic power without 3rd party Transaction Smart Mater Register Blockchain