Cryptocurrency Mining For Dummies. Peter Kent

Чтение книги онлайн.

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

Cryptocurrency Mining For Dummies - Peter  Kent

Скачать книгу

trust (based on the proof of collective work towards the chain) would not exist. (How the pre-mined cryptocurrencies or other weak-consensus mechanisms manage to exist is another story that we’re not discussing in this book; we’re focusing on mined cryptocurrencies, of course.)

      

Mining makes sure that your balances won’t change without your authorization. It incentivizes everyone to behave correctly and punishes those who don’t. It creates a digital form of value transfer that can be trusted by each individual user as an equal peer in the network because every part of the system is aligned for one purpose: to provide a secure way to create, verify, and transfer ownership of digitally scarce cryptographic units.

      Building Blocks: The Transaction’s Journey to the Blockchain

      IN THIS CHAPTER

      

Understanding the cryptocurrency network

      

Defining different types of nodes on the network

      

Learning about transaction fees and change addresses

      

Requesting that the blockchain adds your transaction

      

Verifying transactions and blocks of transactions

      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.

      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.)

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

Скачать книгу