What new knowledge did you gain whilst writing the book?
And also from a legal/political/cultural/etc.
I certainly learned a lot about cryptography while writing the book as well!
Thats how we got hooked ourselves.
Along the way, though, well discuss how Bitcoin works.
After reading this chapter, youll understand the basics of Bitcoinenough to chat about it atany cocktail party.
After informing her of the transaction, she updates her list as well.
This is how Bitcoin works.
So why does Bitcoin seem so complex?
Should a haircut be worth 5000 bitcoins or 0.005 bitcoins?
For example, how do you obtain a copy of the list, and how are bitcoins initially distributed?
Well leave the first point about the value of bitcoins for a later chapter.
But first, you oughta understand the Bitcoin units in more detail.
But instead of associating names of people with accounts, the ledger only lists Bitcoin addresses.
), and the use of pseudonyms is why people can use bitcoins without revealing personal information.
In turn, when you share your address with others, they can send you bitcoins.
Although you need an Internet connection to send bitcoins, you dont need to be connected to receive them.
The QR code is just one of many ways to easily share a Bitcoin address.
Well, this action requires a private key.
As with Bitcoin addresses, QR codes are often used to represent private keys because of their length.
Specifically, they check whether the transaction has been digitally signed using a private key.
Similar to a PIN, a private key should be kept secret.
If someone obtains your private key, he will be able to spend your bitcoins.
That number can then be reused (maliciously) to authorize more transactions that you never intended.
Unlike a PIN, which both you and the bank know, only you know the private key.
Clearly, it is extremely important not to lose your private key!
Having multiple Bitcoin addresses can help you organize your money.
Using multiple addresses, in the form of a wallet, also helps you maintain privacy.
To manage several addresses and private keys, people use Bitcoin wallet programs.
But be aware that the terminology surrounding Bitcoin wallets is not always used consistently.
Often, Bitcoin wallet programs are called Bitcoin wallets for short, confusing these two distinct concepts.
However, you should start keeping these security details in mind.
The next step gives you the option of creating a password.
Although the password is optional, it is very important.
In the final step, Electrum requests instructions on how to connect to a remote server.
Select Auto connect and then click Next (see Figure 2-5).
You should see a screen similar to the one in Figure 2-6.
The green dotin the bottom-right corner indicates that you are connected to the Bitcoinnetwork.
Youve just set up your first Bitcoin wallet!
Nowyou can fill the wallet with bitcoins.
(Actually, your balance will usually update instantaneously.)
You now own bitcoins, which enables you to look into your future!
Note Importing private Bitcoin keys into a wallet can be hazardous.
Youll need to scour the Internet for good deals!
Visit http://befuddled.org/ to access our fortune-telling website, which weve linked directly to a crystal ball.
Bitcoin transactions also require a fee.
Your screen should look something like Figure 2-8.
When you click Send, Electrum asks for your password and then confirms that the transaction has been transmitted.
Almost immediately, you should see your fortune on the website.
Welcome to the future!
By searching online, youll find numerous nonprofit organizations that have posted a Bitcoin address.
Unlike with the fortune-telling website, you might not receive a response from the website when you donate.
But rest assured that the recipients have accepted your bitcoins if Electrums History section displays the word confirmed.
You might be wondering how and where Electrum got a Bitcoin address.
The answer is your Bitcoin wallet program.
No communication with the Bitcoin internet is necessary, an unusual feature that surprises many people.
The same is true when get a new phone number or when you open an account at a bank.
Well use an analogy: Consider all the grains of sand on Earthfrom all the beaches and deserts.
The Blockchain
All Bitcoin transactions are recorded into the blockchain.
Throughout the remainder of this book, well refer to the Bitcoin ledger as the blockchain.
Well explain miners and the details of what they do later in the chapter.
At any given moment, tens of thousands of miners are connected to the Bitcoin connection.
Every block added to the blockchain is added by a single miner on the data pipe.
This is where Bitcoin gets interestingand a little technical.
Lets first consider why anyone would want to update the blockchain.
For the Bitcoin system to work, many people need to keep up-to-date copies of the blockchain.
Therefore, good will alone isnt sufficient to keep the system running.
But the lure of a reward is always an attraction.
Many people become miners and take a stab at be the first to add a block to the blockchain.
Then, based on some probability, a winner is chosen and gets to add a block.
What is the purpose of using a lottery like this to run Bitcoin?
Well, lets imagine Crowley wants to buy a $10,000 car from Clarice.
(Youll learn more about our friend Crowley the Crocodile in the comic in Chapter 5.
Picking a person randomly through a lottery helps accomplish this.
A random person running Bitcoin-mining software is chosen to confirm Bitcointransactions.
The reward lottery is run by the community; no central authority exists to choose a winner.
This takes about ten minutes.
When this happens, the phrase commonly used is that a miner has found a block.
Blockchain Forking
The lottery system works as expected most of the time.
The problem shows up when one part of the data pipe copies Crowleys block and the other copies Satoshis.
As a result, now two blockchains disagree!
Miners and Bitcoin wallet programs must decide which of the two versions of the blockchain to use.
Transaction Confirmations, Double Spending, and Irreversibility
A transaction confirmation is a common concept in Bitcoin.
Some online merchants that accept bitcoins may require one or more transaction confirmations before delivering their good or service.
Every transaction exists in some block on the blockchain.
The blocks behind it are older, and the blocks ahead of it are newer.
The position of a block relative to the tip of the blockchain is known as the block depth.
The number of confirmations a transaction has is equal to the depth of its block.
For transactions of minor value, like purchasing a coffee, vendors usually skip the transaction confirmation.
You simply transfer your bitcoins, pick up your coffee, and proceed with your day.
However, for high-value items, like a car, taking into account transaction confirmations becomes crucial.
More important, its impossible for both transactions to be added to a block because one contradicts the other.
The cost for a malicious villain to double spend those bitcoins rises exponentially with each confirmation.
Why is it called mining?
The term is derived from how bitcoins are initially distributed.
Although the total supply of bitcoins is capped at 21 million, this total is reached slowly over time.
In the beginning, the initial supply of bitcoins was zero.
Today, mining bitcoins requires significant capital, expertise, and access to inexpensive electricity.
In fact, the evolution of Bitcoin mining resembles the way gold mining has changed over times.
The mining reward for finding a block has two components: The first part is transaction fees.
The second component of the reward is a certain number of newly minted bitcoins.
The number of newly minted bitcoins that is provided as a reward diminishes gradually over time.
Thereafter, the reward drops to 12.5, then 6.725, and so on.
Eventually, the user transaction fees will be greater than the reward of newly minted bitcoins.
At that point, the Bitcoin internet will be sustained entirely through transaction fees.
After reading this chapter, you should have a fairly good idea of how the entire system works.
hey, comment on how to improve this article.