Cryptocurrency Mining For Dummies. Peter Kent. Читать онлайн. Newlib. NEWLIB.NET

Автор: Peter Kent
Издательство: John Wiley & Sons Limited
Серия:
Жанр произведения: Личные финансы
Год издания: 0
isbn: 9781119885382
Скачать книгу
program sends outgoing email to an email server and receives incoming email from a server.

      Cryptocurrency networks are similar. First, there is a peer-to-peer network of full nodes, computers that receive and validate transactions and blocks to make sure they abide by the rules of the network and are all valid; this is the network that is doing the work of maintaining the blockchain. These nodes are peers because they’re all equal and work together. (And some of these full nodes, though not all of them, are also miners.) These nodes communicate with each other across the Internet using a particular protocol (a computer language, in the case of Bitcoin using the Bitcoin peer-to-peer protocol), just like email servers communicate across the Internet using a protocol designed for that purpose.

      Then there are client programs — software wallets that people use to send transactions to the full nodes to be added to the blockchain. When you install wallet software on your computer or smartphone or when you set up a custodial wallet by creating an account at an exchange, you’re working with a client program that can communicate on your behalf with the peer-to-peer network of full nodes. (These full nodes are servers to your wallet client.)

Custodial wallets are convenient and incredibly easy to set up; somebody else manages your keys and the wallet software for you. But they are also dangerous. You have to trust the service to protect your keys and to act in your best interests.

      To eliminate third parties in their interaction with the blockchain network, users and miners often choose to run their own node as an alternative to custodial wallets and simple wallets that get all their data from full nodes on the network. These nodes receive and verify their own transactions and act as a peer in the peer-to-peer network. A typical personal computer can function as a node with the correct software.

      Here are a few software tools that making running a Bitcoin node on a PC or laptop as simple as a few clicks:

       Bitcoin Core: https://bitcoin.org/en/bitcoin-core

       BTCPay Server: https://btcpayserver.org

       OpenNode: www.opennode.com

       Samourai Dojo: https://bitcoin-on-raspberry-pi-4.gitbook.io/workspace

       Umbrel: https://getumbrel.com

      There are also specialized hardware devices that are designed to run only a Bitcoin node. These dedicated hardware nodes often consume less electricity compared to a typical PC and can be much smaller in size. Here is a short list of providers that specialize in dedicated Bitcoin node hardware:

       The Bitcoin Machine: https://thebitcoinmachines.com

       Lightning in a Box: https://lightninginabox.co

       myNode One: https://mynodebtc.com/products/one

       Nodl: www.nodl.it

       RaspiBlitz: https://shop.fulmo.org/raspiblitz

       Samourai Dojo: https://samouraiwallet.com/dojo

       Start 9 Labs Embassy: https://store.start9.com/products/embassy

      

There are actually various different kinds of nodes. In fact, nodes on the Bitcoin network have around 150 different software configuration settings, so really there’s an almost infinite number of different types of nodes. We need to explain at least a few basics, though, so what follows is a bit of a simplification; understand that the following types of nodes have a lot of overlap.

       Full nodes — more correctly known as fully validating nodes — are systems that fully validate blocks and transactions. Full nodes check that the blocks and transactions being passed around the network follow the network rules. The nodes then pass the blocks and transactions on, across the network to other full nodes, and those nodes will also validate the blocks and transactions. A full node may contain a copy of the entire blockchain, but not all do; nodes may opt to prune, or remove, redundant data to save space. Today, the amount of disk space the Bitcoin blockchain uses is around 430GB, so pruning can be worthwhile. Most full nodes also accept incoming transaction messages from wallets. Full nodes may be listening nodes, often known as super nodes, or nonlistening nodes. Some full nodes are mining rigs.

       A listening node or super node is a publicly connectable full node that allows large numbers of connections with other nodes. The node “listens” for connections from other nodes on particular ports, is generally running all the time, and is not blocked by a firewall. The Bitcoin network has around 15,000 or more of these super nodes.

       A full nonlistening node is one that has had the listen configuration parameter turned off. Having a full listening node can require a lot of bandwidth, so most nodes have listening disabled in order to reduce communications with other nodes. They do not broadcast their presence to the network, so are not publicly connectable; rather, they have a small number of outgoing connections. Nonlistening nodes are often used by people who want to have wallets that also validate transactions and blocks, but do not want to use the resources required by a listening node. By some counts, there are around 80,000 to 100,000 nonlistening nodes on the Bitcoin network, though during Bitcoin’s December 2018 peak, there were likely around 200,000.

       A lightweight node is one that does not receive and verify every transaction. Most lightweight nodes are wallets; the simple wallet software on your laptop or smart phone is a form of lightweight node. Lightweight nodes communicate with full nodes to transmit transactions and receive information about transaction validation. They are completely at the mercy of the full nodes — that is, lightweight nodes don’t do any transactions or block validation of their own. Most lightweight nodes use a client-server setup; the wallet (client) queries a server for information about transactions recorded to the blockchain.

       SPV (Simple Payment Verification) nodes are a form of lightweight node wallets that can verify just the transactions they care about by communicating with other nodes and retrieving a copy of the block headers.

      In fact, if a node gets a transaction that it discovers is invalid — for example, if the transaction is spending more money than is available on the address from which the money is coming — the node throws away the transaction, but it also blocks the node that sent the bad transaction. In this way, the network “polices” itself; valid transactions and blocks are verified by thousands of different nodes, bad data is disposed of quickly, and bad actors are isolated from the network.