Unit 6: Bitcoin Nodes and Wallets
Nodes are computers that are connected to and participating in the Bitcoin network. They maintain a connection to other nodes, share data with the network, relay valid transactions, and maintain at least some blockchain data, among other functions. A Bitcoin wallet serves many functions, such as managing keys, providing a user interface, and creating and signing transactions. While node and wallet functionality often comes together in the same program, they are often discussed in different contexts.
In this unit, we'll dive into what roles nodes and wallets play on the Bitcoin network. You'll learn who runs nodes and why, experience Bitcoin node and wallet functionality by setting up a regtest node, use a regtest node to perform basic functions, and learn to distinguish between the different functions of a Bitcoin wallet.
Completing this unit should take you approximately 2 hours.
Upon successful completion of this unit, you will be able to:
- describe the functions of a full node;
- experience Bitcoin node and wallet functionality by setting up a regtest node and using it to perform basic functions;
- distinguish between the different functions of a Bitcoin wallet; and
- retrieve wallet data from a node.
6.1: What a Node Does
Why are Bitcoin nodes important? What do they do for the Bitcoin network? This video explains the difference between the roles of miners and the roles of nodes. It also walks through node functionality and why nodes are so important to the Bitcoin network.
6.2: Who Runs a Node and Why?
- Nodes participate in the Bitcoin peer-to-peer network in differing ways, whether they are archival nodes, SPV nodes, fully validating nodes, and so on. Once we understand what nodes do on the network, we are left with this question: who runs a node, and what is their motivation for doing so? This video explains node functionality and the benefits and motivations for running one. Watch the video from 7:45 to 17:45.
6.3: Exercise: Set Up a Regtest Node
And now, the moment we've all been waiting for: let's actually run Bitcoin! We've learned enough, and we're ready! In this exercise, we'll download, install, configure, and run the Bitcoin core implementation.
6.4: The Functions of a Bitcoin Wallet
Bitcoin wallets either are nodes or rely on other nodes to do a variety of things for them, such as broadcast transactions or scan for transactions related to the wallet. The Bitcoin core implementation comes with wallet functionality, which means it performs functions such as key generation, key storage, and constructing and signing transactions. Let's take a closer look at how wallets perform those functions focusing on key generation, storage, and backups.
6.5: Exercise: View Your Node Wallet Data
Now that we are familiar with the functions of nodes and wallets, let's see how they work together by using our Bitcoin regtest node to perform some wallet functions. In this exercise, we'll generate new addresses, have a look at our wallet seed, construct a transaction, sign and broadcast a transaction, and more.