How does the bitcoin source code define its 21 million cap?
Many of bitcoin’s staunchest critics have expressed doubt about its 21 million cap, but perhaps the most mindless criticism relates…,
Most people are aware that bitcoin has no ruler, but it does have rules. Upholding these rules is important for everyone who owns bitcoin. But with no central authority, how are the rules of bitcoin enforced? The answer is through a network of thousands of nodes run by individual bitcoin users all over the world.
A bitcoin node is software that connects to the bitcoin peer-to-peer network. Nodes receive, transmit, and validate new transactions according to the network rules. Understanding what a bitcoin node does and how it works begins with understanding the two most essential building blocks of bitcoin: the ledger and the ruleset.
A node is typically run on a personal computer or an affordable dedicated computer like a Raspberry Pi. It is also possible to run a bitcoin node on lower-powered hardware like a smartphone or on remote hardware like a cloud server, but this is usually not recommended.
The most popular version of bitcoin node software is Bitcoin Core, which is available as a free download.
When a new bitcoin transaction is authored and signed, it is broadcast to the nodes on the network. The nodes immediately look at the transaction to assess whether or not it is valid before forwarding it to other nodes.
The nodes will attempt to answer the following questions:
Each node independently runs validation checks on every pending transaction it receives based on the ruleset. The process is…
The redundancy built into the transmission and validation of blocks and transactions between nodes increases the cost of fooling any node or group of nodes into accepting invalid information. This reduces risks such as…
Understanding the role of nodes also requires base-level knowledge of bitcoin mining, since the two work hand-in-hand. Pending transactions that have not yet been added to the blockchain are transmitted to miners who pick them up and add them to a block template that includes a list of pending transactions.
From there, the miner that wins the proof-of-work (PoW) contest transmits the new block to the network. Even from this point, the verification process continues as nodes check the block assembled by the miner to further confirm its validity. Miners must strictly follow the ruleset when assembling transactions into blocks. If they don’t, nodes reject the block when validating, and the miner loses the payout of the block subsidy as well as any transaction fees they are attempting to collect.
A new block of transactions is added to the bitcoin ledger by a miner on average every ten minutes. When a new block is added to the ledger, it is cryptographically linked to the preceding block. Together, these linked blocks form the linear chain of blocks that is the blockchain. Over time, as new blocks are added to the blockchain, its size increases. The total size of the blockchain can increase the burden on bitcoin nodes as we’ll explore in the next section.
A full node is software that includes a full copy of the bitcoin blockchain and ruleset; it can verify transactions across bitcoin’s entire history. There are two types of full nodes: archival nodes and pruned nodes.
An archival node, also sometimes called a “listening node,” is a full node that contains the complete historical blockchain record going all the way back to the first bitcoin mined by Satoshi Nakamoto in the genesis block. This information is stored locally and is shared with other nodes that need access to it.
One challenge with an archival full node is that the larger the blockchain grows, the more difficult or expensive it becomes for people to download and store a complete copy of it. Today, bitcoin’s blockchain is nearing 400GB in size, and it’s continually growing larger as blocks are mined. To help manage file size and make running nodes more accessible, they can be run with either a complete or “pruned” copy of the bitcoin ledger.
A pruned node is a full node that cuts the blockchain at a certain point and substitutes the detailed transaction history prior to the cut with compacted blocks that are less data intensive.
Pruning a node does not limit its ability to carry out validations—it retains this ability by making use of the way blocks are cryptographically linked together. Even though pruned nodes do not retain all the data beyond the compacted data, they are considered trustless because they can verify all blockchain data from the beginning.
The compacted blocks in a pruned node are “hashes” of the underlying data that they summarize. Due to their smaller size, compacted blocks reduce the file space required to operate a pruned node. Such blocks are reliable for verification because if the input data were to be changed in any way, it would dramatically alter the summary hash and be immediately detected by the other nodes.
One drawback to a pruned node is that it cannot share the entire blockchain to other full nodes, nor does it have access to historical data for lookup (recommended for running a Lightning node for example). Pruned nodes requesting this data must get it from an archival full node which contains the complete transaction history.
Sign up to be notified when we publish new blog articles.
A “light wallet”, also called a “thin client,” “light client,” or “light node” (though it’s not really a node), does not contain a copy of the bitcoin ledger, and it cannot validate transactions in the same way that a full node can.
Light wallets rely on full bitcoin nodes run by third parties to obtain their blockchain data. This means that the user of a light wallet must trust the entity running the node to which the wallet is connected.
The vast majority of light wallets use simplified payment verification (SPV)—a technique first described in the bitcoin whitepaper—to minimize the trust required when validating received transactions. When validating transactions, SPV verifies block summaries while also enforcing a subset of the bitcoin ruleset. However, SPV does not eliminate all trust required. As Satoshi wrote in the whitepaper, SPV is “reliable as long as honest nodes control the network.” When in doubt, running your own node offers a solution.
Light wallets are common and used by most bitcoin users; this is what you’re using if you run BlueWallet, Trezor Suite, or Ledger Live and don’t run your own node. Offloading blockchain storage and indexing to a third party makes light wallets easy to install, require minimal storage space and bandwidth, and synchronize very quickly.
Light wallets involve a privacy trade-off since personal data like IP addresses, wallet addresses, and transaction history must be shared with third parties. There are some exceptions in development, such as Neutrino light wallets designed for the Lightning Network that achieve higher degrees of privacy.
A bitcoin node is not the same as a bitcoin miner. Nodes are the messengers and rule keepers of bitcoin, whereas miners are the scribes. Unlike nodes, miners run the computationally intensive proof-of-work algorithm. Miners rely on nodes to learn about new transactions and to verify and transmit the blocks they assemble.
Because nodes do not participate in the proof-of-work mining process, they do not require the same amount of energy or computing power associated with bitcoin miners. Proof-of-work is difficult and expensive to compute, but cheap and easy to verify. While nodes play a key role in validating and relaying information about new and pending transactions, they possess no means of adding new transactions to the bitcoin blockchain.
After learning more about nodes and what they do, you might wonder if there is any reason why you should run one. There are many benefits to running a node, but there are also some costs. You will have to weigh the advantages and disadvantages to decide whether running a node makes sense for you.
Running a node can help you increase your privacy. By running a node, you can transmit and verify your own bitcoin transactions and search for information on the bitcoin blockchain without needing a third party. You can directly verify the authenticity of any bitcoin you receive to your wallet.
When you use a third party for such activities, your IP address is shared, and it may be possible for an attacker to determine your physical location, connect your personal information to your transaction history, and discover more information about you and those with whom you transact. By running your own node, you minimize this kind of exposure.
Running a node also improves your general knowledge of computing, bitcoin, and its blockchain. The knowledge and experience you gain from running a node can increase the utility you derive from bitcoin and enable you to help others do the same.
Running your own node helps relay and validate transactions and blocks, which helps the bitcoin network stay updated and run optimally. If you run a full node, you help the network by sharing full block information required for initial block download (IBD), without which new nodes would not be able to download the blockchain and verify the current state of the network.
Additionally, because running a node stores the blockchain and enforces the ruleset at your physical location, you help support the bitcoin network by contributing to its decentralization.
It also helps you protect your investment in bitcoin by empowering you to participate in the consensus process for bitcoin’s ruleset. By running a node, you can play a role in deciding whether upgrades, such as Taproot or covenants, should be enabled on the network. Your node’s continued enforcement of the ruleset also helps ensure that bitcoin’s unique properties, such as its 21 million bitcoin supply cap, remain intact.
In most cases, the total expense for running a node is minimal, but running a node does come with some costs:
While Unchained Capital uses a light wallet SPV model for clients, we also make it possible for you to connect Caravan, our open-source vault recovery tool, directly to your own node. Get the latest tips and tricks for getting the most out of Caravan on our YouTube channel.
You can also sign up for one of our live webinars to learn about how to get tax-advantaged savings on your bitcoin while keeping control of your private keys with an Unchained IRA, or how to take self-custody of your bitcoin while eliminating single points of failure with an Unchained multisig vault.
Many of bitcoin’s staunchest critics have expressed doubt about its 21 million cap, but perhaps the most mindless criticism relates…Ted Stevenot, Stephen Hall
When Satoshi Nakamoto created bitcoin, he established in its code a fixed number of bitcoin that will ever exist. Since…Ted Stevenot
Originally published in Parker’s dedicated Gradually, Then Suddenly publication. Bitcoin is often described as a hedge, or more specifically, a…Parker Lewis