mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2024-12-26 08:28:15 +00:00
index fixes
This commit is contained in:
parent
d009fe7ac4
commit
c879c43a5e
@ -2,7 +2,7 @@
|
||||
== Introduction
|
||||
|
||||
=== What is Bitcoin?
|
||||
|
||||
((("bitcoin")))
|
||||
Bitcoin is digital money, a currency for and of the Internet. Bitcoin can be used to buy products or services online or in-person, just like cash or a credit card. Bitcoin can be transmitted as fast as an email from any person to any other person just by installing the software. Bitcoin is de-centralized: There is no central entity, not a bank or governing body that controls bitcoin. It operates by consensus, according to simple mathematical rules that are in the software for all to see.
|
||||
|
||||
|
||||
@ -19,16 +19,19 @@ bitcoin::
|
||||
((("bitcoin")))
|
||||
The name of the currency unit (the coin), the network and the software
|
||||
|
||||
address (aka public key):::: ((("(aka public key):::: ((("(aka public key):::: ((("(aka public key)::
|
||||
((("address (aka public key):::: ((("(aka public key):::: ((("(aka public key):::: ((("(aka public key)")))")))")))
|
||||
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.
|
||||
|
||||
wallet::
|
||||
((("wallet")))
|
||||
Software that holds all your addresses. Use it to send bitcoin and manage your keys.
|
||||
|
||||
secret key (aka private key):::: ((("(aka private key):::: ((("(aka private key):::: ((("(aka private key)::
|
||||
((("secret key (aka private key):::: ((("(aka private key):::: ((("(aka private key):::: ((("(aka private key)")))")))")))
|
||||
secret key (aka private key)::
|
||||
((("secret key")))
|
||||
((("private key", see="secret key")))
|
||||
The secret number that unlocks bitcoins sent to the corresponding address
|
||||
|
||||
transaction::
|
||||
@ -116,7 +119,7 @@ In the USA, it is customary to tip 20% for good service at coffee shops. Alice m
|
||||
====
|
||||
|
||||
==== A currency
|
||||
|
||||
((("bitcoin")))
|
||||
Bitcoin is a currency, the operates much like any "foreign" currency. The main difference is that it is not issued by a national government. Bitcoin currency units are called "bitcoins". Unlike traditional currencies, bitcoins are divisible to much smaller units. The smallest unit is the _satoshi_, one hundred-millionth of a bitcoin (1/100,000,000). Bitcoin can be exchanged for other currencies at specialized currency exchanges that support crypto-currencies like bitcoin. There, a customer can exchange US dollars ($) or Euros (€) for bitcoin, at the prevailing market exchange rate.
|
||||
|
||||
Symbols: B⃦, Ƀ, ฿
|
||||
@ -129,15 +132,21 @@ Currency Code: BTC (unofficial), XBT (possible ISO standard)
|
||||
|=======
|
||||
| Unit Name | Notation | Value
|
||||
| bitcoin | BTC or B⃦ | 1 BTC
|
||||
| millibitcoin | mBTC or mB⃦ | 0.001 BTC or 1/1000th
|
||||
| microbitcoin | μBTC or μB⃦| 0.000001 BTC or 1/1m
|
||||
| millibitcoin or "millibit" | mBTC or mB⃦ | 0.001 BTC or 1/1000th
|
||||
| microbitcoin or "mike" | μBTC or μB⃦| 0.000001 BTC or 1/1m
|
||||
| satoshi | satoshi | 0.00000001 BTC or 1/100m
|
||||
|=======
|
||||
|
||||
|
||||
((("bitcoin")))
|
||||
((("millibitcoin")))
|
||||
((("millibit", see="millibitcoin")))
|
||||
((("microbitcoin")))
|
||||
((("mike", see="millibitcoin")))
|
||||
((("satoshi (currency unit)")))
|
||||
|
||||
==== A network and protocol
|
||||
|
||||
((("peer-to-peer")))
|
||||
((("P2P", see="peer-to-peer")))
|
||||
Bitcoin operates on top of a peer-to-peer network, also called "bitcoin". The bitcoin network is used to propagate transactions, new blocks and alert messages. The network operates using a relatively simple network protocol for peer discovery and blockchain replication.
|
||||
|
||||
|
||||
@ -153,17 +162,19 @@ People can pay for goods and services using bitcoin as the currency. mg
|
||||
Bitcoin transactions, which transfer value from one bitcoin address to another, are recorded in a distributed ledger, called the _blockchain_. In simple terms, think of the ledger as a book with lines like this:
|
||||
|
||||
----
|
||||
...
|
||||
- Address 27 gave 2 bitcoin to address 81
|
||||
- Address 132 gave 1.05 bitcoin to address 22
|
||||
- 25 bitcoin were mined to address 76
|
||||
- Address 13 gave 0.5 bitcoin to address 52
|
||||
- Address 52 gave 0.015 bitcoin to address 166
|
||||
...
|
||||
----
|
||||
|
||||
The ledger is a record of all bitcoin transactions and can be independently verified by every node.
|
||||
|
||||
==== The blockchain
|
||||
|
||||
((("blockchain")))
|
||||
Bitcoin's core innovation is the _blockchain_, a distributed, timestamped ledger. The ledger consists of a cryptographically verified chain of _blocks_, each of which contains transactions, new coins and a signature (hash) of the previous block. Each full bitcoin node in the network will keep a complete local replica of the blockchain, and independently verify all transactions and balances from that replica.
|
||||
|
||||
[[blockchain_diagram]]
|
||||
@ -171,7 +182,7 @@ Bitcoin's core innovation is the _blockchain_, a distributed, timestamped ledger
|
||||
image::images/blockchain.png["A chain of blocks"]
|
||||
|
||||
==== Mining for blocks
|
||||
|
||||
((("mining")))
|
||||
Bitcoin's security is underpinned by computation. The blockchain is formed by solving a problem, called the _proof-of-work_ (PoW) that requires a predictable computational effort, one that takes approximately 10 minutes for the entire network of bitcoin nodes to solve. The process is called _mining_, since it has diminishing returns, just like mining for precious metals. It works a bit like a global lottery, where every bitcoin miner attempts to find a solution to a cryptographic equation. The first miner to find a solution, broadcasts it on the peer-to-peer bitcoin network for others to verify and include in the blockchain. For any transaction to be included in the global blockchain, it must be verified and included inside a new block. Each block includes the fingerprint of the previous block int he chain and any new transactions that have occured in the intervening 10 minutes.
|
||||
|
||||
When a bitcoin miner discovers a new solution to the proof of work algorithm, they create a new block which includes newly minted bitcoin in a transaction that pays to the miner's own bitcoin address. Bitcoin miners earn the newly minted bitcoin as a reward by creating a transaction to pay themselves. They can do this only if they discover a solution to the proof-of-work problem, thus providing an incentive to participate in mining and thereby to computationally secure the transactions.
|
||||
@ -184,7 +195,8 @@ At the time of writing this, the fees usually represent 1% or less of a bitcoin
|
||||
|
||||
|
||||
==== A transaction language
|
||||
|
||||
((("Script")))
|
||||
((("transaction script")))
|
||||
A simple bitcoin transaction transfers value from one bitcoin address to another. However, there is much more to bitcoin transactions than that. Each transaction is a signed script that is evaluated using a stack-based interpreter. The language of transactions is Forth-like and not Turing-complete as it does not include looping constructs.
|
||||
|
||||
A transaction script can make a bitcoin payment payable to the owner of a bitcoin address, to multiple bitcoin addresses, to anyone who solves a riddle, to anyone who guesses a number or to infinitely more complex requirements.
|
||||
@ -193,22 +205,31 @@ The transaction script language is extremely powerful and can be used to express
|
||||
|
||||
|
||||
==== An Application Programming Interface (API)
|
||||
((("JSON-RPC API")))
|
||||
((("API", see="JSON-RPC API")))
|
||||
|
||||
The reference bitcoin software implementation, known as the _Satoshi Client_ and with the application name +bitcoin-qt+ or +bitcoind+, offers a client-level API. The API is available as a JSON/RPC interface and offers programmatic access to bitcoin wallets, th blockchain and the bitcoin network.
|
||||
|
||||
=== Getting Bitcoin
|
||||
|
||||
((("bitcoind")))
|
||||
((("bitcoin-qt")))
|
||||
((("bitcoin client")))
|
||||
There are many different implementations of bitcoin, from the front-end user interface to various libraries, servers and bitcoin network nodes.
|
||||
|
||||
The reference implementation of bitcoin, which combines a full bitcoin network node, a wallet and a user interface is known as the _Satoshi Client_, or also as its executable name +bitcoind+ on Unix-like systems and +bitcoin-qt+ for the graphical user interface component. The Satoshi client is maintained by a network of volunteers as an open source project hosted on Github https://github.com/bitcoin/bitcoin.
|
||||
|
||||
==== Full node client or lightweight client?
|
||||
((("full node")))
|
||||
((("lightweight client")))
|
||||
|
||||
A full node client is one that stores a local copy of the entire blockchain (the distributed transaction ledger), from the first block (the _Genesis Block_) to the most current block. The blockchain is usually stored in a database, to make indexing and retrieval easier. It is a multi-gigabyte file, at least 8GB at this time. As a result, a full-node client may take several days and quite a bit of disk space to become fully "synchronized" with the network, meaning it has downloaded a full copy of the blockchain up to the most recent block.
|
||||
|
||||
By comparison, a lightweight client does not store a full copy of the blockchain. Instead, it relies on selected trusted servers which can answer queries about the blockchain. As a result, a lightweight client can bootstrap instantly and start processing transactions. However, a lightweight client is always reliant on an external trusted source of data on the blockchain, whereas a full node client can independently validate any transaction without trusted third parties or the counterparty risks they introduce.
|
||||
|
||||
==== Desktop, mobile, web or hybrid wallet?
|
||||
((("web wallet")))
|
||||
((("mobile wallet")))
|
||||
((("desktop wallet")))
|
||||
|
||||
Bitcoin clients exist in many forms, and for many platforms. The examples in this book will use the reference client as well as several other desktop, mobile and web examples. For practical bitcoin use you may want to try a desktop, mobile and web wallet, or a web/mobile hybrid.
|
||||
|
||||
@ -263,14 +284,15 @@ Money is a means of transferring or storing wealth, at its most basic. It exists
|
||||
* Scarce in the local environment
|
||||
* Fungible
|
||||
|
||||
((("precious metals")))
|
||||
Precious metals have been the predominant currency for thousands of years across the world, usually stamped into coins. Modern paper money started as representative of precious metal deposits, but is now representative of treasury debt issued by the central governments. National currencies are issued by government "fiat" and are commonly referred to as _fiat currencies_ by economists. Most of what we consider common features of our monetary system are really only recent inventions, of the late 20th century.
|
||||
|
||||
==== A brief history of crypto currencies
|
||||
|
||||
((("crypto-currency")))
|
||||
Crypto-currencies are digital currencies based on cryptography. The development of crypto currencies started in ...... Essentially, crypto currencies aim to achieve an entirely abstract digital currency, one whose value can be transmitted digitally to a party as payment itself. There are two core challenges with a purely digital currency: how do you control the creation of new currency units and how do you prevent copying or counterfeiting.
|
||||
|
||||
==== Public key cryptography and crypto-currency
|
||||
|
||||
((("public key")))
|
||||
Public-key cryptography, or assymetric cryptography, is a key part of a crypto-currency. Surprisingly, the cryptographic keys are not actually stored inside the bitcoin blockchain or the network. Instead, the blockchain only records transactions with digital signatures (hashes) of keys. The keys themselves are completely independent and can be generated and managed by the end users. This enables many of the interesting properties of bitcoin, including de-centralized trust and control.
|
||||
|
||||
In a nutshell, public-key cryptography is like a digital padlock, which can only be opened by the owner of a secret key. The owner of that key can hand out as many copies of the padlock as they want, and others can use it to "lock" bitcoins inside transactions recorded on the blockchain. Only the owner of the key can then unlock and "redeem" these transactions, as only they can open the digital padlock.
|
||||
@ -289,7 +311,7 @@ By sharing this bitcoin address (eg. 1HvHT6B3ZVT8nWCdVx3CKr8PRUMCNhZTqD), the ow
|
||||
|
||||
|
||||
==== Peer-to-Peer networks
|
||||
|
||||
((("peer-to-peer")))
|
||||
Bitcoin is more than just a currency, it is also the payment network that carries all of the transactions of that currency. Well, almost all, as we will see in examining "off-blockchain" transactions later in this book.
|
||||
|
||||
The bitcoin network is a peer-to-peer network, which is formed by all the bitcoin clients that are running a full-node client. At any moment, the bitcoin network can range in size anywhere from a tens of thousands to hundreds of thousands of nodes. Only a tiny subset of those is required to operate, but good network propagation and distribution ensures resillience and survivability of the overall bitcoin network.
|
||||
|
Loading…
Reference in New Issue
Block a user