“Mining” is the process of 取引の確認 そして adding them to the blockchain.
Nodes that participate in mining are known as 鉱民 and form a critical part of the Bitcoin network. As part of the mining process, 新しいビットコイン are created, which are “paid” to miners.
A nice way to better understand mining is to first see how BItcoin would work if it did NOT have mining.
Here’s how it’d work.
Let’s say this is a ファイル.
It is stored on a computer.
Think of this file kind of like a Word doc.
And let’s call this file, the “ブロックチェーン".
A blockchain is a distributed ledger of “ブロック".
I’ll dive deeper into blockchain in a later lesson, but for now, just know that each block contains a bundle of transactions.
Now imagine this is the Bitcoin Network.
These are all computers, connected together across the internet, and they’re running the ビットコイン・ソフトウェア.
They’re all sharing a copy of the same file, which is the ブロックチェーン.
If you want to send a bitcoin to someone, or 譲渡 ownership of a bitcoin to someone else, you would initiate a トランザクション.
The transaction is just a ライン of data (in purple).
When you initiate a transaction, it gets sent to a node of the Bitcoin network.
If Bitcoin did NOT have mining, the way this would work is that this computer would record the transaction straight to the blockchain, the shared file.
Then the computer would pass on that transaction to the other nodes it is connected to and they will write the transaction data to their own file.
Those nodes would pass the transaction to every node they’re connected to and would also write the transaction data to their own file.
And so on….
This would continue until the transaction has propagated the ENTIRE Bitcoin network.
そして every node has written it to their file.
So that’s a simple way of having a shared file or a shared “ledger” of transactions or a “分散型元帳".
Notice how ALL computers now have the purple line (transaction) stored on their ファイル (blockchain).
When all the nodes have updated their copy of the file, the ownership of the bitcoin will have changed from one person to the next person.
And that’s an example of a simple Bitcoin transaction. Congratulations!
But we have a problem…
There’s a problem that needs to be solved if we were to do it this way.
Let’s say you want to sell your bitcoin to this purple dude.
So you create a transaction to send bitcoin to the purple dude.
Then you send this transaction to the node on this side of the Bitcoin network.
But let’s say you’re the shady type, and since you can’t help it, you try to do something shady.
Because it’s a network of connected computers, you create a SECOND transaction that sends the SAME bitcoin to a different person like this red dude (on the right side).
Then you send this transaction with the red dude into another node on the network.
WTF?!
You’ve just inserted TWO separate transactions into the network that involves trying to spend the SAME bitcoin!
You can do this because it’s a network of computers located in different places all over the world.
What a sneaky jerk. Congratulations! You are shady as hell!
So what will happen from here is that these two transactions will start propagating across the network.
Some nodes will receive the パープル transaction. Other nodes will receive the 赤 transaction.
In the illustration below, when a computer tries to pass on its 赤 transaction, this computer has already received the パープル transaction spending this bitcoin so it would reject それ
Which is good, but here lies the problem…
Now you have two CONFLICTING transactions on the network.
覚えておいてほしい、 every computer on the network needs to all share the SAME EXACT file.
Some computers can’t hold a file with the パープル transaction, while others hold a file with the 赤 transaction. They all have to pick one.
ALL computers have to pick the 赤 transaction OR the パープル transaction.
If Bitcoin were to operate this way where transactions are written directly to the file, you would create this DOUBLE SPEND problem.
Bitcoin solves this problem!
Please read my lesson on the Double Spending Problem if you’re not familiar with it.
So how do the computers come to an agreement on which transaction is the legit one?
Mining is the solution.
Bitcoin solves this problem of not having conflicting transactions written to the blockchain, the shared “file”.