Bitcoin For Dummies. Peter Kent
Чтение книги онлайн.

Читать онлайн книгу Bitcoin For Dummies - Peter Kent страница 15

Название: Bitcoin For Dummies

Автор: Peter Kent

Издательство: John Wiley & Sons Limited

Жанр: Личные финансы

Серия:

isbn: 9781119602149

isbn:

СКАЧАТЬ get to addresses in a moment!).

      With us so far? There’s a network of computers — the Bitcoin network — all talking to each other to manage the processing of Bitcoin transactions. Nodes exist that add transactions to the blockchain ledger, some of which are also mining, and wallets are used by individuals to manage their Bitcoin, acting as clients sending messages to the server nodes to move Bitcoin around in the ledger.

      How many servers are there? It’s hard to tell. Servers come, servers go, and in fact, one can run a server privately, so it can’t be seen on the network. The number of active nodes fluctuates greatly, in particular based on the price of Bitcoin; as the price rises, more nodes come online, because mining becomes more profitable (remember, some nodes, but not all, are also mining Bitcoin).

      

Full nodes — or more properly, fully validating nodes — are those that are involved in the process of validating and adding transactions to the ledger (some of them are mining, too). A subset of these fully validating nodes are also listening nodes (also known as super nodes), which are full nodes that are publicly connectable, not behind a firewall or locked port.

      When we did a quick Google search on the subject, we found sources claiming anywhere from 13,000 to 47,000 to 76,000 to 83,000 to 100,000 nodes but it doesn’t really matter. Just be aware that thousands of Bitcoin servers exist that contain a partial or full copy of the ledger. And, by the way, those nodes are in scores of different countries — certainly more than 100. As a result, no single government can stop Bitcoin, should it decide to do so.

      So now you know about the Bitcoin network — thousands of nodes holding a copy of the ledger, along with wallets owned by ordinary Bitcoin owners (like you) which send transactions to the network. Now let’s look at the actual ledger.

      You found out earlier why a blockchain is known as a blockchain: because it chains blocks of data together. What does that mean, though? How are blocks chained together? Let us explain. (By the way, we’re focusing here on the Bitcoin blockchain; blockchains can be used for many different purposes, and may have different characteristics, but they generally follow the same overall structure.)

      Wallets send transactions to the network, and the nodes add them to a list of transactions that need to be added to the blockchain. Every ten minutes, more or less, these transactions are gathered together into a block of data, and added to the blockchain. But remember, these blocks are not merely connected to one another; they are chained together. In a sense, they are locked together, and this is done using a complicated piece of mathematics called hashing.

      Hashing the blocks

      All these blocks of data containing a record of transactions are, as you’ve discovered, stored on multiple computers — thousands of them, in scores of countries. That’s a powerful thing in itself; how can you hack all those computers? But there’s more; the chaining of the blocks from which blockchains get their name further complicates any attempt at hacking. Here’s how it works.

      The Bitcoin network uses a hash to identify each block of transactions. The block is passed through a special hashing algorithm, a bit of complex mathematics that has very useful characteristics.

       When you hash a block of information, you end up with a very large string of characters.

       This string of characters is unique, and only matches that particular piece of hashed data. It acts like a fingerprint, uniquely identifying a particular block of data.

       Every time you hash the data, you will always end up with the same unique hash number.

       If you were to change a single character in the list of transactions, the hash would no longer match. That is, should you hash the modified data again, you would end up with a completely different hash.

      How does this hashing mathematics do all this? You don’t need to know! We don’t know, after all, so why should you? Just accept that the mathematics does all this (it does), and don’t worry about how (just as you accept how your smartphone works do you really know how it functions?).

      So here’s how the overall process works:

      1 A node puts together a block of transactions.

      2 The hash — the long string of characters acting as a “fingerprint” — copied from the previous block is also added to the block of transactions.

      3 The node then hashes the block, previous-block’s hash and all. That is, it passes the combination to the hashing algorithm, which reads it and then creates the “fingerprint” the hash.Here’s a real example, taken from the Bitcoin blockchain:00000000000000000012b707bf6d172f0de94cfb311113c5d26dfe92764acc95

      4 The hash is added to the block of transactions.

      5 The block of transactions is added to the blockchain.

      So, as the process moves along, and more transactions are added, we have a series of blocks of data, each containing two hashes: the hash identifying the previous block, and the new hash identifying the current block (including the current transactions and the previous block’s hash).

An illustration of each block’s hash is stored in the next block of data. The hashes chain the blocks together in an orderly fashion.

      The Bitcoin blockchain is “immutable”

      Remember when we said earlier that the Bitcoin blockchain is immutable that once created, it can’t be changed? It’s the hashes that make it immutable. If the Bitcoin blockchain says you own x Bitcoin, then you do own x Bitcoin, and there can be no disagreement…and nobody can go into the blockchain and hack it or somehow change or alter it.

      Imagine what would happen if someone went into a block (we’ll call it Block A) and changed a little bit of data — for example, they went in and showed that instead of sending someone one Bitcoin, you sent nine.

      Well, СКАЧАТЬ