mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2025-03-25 20:05:43 +00:00
ch2
This commit is contained in:
parent
7f0159b6a0
commit
21235163a9
@ -3,11 +3,11 @@
|
||||
|
||||
=== Transactions, Blocks, Mining and the Blockchain
|
||||
|
||||
Bitcoin is a system based on de-centralized trust, which means that there is no central trusted authority, but instead trust is achieved as an emergent property from the interactions of different participants in the bitcoin system. In this chapter we will examine bitcoin from a high-level by tracking a single transaction through the bitcoin system and watch as it becomes "trusted" and accepted by the bitcoin mechanism of distributed consensus.
|
||||
The bitcoin system, unlike traditional banking and payment systems, is based on de-centralized trust. Instead of a central trusted authority, in bitcoin, trust is achieved as an emergent property from the interactions of different participants in the bitcoin system. In this chapter we will examine bitcoin from a high-level by tracking a single transaction through the bitcoin system and watch as it becomes "trusted" and accepted by the bitcoin mechanism of distributed consensus and is finally recorded on the blockchain, the distributed ledger of all transactions.
|
||||
|
||||
==== Bitcoin Overview
|
||||
|
||||
At a high level, the bitcoin system consists of users with wallets containing keys, transactions which are propagated across the network and miners who produce (through competitive computation) the consensus blockchain, the authoritative ledger of all transactions.
|
||||
In the overview diagram below, we see that the bitcoin system consists of users with wallets containing keys, transactions which are propagated across the network and miners who produce (through competitive computation) the consensus blockchain, the authoritative ledger of all transactions. In this chapter, we will trace a single transaction as it travels across the network and examine the interactions between each part of the bitcoin system, at a high level. Subsequent chapters will delve deeper into the technology behind wallets, mining and merchant systems.
|
||||
|
||||
[[blockchain-mnemonic]]
|
||||
.Bitcoin Overview
|
||||
@ -15,7 +15,7 @@ image::images/Bitcoin Overview.png["Bitcoin Overview"]
|
||||
|
||||
==== A simple transaction
|
||||
|
||||
Alice, who we introduced in the previous chapter, is a new user who has just acquired her first bitcoin. Now she will make her first retail transaction, buying a cup of coffee at Bob's coffee shop in Palo Alto, California. Bob's coffee shop recently started accepting bitcoin payments, as advertised by a sign declaring _"Bitcoin Accepted Here"_ in the window. At the counter, the prices are listed in the local currency (US dollars) but at the register, customers have the option of paying in either dollars or bitcoin. Alice places her order for a cup of coffee and Bob enters the transaction on his point-of-sale system that has been adapted to convert each price to bitcoins at the prevailing market rate. The register displays the prices in both currencies, as well as showing a QR code containing a _payment request_ for this transaction:
|
||||
Alice, who we introduced in the previous chapter, is a new user who has just acquired her first bitcoin. In <<getting_first_bitcoin>>, Alice met with her frined Joe to exchange some cash for bitcoin. The transaction created by Joe funded Alice's wallet with 0.10 BTC. Now Alice will make her first retail transaction, buying a cup of coffee at Bob's coffee shop in Palo Alto, California. Bob's coffee shop recently started accepting bitcoin payments, by adding a bitcoin option to his point-of-sale system (see <<bitcoin_for_merchants>> for information on using bitcoin for merchants/retail). The prices at Bob's Cafe are listed in the local currency (US dollars) but at the register, customers have the option of paying in either dollars or bitcoin. Alice places her order for a cup of coffee and Bob enters the transaction at the register. The point-of-sale system will convert the total price from US dollars to bitcoins at the prevailing market rate and displays the prices in both currencies, as well as showing a QR code containing a _payment request_ for this transaction:
|
||||
|
||||
----
|
||||
Total:
|
||||
@ -23,9 +23,26 @@ $1.50 USD
|
||||
0.015 BTC
|
||||
----
|
||||
|
||||
[[payment-request-QR]]
|
||||
.Payment Request QR Code - encodes a payment request URL as defined in BIP0021
|
||||
image::images/payment-request-qr.gif["payment-request"]
|
||||
|
||||
[[payment-request-URL]]
|
||||
.The payment request QR code above encodes the following URL, defined in BIP0021
|
||||
----
|
||||
bitcoin:1GdK9UzpHBzqzX2A9JFP3Di4weBwqgmoQA?amount=0.015&label=Bob%27s%20Cafe&message=Purchase%20at%20Bob%27s%20Cafe
|
||||
|
||||
Components of the URL
|
||||
A bitcoin address: 1GdK9UzpHBzqzX2A9JFP3Di4weBwqgmoQA
|
||||
The payment amount: amount=0.015
|
||||
A label for the recipient address: label=Bob%27s%20Cafe
|
||||
A description for the payement: message=Purchase%20at%20Bob%27s%20Cafe
|
||||
----
|
||||
|
||||
|
||||
[TIP]
|
||||
====
|
||||
Unlike a QR code that simply contains a destination bitcoin address, a "payment request" is a QR encoded URL that contains a destination address, a payment amount and a generic description such as "Bob's Cafe". This allows a bitcoin wallet application to pre-fill the information to send the payment while showing a human-readable description to the user. See <<payment request URL>>
|
||||
Unlike a QR code that simply contains a destination bitcoin address, a "payment request" is a QR encoded URL that contains a destination address, a payment amount and a generic description such as "Bob's Cafe". This allows a bitcoin wallet application to pre-fill the information to send the payment while showing a human-readable description to the user. See <<payment request URL>>, for more details. You can scan the QR code above with a bitcoin wallet application to see what Alice would see.
|
||||
====
|
||||
|
||||
Bob says _"That's one-dollar-fifty, or fifteen milibits"_.
|
||||
|
@ -1,6 +1,20 @@
|
||||
Dump of material that needs to be placed later
|
||||
|
||||
|
||||
[[payment-request-URL]]
|
||||
.The payment request QR code above encodes the following URL, defined in BIP0021
|
||||
----
|
||||
bitcoin:1GdK9UzpHBzqzX2A9JFP3Di4weBwqgmoQA?amount=0.015&label=Bob%27s%20Cafe&message=Purchase%20at%20Bob%27s%20Cafe
|
||||
|
||||
Components of the URL
|
||||
A bitcoin address: 1GdK9UzpHBzqzX2A9JFP3Di4weBwqgmoQA
|
||||
The payment amount: amount=0.015
|
||||
A label for the recipient address: label=Bob%27s%20Cafe
|
||||
A description for the payement: message=Purchase%20at%20Bob%27s%20Cafe
|
||||
----
|
||||
|
||||
|
||||
|
||||
* External Risks
|
||||
|
||||
All world currencies today are controlled by sovereign nation states. This control has significant political and economic benefits and is, of course, zealously protected. As a result, attempts to create competing and independent digital currencies, have quickly come under legal, or sometimes extra-legal, attack. Without a central organization, clearinghouse or controlling authority, bitcoin is not easy to attack. It is resilient to interference because control of the network and security of the currency is distributed as much as possible.
|
||||
|
BIN
images/payment-request-qr.gif
Normal file
BIN
images/payment-request-qr.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
Loading…
Reference in New Issue
Block a user