From 25af5c23bd296eae47feaa195abc6fee38deef83 Mon Sep 17 00:00:00 2001 From: Lornestar Date: Fri, 22 Aug 2014 16:14:14 +0800 Subject: [PATCH 01/23] Update preface.asciidoc bitcoin address clearer explanation --- preface.asciidoc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/preface.asciidoc b/preface.asciidoc index 2b3cd840..1fddda84 100644 --- a/preface.asciidoc +++ b/preface.asciidoc @@ -115,7 +115,7 @@ address (aka public key):: ((("bitcoin address"))) ((("address", see="bitcoin address"))) ((("public key", see="bitcoin address"))) - A bitcoin address looks like +1DSrfJdB2AnWaFNgSbv3MZC2m74996JafV+, they always start with a one. You can have as many as you like, share them so people can send you coins. + A bitcoin address looks like +1DSrfJdB2AnWaFNgSbv3MZC2m74996JafV+, they always start with a one. Just like you ask others to send an email to your email address, you would ask others to send you bitcoin to your bitcoin address. bitcoin:: ((("bitcoin"))) @@ -198,25 +198,25 @@ Many contributors offered comments, corrections and additions to the early-relea ===== (Name - Github ID) -* *Minh T. Nguyen - enderminh: Github contribution editor* -* Ed Eykholt - edeykholt +* *Minh T. Nguyen - enderminh: Github contribution editor* +* Ed Eykholt - edeykholt * Michalis Kargakis - kargakis -* Erik Wahlström - erikwam +* Erik Wahlström - erikwam * Richard Kiss - richardkiss * Eric Winchell - winchell * Sergej Kotliar - ziggamon -* Nagaraj Hubli - nagarajhubli -* ethers +* Nagaraj Hubli - nagarajhubli +* ethers * Alex Waters - alexwaters -* Mihail Russu - MihailRussu +* Mihail Russu - MihailRussu * Ish Ot Jr. - ishotjr * James Addison - jayaddison -* Nekomata - nekomata-3 -* Simon de la Rouviere - simondlr -* Chapman Shoop - belovachap -* Holger Schinzel - schinzelh +* Nekomata - nekomata-3 +* Simon de la Rouviere - simondlr +* Chapman Shoop - belovachap +* Holger Schinzel - schinzelh * effectsToCause - vericoin -* Stephan Oeste - Emzy -* Joe Bauers - joebauers -* Jason Bisterfeldt - jbisterfeldt +* Stephan Oeste - Emzy +* Joe Bauers - joebauers +* Jason Bisterfeldt - jbisterfeldt * Ed Leafe - EdLeafe From e8f4ab417aed7c60e9eb844b64d70c2a3dd00a9c Mon Sep 17 00:00:00 2001 From: Lornestar Date: Fri, 22 Aug 2014 16:24:20 +0800 Subject: [PATCH 02/23] Update preface.asciidoc I think it's better to explain the value and usage of a fee, instead of a more technical definition that identifies how it works. It is possible for a transaction to be processed without a fee. --- preface.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preface.asciidoc b/preface.asciidoc index 1fddda84..d07a6ca6 100644 --- a/preface.asciidoc +++ b/preface.asciidoc @@ -147,7 +147,7 @@ difficulty re-targeting:: fees:: ((("fees"))) - An excess amount included in each transaction as a network fee or additional reward to the miner who finds the proof-of-work for the new block. Currently 0.5 mBTC minimum. + The sender of a transaction often includes a fee to the network for processing their requested transaction. Most transactions require a minimum fee of 0.5mBTC. hash:: ((("hash"))) From fb2fe84c862e6a02907e98e7ffe3bffd8a3dd57a Mon Sep 17 00:00:00 2001 From: Lornestar Date: Fri, 22 Aug 2014 16:42:00 +0800 Subject: [PATCH 03/23] Update preface.asciidoc Maintain consistency. If you're gonna show an example bitcoin address, should show an example private key. It also helps to understand it further when you can see an example. --- preface.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preface.asciidoc b/preface.asciidoc index d07a6ca6..be8ed91d 100644 --- a/preface.asciidoc +++ b/preface.asciidoc @@ -176,7 +176,7 @@ reward:: secret key (aka private key):: ((("secret key"))) ((("private key", see="secret key"))) - The secret number that unlocks bitcoins sent to the corresponding address. + The secret number that unlocks bitcoins sent to the corresponding address. A secret key looks like +5J76sF8L5jTtzE96r66Sf8cka9y44wdpJjMwCxR3tzLh3ibVPxh+ transaction:: ((("transaction"))) From 97f37419f559a51ef9caf9e7e3afa247747764b5 Mon Sep 17 00:00:00 2001 From: Lornestar Date: Fri, 22 Aug 2014 16:55:14 +0800 Subject: [PATCH 04/23] Update preface.asciidoc A clearer explanation of the value a wallet brings to a user --- preface.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preface.asciidoc b/preface.asciidoc index be8ed91d..1666c07b 100644 --- a/preface.asciidoc +++ b/preface.asciidoc @@ -184,7 +184,7 @@ transaction:: wallet:: ((("wallet"))) - Software that holds all your addresses. Use it to send bitcoin and manage your keys. + Software that holds all your bitcoin addresses and secret keys. Use it to send, receive and store your bitcoin. ++++ From 4079a650cd2553cecfc516c1f9dbe0919ef9fd10 Mon Sep 17 00:00:00 2001 From: Lornestar Date: Fri, 22 Aug 2014 17:02:02 +0800 Subject: [PATCH 05/23] Update ch01.asciidoc As I read through the history of Bitcoin section I kept asking when are you going to get to the part about Bitcoin. I think half of that section is really events leading up to Bitcoin, as well Bitcoin didn't have any history until it was invented. --- ch01.asciidoc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ch01.asciidoc b/ch01.asciidoc index f8e0ee5b..3fab0164 100644 --- a/ch01.asciidoc +++ b/ch01.asciidoc @@ -17,7 +17,7 @@ Behind the scenes, bitcoin is also the name of the protocol, a network and a dis In this chapter we'll get started by explaining some of the main concepts and terms, getting the necessary software and using bitcoin for simple transactions. In following chapters we'll start unwrapping the layers of technology that make bitcoin possible and examine the inner workings of the bitcoin network and protocol. -=== History of Bitcoin +=== Before Bitcoin? The emergence of viable digital money is closely linked to developments in cryptography. This is not surprising when one considers the fundamental challenges involved with using bits to represent value that can be exchanged for goods and services. Two fundamental questions for anyone accepting digital money are: @@ -36,7 +36,9 @@ Bitcoin represents the culmination of decades of research in cryptography and di * A public transaction ledger (the blockchain); * A de-centralized mathematical and deterministic currency issuance (distributed mining), and; * A de-centralized transaction verification system (transaction script). - + +=== What is Bitcoin? + Bitcoin was invented in 2008 by Satoshi Nakamoto with the publication of a paper titled "Bitcoin: A Peer-to-Peer Electronic Cash System". Satoshi Nakamoto combined several prior inventions such as b-money and HashCash to create a completely de-centralized electronic cash system that does not rely on a central authority for currency issuance or settlement and validation of transactions. The key innovation was to use a Proof-Of-Work algorithm to conduct a global "election" every 10 minutes, allowing the de-centralized network to arrive at _consensus_ about the state of transactions. This elegantly solves the issue of double-spend where a single currency unit can be spent twice. Previously, the double-spend problem was a weakness of digital currency and was addressed by clearing all transactions through a central clearinghouse. The bitcoin network started in 2009, based on a reference implementation published by Nakamoto and since revised by many other programmers. During the first four years of operation, the network has grown to include an enormous amount of Proof-Of-Work computation, thereby increasing its security and resilience. In 2013, the total market value of bitcoin's primary monetary supply measure (M0) is estimated at more than 10 billion US dollars. The largest transaction processed by the network was $150 million US dollars, transmitted instantly and processed without any fees. From 2b8040e4b0e6db20fd8578c3063180df8b315c40 Mon Sep 17 00:00:00 2001 From: Lornestar Date: Fri, 22 Aug 2014 17:35:03 +0800 Subject: [PATCH 06/23] Update ch01.asciidoc accidentally put What is Bitcoin, for History of Bitcoin --- ch01.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch01.asciidoc b/ch01.asciidoc index 3fab0164..b6639f6c 100644 --- a/ch01.asciidoc +++ b/ch01.asciidoc @@ -37,7 +37,7 @@ Bitcoin represents the culmination of decades of research in cryptography and di * A de-centralized mathematical and deterministic currency issuance (distributed mining), and; * A de-centralized transaction verification system (transaction script). -=== What is Bitcoin? +=== History of Bitcoin? Bitcoin was invented in 2008 by Satoshi Nakamoto with the publication of a paper titled "Bitcoin: A Peer-to-Peer Electronic Cash System". Satoshi Nakamoto combined several prior inventions such as b-money and HashCash to create a completely de-centralized electronic cash system that does not rely on a central authority for currency issuance or settlement and validation of transactions. The key innovation was to use a Proof-Of-Work algorithm to conduct a global "election" every 10 minutes, allowing the de-centralized network to arrive at _consensus_ about the state of transactions. This elegantly solves the issue of double-spend where a single currency unit can be spent twice. Previously, the double-spend problem was a weakness of digital currency and was addressed by clearing all transactions through a central clearinghouse. From 68fe6a3d29e8a86d22a814ad885c0960d1b0a71d Mon Sep 17 00:00:00 2001 From: Lornestar Date: Fri, 22 Aug 2014 17:38:58 +0800 Subject: [PATCH 07/23] Update ch01.asciidoc Identifying the potential pains that Bitcoin can solve, quantifying how big of an impact the innovation can really have. This should hopefully get the reader excited about the possible power their code can have, and encourage them even more to learn more about Bitcoin. --- ch01.asciidoc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ch01.asciidoc b/ch01.asciidoc index b6639f6c..759858d7 100644 --- a/ch01.asciidoc +++ b/ch01.asciidoc @@ -45,6 +45,16 @@ The bitcoin network started in 2009, based on a reference implementation publish Satoshi Nakamoto withdrew from the public in April of 2011, leaving the responsibility of developing the code and network to a thriving group of volunteers. The name Satoshi Nakamoto is an alias and the identity of the person or people behind this invention is currently unknown. However, neither Satoshi Nakamoto nor anyone else exerts control over the bitcoin system, which operates based on fully transparent mathematical principles. The invention itself is groundbreaking and has already spawned new science in the fields of distributed computing, economics and econometrics. +Bitcoin has the potential to fix many financial and economic problems that exist today due to flawed centralized systems. Some examples are: +* Hyperinflation that has severly hurt the economies of countries like Argentinian and Zimbabwe. +* 2.5 Billion unbanked around the world who do not benefit from the financial services most do in the developed world. +* Merchants getting charged 2-4% per transaction when accepting credit cards. +* Bank accounts getting frozen, or funds seized from accounts for various reasons. +* People sending money back home and getting charged remittance fees that can range from 2-20%. +* Lack of transparency when performing a wire transfer. +* World travelers getting charged exchange rate fees when using credit cards in foreign countries. +* Citizens of Cyprus having bank accounts frozen for two weeks to secure a Eurozone bailout. + .A Solution To a Distributed Computing Problem **** From d3d95954e5907aee0ffe7186396ed0088278256e Mon Sep 17 00:00:00 2001 From: Lornestar Date: Fri, 22 Aug 2014 18:10:53 +0800 Subject: [PATCH 08/23] Update ch01.asciidoc I took the Coinbase description from their own about page. They are not an exchange, since you do not exchange bitcoin with other users, you buy and sell it directly with Coinbase. The big value they bring is making it easy to use bitcoin. --- ch01.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch01.asciidoc b/ch01.asciidoc index 759858d7..e43c1f07 100644 --- a/ch01.asciidoc +++ b/ch01.asciidoc @@ -147,7 +147,7 @@ Alice is now ready to start using her new bitcoin web-wallet. It is not possible to buy bitcoins at a bank or foreign exchange kiosks at this time. It is not possible to use a credit card to buy bitcoins, either. As of 2014, it is still quite difficult to acquire bitcoins in most countries. There are a number of specialized currency exchanges where you can buy and sell bitcoin in exchange for a local currency. These operate as web-based currency markets and include: * Bitstamp (bitstamp.net), a European currency market that supports several currencies including euros (EUR) and US dollars (USD) via wire transfer -* Coinbase (coinbase.com), a US-based currency market in California that supports US dollar exchange to and from bitcoin. Coinbase can connect to US checking accounts via the ACH system. +* Coinbase (coinbase.com), a US-based bitcoin wallet and platform where merchants and consumers can transact in bitcoin. Coinbase makes it easy to buy and sell bitcoin, allowing users to connect to US checking accounts via the ACH system. Crypto-currency exchanges such as these operate at the intersection of national currencies and crypto-currencies. As such, they are subject to national and international regulations and are often specific to a single country or economic area and specialize in the national currencies of that area. Your choice of currency exchange will be specific to the national currency you use and limited to the exchanges that operate within the legal jurisdiction of your country. Similar to opening a bank account, it takes several days or weeks to set up the necessary accounts with the above services because they require various forms of identification to comply with KYC (Know Your Customer) and AML (Anti-Money Laundering) banking regulations. Once you have an account on a bitcoin exchange, you can then buy or sell bitcoins quickly just as you could with foreign currency with a brokerage account. From 78b5d4f868b6cd5ff2fca5835d4af2160c16ea0e Mon Sep 17 00:00:00 2001 From: Lornestar Date: Fri, 22 Aug 2014 18:13:38 +0800 Subject: [PATCH 09/23] Update ch01.asciidoc Using a bitcoin ATM is another method of getting bitcoins. --- ch01.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/ch01.asciidoc b/ch01.asciidoc index e43c1f07..f6b450b0 100644 --- a/ch01.asciidoc +++ b/ch01.asciidoc @@ -158,6 +158,7 @@ There are three other methods for getting bitcoins as a new user: * Find a friend who has bitcoins and buy some from them directly. Many bitcoin users started this way. * Use a classified service like localbitcoins.com to find a seller in your area to buy bitcoins for cash in an in-person transaction. * Sell a product or service for bitcoin. If you're a programmer, sell your programming skills. If you have an online store, see <> to sell in bitcoin. +* Use a bitcoin ATM in your city. A map of bitcoin ATMs can be found at http://www.coindesk.com/bitcoin-atm-map/ Alice was introduced to bitcoin by a friend and so she has an easy way of getting her first bitcoin while she waits for her account on a California currency market to be verified and activated. From d30a644e32f4ef39c020d4ea8d46379e28428ec4 Mon Sep 17 00:00:00 2001 From: Lornestar Date: Fri, 22 Aug 2014 19:27:06 +0800 Subject: [PATCH 10/23] Update ch01.asciidoc You can buy bitcoin using Purse.IO. However I do not think it's a good idea to add purse.io to ways you can buy bitcoin because there is a chance that at any moment Amazon can shut them down and then the comment will become obsolete. --- ch01.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch01.asciidoc b/ch01.asciidoc index f6b450b0..55bcc0db 100644 --- a/ch01.asciidoc +++ b/ch01.asciidoc @@ -144,7 +144,7 @@ Alice is now ready to start using her new bitcoin web-wallet. [[getting_first_bitcoin]] ==== Getting your first bitcoins -It is not possible to buy bitcoins at a bank or foreign exchange kiosks at this time. It is not possible to use a credit card to buy bitcoins, either. As of 2014, it is still quite difficult to acquire bitcoins in most countries. There are a number of specialized currency exchanges where you can buy and sell bitcoin in exchange for a local currency. These operate as web-based currency markets and include: +It is not possible to buy bitcoins at a bank or foreign exchange kiosks at this time. As of 2014, it is still quite difficult to acquire bitcoins in most countries. There are a number of specialized currency exchanges where you can buy and sell bitcoin in exchange for a local currency. These operate as web-based currency markets and include: * Bitstamp (bitstamp.net), a European currency market that supports several currencies including euros (EUR) and US dollars (USD) via wire transfer * Coinbase (coinbase.com), a US-based bitcoin wallet and platform where merchants and consumers can transact in bitcoin. Coinbase makes it easy to buy and sell bitcoin, allowing users to connect to US checking accounts via the ACH system. From 0149c111e0b720aa46518ff010795e32abf9f28f Mon Sep 17 00:00:00 2001 From: Lornestar Date: Fri, 22 Aug 2014 19:32:13 +0800 Subject: [PATCH 11/23] Update ch01.asciidoc I personally use bitcoinwisdom all the time to watch/analyze prices over the exchanges --- ch01.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/ch01.asciidoc b/ch01.asciidoc index 55bcc0db..bad317ea 100644 --- a/ch01.asciidoc +++ b/ch01.asciidoc @@ -173,6 +173,7 @@ First, Joe has to figure out the exchange rate so that he can give the correct a * bitcoincharts.com, a market data listing service that shows the market rate of bitcoin across many exchanges around the globe, denominated in different local currencies * bitcoinaverage.com, a site that provides a simple view of the volume-weighted-average for each currency * ZeroBlock, a free Android and iOS application that can display a bitcoin price from different exchanges +* bitcoinwisdom.com, another market data listing service [[zeroblock-android]] .ZeroBlock - A bitcoin market-rate application for Android and iOS From 8e5111a3f96bc886e919733f0e42c5de0b13d22b Mon Sep 17 00:00:00 2001 From: Lornestar Date: Sat, 23 Aug 2014 18:51:25 +0800 Subject: [PATCH 12/23] Removing question marks from new titles --- ch01.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ch01.asciidoc b/ch01.asciidoc index bad317ea..7be428fa 100644 --- a/ch01.asciidoc +++ b/ch01.asciidoc @@ -17,7 +17,7 @@ Behind the scenes, bitcoin is also the name of the protocol, a network and a dis In this chapter we'll get started by explaining some of the main concepts and terms, getting the necessary software and using bitcoin for simple transactions. In following chapters we'll start unwrapping the layers of technology that make bitcoin possible and examine the inner workings of the bitcoin network and protocol. -=== Before Bitcoin? +=== Before Bitcoin The emergence of viable digital money is closely linked to developments in cryptography. This is not surprising when one considers the fundamental challenges involved with using bits to represent value that can be exchanged for goods and services. Two fundamental questions for anyone accepting digital money are: @@ -37,7 +37,7 @@ Bitcoin represents the culmination of decades of research in cryptography and di * A de-centralized mathematical and deterministic currency issuance (distributed mining), and; * A de-centralized transaction verification system (transaction script). -=== History of Bitcoin? +=== History of Bitcoin Bitcoin was invented in 2008 by Satoshi Nakamoto with the publication of a paper titled "Bitcoin: A Peer-to-Peer Electronic Cash System". Satoshi Nakamoto combined several prior inventions such as b-money and HashCash to create a completely de-centralized electronic cash system that does not rely on a central authority for currency issuance or settlement and validation of transactions. The key innovation was to use a Proof-Of-Work algorithm to conduct a global "election" every 10 minutes, allowing the de-centralized network to arrive at _consensus_ about the state of transactions. This elegantly solves the issue of double-spend where a single currency unit can be spent twice. Previously, the double-spend problem was a weakness of digital currency and was addressed by clearing all transactions through a central clearinghouse. From 4fb73060300dd9f6791090386a4218962ffc87d9 Mon Sep 17 00:00:00 2001 From: Lornestar Date: Sat, 23 Aug 2014 19:28:12 +0800 Subject: [PATCH 13/23] improved explanation of confirmations identifying that the additional blocks must be removed first --- ch01.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch01.asciidoc b/ch01.asciidoc index 7be428fa..0cd53e7e 100644 --- a/ch01.asciidoc +++ b/ch01.asciidoc @@ -198,7 +198,7 @@ If Alice has a smartphone or laptop with her, she will also be able to see the t .Confirmations **** -At first, Alice's address will show the transaction from Joe as "Unconfirmed". This means that the transaction has been propagated to the network but has not yet been included in the bitcoin transaction ledger, known as the blockchain. To be included, the transaction must be "picked up" by a miner and included in a block of transactions. Once a miner has discovered a solution to the Proof-of-Work algorithm for this block (in approximately 10 minutes), the transactions within the block will be accepted as "confirmed" by the network and can be spent. The transaction is seen by all instantly, but it is only "trusted" by all when it is included in a newly mined block. The more blocks mined after that block, the more trusted it is, as more and more computation is "piled" on top of it. +At first, Alice's address will show the transaction from Joe as "Unconfirmed". This means that the transaction has been propagated to the network but has not yet been included in the bitcoin transaction ledger, known as the blockchain. To be included, the transaction must be "picked up" by a miner and included in a block of transactions. Once a miner has discovered a solution to the Proof-of-Work algorithm for this block (in approximately 10 minutes), the transactions within the block will be accepted as "confirmed" by the network and can be spent. The transaction is seen by all instantly, but it is only "trusted" by all when it is included in a newly mined block. As more blocks are mined after that block, the lower the risk that block can be removed or modified because the additional blocks must be removed first requiring additional computational power. **** Alice is now the proud owner of 0.10 bitcoin which she can spend. In the next chapter we will look at her first purchase with bitcoin and examine the underlying transaction and propagation technologies in more detail. From 9c67b2c88119b0adaadf5e0703f0695322d76530 Mon Sep 17 00:00:00 2001 From: Lornestar Date: Sat, 23 Aug 2014 19:45:27 +0800 Subject: [PATCH 14/23] Added BIP to the quick glossary list BIPs are mentioned throughout the book, so I figure many readers will be asking what does BIP0021 mean? --- preface.asciidoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/preface.asciidoc b/preface.asciidoc index 1666c07b..324fdc22 100644 --- a/preface.asciidoc +++ b/preface.asciidoc @@ -117,6 +117,10 @@ address (aka public key):: ((("public key", see="bitcoin address"))) A bitcoin address looks like +1DSrfJdB2AnWaFNgSbv3MZC2m74996JafV+, they always start with a one. Just like you ask others to send an email to your email address, you would ask others to send you bitcoin to your bitcoin address. +bip:: +((("bip"))) + Bitcoin Improvement Proposals. A set of proposals that members of the bitcoin community have submitted to improve bitcoin. For example BIP0021 is a proposal to improve the bitcoin URI scheme. + bitcoin:: ((("bitcoin"))) The name of the currency unit (the coin), the network and the software From bd1cf52ff02abcb5883ccb4ee48e273f9c618148 Mon Sep 17 00:00:00 2001 From: Lornestar Date: Sat, 23 Aug 2014 20:11:55 +0800 Subject: [PATCH 15/23] New block every 10 minutes is average They may think it's written into the rules of bitcoin that a new block is discovered every 10 min, instead of on average every 10 min. --- ch02.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch02.asciidoc b/ch02.asciidoc index 64c4193d..0ebea795 100644 --- a/ch02.asciidoc +++ b/ch02.asciidoc @@ -222,7 +222,7 @@ Jing started mining in 2010 using a very fast desktop computer to find a suitabl === Mining transactions in blocks -A transaction transmitted across the network is not verified until it becomes part of the global distributed ledger, the blockchain. Every ten minutes, miners generate a new block that contains all the transactions since the last block. New transactions are constantly flowing into the network from user wallets and other applications. As these are seen by the bitcoin network nodes, they get added to a temporary "pool" of unverified transactions maintained by each node. As miners build a new block, they add unverified transactions from this pool to a new block and then attempt to solve a very hard problem (aka Proof-of-Work) to prove the validity of that new block. The process of mining is explained in detail in <>. +A transaction transmitted across the network is not verified until it becomes part of the global distributed ledger, the blockchain. Every ten minutes on average, miners generate a new block that contains all the transactions since the last block. New transactions are constantly flowing into the network from user wallets and other applications. As these are seen by the bitcoin network nodes, they get added to a temporary "pool" of unverified transactions maintained by each node. As miners build a new block, they add unverified transactions from this pool to a new block and then attempt to solve a very hard problem (aka Proof-of-Work) to prove the validity of that new block. The process of mining is explained in detail in <>. Transactions are added to the new block, prioritized by the highest-fee transactions first and a few other criteria. Each miner starts the process of mining a new block of transactions as soon as they receive the previous block from the network, knowing they have lost that previous round of competition. They immediately create a new block, fill it with transactions and the fingerprint of the previous block and start calculating the Proof-of-Work for the new block. Each miner includes a special transaction in their block, one that pays their own bitcoin address a reward of newly created bitcoins (currently 25 BTC per block). If they find a solution that makes that block valid, they "win" this reward because their successful block is added to the global blockchain and the reward transaction they included becomes spendable. Jing, who participates in a mining pool, has set up his software to create new blocks that assign the reward to a pool address. From there, a share of the reward is distributed to Jing and other miners in proportion to the amount of work they contributed in the last round. From c3190cd32c479f2195125215b8f6f628041c7372 Mon Sep 17 00:00:00 2001 From: Lornestar Date: Sat, 23 Aug 2014 20:28:20 +0800 Subject: [PATCH 16/23] Improved description of keys ownership --- ch04.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch04.asciidoc b/ch04.asciidoc index 619ed8c0..82b7d80e 100644 --- a/ch04.asciidoc +++ b/ch04.asciidoc @@ -5,7 +5,7 @@ Ownership of bitcoin is established through _digital keys_, _bitcoin addresses_ and _digital signatures_. The digital keys are not actually stored in the network, but are instead created and stored by end-users in a file, or simple database, called a _wallet_. The digital keys in a user's wallet are completely independent of the bitcoin protocol and can be generated and managed by the user's wallet software without reference to the blockchain or access to the Internet. Keys enable many of the interesting properties of bitcoin, including de-centralized trust and control, ownership attestation and the cryptographic-proof security model. -The digital keys within each user's wallet allow the user to sign transactions, thereby providing cryptographic proof of the ownership of the bitcoins sourced by the transaction. Keys come in pairs consisting of a private (secret) and public key. Think of the public key as similar to a bank account number and the private key as similar to the secret PIN number, or signature on a cheque that provides control over the account. These digital keys are very rarely seen by the users of bitcoin. For the most part, they are stored inside the wallet file and managed by the bitcoin wallet software. +Every bitcoin transaction requires a valid signature to be included in the blockchain, which can only be generated with valid digital keys, therefore anyone with a copy of those keys has control of the bitcoin in that account. Keys come in pairs consisting of a private (secret) and public key. Think of the public key as similar to a bank account number and the private key as similar to the secret PIN number, or signature on a cheque that provides control over the account. These digital keys are very rarely seen by the users of bitcoin. For the most part, they are stored inside the wallet file and managed by the bitcoin wallet software. In the payment portion of a bitcoin transaction, the recipient's public key is represented by its digital fingerprint, called a _bitcoin address_, which is used in the same way as the beneficiary name on a cheque (i.e. "Pay to the order of"). In most cases, a bitcoin address is generated from and corresponds to a public key. However, not all bitcoin addresses represent public keys; they can also represent other beneficiaries such as scripts, as we will see later in this chapter. This way, bitcoin addresses abstract the recipient of funds, making transaction destinations flexible, similar to paper cheques: a single payment instrument that can be used to pay into people's accounts, company accounts, pay for bills or pay to cash. The bitcoin address is the only representation of the keys that users will routinely see, as this is the part they need to share with the world. From 7ce978a224eb19e277a6cb459d295f00974d19e8 Mon Sep 17 00:00:00 2001 From: Lornestar Date: Sun, 24 Aug 2014 10:17:07 +0800 Subject: [PATCH 17/23] Explaining satoshi denomination differently I think it's really difficult to know that 100 millionth is 8 decimal places --- ch05.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch05.asciidoc b/ch05.asciidoc index 1274fcd0..2130a64e 100644 --- a/ch05.asciidoc +++ b/ch05.asciidoc @@ -70,7 +70,7 @@ The fundamental building block of a bitcoin transaction is an _unspent transacti There are no accounts or balances in bitcoin, there are only _unspent transaction outputs_ (UTXO) scattered in the blockchain. ==== -Unlike cash, which exists in specific denominations (one dollar, five dollars, ten dollars), a UTXO can have any arbitrary value denominated as a multiple of satoshis (the smallest bitcoin unit equal to 100 millionth of a bitcoin). While UTXO can be any arbitrary value, once created it is indivisible just like a coin that cannot be cut in half. If a UTXO is larger than the desired value of a transaction, it must still be consumed in its entirety and change must be generated in the transaction. In other words, if you have a 20 bitcoin UTXO and want to pay 1 bitcoin, your transaction must consume the entire 20 bitcoin UTXO and produce two outputs: one paying 1 bitcoin to your desired recipient and another paying 19 bitcoin in change back to your wallet. As a result, most bitcoin transactions will generate change. +A UTXO can have an arbitrary value denominated as a multiple of satoshis. Just like dollars can be divided down to two decimal places as cents, bitcoins can be divided down to eight decimal places as satoshis. While UTXO can be any arbitrary value, once created it is indivisible just like a coin that cannot be cut in half. If a UTXO is larger than the desired value of a transaction, it must still be consumed in its entirety and change must be generated in the transaction. In other words, if you have a 20 bitcoin UTXO and want to pay 1 bitcoin, your transaction must consume the entire 20 bitcoin UTXO and produce two outputs: one paying 1 bitcoin to your desired recipient and another paying 19 bitcoin in change back to your wallet. As a result, most bitcoin transactions will generate change. In simple terms, transactions consume the sender's available UTXO and create new UTXO locked to the recipient's bitcoin address. Imagine a shopper buying a $1.50 beverage, reaching into their wallet and trying to find a combination of coins and bank notes to cover the $1.50 cost. The shopper will choose exact change if available (a dollar bill and two quarters), or a combination of smaller denominations (six quarters), or if necessary, a larger unit such as a five dollar bank note. If they hand too much money, say $5, to the shop owner they will expect $3.50 change, which they will return to their wallet and have available for future transactions. Similarly, a bitcoin transaction must be created from a user's UTXO in whatever denominations that user has available. They cannot cut a UTXO in half any more than they can cut a dollar bill in half and use it as currency. The user's wallet application will typically select from the user's available UTXO various units to compose an amount greater than or equal to the desired transaction amount. As with real life, the bitcoin application can use several strategies to satisfy the purchase amount: combining several smaller units, finding exact change, or using a single unit larger than the transaction value and making change. From 9cd1c1a2d73e9298578f31dd0c25a7306c1880a4 Mon Sep 17 00:00:00 2001 From: Lornestar Date: Sun, 24 Aug 2014 10:41:34 +0800 Subject: [PATCH 18/23] blockchain size is 20+Gigs --- ch06.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch06.asciidoc b/ch06.asciidoc index f8f2421e..04511a9a 100644 --- a/ch06.asciidoc +++ b/ch06.asciidoc @@ -129,7 +129,7 @@ Full nodes are nodes that maintain a full blockchain with all transactions. More Full blockchain nodes maintain a complete and up-to-date copy of the bitcoin blockchain with all the transactions, which they independently build and verify, starting with the very first block (genesis block) and building up to the latest known block in the network. A full blockchain node can independently and authoritatively verify any transaction without recourse or reliance on any other node or source of information. The full blockchain node relies on the network to receive updates about new blocks of transactions, which it then verifies and incorporates into its local copy of the blockchain. -Running a full blockchain node gives you the pure bitcoin experience: independent verification of all transactions without the need to rely on, or trust, any other systems. It's easy to tell if you're running a full node because it requires several gigabytes of persistent storage (disk space) to store the full blockchain. If you need a lot of disk and it takes 2-3 days to "sync" to the network, you are running a full node. That is the price of complete independence and freedom from central authority. +Running a full blockchain node gives you the pure bitcoin experience: independent verification of all transactions without the need to rely on, or trust, any other systems. It's easy to tell if you're running a full node because it requires 20 plus gigabytes of persistent storage (disk space) to store the full blockchain. If you need a lot of disk and it takes 2-3 days to "sync" to the network, you are running a full node. That is the price of complete independence and freedom from central authority. There are a few alternative implementations of full-blockchain bitcoin clients, built using different programming languages and software architectures. However, the most common implementation is the reference client Bitcoin Core, also known as the Satoshi Client. More than 90% of the nodes on the bitcoin network run various versions of Bitcoin Core. It is identified as "Satoshi" in the sub-version string sent in the +version+ message and shown by the command +getpeerinfo+ as we saw above, for example +/Satoshi:0.8.6/+. From bf732ce72d895d047286b6c5873ba00728bf20cf Mon Sep 17 00:00:00 2001 From: Lornestar Date: Sun, 24 Aug 2014 20:27:22 +0800 Subject: [PATCH 19/23] Clearer explanation of merkle tree value --- ch07.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch07.asciidoc b/ch07.asciidoc index 470ef968..56563e10 100644 --- a/ch07.asciidoc +++ b/ch07.asciidoc @@ -145,7 +145,7 @@ Each block in the bitcoin blockchain contains a summary of all the transactions A _Merkle Tree_, also known as a _Binary Hash Tree_ is a data structure used for efficiently summarizing and verifying the integrity of large sets of data. Merkle Trees are binary trees containing cryptographic hashes. The term "tree" is used in computer science to describe a branching data structure, but these trees are usually displayed upside down with the "root" at the top and the "leaves" at the bottom of a diagram, as you will see in the examples that follow. -Merkle trees are used in bitcoin to summarize all the transactions in a block, producing an overall digital fingerprint of the entire set of transactions, which can be used to prove that a transaction is included in the set. A merkle tree is constructed by recursively hashing pairs of nodes until there is only one hash, called the _root_, or _merkle root_. The cryptographic hash algorithm used in bitcoin's merkle trees is SHA256 applied twice, also known as double-SHA256. +Merkle trees are used in bitcoin to summarize all the transactions in a block, producing an overall digital fingerprint of the entire set of transactions, providing a very efficient process to verify if a transaction is included in a block. A merkle tree is constructed by recursively hashing pairs of nodes until there is only one hash, called the _root_, or _merkle root_. The cryptographic hash algorithm used in bitcoin's merkle trees is SHA256 applied twice, also known as double-SHA256. When N data elements are hashed and summarized in a Merkle Tree, you can check to see if any one data element is included in the tree with at most +2*log~2~(N)+ calculations, making this a very efficient data structure. From cc9ba043b1668be4c4d3fbec2b2755b7119e0457 Mon Sep 17 00:00:00 2001 From: Lornestar Date: Mon, 25 Aug 2014 01:48:47 +0800 Subject: [PATCH 20/23] Quick summary of miners role --- ch08.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch08.asciidoc b/ch08.asciidoc index 6f686ee6..3e0e1e66 100644 --- a/ch08.asciidoc +++ b/ch08.asciidoc @@ -4,7 +4,7 @@ [[mining]] === Introduction - Mining and Consensus -Mining is the process by which new bitcoin is added to the money supply. Mining also serves to secure the bitcoin system against fraudulent transactions or transactions spending the same amount of bitcoin more than once, known as a double-spend. Miners act as a decentralized clearinghouse, validating new transactions and recording them on the global ledger. A new block, containing transactions that occurred since the last block, is "mined" every 10 minutes, thereby adding those transactions to the blockchain. Transactions that become part of a block and added to the blockchain are considered "confirmed", which allows the new owners of bitcoin to spend the bitcoin they received in those transactions. Miners receive two types of reward for mining: new coins created with each new block and transaction fees from all the transactions included in the block. To earn this reward, the miners compete to solve a difficult mathematical problem based on a cryptographic hash algorithm. The solution to the problem, called the Proof-of-Work, is included in the new block and acts as proof that the miner expended significant computing effort. The competition to solve the Proof-of-Work algorithm to earn reward and the right to record transactions on the blockchain is the basis for bitcoin's security model. +Mining is the process by which new bitcoin is added to the money supply. Mining also serves to secure the bitcoin system against fraudulent transactions or transactions spending the same amount of bitcoin more than once, known as a double-spend. Miners provide processing power to the bitcoin network in exchange for the opportunity to be rewarded bitcoin. Miners act as a decentralized clearinghouse, validating new transactions and recording them on the global ledger. A new block, containing transactions that occurred since the last block, is "mined" every 10 minutes, thereby adding those transactions to the blockchain. Transactions that become part of a block and added to the blockchain are considered "confirmed", which allows the new owners of bitcoin to spend the bitcoin they received in those transactions. Miners receive two types of reward for mining: new coins created with each new block and transaction fees from all the transactions included in the block. To earn this reward, the miners compete to solve a difficult mathematical problem based on a cryptographic hash algorithm. The solution to the problem, called the Proof-of-Work, is included in the new block and acts as proof that the miner expended significant computing effort. The competition to solve the Proof-of-Work algorithm to earn reward and the right to record transactions on the blockchain is the basis for bitcoin's security model. The process of new coin generation is called mining, because the reward is designed to simulate diminishing returns, just like mining for precious metals. Bitcoin's money supply is created through mining, similar to how a central bank issues new money by printing bank notes. The amount of newly created bitcoin a miner can add to a block decreases approximately every four years (or precisely every 210,000 blocks). It started at 50 bitcoin per block in January of 2009 and halved to 25 bitcoin per block in November of 2012. It will halve again to 12.5 bitcoin per block sometime in 2016. Based on this formula, bitcoin mining rewards decrease exponentially until approximately the year 2140 when all bitcoin (20.99999998 million) will have been issued. After 2140, no new bitcoins are issued. From 9322a60b831c927479b3ef8758f7a888964c4f08 Mon Sep 17 00:00:00 2001 From: Lornestar Date: Mon, 25 Aug 2014 01:50:03 +0800 Subject: [PATCH 21/23] Most won't know what a clearing house is --- ch08.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch08.asciidoc b/ch08.asciidoc index 3e0e1e66..0f81d186 100644 --- a/ch08.asciidoc +++ b/ch08.asciidoc @@ -4,7 +4,7 @@ [[mining]] === Introduction - Mining and Consensus -Mining is the process by which new bitcoin is added to the money supply. Mining also serves to secure the bitcoin system against fraudulent transactions or transactions spending the same amount of bitcoin more than once, known as a double-spend. Miners provide processing power to the bitcoin network in exchange for the opportunity to be rewarded bitcoin. Miners act as a decentralized clearinghouse, validating new transactions and recording them on the global ledger. A new block, containing transactions that occurred since the last block, is "mined" every 10 minutes, thereby adding those transactions to the blockchain. Transactions that become part of a block and added to the blockchain are considered "confirmed", which allows the new owners of bitcoin to spend the bitcoin they received in those transactions. Miners receive two types of reward for mining: new coins created with each new block and transaction fees from all the transactions included in the block. To earn this reward, the miners compete to solve a difficult mathematical problem based on a cryptographic hash algorithm. The solution to the problem, called the Proof-of-Work, is included in the new block and acts as proof that the miner expended significant computing effort. The competition to solve the Proof-of-Work algorithm to earn reward and the right to record transactions on the blockchain is the basis for bitcoin's security model. +Mining is the process by which new bitcoin is added to the money supply. Mining also serves to secure the bitcoin system against fraudulent transactions or transactions spending the same amount of bitcoin more than once, known as a double-spend. Miners provide processing power to the bitcoin network in exchange for the opportunity to be rewarded bitcoin. Miners validate new transactions and recording them on the global ledger. A new block, containing transactions that occurred since the last block, is "mined" every 10 minutes, thereby adding those transactions to the blockchain. Transactions that become part of a block and added to the blockchain are considered "confirmed", which allows the new owners of bitcoin to spend the bitcoin they received in those transactions. Miners receive two types of reward for mining: new coins created with each new block and transaction fees from all the transactions included in the block. To earn this reward, the miners compete to solve a difficult mathematical problem based on a cryptographic hash algorithm. The solution to the problem, called the Proof-of-Work, is included in the new block and acts as proof that the miner expended significant computing effort. The competition to solve the Proof-of-Work algorithm to earn reward and the right to record transactions on the blockchain is the basis for bitcoin's security model. The process of new coin generation is called mining, because the reward is designed to simulate diminishing returns, just like mining for precious metals. Bitcoin's money supply is created through mining, similar to how a central bank issues new money by printing bank notes. The amount of newly created bitcoin a miner can add to a block decreases approximately every four years (or precisely every 210,000 blocks). It started at 50 bitcoin per block in January of 2009 and halved to 25 bitcoin per block in November of 2012. It will halve again to 12.5 bitcoin per block sometime in 2016. Based on this formula, bitcoin mining rewards decrease exponentially until approximately the year 2140 when all bitcoin (20.99999998 million) will have been issued. After 2140, no new bitcoins are issued. From 06155bcb20b748729a18bcc2b7f6523dc52f7788 Mon Sep 17 00:00:00 2001 From: Lornestar Date: Mon, 25 Aug 2014 01:52:05 +0800 Subject: [PATCH 22/23] Never heard that ex nihilo before, no need --- ch08.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch08.asciidoc b/ch08.asciidoc index 0f81d186..89b2cd0e 100644 --- a/ch08.asciidoc +++ b/ch08.asciidoc @@ -16,7 +16,7 @@ In this chapter, we will first examine mining as a monetary supply mechanism and ==== Bitcoin Economics and Currency Creation -Bitcoins are "minted" during the creation of each block at a fixed and diminishing rate. Each block, generated on average every 10 minutes, contains entirely new bitcoins, created ex nihilo (from nothing). Every 210,000 blocks or approximately every four years the currency issuance rate is decreased by 50%. For the first four years of operation of the network, each block contained 50 new bitcoin. In November of 2012, the new bitcoin issuance rate was decreased to 25 bitcoin per block and it will decrease again to 12.5 bitcoin at block 420,000, which will be mined sometime in 2016. The rate of new coins decreases like this exponentially over 64 "halvings", until block 13,230,000 (mined approximately in year 2137) when it reaches the minimum currency unit of 1 satoshi. Finally, after 13.44 million blocks, in approximately 2140, all 2,099,999,997,690,000 satoshis, or almost 21 million bitcoin will be issued. Thereafter, blocks will contain no new bitcoin, and miners will be rewarded solely through the transaction fees. +Bitcoins are "minted" during the creation of each block at a fixed and diminishing rate. Each block, generated on average every 10 minutes, contains entirely new bitcoins, created from nothing. Every 210,000 blocks or approximately every four years the currency issuance rate is decreased by 50%. For the first four years of operation of the network, each block contained 50 new bitcoin. In November of 2012, the new bitcoin issuance rate was decreased to 25 bitcoin per block and it will decrease again to 12.5 bitcoin at block 420,000, which will be mined sometime in 2016. The rate of new coins decreases like this exponentially over 64 "halvings", until block 13,230,000 (mined approximately in year 2137) when it reaches the minimum currency unit of 1 satoshi. Finally, after 13.44 million blocks, in approximately 2140, all 2,099,999,997,690,000 satoshis, or almost 21 million bitcoin will be issued. Thereafter, blocks will contain no new bitcoin, and miners will be rewarded solely through the transaction fees. [[bitcoin_money_supply]] .Supply of bitcoin currency over time based on a geometrically decreasing issuance rate From 770115bab2c4382c394df4b99e88ad8cbd16fcfd Mon Sep 17 00:00:00 2001 From: "Andreas M. Antonopoulos" Date: Mon, 25 Aug 2014 10:53:48 -0400 Subject: [PATCH 23/23] removed section describing the economic benefits of bitcoin. Do not want to add political and economic statements that are not easily substantiated and seem off-topic. --- ch01.asciidoc | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ch01.asciidoc b/ch01.asciidoc index 0cd53e7e..a819686c 100644 --- a/ch01.asciidoc +++ b/ch01.asciidoc @@ -45,16 +45,6 @@ The bitcoin network started in 2009, based on a reference implementation publish Satoshi Nakamoto withdrew from the public in April of 2011, leaving the responsibility of developing the code and network to a thriving group of volunteers. The name Satoshi Nakamoto is an alias and the identity of the person or people behind this invention is currently unknown. However, neither Satoshi Nakamoto nor anyone else exerts control over the bitcoin system, which operates based on fully transparent mathematical principles. The invention itself is groundbreaking and has already spawned new science in the fields of distributed computing, economics and econometrics. -Bitcoin has the potential to fix many financial and economic problems that exist today due to flawed centralized systems. Some examples are: -* Hyperinflation that has severly hurt the economies of countries like Argentinian and Zimbabwe. -* 2.5 Billion unbanked around the world who do not benefit from the financial services most do in the developed world. -* Merchants getting charged 2-4% per transaction when accepting credit cards. -* Bank accounts getting frozen, or funds seized from accounts for various reasons. -* People sending money back home and getting charged remittance fees that can range from 2-20%. -* Lack of transparency when performing a wire transfer. -* World travelers getting charged exchange rate fees when using credit cards in foreign countries. -* Citizens of Cyprus having bank accounts frozen for two weeks to secure a Eurozone bailout. - .A Solution To a Distributed Computing Problem ****