Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Bitcoin Internal


Published on

Bitcoin internal (transaction, block, mining, proof-of-work, ...)

Published in: Technology

Bitcoin Internal

  1. 1. Bitcoin Internal Lưu Tuấn Cường
  2. 2. Agenda 1. Fiat and Digital Currency 2. Bitcoin Internals  Transaction  Block Chain  Mining & Proof-of-work 3. Future Research Bitcoin 2
  3. 3. Fiat Currency   The currency we use today is at fiat currency: its value is entirely determined by government policy and law. It is not a commodity (like gold). Any amount of money could be created without limits. Bitcoin 3 functions of money:  Medium of exchange  Unit of account  Store of value 3
  4. 4. Digital Currency  Digital Currency: Digital currency is a form of money or script that is only executed electronically. Typically, this involves the use of computer networks, the Internet and digital stored value systems.  Electronic funds transfer, direct deposit, digital gold currency and virtual currency are all examples of electronic money. Bitcoin 4
  5. 5. Online Payment Bitcoin 5
  6. 6. Online Payment Problems:  It involves a trusted third party and implies some cost.  Not Anonymous.  Completely non-reversible transactions are not really possible. More risks for merchants. Bitcoin 6
  7. 7. Bitcoin Bitcoin is the name of the project started by Satoshi Nakamoto to create the world’s first decentralized digital crypto-currency in 2009.  Digital: it is just a record of transactions (a ledger).  Decentralized: the ledger is public; validation of the ledger is made by a peer-to-peer network. Bitcoin is the name of a single unit of the Bitcoin currency (BTC). 1 BTC = 100.000.000 Satoshis. Bitcoin 7
  8. 8. Characteristic of Bitcoin      Commodity: Hard limit of about 21 million BTCs Based on cryptographic proof instead of trust Non-reversible transactions Transactions are cheap, and mostly free Anonymous Bitcoin 8
  9. 9. Characteristic of Bitcoin - - - Degree of acceptance: Many people are still unaware of Bitcoin Ongoing development: Bitcoin software is still in beta with many in complete features in active development Take time to verify transactions. Require basic knowledge when use bitcoin. Bitcoin 9
  10. 10. Some terms (1) Address (account): 160-bit hash of the public portion of a public/private ECDSA key pair Ex: 31uEbMgunupShBVTewXjtqbBv5MndwfXhb  Wallet: Bitcoin addresses (the public keys) and their associated private keys are stored in the wallet data file  Client: an application used by the users to perform operations on the Bitcoin Network.  Standard Client: an application developed by the original developers working on the Bitcoin project. It sets the standards of how Clients should work and communicate with each other.  Bitcoin 10
  11. 11. Some terms (2)  Miner: A Miner is a computer machine and accompanying application dedicated to creating new Blocks. Bitcoin 11
  12. 12. Transaction Satoshi Nakamato, 1998: “We define a digital coin as a chain of digital signatures" A coin is defined by the list of its transactions.  Proof of ownership is given by digital signature of transaction by last owner  Bitcoin 12
  13. 13. Transaction hash: 9c809ffd57fe160b7a5504f0ff9ec2beb3f491fd3eb88d548d56399b7b8bd4db inputs (1): amount: 100 from (address): 1PgMst4c11hPpuYQeqRPTCjMv9Z8CmLus4 scriptSig: 30450221008044adfa98b5bd83f2ec0852e8c5aa7b5e226924b475b . . . outputs (1): amount: 100 to (address): 16MgZaATWXrAgDB3Q9evULCHATWrmbxmUt scriptPubKey: . . . 3ac1f8f5cb7ab8ed6d2d5dc1d295ec3e1d00dbd6 . . . Bitcoin 13
  14. 14. Transaction - Problem Double-Spending: The payee can't verify that one of the owners did not double-spend Bitcoin 14
  15. 15. Timestamp Server A timestamp server takes a hash of a block of items to be timestamped and widely publishing the hash. The timestamp proves that the data must have existed at the time in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain , with each additional timestamp reinforcing the ones before it. Bitcoin 15
  16. 16. Timestamp Server Bitcoin 16
  17. 17. Proof-of-work Bitcoin miners find a random number (called a "Nonce") that when inserted into the current block makes the hash (SHA-256)2 be below the current target. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash Bitcoin 17
  18. 18. Proof-of-work Example Hash of the last block (shortened to 30 characters): 00000000000001adf44c7d69767585 Hash of a few valid transactions waiting for inclusion (shortened): 5572eca4dd4 Db7d0c0b845 One special transaction - mining award: 916d849af76 Target: 001ae0000000000000000000000000 Bitcoin (2 leading zeros) 18
  19. 19. Proof-of-work Example Nonce = 0 Block Hash: 8b9b994dcf57f8f90194d82e234b72ac -> No luck! No leading zeros?  Nonce = 1 Block Hash : 5b7ce5bcc07a2822f227fcae7792fd90 -> No luck! No leading zeros? …..  Nonce = 1000: Block Hash : 0005e55df5758517c9bed0981b52ce4a -> Ok  Send the block to the Bitcoin network. Bitcoin 19
  20. 20. Block Bitcoin 20
  21. 21. Bitcoin Mining 1. 2. Block Award Transaction fee Bitcoin 21
  22. 22. Network The steps to run the network are as follows: 1) New transactions are broadcast to all nodes. 2) Each node collects new transactions into a block. 3) Each node works on finding a difficult proof-of-work for its block. 4) When a node finds a proof-of-work, it broadcasts the block to all nodes. 5) Nodes accept the block only if all transactions in it are valid and not already spent. 6) Nodes express their acceptance of the block by working on creating the next block in the chain, using the hash of the accepted block as the previous hash. Bitcoin 22
  23. 23. Future Research Security Issues:  Anonymity  Non-Professional Programming  Wallet Is Vulnerable  Wallet-Thief Countermeasure  Sybil Attack  DoS Attack Bitcoin 23
  24. 24. Thank you Bitcoin 24