For consumer32260: Bill sells some apples to Sally for £ 2.50
Bill is a fruit seller. Sally wants to buy some apples for £ 2.50. Sally wants to use Bitcoin to pay Bill for the apples. Bill submits his payment address to Sally, for example as a quick response code:
Sally uses a Bitcoin wallet on her smartphone to scan the code. She is presented with a screen where she can specify an amount to send to Bill’s address. She typed ‘£ 2.50’ and presses send. A minute later Bill’s tablet informs him that a payment is pending, which has not yet been confirmed. About ten minutes later, payment is completed when it is confirmed.
Under the hood
1) The payment order (Transaction):
The software on Sally’s smartphone checks whether Sally has an adequate balance and then creates a payment order, which we call transaction. This transaction contains three pieces of information: which “coins” incur expenditure, the payment to the recipient, and a signature.
Sally’s wallet is connected to other network participants. The wallet passes the transaction to each of them, which in turn sends it on to all their contacts. Within a few seconds, each network participant has received a notice of Sally’s payment order. Each participant checks whether the “coins” referred to exist, and whether the signature matches the owner’s property.
So far, Sally’s payment is only a promise, because the transaction is still on not confirmed.
To change that, there are some network participants, which we’ll call miners, working on confirming these transactions. Miners grab all unconfirmed transactions and try to pack them in a set. When this set does not meet the difficulty requirement, they reorganize it and try again. Miners all over the planet carry out this work until, at some point, someone finds a set with the right properties: a valid block. Because finding a valid block is such an unlikely event, the announcement of the new block proves that the network has spent work finding it.
As with the transactions before, the miner sends the block to all its contacts, which in turn forwards it. Each participant checks the work (to confirm that the block is following the rules) and when they are satisfied, applies the included transactions to their own ledger: the transactions are carried out and the “coins” used by the senders are marked as spent, but the recipients earn new “coins” as instructed by the transactions. Sally’s (and all the others) transaction has now been confirmed. Bill can now spend the “coins” he received from Sally.
3) The Blockchain
Let’s take a step back. Before Sally paid Bill, Sally got her bitcoins from Alice. The order of transactions is crucial as transactions can only spend “coins” already created. Sally can’t pay Bill if Alice didn’t get the money first. Transactions have a specific position in the block that confirms them and each block has a fixed position in the block chain by reference to its direct predecessor. Eg
Block 90 links to
Block 89 like its predecessor, in turn
Block 89 builds on
Block 88, and so on, duration
Block 2 points on the first block, the
Genesis Block ← 2 ← … ← 88 ← 89 ← 90
The eponymous blockchain it has useful features:
- Deterministic results: Everyone can start from the
Genesis Blockand apply each block consecutively to reach the same result.
- Synchronization and Consensus: When you have used the most recent block, the balances in your ledger are in the same condition as all other participant ledgers.
- Unchangeable history: As each block builds on its predecessor, each new block buries the history under more work (see graphic below):
Illustration: Mark Montgomery / IEEE Spectrum