Today’s topic is the path of Bitcoin from “send” to “receive”. In this episode, we’re going to go over exactly what happens to a single Bitcoin from the moment you hit the “send” button in your wallet until it’s received on the other end.
What you will learn in this video
- What happens behind the scene when you press ‘send’ until the subject recieves the Bitcoin?
- What are nodes and what’s their job?
- What is a Block Explorer?
- What are transaction confirmations?
Hopefully, once we finish this lesson, you’ll have a good understanding of how the Bitcoin network works and what’s the role of each specific player in the Bitcoin ecosystem. So let’s get started!
The path from send to receive has 3 parts: Signing, broadcasting and confirming. Let’s start with the first part – signing.
When I hit the “send” button in my Bitcoin wallet, what I’m actually doing is telling my wallet:
“Hey wallet, I want to send 1 Bitcoin to my friend Steve. Here is Steve’s Bitcoin address.”
The wallet, in response, creates a transaction message containing information about me, the sender (Steve), the recipient and the amount being sent (in this case, one Bitcoin).
Afterward, the wallet produces a unique digital signature for this message by mathematically mixing it with my private key.
In our previous lesson, I’ve discussed the concept of the private key. It’s basically a long string of letters and numbers that act as the “password” for your Bitcoins. Whoever knows my private key has control of my Bitcoins.
A digital signature is a way to prove that I own the private key to my Bitcoins by using only my public key which I have no issue exposing, thus keeping my private key, well, private.
Also, digital signatures are different each time you sign a transaction – that’s why they are even more secure than a real signature since they are unique for each and every transaction. So if I send Steve one Bitcoin today and then another Bitcoin tomorrow, each of these transactions will have a different digital signature.
After signing the transaction message, the wallet then groups the signature, along with my transaction message, into a small file. This concludes our first step of signing.
Now we can move on to the next step – broadcasting.
In the broadcasting step, the wallet starts sending out the file to other computers that hold a copy of the Blockchain. These computers are also known as nodes. Each node that receives the file verifies that it’s legit. It’s basically looking to see that I actually have the funds I want to spend and that my signature checks out, much like a banker would check your account balance before clearing your check.
Once my file is verified, it’s then passed on to other nodes in the network that repeat this process.
When a node receives a file, it keeps it in a holding area called the Mempool. The Mempool, short for memory pool, is a space dedicated for valid but still unconfirmed transactions.
Once the transaction message finds its way to the Mempool of the different online nodes on the network, we can say the second step of broadcasting is officially finished.
Now I want to take a quick pause and talk about the status of our transaction at this point. In order to actually see what’s going on with our transaction while it’s making its path along the Bitcoin network, we can use a block explorer.
A block explorer is a tool, usually in the form of a website, that allows you to search and navigate through the Blockchain. Using a block explorer, you can check the balance of different Bitcoin addresses, track transactions and get a wide variety of statistics about the network.
So at this point, if we look at our transaction through the block explorer, we will see that it is marked as “unconfirmed”, meaning it was broadcasted to the network and had its digital signature verified but it still isn’t part of the Blockchain. This type of transaction is also referred to sometimes as a zero confirmation transaction.
An unconfirmed transaction should be treated as its name implies – unconfirmed. This means that the transaction can still get canceled, and there’s no guarantee it will ever enter the Blockchain. If you’re receiving goods for a payment done in Bitcoin, never accept an unconfirmed transaction as a proof of payment.
Now we can now move on to the final step – confirming our transaction.
If you’ve watched our previous lesson about Bitcoin mining, then you already know that miners group transactions together, meaning they take those files sitting around in the Mempool, group them together and create a block of transactions.
There is a limit to how many transactions can be inserted into each block. Therefore, miners will usually pick the transactions that have the highest mining fees attached to them first.
Miners will then compete with each other in order to get their block into the Blockchain.
The mining competition is based on mathematical calculations, and the miner with the most computational power will have the best chance of winning. Once a miner wins the competition and gets his block into the Blockchain, all of the transactions that were in that block will be considered as confirmed.
Basically, the miners are writing the history book of Bitcoin transactions, and whoever wins the competition gets to write the next page.
On average, a new block of transactions will be mined, or inserted into the Blockchain, every 10 minutes. Keep in mind that this is on average. Sometimes you’ll get 2 blocks confirmed within 1 minute, and sometimes it can take more than an hour.
If a block was mined with your transaction in it, you’ll notice it will now show on the block explorer as having one confirmation. As more and more blocks are added afterward, the confirmation number will grow.
Think of it as a building of blocks with our block at the very bottom. Every additional block set on top of our own block makes it harder to remove. That’s why it’s usually suggested to wait for at least 6 blocks before considering a transaction as fully confirmed without any chance of cancellation.
That’s it! Our transaction is now fully confirmed and received.
Hopefully, you now have a better understanding of how the Bitcoin network operates. If you have any additional questions about what we just covered, feel free to leave them in the comment section below.
I hope you enjoyed this episode of Bitcoin Whiteboard Tuesday, and I’ll see you…in a bit.