Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Bitcoin

Avatar for Jas Chhabra Jas Chhabra
January 24, 2014
210

Introduction to Bitcoin

Avatar for Jas Chhabra

Jas Chhabra

January 24, 2014
Tweet

Transcript

  1. Today’s Electronic money + Lot of protections against theft +

    Easy to use - Not Anonymous - Requires Trust
  2. Electronic Cash Double Spending ? Transaction Amount Reference Signed Joe->John

    2E$ Previous Transaction Transaction Signed by Joe Joe->Jane 2E$ Previous Transaction Transaction Signed by Joe Previous transaction sending E$ to Joe
  3. First let us understand what is a Ledger entry in

    Bitcoin network or a transaction
  4. What is a Bitcoin transaction : One example transaction From:

    Joe’s Anonymous Address (pub key hash) Which contains: 50 BTC Hash: Previous transaction To: Bob’s Anonymous address (pub key hash) Send: 10 BTC To: Joe’s new Anonymous address (pub key hash) Send: Change of 40 BTC Signature: Proof that Joe is allowed to spend the 50 BTC Bob will spend using the private key
  5. Next transaction by Bob From: Bob’s Anonymous Address (pub key

    hash) Which contains: 10 BTC Hash: Previous transaction To : John’s Anonymous address (pub key hash) Send: 10 BTC Signature: Proof that Bob is allowed to spend the 50 BTC
  6. How does everybody agree on the same version of ledger?

    Brilliant solution by Satoshi Nakamoto
  7. Background: Hash based proof of work Ideal Hash Function Arbitrary

    length input Fixed length output • Random mapping • Same output for same input What is a Hash ?
  8. Background: Hash based proof of work E.g. For 128 bit

    hash Given X Find Y < Hash (X||Y) 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF
  9. Blocks and Proofs Previous Block’s hash Nonce Transaction 1 Trasnsaction

    2 Transaction N Previous Block’s hash Nonce Transaction 1 Trasnsaction 2 Transaction N
  10. Block in progress / mining Previous Block’s hash Transaction 1

    Trasnsaction 2 Miner’s transaction Nonce + Hash < Network difficulty decided target Broadcast Proof to the network
  11. Miner’s transaction Special transaction that transfers 25 BTC (current) to

    an address provided by the miner(reward going down) Makes every miner’s proof of search different Incentive for miner
  12. Network Difficulty Adjusts to ensure blocks are generated every 10

    minutes Ensures that probability of you finding a block is proportional to your computing power
  13. How does this prevent fraud? Lot of computing power needed

    to reverse a Tx few blocks ago. Network is moving ahead Nearly impossible to catch up.
  14. Summary Only one history(longest) is accepted by the network Computing

    power == Vote Miner’s transactions provide incentive for mining
  15. Bitcoin as a platform for new types of transaction Standard

    Transaction To Spend: OP_CHECKSIG Operation in a stack based language Lots of other possible operations: For example: OP_CHECKMULTSIG, OP_ADD, OP_IF,… Combine operations to create new transactions