4

I did a statistic about the difference between the first announcement time in the network and the timestamp in block header for blocks within 2020. Surprisingly, most (93%) differences are less than 100 seconds. One of the possible reasons is my statistic is wrong, but if the result is accurate, I am really curious about the reason behind it.

My original understanding of mining is to pick a timestamp (the timestamp of when miners started mining) and then fix it. After that, the miner chooses different nonces to solve the puzzle. However, this strategy seems can not result in the distribution of differences above. So I am wondering how bitcoin miners choose timestamps when mining in the real world.

One of the strategies that can lead to the distribution above I can imagine is: Miners change the timestamp frequently according to real-time timestamp. But I failed to find any relevant information about this strategy...

5

My original understanding of mining is to pick a timestamp (the timestamp of when miners started mining) and then fix it.

There's no reason for that to be the case, as mining is progress-free. It is actually an advantage to update the timestamp in some cases, as it means that new proof of work can be attempted without needing to update the extraNonce value to something new. Each new second, it is as if a new work unit has been generated for free.

So I am wondering how bitcoin miners choose timestamps when mining in the real world.

Many pieces of public pool software tend to update the work every 30 seconds, which would mean that you would expect mined block timestamps to be within 30 seconds or less of the actual wall time. Beyond the fairly loose restrictions placed by Bitcoin's consensus rules on timestamps, there's nothing preventing anybody from simply choosing their own arbitrary rules for how and why they might set the clock.

One of the strategies that can lead to the distribution above I can imagine is: Miners change the timestamp frequently according to real-time timestamp. But I failed to find any relevant information about this strategy...

That's not an unreasonable assumption based on the information available, but you're probably not going to find much more than that. Time in Bitcoin is fairly loosely considered to begin with; so long as things trend towards at least sundial accuracy, and meet the consensus rules, it doesn't impact the security of the system particularly.

1
  • Great answer, thanks!
    – Zhichun Lu
    Oct 28 at 10:50

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.