Bitcoin For Dummies. Peter Kent
Чтение книги онлайн.
Читать онлайн книгу Bitcoin For Dummies - Peter Kent страница 14
Here’s a quick question for you: What’s the difference between U.S. dollars and Bitcoin? With U.S. dollars, 90 percent of all the money is nothing more than entries in a computer server. With Bitcoin, it’s 100 percent!
Now, the Bitcoin ledger is often described as being immutable. The word immutable means “not capable of or susceptible to change,” and of course the Bitcoin ledger can change; hundreds of thousands of transactions are added to the ledger every day. But what immutable means in this context is that once a transaction has been committed to the ledger, that’s it; it can’t be changed. The ledger can’t be “hacked” and modified, for instance. (You’ll find out why in a few moments.)
So, because the ledger is immutable, it means that whatever is recorded in the ledger is the truth. If the ledger says that you own, say, half a Bitcoin, then the fact is you own half a Bitcoin!
So where is this “Bitcoin ledger”?
Well, there is another very important difference between everyday money and Bitcoin. The transactions are not mere entries in a computer server. Rather, they are entries in a duplicated, distributed ledger spread across a network of thousands of servers.
Bitcoin is sometimes known as a “trustless” system; not because it can’t be trusted, but because trust in a single person or company isn’t required. In a sense, trust is already baked into the system. It’s “trustless” because you don’t have to trust any particular individual, or any particular organization. This is because of the way the mathematics behind Bitcoin functions (keeping participants honest, in effect): It ensures that many servers are involved, and that the system itself can be trusted.
So we have Bitcoin transactions stored in the Bitcoin ledger. Where and how is that ledger stored? To understand that, we have to take another step back, and understand a little about blockchains.
Bitcoin uses a blockchain ledger
The Bitcoin ledger — the record of Bitcoin transactions — is saved in the Bitcoin blockchain. What’s a blockchain, you ask? A blockchain is a very special type of database. So once again, we need to step back — very quickly this time — to ask, what’s a database?
Quite simply, a database is an electronic store of information, that is being stored in a structured format on a computer. If you open a word-processing file and type a bunch of names and addresses into a document and save it, that’s not really a database; it’s just a jumble of information. But if you open a spreadsheet document and save the names and addresses — first name in the first column, last name in the second column, street address in the third, and so on — then you are creating a form of simple database where the information is stored in an organized, structured format.
Blockchains are a form of database; more specifically, they are specialized, sophisticated databases with special features that make them immutable unchangeable and unhackable.
The first significant characteristic is (and perhaps once we’ve said this, it may not be a surprise) that the blockchain uses blocks of data that are, um, chained together in a manner that makes it impossible to change any piece of data — a particular transaction, for instance — without changing the entire chain of blocks (we’ll explain how that works in a moment).
The other important characteristic is that the blockchain database is duplicated and distributed. Let’s look at these two issues one by one, starting with the duplication and distribution.
Looking at the Bitcoin Distributed, Peer-to-Peer Network
Without the Internet, there’s no Bitcoin. Bitcoin is an Internet technology, just as email and the World Wide Web are Internet technologies. And all three of these technologies require networks. (You might think of the Internet as the road system, and the different networks as different types of traffic — cars, trucks, buses — running over those roads.)
The Bitcoin ledger is stored on Bitcoin “nodes” on what is known as a peer-to-peer network: thousands of computers spread across the world. Each of these nodes contains a full copy or a portion of the blockchain, and so in effect thousands of copies of the ledger exist. Because of this, if you wanted to hack into the ledger and change a transaction, you’d have to convince all these computers to agree. By peer-to-peer, we mean that every one of these nodes is “equal”; there is no central server (or central group of servers) that manages the process, as there is with, say, a bank’s or credit-card network’s transactions. Rather, the process is managed according to a set of rules by which the entire community abides (again, the rules are baked into the mathematics that runs the system).
The nodes make the entire Bitcoin system function; they add transactions — including your transactions when you buy and sell Bitcoin — to the blockchain. Some of these nodes are also mining nodes, by the way, the nodes that are part of the process that brings new Bitcoin into existence (in the form of what is known as a coinbase transaction in the blockchain, a transaction in which new Bitcoin is added to the ledger).
However, having said that the Bitcoin network is a peer-to-peer network, it also works in some ways like a client-server network. Consider, for instance, the email system. Computers throughout the world exist that can manage email (we call them email servers). And what we call email clients (servers provide services to clients) also exist. An email client is a program such as Microsoft Outlook that sends email to a server — or the web program you see when you log into Gmail or Yahoo! Mail; that’s a client, too. These programs communicate with the servers. So, for instance, when you send email from, say, your Gmail account to, perhaps, grandma, that message first goes from your Gmail account to one of the Gmail system’s email servers, which then sends the email across the Internet to the server that manages gran’s email. Gran then uses her client program — Outlook, Gmail, Yahoo! Mail, or whatever — to get the email from that server.
The Bitcoin network is very similar. For example, it’s a peer-to-peer system of nodes that communicate with each other, each storing a copy of part (or all) of the blockchain ledger. But most Bitcoin owners don’t run one of these nodes. Instead, they have wallets. Now, different types of wallets exist, including what are known as cold wallets, wallets that are not connected to the Internet (see Chapter 4 for more). And while some of these wallets are offline most of the time, but online when needed, other wallets are never connected to the Internet at all (such as paper wallets, brain wallets, and metal wallets).
However, hot wallets also exist, which are essentially wallet software programs connected to the Internet (and the program might be running on a personal computer, a tablet, a smartphone, or even a dedicated computer, known as a hardware wallet). These hot wallets can be regarded as client programs, and the Bitcoin nodes as servers.
You, the Bitcoin owner or buyer or seller, communicate with the servers that validate transactions using your Bitcoin client program (your wallet). (Wallets, by the way, are also a form of node — a device connected to the network — but typically when someone is talking about a Bitcoin node, they are talking about more than a simple wallet.) Let’s say you want to sell some Bitcoin, or buy something with Bitcoin (which is essentially the same thing, right? You give some Bitcoin to someone and in return get something back.). You use your wallet to send a message to the Bitcoin network, asking the nodes to add your transaction to the blockchain,