3

Please let me know if I understand something wrong.

Let's say I want to create a new block and verify previous transactions. To do this, I need to:

  • Choose which transactions I want to include in my block
  • Calculate the Merkle Root of these transactions
  • I choose (?) a timestamp where I expect to 'create' this block (Is this a general concensus?)
  • I start to calculate hashes by concatenating above values and starting at nonce 0, increasing up to 2^32-1
  • When I find a hash with enough zeros, I announce my proof to the network and collect my fee

There's one problem here: there is no way to guarantee a solution exists. Since I expect mining pool members to all agree what transactions to include and which timestamp to use, it can be possible that for the given block no solution exists.

Of course, other miners also experience this problem. What if all 'big' miners choose blocks which do not have any solution? Could the network stall?

3

Since I expect mining pool members to all agree what transactions to include and which timestamp to use, it can be possible that for the given block no solution exists.

That is usually not the case. With the stratum protocol which is most widely used, miners have no say as to what goes into a block except for the nonce and extranonce (extranonce is part of the coinbase transaction). So if a given block and all of its nonces result in no solution, the mining pool just constructs a new block with either new transactions, a different transaction ordering, or just a different timestamp and tells the miners to work on that.

As for the timestamp, it does not need to match real time at all. The timestamp just needs to be greater than the previous block's Median Time Past (median timestamp of the last 11 blocks), so the timestamp can be off of real time.

What if all 'big' miners choose blocks which do not have any solution? Could the network stall?

A miner is not locked into only working on the block that they chose. They can construct another block and work on that. The network does not know nor does it care if a miner had to construct a different block to mine.

  • 1
    The vast majority of blocks have no solution whatsoever. The normal condition of the network is to stall for, on average, ten minutes until someone happens to be lucky enough to make a block that has a solution and then finds that solution. – David Schwartz Oct 22 '17 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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