Timestamp

Timestamp

how mining works

Nonce Range A modest miners does 10^8 hashes/sec. that means 4 * 10^9 nonce will be covered in = (4 * 10^9)/(10^8)=40 sec. A miner exhaust 4Billion nonce in 40 sec.

what will the miners do when all the nonce get exhausted and miners have not hit the target?

Timestamp

it consist of unix time(Unix time is a single signed number that increments every second). time in the block creation we get it from timestamp,it is converted in pm am or in days months. In SHA256 Algorithm a block contains of various fields, like block no, nonce, timestamp, data, prev hash, hash. timestamp is only a filed which changes every seconds. and when ever it will change due to avalanche effect( if an input is changed slightly (for example, flipping a single bit), the output changes significantly (e.g., half the output bits flip).)

In one second A miner will exhaust 0.1 Billion nonce in 1sec,and nonce range is 4 billions it will exhaust in 40 sec, so you may think it how will the miner hit the target if nonce get exhausted. But here's timestamp plays an important role for the miners to hit the target. how ? the time in timestamp's changes every sec, and if 1 sec is over and miner has not hit the target so in another seconds of time their is a chance to hit a target, because when the timestamp's time changes a new hash is generated miner gets an another chance to get the correct nonce value to hit the target. nonce will never exhaust completely because timestamps changes every seconds and due to avalanche effect for SHA256 new hash will generate and miner can exhaust nonce again from 0. nonce will never reach 4 Billion in 40sec because in every one sec our timestamp is changing. nonce sometime can be used more or lesser depending upon the machine the miner is using.

current hashing rate is equal to 280 million trillion hashes/sec.