Does mining a block mean that anyone else who was working on mining a block loses their progress and must restart?
Yes and no.
When a new block is created, everyone on the network must discard old work and use the new information provided (assuming they don't want to create forks). It does lead to some small performance loss.
On the other hand, creating a block is more or less like playing a lottery - there is no real "progress" per se, you are just trying more and more tickets until you win something. When a new block is created you don't have a situation of "10% left, I lost so much work", as there is no telling whether there actually IS a solution to the particular configuration of a block you were creating.
All in all, yes, everyone must start over when a new block is created, but they don't lose much (aside from some small performance drop due to stale shares).
So your odds of success don't increase as you try more numbers?– CasebashJun 13, 2012 at 23:55
1@Casebash The overall chance of success increases the more number you try, but the chance of finding a block per each try - does not. It's not like opening boxes and expecting to find a prize in one of them, where you know that having tried half of them already, the remaining half have a higher chance now, since there are less of them and there is still the same prize inside. It's like playing roulette - one spin does not affect the other. Jun 14, 2012 at 0:10
@ThePiachu Couldn't a client just "ignore his update" and "compete for a fork" ?– PacerierJun 17, 2012 at 21:05
@Pacerier It could, but in most cases they would lose. Even if they managed to create a fork soon after, the rest of the network would prefer the first mined block. In order to successfully force your fork, you'd have to not only catch up to the block that was mined, but mine another one on top of that before the entire network does the same with the other block. Unless you own a majority of the computational power of the entire network, you will most likely lose the race. Losing the race means you lose money. Jun 17, 2012 at 21:51
In effect, every time someone sends a new transaction to the network that the miner accepts it changes the block that the miner is trying to solve, since the new transaction gets added to the currently unsolved block and which changes the hash.
But since solving blocks is a Poisson process there is no "progress" towards finding a block and these changes don't cause miners to lose progress. Each hash you try either solves it or doesn't.
No, because there's no progress in mining blocks. If you've mined for 5 minutes and didn't find a block, you aren't any closer to finding it than when you started - the hazard function is constant.