Bitcoin Mining and Transaction Validation

You will learn, from a high-level perspective, about the underlying mechanics of Bitcoin as a payment network.

The Bitcoin Ledger

In simple terms, Bitcoin is software that works like a ledger (aka record of transactions) that keeps tabs on who owns what amount of bitcoin (the asset) at any given period. New transactions are automatically added to the ledger through a predefined set of rules.

If only one person or a few people owned the ledger, it could be easily tampered with to make it appear like someone had more bitcoin than they should. On the other hand, if many people worldwide had a copy of the same ledger, it would be tough to make any tampering appear legitimate. A digital ledger system distributed across multiple computers is the underlying idea of a public blockchain. It also makes the Bitcoin network decentralized. Centralized (private) blockchains also exist where few actors control the computers in the network.

  • Blockchaina system of recording information that is difficult or impossible to change, hack, or cheat
  • Decentralizedprocess by which core activities and decision making is delegated away from a central authority

Bitcoin Mining (Proof-of-Work)

Let’s pretend the Bitcoin blockchain has started from scratch. No transactions exist. The Bitcoin software mandates that records of transactions get timestamped and recorded to the ledger. This process occurs about every 10 minutes. So, every 10 minutes, a block of transactions will be added to the blockchain. No transactions in a block would lead to an empty block.

For this process of adding blocks to occur, the Bitcoin software puts out a bounty to solve a complex math problem that would take your computer approximately 10 minutes to answer. For solving the problem, the underlying code will reward some amount of bitcoin to a digital version of a wallet (aka a digital wallet) held by your computer. This computation-heavy process is called proof-of-work mining. Your computer runs the Bitcoin software and validates blocks of transactions by solving complex math problems given by the Bitcoin software in return for bitcoin (the asset) in a digital wallet.

Expanding on this concept, we introduce another network participant. You and another party compete to solve the computation-based problem first. Typically, whoever has the most computation power (aka hash rate) will have a higher probability of winning the race and thus earn bitcoin from the network. After a winner is determined, you and the other participant will update your blockchain version to include the validated block. You both continue to compete for new blocks approximately every 10 minutes. As new miners join and leave the network, the difficulty of the math problem is adjusted automatically to keep the 10-minute block time.

Without a single user-generated transaction, newly minted bitcoins were rewarded to miners for validating blocks. The blockchain grew, and the ledger became more distributed as miners downloaded the existing version of the ledger (with the longest string of blocks) to begin competing in the mining process. The bitcoin held by miners is sold directly to others over the counter, on cryptocurrency exchanges (similar to a brokerage), or kept.

It is also possible to run a copy of the Bitcoin blockchain without contributing to the mining process (called running a Bitcoin node). Running a node further distributes the original copy of the official Bitcoin ledger (increasing the blockchain’s immutability properties). Simply running a node (without specialized mining hardware) will allow you to validate your version of the ledger versus others in the network but will not allow you to earn bitcoin. The proof-of-work difficulty is currently too high for regular PCs to compete in mining.

  • Bitcoin Node any computer that runs a Bitcoin implementation and stores a full record of the blockchain
  • Cryptocurrency Exchange marketplace allowing for the conversion of digital currencies for other assets
  • Digital Wallet software that allows one party to make electronic transactions with another
  • Hash Rate total amount of computation power used in a proof-of-work cryptocurrency network to validate blockchain transactions
  • Immutability not capable or susceptible to change
  • Proof-of-Work cryptographic proof in which one party proves to others that a certain amount of computational power has been expended

Validating Bitcoin Transactions (Mining Cont.)

Suppose Sally Sue wants to buy a moon missile from Jeff. She would exchange dollars on a cryptocurrency exchange for bitcoin. Then, she would send that bitcoin to Jeff’s digital bitcoin wallet via a public address. This bitcoin transaction would automatically broadcast to the network for validation.

The transaction effectively sits in a queue and waits for miners to find the next valid block to add to the blockchain. As discussed, finding the next valid block is the competition miners go through to answer the math problem given by the Bitcoin software. A fee is added to this transaction (paid to the miners) as an incentive for miners to prioritize adding Sally’s transaction to a block, as there is a limit to how many transactions can fit into a single block. The more congested the queue, the longer it takes to validate a transaction. A higher transaction fee ensures a transaction is included earlier than others in a block. Remember, it takes 10 minutes for miners to find a valid block.

Once the transaction is confirmed, the bitcoin that Sally sent to Jeff will be available for use, and Jeff can then send Sally the moon missile. To ensure a high degree of security of the transaction, it is an industry-standard to wait for at least six confirmations before declaring a transaction is secure and irreversible. A confirmation is a block added to the blockchain after a particular transaction. Six confirmations, in theory, would take an hour to process.

At a high level, this is how transactions are validated and how the blockchain grows within the Bitcoin network. This process of keeping nodes in sync through the longest chain selection and validating transactions using proof-of-work is known as consensus or, more specifically, in the case of the Bitcoin protocol, Nakamoto Consensus.

  • Confirmation a block being added to the blockchain after a particular transaction has been made
  • Consensus method for ensuring individual nodes in a system agree on a single state of the network
  • Protocol (programming)a set of rules and instructions by which electronic devices must follow in order to communicate between one another
  • Public Address a cryptographic string of text that allows a user to receive cryptocurrencies to their digital wallet or account

Next Steps

If you feel prepared, take our Introduction to Bitcoin and Blockchain quiz:

  1. Chaudhury, A. (2021, November 8). What is Nakamoto consensus and how does it power bitcoin? Bitcoin Magazine: Bitcoin News, Articles, Charts, and Guides. Retrieved March 22, 2022, from https://bitcoinmagazine.com/guides/what-is-nakamoto-consensus-bitcoin

  2. Dog, D. (2020, November 19). What is the Nakamoto Consensus? CoinMarketCap Alexandria. Retrieved March 22, 2022, from https://coinmarketcap.com/alexandria/article/what-is-the-nakamoto-consensus

  3. Nakamoto, S. (2008). Bitcoin: A Peer-to-Peer Electronic Cash System. Bitcoin.org.

Scroll to Top