3 ms·
> but got changed to a less-than check for performance reasons. Performance as in "it takes less time to verify the PoW," or something else? Because the "leadi
by nemo1618 6y ago
> but got changed to a less-than check for performance reasons.
Performance as in "it takes less time to verify the PoW," or something else? Because the "leading zeros" and "less than target" approaches would both take a negligible amount of time.
- Jasper_ 6y agoThe story I was told from Bitcoin developers was that it was done for code performance reasons. However, since the less-than check goes back all the way to the code's "Initial commit" [0], I'm not sure if that's fully accurate -- it might have been based on correspondence from the original author. At the very least, the misconception comes from Bitcoin's own whitepaper. [0] https://github.com/bitcoin/bitcoin/blob/e071a3f6c06f41068ad17134189a4ac3073ef76b/main.cpp#L1179-L1181 https://github.com/bitcoin/bitcoin/blob/e071a3f6c06f41068ad1...
- nemo1618 6y agoWeird. That doesn't make any sense to me. btw, the whitepaper probably used "number of leading zeros" because that's what Hashcash does.
- monokh 6y agoThe article mentions the hash is required to begin with a certain number of 0s in hex digits (half byte) whereas the Bitcoin whitepaper refers to it as number of bits. I'm unsure about the comparison (== or >) but the whitepaper seems accurate with regards to the target.