# Restarting mining on new transaction

I understood that when a new transaction comes in, the miners have to start over, or at least change their merkle-tree to include the new transaction, essentially starting from scratch again.

If I look a the real-time transactions on https://blockchain.info/, how could miners ever make a block when there is never a break?

Unless you define a break as a few microseconds, and since every second you can calculate I believe billions of possible hashes, I still find it hard to grasp how a new block gets "chosen" or verified in human understandable terms.

• Every new hash has equal probability of success, regardless of whether it's the first hash tried on a given block or whether there have been millions before. "Restarting" isn't a meaningful concept; you're effectively "restarting" billions of times a second anyway, so practically nothing is lost by updating the header with the new transaction. – Nate Eldredge Sep 8 '16 at 15:25
• @NateEldredge Let's say you've tried a 1000 nonces without finding a block, so you know those 1000 nonces aren't it, at least for the current block. But if anything changes (ie the hash), then it has to start over in the sense that you don't have a 1000 known wrong nonces, but 0. But I think I understand your point that probability-wise there is not much of a difference. – BlockChange Sep 9 '16 at 11:46
• Nope. I am saying there is zero difference. Knowing 1000 nonces that don't work is useless information; it has absolutely no bearing on the probability of the next nonce working. Note there is no guarantee that any nonce works at all; you could have tried all but one of the 2^32 possible nonces for a block, and the probability of the last one working is still the same as for the first one you tried: 1 in (difficulty * 2^32). (Indeed, for any given block, it's extremely unlikely that any of the 2^32 possible nonce values work.) – Nate Eldredge Sep 9 '16 at 11:54
• Consider the following thought experiment. I have a red die with a billion sides. I roll it and ask you to guess the number. If you're right, you win. If not, I roll again and ask you guess the new number. Since we re-roll every time, having 1000 incorrect guesses doesn't help or hurt your chances on the next roll. And if after 1000 plays, I throw away the red die and start using a billion-sided green die, you haven't lost any "progress". – Nate Eldredge Sep 9 '16 at 11:56
• If the nonce range is let's say 1-1000000 (I think there's an upper limit in bitcoin?) then you probability increases, per probability, if you know what I mean. I understand that it's possible that no nonce works at all, but then you are getting closer to using an extraNonce, or perhaps the difficulty decreasing? – BlockChange Sep 9 '16 at 11:57