I'm sorry if that has been posted before here, but I'm trying to wrap my head around the difficulty target and its leading zeros and what that has to do with the output. I'm trying to get some clarification on how mining a new block works.
From what I understand, to create a new block a miner will take the previous blocks hash along with the version, timestamp, merkle root, difficulty target and nonce.
The difficulty target is adjusted after every 2016 blocks (which is about every 2 weeks if all goes well) and is a 256 bit number that has a certain number of leading zeros depending on how many nodes there are and how difficult the target should be, because each zero represents a double or half of difficulty, and the nonce is the amount of times the miner tried to hash. (correct?)
Now the part that I'm trying to understand is that I've heard the resulting hash has to be LESS than the difficulty number. I don't quite seem to get that. So, does that mean after a miner puts all 6 of those inputs from the block header into the SHA256 function, and if the output luckily becomes less than the difficulty of leading zeros, then that is the winning output? How do we know if it is less than the difficulty target? Just by one digit will make it so?
Sorry for the long post, I've been spending too much of my time trying to research this when I should be concentrating on other things lol
[link] [comments]
No comments:
Post a Comment