Discover How a Transaction Is Added to Bitcoin Blockchain and Secured via Mining in 9 Steps

Understanding the fundamentals of Bitcoin is essential.

Sylvain Saurel
Feb 13 · 9 min read

“Risk comes from not knowing what you’re doing.”
— Warren Buffett

Warren Buffett is one of the biggest investors of all time. His consistent success in financial investments for over 50 years makes him an expert in risk management.

When Warren Buffett talks about investment risk, you need to listen carefully.

For Warren Buffett, the biggest risk when you invest is not knowing what you are doing. If you invest with an understanding of what you are doing, you are making a controlled decision, which is not a risk.

In the case of Bitcoin, it’s exactly the same thing.

Buying Bitcoin is only risky if you don’t understand how Bitcoin works and the revolution it intends to lead in building a fairer future world for all.

In order to help you better understand what Bitcoin is, and ultimately better manage the risk associated with a potential Bitcoin purchase, I propose to discover in 9 steps how a transaction is added to the Bitcoin Blockchain and how it is secured through the mining process.

1. A User Initiates a Transaction on the Bitcoin Blockchain

It all starts with a user on the Bitcoin network initiating a transaction from a Bitcoin wallet. This user chooses to perform this transaction to another user on the Bitcoin network.

This user can be an individual or an entity such as a trading platform like Binance or Coinbase.

Overall, a transaction includes the following three essential pieces of information:

  • Sender address
  • Recipient address
  • The amount of the Bitcoin transaction that the user wishes to make

2. The Transaction Is Broadcast to All Nodes of the Bitcoin Network

The transaction initiated from a Bitcoin wallet is transmitted to the Bitcoin Blockchain before being broadcast in Peer-to-Peer mode to all nodes on the network.

The nodes on the Bitcoin Blockchain can be simple nodes or masternodes.

When a node receives a transaction, it will check if it is valid.

The node then decides whether to accept or reject this transaction.

You should be aware that the nodes of the Bitcoin Blockchain are a critical part of the infrastructure that allows its network to function properly.

2.1 Simple Nodes

Simple nodes can be online or offline.

When a simple node is online, it will receive, save and broadcast all the latest transaction blocks to all the other nodes in the network whether they are online or offline.

When an offline node reconnects, there is a synchronization phase with the Bitcoin Blockchain during which the node will download the missing part of the Blockchain.

2.2 Masternodes

Masternodes are nodes that are equipped in a slightly more important way than simple nodes.

A masternode will work 24/7.

Running a Bitcoin masternode will require specific equipment since it requires a lot of resources: power, maximum availability, maintenance, disk space, and RAM memory.

A masternode therefore always has the most up-to-date version of the Bitcoin Blockchain.

The more masternodes a Blockchain such as Bitcoin has, the safer and more secure the Bitcoin Blockchain is.

3. Each Node of the Bitcoin Blockchain Writes the Transaction to Its Mempool

When a node receives a new transaction that it accepts, it will write it into a dedicated memory area called Mempool.

The Mempool contains all the transactions waiting to be included in a block for validation via mining.

The size of a Mempool will vary from node to node in the Bitcoin Blockchain.

This is because it depends on the physical capabilities of each node.

The size of the global Mempool of the Bitcoin Blockchain is a known metric that represents all transactions awaiting validation by the Bitcoin network.

At this point in time, the overall size of the Bitcoin Mempool is 9,743,589 Bytes :

Too large a size of this Mempool means that the Blockchain Bitcoin has a very high volume of transactions and cannot process them fast enough.

Thus, the smaller the size of the Mempool, the faster the Bitcoin network can be considered.

Each node can view the Mempool of another node in the Bitcoin Blockchain.

If a transaction arrives at a node, and that node’s Mempool is full, then the node will decide to prioritize the transactions it wants to try to validate.

This prioritization is most often done by keeping the transactions with the highest transaction fees.

Therefore, if you want to maximize your chances of having your transaction processed on a priority basis while the Bitcoin network is congested, you must include a higher transaction fee for your transaction.

4. Miners Constitute a Block of Transactions From the Mempool

Miners are usually brought together in mining pools to maximize their chances of solving the mathematical puzzle associated with validating a block of transactions.

A mining pool will manage one or more masternodes, but this is not an obligation, which will allow it to keep Mempools up to date.

Miners pick from their node’s Mempool or from the Mempool of other members of the network transactions that they will include in a transaction block.

The average block size on the Bitcoin network is 1MB.

Different miners may include identical transactions within different blocks at that point in time.

This does not have an impact as you will see later.

Miners are looking to maximize their profits and will therefore prioritize the transactions with the highest fees.

5. Miners Attempt to Mine the Transactions’ Block by Applying the Proof-of-Work Algorithm

At this moment, each miner has formed his own block of transactions that he will try to mine. In order to do this, miners must solve a mathematical problem that looks simple but is actually very computationally intensive.

Specifically, miners must find the cryptographic signature for the data in a transactions’ block that begins with a number of consecutive zeros.

As a reminder, a cryptographic signature is an algorithm that takes input data in the form of strings of characters and outputs a unique signature of fixed length.

More importantly, a cryptographic hash function has the distinct advantage of being a one-way function. It can therefore be easily computed but very difficult to reverse.

While the calculation of the hash of a string with a cryptographic hash function is very fast, the reverse calculation is very complex and time consuming.

Indeed, there is nothing more efficient than a stupid and time-consuming systematic approach during which it will be necessary to test all possible input combinations of the hash function in order to find the same output.

Simplifying things, the more zeros added at the beginning of the cryptographic signature to be found for the data in a block, the more difficult it becomes to mine a block of Bitcoin Blockchain.

The difficulty to mine a block on the Bitcoin network is periodically adjusted by taking into account the computing power made available by all the miners on the network.

The computing power available on the Bitcoin network is called the Hash Rate.

The higher the Hash Rate, the safer and more secure the Bitcoin network is considered to be.

The fact that Bitcoin has been breaking records for Hash Rate available since the beginning of 2020 is therefore a sign of the excellent health of its Blockchain.

Finally, it is also crucial that no single entity owns more than 51% of the computing power of the Bitcoin network, otherwise there is a risk of a double-spending attack or the blocking of transactions by arbitrary decisions.

6. The Miner Who Validates a Transactions’ Block Broadcasts It to the Entire Bitcoin Network

When a miner finds the correct cryptographic signature for a block of transactions, he broadcasts it to all the other nodes in the network.

Each block of the Blockchain is linked to its previous block by its hash.

Nodes that receive this new version of the Blockchain will check its validity.

7. Other Miners Who Receive This Block Must Confirm It

When a node validates that the new version of the Blockchain it has just received is good, it broadcasts a confirmation to all other nodes in the Bitcoin network.

The other nodes in the Bitcoin network then check their own version and so on.

Each time a new version of the Blockchain is received, the node keeps only the longest valid version of the Blockchain.

Once this validation has been completed, each node abandons its block of transactions being validated, and then removes from its Mempool all the validated transactions contained in this new block.

It is said that the miner who has just successfully validated this block of transactions has mined a new block of the Bitcoin Blockchain.

The work of miners in validating transactions and securing the Bitcoin network is rewarded with an amount in Bitcoin in addition to the transaction fees.

In the early days of Bitcoin, this award was 50 BTC. For every 210,000 blocks validated, it is automatically halved during a so-called Bitcoin Halving.

In May 2020, the third Halving in the history of Bitcoin will decrease the reward for mining a block from 12.5 BTC to 6.25 BTC.

In order to pay this reward to miners who have validated the transactions’ block, each block contains a record detailing the Bitcoin address that will receive the reward.

This record is often called a coinbase transaction and represents the first transaction in each block.

Since the computing power required to mine a Bitcoin block is very large, miners have pooled their computing power by grouping together in mining pools.

The mining pool validating a block of transactions then distributes the reward proportionally according to the amount of computing power each miner makes available in the pool.

8. Miners Who Failed Return in Quest of a New Reward Based on This New Version of the Blockchain

Miners who failed return immediately in quest of a new reward by going to Step 3.

They will now attempt to mine a new block of transactions by adding it to the new version of the Blockchain that they have just confirmed.

Each new block added after the block in which your Bitcoin transaction is embedded will be considered a confirmation.

Consider the following Bitcoin Blockchain consisting of three blocks:

The transactions are placed here in the data area in the form of a Merkle Tree.

If your transaction was in Block 0 of the Bitcoin Blockchain, when the valid Blockchain is in Block 2, you have had 2 confirmations of your transaction.

With regard to confirmations of a transaction made in Bitcoin, the following rules apply if you receive payments in Bitcoin:

  • Payments with zero confirmation can still be reversed.
  • One confirmation is generally considered sufficient for Bitcoin payments of less than $1,000.
  • Three confirmations are required by exchanges for deposits between $1,000 and $10,000.
  • Six confirmations are a commonly accepted standard for larger payments between $10,000 and $1,000,000.

9. The User’s Transaction Is Confirmed

As a Bitcoin network user who has just initiated the transaction, you can check the number of confirmations yourself.

This can be done by downloading Bitcoin Core or by using an online Bitcoin Blockchain explorer.

You need to enter the hash of your transaction and you will then be able to view all the details of your transaction:

Here, the number of confirmations is 94 which indicates that your transaction is validated and can no longer be removed from the Bitcoin Blockchain.


Anyone who wants to get seriously involved in the world of Bitcoin should take the time to understand how it works. In this story, I have shown you how a Bitcoin transaction is added to its Blockchain.

Better yet, you discovered how the nodes of the Bitcoin network work and how the miners validate the transactions’ blocks. This validation of a transaction block is done on average every 10 minutes and allows for the creation of new Bitcoins.

You will have understood that the work of the nodes but also of the miners is essential to ensure the proper functioning and security of Bitcoin on a daily basis.

As you continue to learn more about Bitcoin, you will be able to make your own decision whether or not to buy Bitcoins.

If you make your decision to buy Bitcoin with a full understanding of what you are doing, then it won’t be a risky thing to do if you stick to Warren Buffett’s philosophy.

In Bitcoin We Trust

In Bitcoin We Trust is a place where Bitcoin believers share their ideas about the upcoming revolution. Blockchain and cryptocurrencies are also covered in this publication.

Sylvain Saurel

Written by

Entrepreneur / Developer / Blogger / Author. In Bitcoin We Trust:

In Bitcoin We Trust

In Bitcoin We Trust is a place where Bitcoin believers share their ideas about the upcoming revolution. Blockchain and cryptocurrencies are also covered in this publication.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade