Bitcoin Forum
November 16, 2024, 12:36:05 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: variance in block times --- std deviation  (Read 1843 times)
Cryddit
Legendary
*
Offline Offline

Activity: 924
Merit: 1132


View Profile
April 27, 2015, 09:46:13 PM
 #21

It isn't about a particular number of leading zero's, it's about getting under a particular target value.  

Satoshi's code from 2008 had an 'nBits' variable which gave a leading number of zeros that the hash had to be under; that would allow only doubling or halving.  But by the time it deployed, he had changed it to the current scheme to allow finer-grained adjustments.  I think the revision was Hal Finney's idea.  

The target value these days is encoded in 32 bits: a 24-bit integer raised to an 8-bit power of 2, which is then converted to a 256-bit integer - the set of values is the same as a 24-bit integer unsigned integer times 2 raised to some power up to 212.  

Short version of the story, the difficulty target goes up or down with a granularity of 1 part in ~8 million, so it's pretty sensitive in terms of adjustability.
tspacepilot (OP)
Legendary
*
Offline Offline

Activity: 1456
Merit: 1081


I may write code in exchange for bitcoins.


View Profile
April 28, 2015, 03:06:18 AM
 #22

- snip -
I think I understand your question as "how can they always target 10, since adding or removing a requirement for a zero moves the difficulty target exponentially".  I would also like to know the answer to this,
- snip -

We don't just add or remove a zero.

Adding or removing a zero was an example in a concept document about how a difficulty could be adjusted.  It does not describe how the difficulty adjustment was actually implemented once the software was written.

Instead, the difficulty target is simply a 256 bit number.  Any hash value that is less than the target is valid regardless of how many zeros there are.

Now in practice, a number that is less than the target will never have LESS leading zeros than the target has, but it might have the exact same number of zeros if the rest of the hash is less than the target difficulty.

I think that pretty much explains it.  Thanks Danny Hamilton!
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!