Bitcoin Transaction Confirmations and Blocks
By: Ofir Beigel | Last updated: 4/24/20
Let’s say I send you 1 Bitcoin. After a few minutes, you see that this transaction has received one “confirmation”. What does this actually mean? This post explains it all.
Bitcoin Confirmations and Blocks Summary
Bitcoin transactions are bundled into blocks. These blocks are inserted by Bitcoin miners into the Bitcoin ledger of transactions, known as the blockchain.
If your transaction was inside a successfully mined block, you will see it receive 1 confirmation. Each block mined thereafter will award your transaction with an additional confirmation. It’s recommended to wait for at least 6 confirmations before deeming a transaction as irreversible.
That’s blocks and confirmations in a nutshell. If you want a more detailed explanation keep on reading, here’s what I’ll cover:
- What are Bitcoin Transaction Blocks?
- The Mining Process
- Orphan Blocks
- Reversing a transaction
Don’t Like to Read? Watch This Short Tutorial Instead
Bitcoin transactions are written onto a transaction ledger known as the blockchain. However, instead of being added one by one, the transactions are bundled into a block of transactions.
Just like any other digital information, a transaction has a file size. A block of transactions can hold up to 1mb of transactions.
A Bitcoin transaction is not confirmed immediately once you send it. Instead, it sits in the mempool, a sort of transaction waiting room.
Bitcoin miners then pick transactions from the mempool and assemble a candidate block of transactions (transactions with a higher fee attached will be chosen first).
Bitcoin miners are computers that compete for the right to insert the next block of transactions into the blockchain. They do so by trying to guess a random number that solves a mathematical equation (also known as proof of work).
Once a miner finds a solution, he gets to insert his candidate block as a valid block in the blockchain. When that happens, all transactions that are inside that block will receive 1 confirmation. Now, miners can move on to compete over the next block.
This process of assembling blocks of transactions and then updating the ledger is what’s known as Bitcoin mining. The winning miner will get a mining reward and all of the transaction fees attached to the transactions inside his block.
Orphan blocks are valid blocks that aren’t included in the blockchain. This happens in a rare situation in which two miners managed to mine a block at roughly the same time. Eventually, even though both blocks are valid, only one will be accepted and the other will be orphaned.
Let’s break down how this can occur:
Sometimes, two miners will find the solution at roughly the same time. This will create two different blocks of transactions propagating around the network.
Let’s use an example to illustrate this:
Two miners mine block A and B at the same time. 50% of the network received block A first, while the other 50% received block B. At the current state there is a temporary fork in the network.
A few minutes go by and block C is mined. Block C was mined by a computer that received block B as valid. Therefore the valid blocks are now B and C, and block A is considered an orphaned block.
Each time a new block is inserted into the blockchain, all of the previous blocks get confirmed again (they are also checked in the process).
The more confirmations a block has, the harder it will be for someone to remove it from the blockchain. Doing so will require an attacker to create an alternate block and then build a longer chain than the original blockchain.
This requires an enormous amount of computing power (see 51% attack for more information).
It is recommended to wait for at least 6 confirmations in order to be positive that your transaction won’t get canceled by any sort of attack – this takes on average 1 hour to achieve. If you’re dealing with smaller amounts of money, you’re probably OK with waiting for just 1 confirmation.
Reversing a transaction takes planning, time and effort and a lot of computing power. Most people probably won’t go through all of that trouble for a small amount of money.
Bitcoin transactions are bundled into blocks which are what make up the blockchain (a chain of blocks). Once your transaction enters a valid block, it receives its first confirmation. Each block that is mined after that adds an additional confirmation to it, making it harder to reverse.
Still have questions about Bitcoin transaction confirmations and blocks? Let me know in the comment section below.