The difficulty is a function of block creation speed.
The goal is to, on average, create blocks every 10 mins.
It is recalculated every two weeks (link)
You can look up the calculation of difficulty in the open source code of Bitcoin
From my understanding, the difficulty of the network will still keep increasing when the "target" block is mined, regardless of the number of miners (yes?)
The difficulty readjusts every 2016 blocks, based on the average time taken to mine the previous 2016 blocks. If the average is less than 10 minutes, the difficulty goes up. If greater than 10 ...
Historically, block template generation has been very slow. It was faster to send an empty template with no transactions, then wait for the mining pool to create a block template with transactions, then send the result to the miners when it was ready (in the order of ten seconds occasionally). This is no longer the case in modern versions of bitcoin core.
I understand a hash function is only one way function. You have an Input which produces a unique hash. This means that if multiple different parties are hashing the same input then their hash results must be identical, right?
Multiple parties will never be hashing the same information. Either the parties are coordinating or they're not. If they're ...
At least X number of leading zeroes.
More leading zeroes are harder. Fewer is not hard enough! Note that any arbitrary list of digits would be equally hard. A list of all zeroes is just a convenient choice used by Bitcoin. Miners are finding a hash whose first n digits matches some arbitrary number. They do it by generating huge numbers of hashes (varying ...
What is this "time lag" ?
When a miner finds a block, they will broadcast it to the network. As with all real-world networks, there is a latency (“lag time”) for this information to be received by the other nodes in the network. Specifically, there will be some amount of latency between the miner that found the block, and other miners on the network. Even ...