Contents
Bitcoin: Fundamental Technical Structure
If you’ve ever wondered what’s going on underneath the hood of Bitcoin, look no further. We dive into the tech behind how Bitcoin really works.
By Cameron and Tyler Winklevoss, Co-Founders, Gemini
Updated November 2, 2023 • 5 min read
Summary
The Bitcoin network is a decentralized, trustless, peer-to-peer network designed to securely send monetary value from one party to another in the form of bitcoin. This article provides an overview of Bitcoin’s technical structure including the blockchain, nodes, miners, and proof of work mining. If you’d like to read up on other aspects of Bitcoin, be sure to check out our other articles, including Bitcoin: Origins and Cultural Significance and Bitcoin: Network Security.
Contents
The Blockchain Ledger
The Bitcoin network maintains a distributed public ledger that records the ownership of all bitcoin, the native digital asset token of the network. New transactions are grouped together into “blocks” and added sequentially to the network’s ongoing chain of blocks — hence the term “blockchain.” The Bitcoin blockchain contains every block since inception, stretching all the way back to the first block known as the “Genesis Block.”
Identical copies of the blockchain are hosted on computers around the world that run the Bitcoin software. These computers are called "nodes." This design ensures that no single entity is in control of the blockchain or protocol that governs it. Bitcoin's distributed nature makes it decentralized and resistant to being controlled (or shut down) by any government or central authority. Theoretically, all nodes that maintain a complete copy of the blockchain — known as "full nodes" — would need to be destroyed in order to erase the Bitcoin blockchain. No small task as there are even full nodes floating above the earth in space!
Nodes known as “miners” serve the purpose of validating Bitcoin transactions and securing the blockchain ledger. In the traditional banking system, when you send money from your bank account to another bank account, the banks act as trusted intermediaries, deducting funds from one account and adding them to another. With Bitcoin, centralized intermediaries are replaced by a trustless network of miners. We’ll explain how this works shortly.
Peer-to-Peer Network Nodes
Nodes are a major part of blockchain-based protocols and the cornerstone of decentralization, security, and transparency. There are several types of nodes on the Bitcoin network. When a user connects to the Bitcoin network to send or receive bitcoin, her computer acts as a node. Most nodes are known as light nodes, which typically only download the more recent blockchain data needed to process and verify new transactions. This minimal approach keeps light nodes running quickly and efficiently without requiring too much computational or storage resources.
In contrast, full nodes contain an entire copy of the blockchain in real time. They download every block of transactions that has ever happened on the network since the Genesis Block — not just the most recent ones. As long as the full blockchain exists on at least one full node, there will be a record of all bitcoin and bitcoin transactions throughout history.
Finally, there are the nodes called miners who write blocks of new transactions to the blockchain and, in doing so, mint new bitcoin.
Proof-of-Work Mining: Bitcoin’s Consensus Mechanism
Miners compete to solve a computationally-intensive, proof of work puzzle. The “winning” miner is rewarded with a set number of bitcoin (plus network transaction fees) called the “block reward.” One miner wins the block reward roughly every 10 minutes, regardless of the amount of processing power that miners collectively bring to bear on the network. More processing power only increases a miner's chances of winning; it does not speed up the competition. Miners can’t accelerate or otherwise alter Bitcoin’s deterministic supply schedule.
The puzzle requires a miner to create a new block by taking all of the network’s new and unconfirmed transactions, as well as information from the previous block (i.e., its “block header”), and “hash” them using the SHA-256 algorithm. Hashing is a process whereby a specific input (in this case, recent transaction data and the block header) is entered into an algorithm to generate a specific output. A Miner must take this input and guess a number called a “nonce” that when entered together into SHA-256, will generate an output that satisfies the output threshold set by the Bitcoin protocol. Mining boils down to guessing nonces as quickly as possible. If a miner hits the specified output threshold, she will broadcast her new block (which includes her nonce) to other miners on the network so that they can hash it themselves and verify her solution. If a majority of miners — 51% or more — reach consensus on her solution, she will be allowed to add her new block to the blockchain and receive the block reward. And then the race begins all over again.
Here’s the important part: if any of the transaction data is altered by even the smallest amount (say a “satoshi,” which is 0.00000001 BTC), the hash output will change. As a result, a majority of miners will fail to reach consensus around any nonce that solves the puzzle using tampered transaction data. This prevents a dishonest miner from winning and encourages miners to act scrupulously with their precious computational resources.
Bitcoin mining is an elegant design that serves the dual purpose of validating transactions and minting new bitcoin. But there’s more...because mining requires computer processing power (i.e, energy), there is a real cost to minting bitcoin, which gives it digital scarcity. This mimics real world gold production inasmuch as they both require energy to mine. But unlike Bitcoin, gold mining does not serve to validate (and process) transactions. Bitcoin mining does both, and that’s a beautiful thing.
Anatomy of a Block
Each Bitcoin block is limited in size to one megabyte of data. For “Segregated Witness” (SegWit) blocks, transaction data is limited to one megabyte, whereas signature data (aka witness) is segregated and limited to three megabytes. This keeps the block size at one megabyte while increasing block space for transaction data.
A block contains the following information:
A Block header:
Version number
Hash of the previous block header
Hash of the root of Merkle tree of all the transactions in the current block
Timestamp
Difficulty target of the current block (meaning how difficult the target hash will be to find)
Nonce
Data for each transaction:
Version number
Flag (only for SegWit transactions)
Transaction inputs
Transaction outputs
Witnesses (only for SegWit transactions)
Lock time
Bitcoin Halving
Bitcoin has a deterministic supply schedule that caps the total supply of bitcoin at 21 million bitcoin (or BTC). As discussed above, new bitcoin are minted when a miner wins the block reward. The block reward amount is “halved” every 210,000 blocks, which happens approximately every four years. Bitcoin’s halving schedule is as follows:
2009 to 2012: block reward = 50 BTC
2012 to 2016: block reward = 25 BTC
2016 to 2020: block reward = 12.5 BTC
2020 to 2024: block reward = 6.25 BTC
The next halving will occur in early 2024, when the block reward halves to 3.125 BTC. As the block reward continues to halve, it will eventually approach zero — approximately in the year 2140. In other words, after 2140, no new bitcoin will ever be minted and the block reward will consist solely of transaction fees charged by miners when bitcoin is sent on the network.
The fixed and predetermined supply schedule of bitcoin gives it “hard money,” store of value properties and is why many people consider it “digital gold” or “gold 2.0.”
Bitcoin Forks
A fork occurs when an existing blockchain splits into two different blockchains. This happens when an update is made to a protocol that not all of the nodes adopt. There are two types of forks that blockchains can experience; a soft fork, whereby old nodes and new nodes are able to read both blockchains (compatible); and a hard fork, whereby old nodes cannot read the new blockchain and vice versa (incompatible). Hard forks result in two separate blockchains with distinct native digital asset tokens that are separate and apart from each other.
When updates are made to the Bitcoin protocol, individual nodes must determine if they will upgrade and accept the new changes or not. If a constituent of nodes within the network refuses to adopt the changes, then a hard fork results. Bitcoin has experienced several forks of both kinds, including the Bitcoin Cash hard fork that occurred at block 661,647, the last common block between Bitcoin and Bitcoin Cash. The Bitcoin Cash fork emanated from a disagreement in the Bitcoin community around block size. Bitcoin Cash adopted a block size of eight megabytes to increase transaction throughput, whereas Bitcoin kept a block size of one megabyte to foster greater node participation and ensure decentralization.
Cryptopedia does not guarantee the reliability of the Site content and shall not be held liable for any errors, omissions, or inaccuracies. The opinions and views expressed in any Cryptopedia article are solely those of the author(s) and do not reflect the opinions of Gemini or its management. The information provided on the Site is for informational purposes only, and it does not constitute an endorsement of any of the products and services discussed or investment, financial, or trading advice. A qualified professional should be consulted prior to making financial decisions. Please visit our Cryptopedia Site Policy to learn more.
Author
Cameron and Tyler Winklevoss
Co-Founders, Gemini
Cameron and Tyler Winklevoss co-founded Gemini, a cryptocurrency exchange and custodian, to empower the individual through crypto. Gemini is a New York Trust company that allows customers to buy, sell, and store more than 60 cryptocurrencies such as bitcoin, bitcoin cash, ether, zcash, and litecoin. They graduated from Harvard University with degrees in Economics in 2004 and earned their MBAs from Oxford University in 2010. Together, they represented the United States at the 2008 Olympic Games in Beijing, China, placing 6th in the Men’s Pair event. Cameron and Tyler have been angel investors and entrepreneurs in emerging technologies since 2003. They began investing in bitcoin in 2012 and launched Gemini in 2015.
Is this article helpful?