Author

Topic: How the difficulty is adjusted in this situation ? (Read 1301 times)

legendary
Activity: 3472
Merit: 4801
As I understand, the more number of zeroes are required in a block hash, the more it is difficult to find.

That's not exactly how it works, but it's a good introduction.  In actuality, the "difficulty" is simply a target number.  Any number less than the target is considered "lower than the difficulty" regarless of the number of zeroes.

Now suppose, the target is to find a hash with more than 8 zeroes in the left, but the found hash hash 20 zeroes in left.

With a number that has a fixed number of digits, more zeros on the left means it has to be a smaller number.  So, 20 zeroes on the left obviously means that the found has is low enough.

Does it mean that the next hash has to have more than 20 zeroes in left?

No.  The next has has to have more than 8 zeroes on the left.  That's what you just said the difficulty is "more than 8 zeroes in the left".  It won't need more than that unless the difficulty increases in the future.

How network will adjust this sudden difficulty spike ?

This is not a difficulty spike.  There is no adjustment necessary.  Difficulty is only changed if the total time for the last 2016 blocks is more (or less) than 20160 minutes.  If it is more than 20160 minutes, then blocks are too slow and the difficulty is decreased.  If it is less than 20160 minutes, then blocks are too fast and the difficulty is increased.

Please let me know if I'm having any conceptual mistake here...

You are having a conceptual mistake here.
sr. member
Activity: 475
Merit: 252
As I understand, the more number of zeroes are required in a block hash, the more it is difficult to find. Now suppose, the target is to find a hash with more than 8 zeroes in the left, but the found hash hash 20 zeroes in left. Does it mean that the next hash has to have more than 20 zeroes in left ? How network will adjust this sudden difficulty spike ?

Please let me know if I'm having any conceptual mistake here...

no
any better hash works. difficutly only adjusts after 2 weeks in blocktime and only takes the time-diff between blocks into account: not the value of the found hash itself

I know the standard definition of difficulty. That was not my Q.

Zeroes required in a hash to be accepted as valid is set by the network. And finding hashes with less number of zeroes by changing nonce is called hashing. That is the difficult thing for a miner. More the zeroes, more difficult it is. Is not it ? This is what I have meant by difficulty here. NOT the standard definition.

onemorebtc is correct. His answer DOES answer your question.

You are fundamentally misunderstanding how difficulty is calculated. You are asking if "the next hash has to have more than 20 zeroes in left?" (sic) and the answer is "no".

The bitcoin network does not care HOW RIGHT you are, it just cares if you're RIGHT or WRONG.
If you meet the requirement, you are RIGHT.
If you DON'T meet the requirement you are WRONG.

You are not MORE WRONG if you have less zeroes, and you are not MORE RIGHT for having more zeroes than needed. It's just a 1/0, right/wrong, yes/no type problem.

So every single block for 2 weeks could have 55 zeroes, but the Bitcoin network would not care. If they were slow to confirm, the difficulty will go DOWN, not up. If they were fast to confirm, the difficulty will go UP.
sr. member
Activity: 362
Merit: 262
As I understand, the more number of zeroes are required in a block hash, the more it is difficult to find. Now suppose, the target is to find a hash with more than 8 zeroes in the left, but the found hash hash 20 zeroes in left. Does it mean that the next hash has to have more than 20 zeroes in left ? How network will adjust this sudden difficulty spike ?

Please let me know if I'm having any conceptual mistake here...

Difficulty on adjusts every 2016 blocks.  If a block hash is a lot more zeroes than needed it has no impact on difficulty or the network.
legendary
Activity: 4214
Merit: 1313
As I understand, the more number of zeroes are required in a block hash, the more it is difficult to find. Now suppose, the target is to find a hash with more than 8 zeroes in the left, but the found hash hash 20 zeroes in left. Does it mean that the next hash has to have more than 20 zeroes in left ? How network will adjust this sudden difficulty spike ?

Please let me know if I'm having any conceptual mistake here...

no
any better hash works. difficutly only adjusts after 2 weeks in blocktime and only takes the time-diff between blocks into account: not the value of the found hash itself

I know the standard definition of difficulty. That was not my Q.

Zeroes required in a hash to be accepted as valid is set by the network. And finding hashes with less number of zeroes by changing nonce is called hashing. That is the difficult thing for a miner. More the zeroes, more difficult it is. Is not it ? This is what I have meant by difficulty here. NOT the standard definition.

His answer to your question was correct.  The 20 zeroes does not change the difficulty at all.  Anything less than 8 zeroes is acceptable in your example, and that continues until the next difficulty adjustment.

sr. member
Activity: 311
Merit: 264
As I understand, the more number of zeroes are required in a block hash, the more it is difficult to find. Now suppose, the target is to find a hash with more than 8 zeroes in the left, but the found hash hash 20 zeroes in left. Does it mean that the next hash has to have more than 20 zeroes in left ? How network will adjust this sudden difficulty spike ?

Please let me know if I'm having any conceptual mistake here...

no
any better hash works. difficutly only adjusts after 2 weeks in blocktime and only takes the time-diff between blocks into account: not the value of the found hash itself

I know the standard definition of difficulty. That was not my Q.

Zeroes required in a hash to be accepted as valid is set by the network. And finding hashes with less number of zeroes by changing nonce is called hashing. That is the difficult thing for a miner. More the zeroes, more difficult it is. Is not it ? This is what I have meant by difficulty here. NOT the standard definition.
sr. member
Activity: 266
Merit: 250
As I understand, the more number of zeroes are required in a block hash, the more it is difficult to find. Now suppose, the target is to find a hash with more than 8 zeroes in the left, but the found hash hash 20 zeroes in left. Does it mean that the next hash has to have more than 20 zeroes in left ? How network will adjust this sudden difficulty spike ?

Please let me know if I'm having any conceptual mistake here...

no
any better hash works. difficutly only adjusts after 2 weeks in blocktime and only takes the time-diff between blocks into account: not the value of the found hash itself
sr. member
Activity: 311
Merit: 264
As I understand, the more number of zeroes are required in a block hash, the more it is difficult to find. Now suppose, the target is to find a hash with more than 8 zeroes in the left, but the found hash hash 20 zeroes in left. Does it mean that the next hash has to have more than 20 zeroes in left ? How network will adjust this sudden difficulty spike ?

Please let me know if I'm having any conceptual mistake here...
Jump to: