Cryptocurrency Mining For Dummies. Peter Kent
Чтение книги онлайн.
Читать онлайн книгу Cryptocurrency Mining For Dummies - Peter Kent страница 19
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.
Any computer connected to the network is a node, but different nodes do different things:
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.
So full nodes connect to each other, they pass transactions and blocks between each other … but they don’t trust each other. If a node receives from a wallet a transaction that the node believes is invalid, it won’t pass it on to another node. But this doesn’t mean a node will automatically assume that the transaction must be valid if it’s being passed a transaction by another node; rather, the node will validate the transaction for itself.
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.
It’s this lack of trust that builds trust. Nodes will get blocked by other nodes — depending on the infraction nodes may be blocked for a few hours, or permanently blocked for obviously intentional misbehavior — and thus the system is self-regulating. Because nodes don’t trust other nodes, the overall system can be trusted.
If you’d like to get an idea of the extent and distribution of the Bitcoin full node network, take a look at https://bitnodes.io
, shown in Figure 3-1. (This chart shows just the full listening nodes; there are likely eight or ten times this number of full nonlistening nodes.)
Source: https://bitnodes.io
FIGURE 3-1: A live view at the time of writing of the full listening node count on the Bitcoin network as well as the distribution of these nodes across the world.
Submitting Transactions
Say that you want to send someone some money, some of your Bitcoin. (Remember, we’re writing this from the perspective of Bitcoin; other cryptocurrencies may function slightly differently, but the core principles are much the same.)
And say that you have a single Bitcoin associated with an address in the Bitcoin blockchain, and you want to send one tenth of that money (0.1BTC) to Joe. (It doesn’t matter why — perhaps payment for a purchase, for some work Joe did for you, a charitable donation, a bribe, or whatever. All we care is that you’re sending 0.1 Bitcoin to Joe.)
So, using your wallet software, you enter Joe’s address, the Bitcoin address he gave you to use for the transaction. You state how much Bitcoin you’re going to send him (0.1BTC). You also state how much of a fee you’re willing to pay for the transaction.
Looking at transaction fees
Fees are often measured in Satoshi/byte and can range between 1 to over 2,000 Satoshi/byte (that is, the fee is based on the size of the transaction message your wallet sends to the blockchain, not the value of the transaction). The busier the network, the higher the fee required to incentivize miners to include your transaction in a block quickly. Bitcoin network fees per transaction on average fluctuate between 0.00001 BTC and 0.001 BTC, as shown in Figure 3-2.
FIGURE 3-2: A view at the time of writing of