pull/2/head
Andreas M. Antonopoulos 11 years ago
parent 635feba591
commit e9296928a6

@ -15,18 +15,26 @@ In this chapter we'll get started with bitcoin by explaining some of the main co
=== History of Bitcoin
Bitcoin is the culmination of decades of research in cryptography and distributed systems and represents four key innovations brought together in a unique and powerful combination. Bitcoin consists of a de-centralized peer-to-peer network, a public transaction ledger, a de-centralized mathematical and deterministic currency issuance, a de-centralized transaction verification system and a set of powerful APIs.
Cryptographic currencies depend on cryptography to control the ownership of a piece of digital data. Using cryptographic digital signatures, a user can sign a digital asset or transaction and securely prove the ownership of that asset.
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 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, a weakness of digital money, where a single currency unit can be spent twice.
In the late 1980s, when cryptography started becoming more broadly available and understood, many researchers began trying to use cryptography to build digital currencies. These early digital currency projects issued digital money, usually backed by a national currency or precious metal such as gold.
Satoshi Nakamoto's invention is also a practical solution to a previously unsolved problem in distributed computing, known as the Byzantine Generals problem. As such, it represents a breakthrough in distributed computing science and has wide applicability beyond currency. It can be used to achieve consensus on decentralized networks for provably-fair elections, lotteries, asset registries, digital notarization and more.
While these earlier digital currencies worked, they had several fatal flaws. Firstly, early digital currencies used a central clearinghouse to settle all transactions at regular intervals, just like a traditional banking system. Secondly, these central clearinghouses and the organizations issuing the digital currency were highly centralized organizations, usually corporations. Unfortunately, in most cases these nascent digital currencies were targetted by worried governments and eventually litigated out of existence. Some failed in spectacular crashes when the parent company liquidated abruptly.
Bitcoin represents the culmination of decades of research in cryptography and distributed systems and includes four key innovations brought together in a unique and powerful combination. Bitcoin consists of a de-centralized peer-to-peer network, a public transaction ledger, a de-centralized mathematical and deterministic currency issuance and a de-centralized transaction verification system.
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 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, a weakness of digital money, where a single currency unit can be spent twice. Previously, the double-spend problem was solved by clearing all transactions through a central clearinghouse.
Satoshi Nakamoto's invention is also a practical solution to a previously unsolved problem in distributed computing, known as the Byzantine Generals problem. Briefly, the problem consists of trying to agree on a course of action by exchanging information over an unreliable and potentially compromised network. Satoshi Nakamoto's solution, which uses the concept of proof-of-work to achieve consensus without a central trusted authority represents a breakthrough in distributed computing science and has wide applicability beyond currency. It can be used to achieve consensus on decentralized networks for provably-fair elections, lotteries, asset registries, digital notarization and more.
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 mathematical principles. The invention itself is groundbreaking and has already spawned new science in the fields of distributed computing, economics and econometrics.
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 in security and resillience. As the network has grown, the exchange rate of a bitcoin has also grown dramatically and with quite a lot of volatility. 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 a staggering $150 million US dollars, transmitted instantly and processed without any fees.
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 resillience. 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.
[[user-stories]]
=== Bitcoin Uses, Users and Their Stories
Bitcoin is a technology, but it expresses money which is fundamentally a language for exchanging value between people. Let's look at the people who are using bitcoin and some of the most common uses of bitcoin through their stories. We will re-use these stories throughout the book to illustrate the real-life uses of bitcoin and how they are made possible by the various technologies that are part of bitcoin.
North American Retail::
@ -72,15 +80,50 @@ For the purposes of this book, we will be demonstrating the use of a variety of
==== Quick Start - Web Wallet
A web wallet is the easiest way to start using bitcoin, and is the choice of our Alice who we introduced in <<user-stories>>. Alice is not a technical user and only recently heard about bitcoin from a friend. She starts her journey by visiting the official website bitcoin.org, where she finds a broad selection of bitcoin clients. Following the advice on the bitcoin.org site, she chooses the easiest-to-use client, a web wallet by blockchain.info a popular hosted-wallet service. Following a link from bitcoin.org, she opens the blockchain.info wallet page at https://blockchain.info/wallet and selects "Start a New Wallet". To register her new wallet, she must enter an email address, a password and prove that she is a human by completing a CAPTCHA test.
[TIP]
====
When creating a bitcoin wallet you will need to provide a password or passphrase to protect your wallet. There are many bad actors attempting to break weak passwords, so take care to select one that cannot be easily broken. Use a combination of upper and lower-case characters, numbers and symbols. Avoid personal information such as birthdates or names of sports teams. Avoid any words commonly found in dictionaries, in any language. If you can, use a random password generator to create a completely random password, at least 12 characters in length. Remember: bitcoin is money and can be instantly moved anywhere in the world - that makes it easy to steal and disappear.
====
Once Alice has completed the registration form, she is presented with a Wallet Recovery Mnemonic. This is a series of words that can be used to reconstruct her wallet in case she loses the password or account details. Following the instructions on screen, Alice copies the words onto paper, locking it away in a secure location.
[[blockchain-mnemonic]]
.Blockchain.info - Wallet Recovery Mnemonic
image::images/blockchain-mnemonic.png["wallet recovery mnemonic"]
A few seconds later, and Alice can start using her new bitcoin web wallet by logging in with her account ID and password. In her web browser, she sees the web wallet home screen:
[[blockchain-home]]
.Blockchain.info - Wallet Home Screen
image::images/blockchain-home.png["wallet home screen"]
The most important part of this screen is Alice's _bitcoin address_. Like an email address, Alice can share this address and anyone can use it to send money directly to her new web wallet. On the screen it appears as a long string of letters and numbers: +1Cdid9KFAaatwczBwBttQcwXYCpvK8h7FK+. Next to the wallet's bitcoin address, there is a QR-code, a form of barcode that contains the same information in a format that can be easily scanned by a smartphone. Alice can print the QR code as a way to easily give her address to others without them having to type the long string of letters and numbers.
[TIP]
====
Bitcoin addresses start with the digit "1". Like email addresses, they can be shared with other bitcoin users who can use them to send bitcoin directly to your wallet. Unlike email addresses, you can create new addresses as often as you like, all of which will direct funds to your wallet. A wallet is simply a collection of addresses and the keys that unlock the funds within. There is practically no limit to the number of addresses a user can create.
====
Alice is now ready to start using her new bitcoin web wallet.
==== Bitcoin-Qt (Satoshi Client)
===== Getting your first bitcoins
===== Spending bitcoins - Creating the first transaction
==== Bitcoin-Qt - The Reference Implementation, aka Satoshi Client
You can download the Satoshi Client from bitcoin.org. Depending on your operating system, it will be called bitcoin-qt or bitcoind. The reference client implements all aspects of the bitcoin system, including wallets, a transaction verification engine with a full copy of the entire transaciton ledger (blockchain) and a full network node in the peer-to-peer bitcoin network.
Go to http://bitcoin.org/en/choose-your-wallet and select "Bitcoin-Qt" to download the reference client. Depending on your operating system, you will download an executable installer. For Windows, this is either a ZIP archive or an EXE executable. For Mac OS it is DMG disk image. Linux versions include a PPA package for Ubuntu or a TAR.GZ archive.
===== Bitcoin-Qt - Download Options
[[bitcoin-qt-dl-options]]
.Bitcoin-Qt - Download options for different operating systems
image::images/bitcoin-qt-dl-options.png["bitcoin-qt download options"]
@ -95,18 +138,25 @@ remote: Compressing objects: 100% (12007/12007), done.
remote: Total 31864 (delta 24480), reused 26530 (delta 19621)
Receiving objects: 100% (31864/31864), 18.47 MiB | 119 KiB/s, done.
Resolving deltas: 100% (24480/24480), done.
$ cd bitcoin
$ ls
COPYING INSTALL Makefile.am README.md autogen.sh configure.ac contrib doc pkg.m4 qa share src
$
----
You can start exploring the source code, now that you have downloaded the latest version from the source repository. For information on compiling the bitcoin-qt client from source code, see <<compiling-bitcoin-qt>>.
[TIP]
====
Bitcoin-Qt keeps a full copy of the transaction ledger (blockchain), with every transaction that has ever occured on the bitcoin network since its inception in 2009. This data set is several gigabytes in size (approximately 16GB in late 2013) and is downloaded incrementally over several days. The client will not be able to process transactions or update account balances until the full blockchain dataset is downloaded. During that tim, the client will display "Out of sync" next to the account balances and show "Synchronizing" in th footer.
====
===== Bitcoin-Qt - Running the client for the first time
If you download an installable package, such as an EXE, DMG or PPA, you can install it the same way as any application on your operating system. For Windows, run the EXE and follow the step-by-step instructions. For Mac OS, launch the DMG and drag the Bitcoin-QT icon into your Applications folder. For Ubuntu, double-click on the PPA in your File Explorer and it will open the package manager to install the package. Once you have completed installation you should have a new application "Bitcoin-Qt" in your application list. Double-click on the icon to start the bitcoin client.
The first time you run Bitcoin-Qt it will start downloading the blockchain, a process that may take several days. Leave it running in the background, until it displays "Synchronized" and no longer shows "Out of sync" next to the balance.
[TIP]
====
Bitcoin-Qt keeps a full copy of the transaction ledger (blockchain), with every transaction that has ever occured on the bitcoin network since its inception in 2009. This data set is several gigabytes in size (approximately 16GB in late 2013) and is downloaded incrementally over several days. The client will not be able to process transactions or update account balances until the full blockchain dataset is downloaded. During that tim, the client will display "Out of sync" next to the account balances and show "Synchronizing" in th footer. Make sure you have enough disk space, bandwidth and time to complete the initial synchronization.
====
[[bitcoin-qt-firstload]]
.Bitcoin-Qt - The Graphical User Interface, during the blockchain initialization
image::images/bitcoin-qt-firstload.png["bitcoin-qt first run"]
@ -114,3 +164,6 @@ image::images/bitcoin-qt-firstload.png["bitcoin-qt first run"]

Loading…
Cancel
Save