1

This question already has an answer here:

AFAIK to create the next block, there must be a specific structure (specific number of leading zeros) in the has output calculated on the block's header. This header contains a set of fixed parts (merkle tree, previous block's hash, ...) and two variable parts: nonce and timestamp.

Now, what if all combinations of timestamp and nonce do not result in the desired output to validate the block? (At least for a long duration, like a week).

marked as duplicate by Pieter Wuille, Murch Jul 7 '17 at 16:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

Not only can the nonce be varied, but also some information in the scriptSig of the coinbase transaction in the block, which would change the merkle root, so there should always be enough to find a hash within the target.

The difficulty of finding a block is recalculated every 2016 blocks to give an average time of 10 minutes between blocks. Because of the sheer amount of processing power going into the network, this is pretty reliable, its just not going to take an entire week. If blocks were taking longer than expected, the difficulty would reduce at the next retarget to compensate.

Not the answer you're looking for? Browse other questions tagged or ask your own question.