5

What is the reason for the timestamp field in the block header? Surely the nonce should be the only property that changes? Should the nonce reset to 0 everytime the timestamp changes?

5

The timestamp exists so there will be a permanent record of when the block was found. The timestamp needs to pass some sanity tests for the block to be considered valid.

One of the key uses of the timestamp is in calculating difficulty retargets.

  • But the timestamp (block header field) is hashed? How is that useful to the blockchain? Surely the time the new block is announced to the blockchain is the time value that is recorded? – Anonymous Aug 27 '13 at 13:23
  • 2
    @Anonymous: The network isn't a monolithic entity. Different nodes get the block at different times, and new nodes don't have firsthand knowledge of the history. Having the timestamp part of the hashed data means everyone can agree on the timestamp, and this can never be changed without altering the hash and breaking the chain. The synchronization challenge is why the blockchain exists in the first place. – Meni Rosenfeld Aug 27 '13 at 13:27
  • Does the time stamp change every few seconds. If yes then if a miner is still hashing while time stamp changes and then it finds a hash lower that target, will that hash be considered valid if other conditions are satisfied? – bytefire Sep 6 '13 at 16:13
  • 2
    @bytefire: The miner chooses which timestamp to put in the block. Nodes will reject blocks with timestamp that doesn't make sense, but that's on a scale of hours, so there shouldn't be a problem. (See also bitcoin.stackexchange.com/questions/3743/…). – Meni Rosenfeld Sep 7 '13 at 17: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.