Post on 15-Jan-2015
description
BitcoinA Decentralized, P2P, Crypto Currency
Bitcoin protocol
1. Transactions2. Block (Chains)3. Bitcoin Mining (Pools)4. Wallet
Bitcoin Beginning
1. 20082. “Satoshi Nakamoto”3. Anonymous Underground Genius
Bit What ?
“Bitcoin is an innovative payment method & a new kind of money”
--bitcoin.org
Bit What ?
“Bitcoin is an innovative payment method & a new kind of money”
PEER TO PEER FUND TRANSFER
GLOBAL ACCEPTANCE
LOW or NO PROCESSING FEE
Bit What ?
PEER TO PEER FUND TRANSFER
GLOBAL ACCEPTANCE
LOW or NO PROCESSING FEE
NO BANKS OR REGULATING AGENCIES
Bit What ?
PEER TO PEER FUND TRANSFER
GLOBAL ACCEPTANCE
LOW or NO PROCESSING FEE
ANONYMOUS TRANSFERS
NO TRANSFER LIMITS
YOUR ACCOUNT CANNOT BE SEIZED
NO BANKS OR REGULATING AGENCIES
Bitcoin Protocol is Complex
And requires knowledge of :1. Hashing2. Digital Signatures3. JSONRPC4. Digital Architecture (general)5. Finance 6. Sociology (explicitly built into system)
Digital Signatures
Alice
SK VK
Digital Signatures
Message SK
Signature
ECDSA
Alice
SK VK
Digital Signatures
Message SK
Signature
ECDSA
Alice
SK VK
Message VK
bool
ECDSA-1
Sign
Bitcoin transactions
Are like a ledger entry to a global(open) ledger called the block chain
You own bitcoins if there is a record of some bitcoins being credited to you in the ledger
Naming Conventions
Transactions (ledger entry)
Blocks (ledger page)
Block Chains (ledger)
Transaction Records
Alice Bob฿ 50
VKa SKa VKb SKb
Transaction Records
Alice Bob฿ 50
VKa SKa VKb SKb
VKc
VKd
VKe
30
40
10
Record of bitcoins being transferred to Alice earlier
Transaction Records
Alice Bob฿ 50
VKa SKa VKb SKb
VKc
VKd
VKe
30
40
10
Dc
Dd
De
Transaction Records
Alice Bob฿ 50
VKa SKa VKb SKb
VKc
VKd
VKe
30
40
10
Dc
Dd
De
VKb, ฿ 50
VKa, ฿ 28
INPUT OUTPUT
฿ 2 transaction feethat’s charged by the miner against Proof Of Work
Transaction Records
Alice Bob฿ 50
VKa SKa VKb SKb
VKc
VKd
VKe
30
40
10
Dc
Dd
De
VKb, ฿ 50
VKa, ฿ 28
SKa
Transaction Records
Dc
Dd
De
VKb, ฿ 50
VKa, ฿ 28
SKa
Proof of Work Protocol
A proof of work is a piece of data which is difficult to produce so as to satisfy certain requirements.
Producing a proof of work can be a random process with low probability.
Bitcoin’s Proof of Work
Bitcoin needs a miner to solve for a proof which, the hash of, when concatenated with hash string should have a certain(predefined) number of preceding zeros.
Bitcoin’s Proof of Work
Example (Let challenge = C, proof i = Pi)Hash(P1C) = fj8wru38wrajfhjafhjka…Hash(P2C) = fuwu893r98wefjlioas……Hash(PnC) = 000fhf8iaedihuhfuias...
Transaction Blocks
Alice Bob฿ 50
Single transaction
Transaction Blocks
Transaction Blocks
MINERMINER MINERMINERMINER
Transaction Blocks
MINERMINER MINERMINERMINER
Transaction Blocks
MINERMINER MINERMINERMINER
Transaction Blocks
MINER
HASH
FINAL HASH
HASH
Transaction Blocks
MINER
CHALLENGE (256 bit hash)
HASH
FINAL HASH
HASH
Transaction Blocks
MINER
HASH
FINAL HASH
HASH
CHALLENGE (256 bit hash)
PROOF
HASH 00000000006872hkhaks67y7q2kjnjzxc8zx9mq3w8703q09chjchajhcjhajc3rnqw
25 + Transaction Fee
MINER
25 + Transaction Fee
MINER
The miner is allowed to add a coinbase transaction to every block she mines as a reward. This is how new coins are generated.
Time taken per block
As per the specification, the network should come up with a new block every 10 minutes.
This also means that a transaction should generally take 10 minutes to be completed.
Difficulty Calibration
To ensure 10 minute transaction time, the difficulty of mining is calibrated every 2016 blocks(or two weeks)
Reducing Difficulty
Happens when the network more than 10 minutes per block
The difficulty is reduced by reducing the number of preceding 0s required in the proof string
Increasing Difficulty
Happens when the network less than 10 minutes per block
The difficulty is increased by increasing the number of preceding 0s required in the proof string
SHIVEK KHURANACluster Innovation Centre
University Of Delhi