4

I just read about how miners have to change the nonce bit in order to find an hash below a certain result.

Granted each miner process it the same way, incrementally, adding 1 and hashing, adding one and hashing, what prevents the most powerful computer on the network to snatch all rewards?

I feel like beside the moment each miner starts mining a block, there's no room for luck and a lesser powerful machine, to ever add a block.

2 Answers 2

10

Because each miner may select the transactions (and the order in which they are included) in each block. Also, they do not all start on the same exact nonce, in fact they are changing more than just the nonce in many cases (e.g. block versions - see ASIC BOOST).

This means that they are not all performing the HASH256 (proof of work algorithm) on the exact same data, so the outcome is random. However, more powerful computers can perform more hashes per second, so they will find a solution on average, more often than a less powerful computer. These computers, by the way, are specialized hardware called miners, not general purpose computers.

4
  • 1
    You beat me to punch ;)
    – Ugam Kamat
    Commented Aug 26, 2019 at 14:13
  • 1
    haha sorry @Ugam :)
    – JBaczuk
    Commented Aug 26, 2019 at 14:14
  • 7
    Note that it's not just POSSIBLE but actually NECESSARY for each miner to include different transactions, because one of them -- the coinbase transaction -- is how the miner gets paid for mining, and has to contain the miner's payment address. Commented Aug 26, 2019 at 22:36
  • And aside from this, even if multiple hashers would work together on the same nonce, they are essentially trying to get lucky in guessing a value which will hash to the requested prefix. - if all start guessing at 0000... and incrementing from there, they would all be trying the same numbers and the fastest one would win every time. But you can start guessing anywhere - theoretically you could randomly start guessing anywhere and get lucky every time on the first try and beat all the super-computers with your lone PC.
    – Falco
    Commented Aug 27, 2019 at 14:12
3

Just adjusting the nonce is not sufficient for mining a valid Bitcoin block at the current difficulty level which is around 80 exa-hashes (80 x 1018 hashes) per second. Nonce field in the block is only 4 bytes which means it can at most provide you 2^32 different hashes(4.2x109 hashes). That is the reason, miners adjust the extra nonce value in the coinbase transaction and then iterate over the entire 232 nonce field again.

Supercomputers are way slower than ASICs for mining purposes. Supercomputers contain huge CPU power that are highly useful for general purpose computing however, for running a particular task they will be much slower compared to a hardware that is designed specifically for that purpose. That is the reason miners use ASICs where the dsha256 algorithm is printed on the circuit in the hardware. These chips can't do anything else, but run the double SHA256 hashes which provides them advantage over even a supercomputer.

Miners generally run another machine connected to these ASICs chips. While the ASIC chip is exhausting the nonce space, the other machine changes the extra nonce value and queues it up for the ASIC hardware to take it from there. So these task can be run in parallel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.