Читать книгу Cryptocurrency Mining For Dummies - Peter Kent - Страница 64

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.

Cryptocurrency Mining For Dummies

Подняться наверх