0
A full node has the capability to verify every block starting from the genesis block up until the last block. It does this by hashing the block header and checking if the hash recorded in the block is same as the computed hash. Except, the difficulty is not fixed and the number of leading 0s needed are different in different blocks. How does the validating node know that the nth block required k 0s at the beginning of the hash?
eg: An attacker can build an entire blockchain with initial blocks having only 2 or 3 0s which would be easy to compute. The blocks would be valid as the computed hash will match the recorded hash.
But shouldn't also the actual hash rate of the whole network be involved in the calculation? I mean the whole purpose of the target adjustments is to keep the avg. intervals between blocks constant. Or can this also be inferred from the blocks itself? Perhaps from the timestamps from those 2016 previous founded blocks (?) – Jiri Kremser – 2017-12-26T21:42:54.627
The hashrate is indirectly involved by the previous difficulty and the time it took to mine the 2016 blocks. Because the blocks include a timestamp, the actual hashrate at that time is both unnecessary and unknown. – Andrew Chow – 2017-12-26T21:55:31.473