All miners at any time must have a consensus on the "difficulty target" to be able to achieve the correct nonce (as answer of proof-of-work).
Assume that the target has been updated (it means that 2016 blocks has been discovered) now, the question is "who" calculates this new target such that every miner achieves the same target that is needed to solve proof-of-work of the next block?
Is it true that it's not possible for an attacker to manipulate the target value to trick the other miners such that they achieve a wrong nonce for proof-of-work?
In other words, how can every miner know that the target value has been changed?
--> Is it by the block header of the last block in the Blockchain?
If so, is this approach accountable to achieve a unique target?
Assume 2016 blocks have been discovered and the target must be updated using the following equation:
time = (difficulty x 2^32) / hashing power of the network
Is it right? It's unclear to me how to determine the value for hashing power of the network.
P.S. Assume also an adversary solves the proof-of-work and then generates a new block but forges the block's times-stamp to trick the network at the time of updating target. Since the target will be updated using the blocks' time-stamp.