Demystifying Bitcoin: Understanding the Key Components, Mining Processes, and Transaction Lifecycle

Tomas Svojanovsky
CryptoVerse Insights
5 min readNov 17, 2023

The Bitcoin system, unlike traditional banking and payment systems, does not require trust in third parties. Instead of a central trusted authority, in Bitcoin, each user can use software running on their own computer to verify the correct operation of every aspect of the Bitcoin system.

The Bitcoin system consists of users with wallets containing keys, transactions that are propagated across the network, and miners who produce (through competitive computation) the consensus blockchain, which is the authoritative ledger of all transactions.

Key Components of the Bitcoin System:

  1. Users and Wallets: The Bitcoin system comprises users with wallets containing keys, transactions propagated across the network, and miners responsible for producing the consensus blockchain — the authoritative ledger of all transactions.
  2. Mining: The system’s counterfeit protection relies on computational efforts. Transactions are grouped into blocks, each requiring significant computational power to create, yet only a fraction of that power to verify. Mining serves the dual purpose of ensuring adherence to Bitcoin’s consensus rules and creating new bitcoins through a process that follows a fixed issuance schedule.
  3. Mining Pools: Mining pools form when miners collaborate to mine a block. This approach, more profitable than solo mining, allows rewards to be distributed among all participants, regardless of individual contributions.
  4. Transactions: Transactions function like entries in a double-entry bookkeeping ledger. Each transaction involves inputs (similar to debits) and outputs (similar to credits). The discrepancy between inputs and outputs represents an implied transaction fee, collected by the miner including the transaction in the ledger.
  5. Transaction Fees: Transaction fees, charged by miners, depend on the size and weight of the transaction. While fees are not mandatory, they serve as an incentive for miners to include transactions in the blocks they create.
  6. Coinbase Transactions: Coinbase transactions, always initiated by a miner, create new coins. The coinbase transaction includes a special field that acts as an input to the transaction.

Mining

The Bitcoin system’s counterfeit protection is rooted in computation. Transactions are grouped into blocks, each with a very small header that must be crafted in a highly specific way. This process demands a substantial amount of computation to get it right, yet only a small amount to verify as correct.

The mining process in Bitcoin serves dual purposes. Miners can only earn honest income by creating blocks that adhere to all of Bitcoin’s consensus rules. Consequently, miners are naturally incentivized to include only valid transactions in their blocks and the blocks they build upon. This system allows users the option to trust that any transaction within a block is indeed valid.

Mining results in the creation of new bitcoins in each block, akin to a central bank printing new money. The quantity of bitcoin generated per block is limited and diminishes over time, following a fixed issuance schedule. Mining strikes a delicate balance between cost and reward, utilizing electricity to solve a computational problem. A successful miner receives a reward in the form of new bitcoin and transaction fees. However, this reward is contingent upon the miner correctly validating all transactions to the satisfaction of the consensus rules. This delicate equilibrium provides security for Bitcoin without the need for a central authority.

Mining pools

A mining pool is created when a group of miners collaborates to mine a block. In this cooperative effort, the pool manager receives the coinbase transaction if the block is successfully mined.

Subsequently, the manager assumes the responsibility of distributing the reward among the group of miners who collectively invested resources in the mining process. This collaborative approach proves to be more profitable than solo mining, where a lone miner attempts to solve the partial hash inversion function. In mining pools, the reward is distributed to each member, regardless of whether they individually solved the puzzle or not.

Transactions

Transactions can be likened to entries in a double-entry bookkeeping ledger. Each transaction comprises one or more inputs, akin to debits against a Bitcoin account. On the opposite side of the transaction, there are one or more outputs, functioning like credits added to a Bitcoin account.

It’s important to note that the inputs and outputs do not necessarily equate to the same amount. Instead, outputs slightly total less than inputs, and the variance represents an implied transaction fee — a modest payment collected by the miner responsible for incorporating the transaction into the ledger.

Fee

Miners charge transaction fees, and the fee amount depends on the size and weight of the transaction. The calculation of transaction fees is determined by subtracting the sum of the inputs from the sum of the outputs, represented as: fee = sum(inputs) — sum(outputs).

These fees serve as an incentive for miners, encouraging them to include users’ transactions in the blocks they are creating. All transactions initially enter the memory pool, from which miners select transactions based on their priority to include them in the proposed block.

It’s important to note that fees in the Bitcoin protocol are neither fixed nor mandatory. Even a transaction with no fee will eventually be processed, but the processing time might be considerably long. Given the high volume of transactions and competing investors on the Bitcoin network, it is advisable to include a fee for timely processing. The time required for transaction confirmation typically varies from 10 minutes to over 12 hours in some cases. Transaction processing time is also influenced by network activity; a busy network naturally results in longer processing times.

Coinbase transactions

A coinbase transaction, also known as a generation transaction, is always created by a miner and serves as the initial transaction within a block. Its primary purpose is to generate new coins. The coinbase transaction includes a distinctive field, referred to as the coinbase, which functions as an input for the coinbase transaction.

Transaction lifecycle

  1. A user/sender initiates a transaction using wallet software or another interface.
  2. The wallet software signs the transaction using the sender’s private key.
  3. The transaction is broadcast to the Bitcoin network using a flooding algorithm — an algorithm designed to distribute data to every node in the network.
  4. Mining nodes (miners) listening for transactions verify and include this transaction in the next block to be mined. Just before the transactions are placed in the block, they are stored in a special memory buffer called the transaction pool.
  5. Subsequently, mining commences, securing the blockchain and generating new coins as a reward for miners who invest appropriate computational resources. Once a miner successfully solves the Proof of Work (PoW) problem, they broadcast the newly mined block to the network. Nodes verify the block and propagate it further, initiating the generation of confirmations.
  6. Finally, confirmations begin to appear in the receiver’s wallet, and after approximately three confirmations, the transaction is considered finalized and confirmed. However, three to six is just the recommended number; the transaction can be regarded as final even after the first confirmation. The key idea behind waiting for six confirmations is that the probability of double spending is virtually eliminated after six confirmations.

Thanks for reading my article!

If you enjoyed the read and want to be part of our growing community, hit the follow button, and let’s embark on a knowledge journey together.

Your feedback and comments are always welcome, so don’t hold back!

--

--

Tomas Svojanovsky
CryptoVerse Insights

I'm a full-stack developer. Programming isn't just my job but also my hobby. I like developing seamless user experiences and working on server-side complexities