4 Crypto Currency
4 Crypto Currency
Cryptocurrencies
H( )
prev: H( ) prev: H( ) prev: H( )
H( ) H( )
H( ) H( ) H( ) H( )
H( ) H( ) H( ) H( ) H( ) H( ) H( ) H( )
H( ) H( )
H( ) H( )
(data)
More generally ...
signed by skGoofy
CreateCoin [uniqueCoinID]
A coin’s owner can spend it.
signed by skGoofy
Pay to pkAlice : H( )
signed by skGoofy
CreateCoin [uniqueCoinID]
The recipient can pass on the coin again.
Pay to pkBob : H( )
signed by skGoofy
Pay to pkAlice : H( )
signed by skGoofy
CreateCoin [uniqueCoinID]
double-spending attack
signed by skGoofy
Pay to pkAlice : H( )
signed by skGoofy
CreateCoin [uniqueCoinID]
double-spending attack
transID: 73 type:CreateCoins
coins created
num value recipient
transID: 74 type:PayCoins
consumed coinIDs:
73(1), 42(0), 67(3)
Valid if:
coins created -- consumed coins valid,
-- not already consumed,
num value recipient
-- total value out = total value in, and
0 3.2 0x... -- signed by owners of all consumed coins
1 1.4 0x...
2 7.1 0x...
signatures
Immutable coins
Crucial question:
Consensus
All
Participants
Bitcoin
Script
Reward
for Mining
Bitcoin P2P network
5
1 Hello World! I’m
ready to Bitcoin!
7
getaddr() getaddr()
1, 7 getaddr()
8
3
6
2
4
Transactions
Process starts
over
Transaction propagation (flooding)
Already
heard that!
5
1
7
A→B
8
A→B A→B
A→B
New tx! 3
6 A→B A→B
A→B 2
A→B
A→B A→B
4
A→B
Nodes may differ on transaction pool
New tx!
A→C
A→C
5
1 A→C
A→B
A→C
A→C 7
A→B
A→C
8
A→B
A→B
3
6 A→B
A→B 2
A→B
4
A→B
Transactions Miners Block
Process starts
over
Block Structure
Transactions Miners Block
Process starts
over Block
Puzzle
Proof of
work
Transactions Miners Block
Process starts
over Block
Puzzle