3 ms·
Difficulty can't actually correspond to the number of leading zeros required in the hash, can it? Then there would only be 256 levels of difficulty, and the ave
by wallacoloo 9y ago
Difficulty can't actually correspond to the number of leading zeros required in the hash, can it? Then there would only be 256 levels of difficulty, and the average block time would have to double whenever difficulty increases. Yet I see this "leading zeros" explanation everywhere. So maybe it is the case, but if so, why was this way chosen rather than just requiring that the hash be less than some value, with that value being a function of difficulty? That would give you more granularity at very little additional complexity.
- Klathmon 9y agoThe "number of leading 0's" is just a gross oversimplification of the actual difficulty mechanism. It's a lot easier to explain, and it's somewhat correct (it's easy to look at the hash for a block and see that it has a bunch of zeros at the front) The reality is closer to what you say at the end there, it is calculated so that the resulting hash must be under a given value, and is pretty damn granular. Sadly many people trip over the idea of one hash being "less" than another, and it's just easier to go with the "number of zeros" explanation rather than spend time explaining how a hash just represents a bigass number. For example, the current difficulty as of this comment is 1873105475221.611
- wallacoloo 9y ago> many people trip over the idea of one hash being "less" than another, and it's just easier to go with the "number of zeros" explanation rather than spend time explaining how a hash just represents a bigass number. Aha! I knew there was a reason people prefer the leading zeros explanation. Thanks for pointing it out.