Winning the Bitcoin
You announce to the network that you’ve won. You create a block header for the block, which includes a timestamp, a software version number, the hash of the previous block, and the hash of the block’s transaction’s Merkle tree root. (Never mind, to successfully mine you don’t have to know about Merkle trees.) You then send out your candidate block, with its block header and the header’s hash, onto the network, so other nodes can check it. And check it they do.
A block doesn’t get added to the blockchain unless it’s been verified. To make sure you’ve won, the nodes hash the block header and check the result against the existing block header’s hash. Remember, the Proof of Work task is very difficult, but easily verified, so it can be quickly seen that you have won the contest. The nodes add your block to the blockchain, and the contest resets and begins again. Oh, and you get the block reward — the transaction fees and block subsidy — assigned to your address in the new block.
That’s mining!
So who typically wins these contests? It’s a combination of both chance and computing power. Each time you add a nonce and hash the block header, there’s a mathematically defined chance of winning. It’s low, but possible. Hey, you might win on the first try! (You might, but it’s just not very likely.)
How then do you increase your chances? You add a nonce and rehash over and over and over, millions of times. Each time you hash, it’s like buying a lottery ticket. So the more lottery tickets you buy, the better your chances. That means the more powerful your mining rigs — the more calculations they can carry out — the more chances you have.
This process may all sound very complicated but the hard work is carried out by your mining rig and your node software. You’re not going to be sitting down every ten minutes with paper and pencil hashing the block header! You set up the appropriate hardware and software and let it run.
BITCOIN PRESETS
All of these preset rules and system guidelines are baked into the software that runs the Bitcoin blockchain. A block contains around 2,000 transactions (it varies slightly depending on how much information is in each transaction). One block is added every ten minutes, more or less. In order to maintain this block emission rate, the software has to adjust its difficulty rules every now and then — every 2,016 blocks, in fact. If it’s taking less than ten minutes for each block, on average — because more computing power is being used for mining, as more miners and mining rigs come online — then the target number will be proportionally reduced, to increase the difficulty. If it’s taking more than ten minutes, though (as the price of Bitcoin drops, fewer people mine), then the target number is increased, reducing the difficulty. Also, every 210,000 blocks — around every four years — the block subsidy is halved. At the time of writing, the subsidy is 6.25BTC, but sometime in 2024, it will drop to 3.125BTC.
Конец ознакомительного фрагмента.
Текст предоставлен ООО «ЛитРес».
Прочитайте эту книгу целиком, купив полную легальную версию на ЛитРес.
Безопасно оплатить книгу можно банковской картой Visa, MasterCard, Maestro, со счета мобильного телефона, с платежного терминала, в салоне МТС или Связной, через PayPal, WebMoney, Яндекс.Деньги, QIWI Кошелек, бонусными картами или другим удобным Вам способом.