Brother
Professional
- Messages
- 2,590
- Reaction score
- 544
- Points
- 113
Last time I talked about what blockchain is. For brevity and consistency of presentation, let me remind you: this is a database in which there are special mechanisms to control its integrity and reliability, and this control is carried out by each participant in the network, there is no central regulator and cannot be. Each member of the network has its own copy of the database, and a new record is added only if it meets all the rules of the network.
Let's talk about structure and how coins appear in bitcoin. In other words, how the coins are issued.
Let me remind you that the structure of the "database" of the blockchain is specific, such a structure (in places quite difficult to understand) was invented not out of harm, but in order to solve a number of important problems. We will gradually figure it out with all this. So, this structure is a sequentially linked list of elements. For Bitcoin and a number of other cryptocurrencies, these elements are records of the movement of money between wallets (in other words, transactions). Those. The "database" of a blockchain is a sequentially linked list of transactions.
But for solving a number of problems, these transactions are combined into blocks, and thus, it is more correct to say that the Bitcoin blockchain is a sequentially linked list of transaction blocks. Hence the name - blockchain, blockchain.
New coins appear in the system when a new block is formed. The block is formed by the miner. In theory, this is any computer on the network, but in reality, the race for coins has inflated the cost of equipment, on which it is possible to mine at least something. But more on that another time. In general, the new block is formed by the miner, and he receives his bitcoins as a reward "out of nowhere."
The network participants want to transfer their coins somewhere, and for this they form transactions such as "transfer in the amount of X from wallet Y to wallet Z". Transactions can be (and almost always are) more complex and tricky, but for now, keep it that simple. The transaction is generated and sent to the network (sent to all network participants). Formed as it were the queue of transactions that must now be written to the common database (blockchain). This queue is also called the mempool (memory pool). As long as the transaction is in the mempool, and is not placed on the blockchain, it seems to have "not gone through" yet. That's when it takes its place in the database (in the blockchain) - then that's it, the money is listed. Not yet.
The miner selects several transactions from this mempool and combines them into a block (candidate block). And he adds another transaction, on his own: "credit 12.5 bitcoins to my wallet Y". From nowhere. "Just". Newly Generated Coinsas in the screenshot. The rules allow. Now he has a block in which someone else's transactions and one of his, which comes first in the list. The block is prepared, and now it needs to be "mined", i.e. adjust one of the service parameters of the block so that one equation is fulfilled. The equation is deliberately made very difficult so that, on average, someone can solve it only once every 10 minutes. As soon as our successful miner solves a block, he sends it to all network members. And everyone can easily and quickly check - yes, the equation is solved correctly, the block is correct, you can write it to your copy of the database. Checking the solution to an equation is a simple job. It is many times easier than solving it, so each node quietly checks it in real time.
And now the miner has 12.5 bitcoins in his wallet. This is a reward for his work.
But what if instead of "credit me 12.5 bitcoins" he writes "credit me 100,500 bitcoins"? Even if he mines the block (solves the equation), then none of the network nodes will accept this block. More precisely, no one will write it into their copy of the database. There is an agreement (network rule): it costs 12.5 bictoins to solve the equation, period. And the block just won't fit according to formal rules. Such a block flew to your computer, your wallet quickly checked it and calmly threw out this block as defective. It's nothing personal, just business. The miner wasted 10 minutes looking for a solution to the equation. In the screenshot, not 12.5, but 12.8, because, in fact, there is not a division in half, but a binary shift to the right with rounding down.
Specifically in Bitcoin, there is one more rule - the reward for each block gradually falls. Approximately every four years (every 210,000 blocks) the reward is halved. The initial reward was 50 bitcoins, now 12.5. And at a certain moment (block number 6 929 999, approximately in 2140) it will become zero, the mining of bitcoins will stop, there will be 21 million in total. And the system (the wallet of each node in the network) checks whether the reward matches the number of the block in which it is indicated.
Well, there are still a couple of nuances left to consider.
Our miner is not alone in the network. There are many miners, they all compete for this award, who will send out the correctly solved block first. But each miner forms a candidate block in its own way. He can select other transactions (although he can be the same). But the main thing for him is that as the first transaction he writes "credit 12.5 bitcoins to MY wallet." Even if all miners made blocks in the same way, all the same, the first transaction would be different for everyone - transfer 12.5 bitcoins from nowhere, but to different wallets (each miner specifies his own wallet). This means that the equation that each of them solves is different. Whoever decides first, the block will be recorded in all copies of the database. This means that all copies of the database will indicate that 12.5 bitcoins have been added to his wallet. That,
The mining reward is not the only source of income for the miner. The transaction may indicate the commission to the miner. And if the miner solves his equation, then he receives not only 12.5 bitcoins "out of nowhere", but also a commission from each transaction that is in this block. But these bitcoins, in turn, once upon a time were mined "out of nowhere" by some other miner, and maybe many other hands went through in order to get to our miner in the form of a commission. It is clear that it is beneficial for the miner to place only those transactions in which there is a large commission in the block. This is what actually happens. If you want your transaction to be the first in the queue to be added to the block, set a higher commission.
I deliberately omitted a few details so as not to clutter up the picture. If there is a good response to this post, we will gradually get to the details.
Let's talk about structure and how coins appear in bitcoin. In other words, how the coins are issued.
Let me remind you that the structure of the "database" of the blockchain is specific, such a structure (in places quite difficult to understand) was invented not out of harm, but in order to solve a number of important problems. We will gradually figure it out with all this. So, this structure is a sequentially linked list of elements. For Bitcoin and a number of other cryptocurrencies, these elements are records of the movement of money between wallets (in other words, transactions). Those. The "database" of a blockchain is a sequentially linked list of transactions.
But for solving a number of problems, these transactions are combined into blocks, and thus, it is more correct to say that the Bitcoin blockchain is a sequentially linked list of transaction blocks. Hence the name - blockchain, blockchain.
New coins appear in the system when a new block is formed. The block is formed by the miner. In theory, this is any computer on the network, but in reality, the race for coins has inflated the cost of equipment, on which it is possible to mine at least something. But more on that another time. In general, the new block is formed by the miner, and he receives his bitcoins as a reward "out of nowhere."
How it looks
The network participants want to transfer their coins somewhere, and for this they form transactions such as "transfer in the amount of X from wallet Y to wallet Z". Transactions can be (and almost always are) more complex and tricky, but for now, keep it that simple. The transaction is generated and sent to the network (sent to all network participants). Formed as it were the queue of transactions that must now be written to the common database (blockchain). This queue is also called the mempool (memory pool). As long as the transaction is in the mempool, and is not placed on the blockchain, it seems to have "not gone through" yet. That's when it takes its place in the database (in the blockchain) - then that's it, the money is listed. Not yet.
The miner selects several transactions from this mempool and combines them into a block (candidate block). And he adds another transaction, on his own: "credit 12.5 bitcoins to my wallet Y". From nowhere. "Just". Newly Generated Coinsas in the screenshot. The rules allow. Now he has a block in which someone else's transactions and one of his, which comes first in the list. The block is prepared, and now it needs to be "mined", i.e. adjust one of the service parameters of the block so that one equation is fulfilled. The equation is deliberately made very difficult so that, on average, someone can solve it only once every 10 minutes. As soon as our successful miner solves a block, he sends it to all network members. And everyone can easily and quickly check - yes, the equation is solved correctly, the block is correct, you can write it to your copy of the database. Checking the solution to an equation is a simple job. It is many times easier than solving it, so each node quietly checks it in real time.
And now the miner has 12.5 bitcoins in his wallet. This is a reward for his work.
But what if instead of "credit me 12.5 bitcoins" he writes "credit me 100,500 bitcoins"? Even if he mines the block (solves the equation), then none of the network nodes will accept this block. More precisely, no one will write it into their copy of the database. There is an agreement (network rule): it costs 12.5 bictoins to solve the equation, period. And the block just won't fit according to formal rules. Such a block flew to your computer, your wallet quickly checked it and calmly threw out this block as defective. It's nothing personal, just business. The miner wasted 10 minutes looking for a solution to the equation. In the screenshot, not 12.5, but 12.8, because, in fact, there is not a division in half, but a binary shift to the right with rounding down.
Specifically in Bitcoin, there is one more rule - the reward for each block gradually falls. Approximately every four years (every 210,000 blocks) the reward is halved. The initial reward was 50 bitcoins, now 12.5. And at a certain moment (block number 6 929 999, approximately in 2140) it will become zero, the mining of bitcoins will stop, there will be 21 million in total. And the system (the wallet of each node in the network) checks whether the reward matches the number of the block in which it is indicated.
Well, there are still a couple of nuances left to consider.
Our miner is not alone in the network. There are many miners, they all compete for this award, who will send out the correctly solved block first. But each miner forms a candidate block in its own way. He can select other transactions (although he can be the same). But the main thing for him is that as the first transaction he writes "credit 12.5 bitcoins to MY wallet." Even if all miners made blocks in the same way, all the same, the first transaction would be different for everyone - transfer 12.5 bitcoins from nowhere, but to different wallets (each miner specifies his own wallet). This means that the equation that each of them solves is different. Whoever decides first, the block will be recorded in all copies of the database. This means that all copies of the database will indicate that 12.5 bitcoins have been added to his wallet. That,
The mining reward is not the only source of income for the miner. The transaction may indicate the commission to the miner. And if the miner solves his equation, then he receives not only 12.5 bitcoins "out of nowhere", but also a commission from each transaction that is in this block. But these bitcoins, in turn, once upon a time were mined "out of nowhere" by some other miner, and maybe many other hands went through in order to get to our miner in the form of a commission. It is clear that it is beneficial for the miner to place only those transactions in which there is a large commission in the block. This is what actually happens. If you want your transaction to be the first in the queue to be added to the block, set a higher commission.
I deliberately omitted a few details so as not to clutter up the picture. If there is a good response to this post, we will gradually get to the details.