Author

Topic: A question regarding Timestamp (Read 162 times)

legendary
Activity: 3472
Merit: 10611
January 01, 2020, 03:14:55 AM
#2
not at every iteration but it also changes.
you have this structure:
1- version
2- Previous Block Header Hash
3- MerkleRoot Hash
4- Block Time (or timestamp)
5- N Bits
6- Nonce
these make up 80 bytes and 1&2&5 are fixed for that block while 3&4&6 can change. mining is basically changing 1 bit at a time (from the bits that can change) and hashing it again until you  get the result. so you start from somewhere (nonce) then when you run out of bits you move to another variable.

the loop could look like this:
start: nonce=0
increment nonce(+1)
reach nonce max (0xffffffff)
change nonce to 0 and change something else:
  - timestamp if enough time has been passed
  - merkle root if new transactions were added to the mempool and were included in this block
    or have a variable in coinbase tx called extranonce and change that.
increment nonce(+1)
...
legendary
Activity: 1918
Merit: 1728
January 01, 2020, 02:36:17 AM
#1
As we all know nonce is the number that keeps on changing until the hash generated with the joint string of nonce and other block data matches the target difficulty requirement.
Other block data such as data, last hash and difficulty remain constant but what about timestamp? Does timestamp also changes alongside nonce at every iteration until required hash is found or it remains constant?
Jump to: