Cryptocurrency Mining For Dummies. Peter Kent
Чтение книги онлайн.
Читать онлайн книгу Cryptocurrency Mining For Dummies - Peter Kent страница 18
![Cryptocurrency Mining For Dummies - Peter Kent Cryptocurrency Mining For Dummies - Peter Kent](/cover_pre1145960.jpg)
Chapter 3
Building Blocks: The Transaction’s Journey to the Blockchain
IN THIS CHAPTER
At one end, you’ve got your wallet or your node software. At the other, there’s the blockchain. In between is the network of peer-to-peer nodes and miners creating blocks in the chain. How does a transaction that you set up on your wallet program find its way into the blockchain?
In this chapter, we look at how a transaction leaves your wallet and ends up in the blockchain and the miner’s role in that process. As an example, we use Bitcoin, the first blockchain-based cryptocurrency. Other cryptocurrencies use a similar process, to varying degrees. Each has its own particulars, but understanding how Bitcoin works will give you a really good foundation.
The Cryptocurrency Network
Every cryptocurrency has its own network of nodes, operating across the Internet, and this network has both peer-to-peer and client-server aspects, depending on how you chose to interface with it and which software you utilize. (You may hear the term blockchain network or Bitcoin network, for example.)
You’ll often hear a cryptocurrency network described as a peer-to-peer network, and it is — though the peer-to-peer network can also be used as a client-server network. What’s the difference?
Peer-to-peer networks are networks of equal computers that work together.
Client-server networks are networks on which servers provide services to client computers.
Think about how you work with email. The Internet’s email system also has two aspects. First, it has a peer-to-peer aspect comprising hundreds of thousands of email servers around the world that work together, sending emails between each other.
But the email system also has a client-server aspect, with millions of email clients. Say that you use Outlook on your computer, or perhaps you log into Gmail and use the Gmail email program in your web browser. Either way, the program you’re using to write, send, receive, and read email is known as a client. This client 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.)
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