Author

Topic: Randomness of hash and a few other Q (Read 927 times)

newbie
Activity: 22
Merit: 0
December 19, 2012, 04:34:48 PM
#4
Thanks, that's really clear and good answers.
donator
Activity: 1218
Merit: 1079
Gerald Davis
December 19, 2012, 04:16:28 PM
#3
As grau pointed out it isn't the number of zeros that matter but the exact target.

For any difficulty the target value can be computed.  They have an inverse relationship.  As difficulty rises the target gets smaller (lower %of hashes will be below the target hence it is "harder" to find a valid hash).

Right now.

The current difficulty is 3370181.7992778
The current target is 00000000000004FA620000000000000000000000000000000000000000000000

So for example a hash beginning with 00000000000005 would be invalid as would a hash beginning with 00000000000004FA63 however a hash beginning with 00000000000003 would be valid despite all three hashes having the same number of zeros.

You example hash is valid because it is smaller than the target
Code:
000000000000039ce32a9b18b1c676f14658ee02ae15dd5791f8604ae2d31968 <- block hash
00000000000004FA620000000000000000000000000000000000000000000000 <- target (for difficulty 3370181.7992778)

The target for difficulty 1 is:
Code:
00000000FFFF0000000000000000000000000000000000000000000000000000

The smallest hash is:
Code:
0000000000000000000000000000000000000000000000000000000000000000

The largest hash is:
Code:
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

Relationship between difficulty, number of hashes to solve a block, and the target.
You will notice in the range of 0000... to FFFF .... roughly 1 in 2^32 hashes will be below the difficulty 1 target.  It requires roughly 2^32 hashes to find one which is valid at difficulty 1.   Current difficulty is 3370181.7992778 the current target is 3,370,181x smaller than the difficulty 1 target.  On average it will require (2^32) * (3370181.7992778) hashes to find one smaller than the current target.


hero member
Activity: 836
Merit: 1030
bits of proof
December 19, 2012, 03:55:17 PM
#2
It is not the number of 0 that is set as target but a number that the result must be less than. This allows lower granularity of adjustment.

The merkle root is simplified a checksum of the block content that is included into the data the hash has to be found upon, therefore it serves as a proxy for the block content. it has other neat properties too, but this should answer your question.
newbie
Activity: 22
Merit: 0
December 19, 2012, 03:50:18 PM
#1
I read something like the following, and I'm wondering if it's correct:

When mining, the hash is not known beforehand, but some kind of product is known. I think the product is the number of 0's before the rest of the hash string. So for example this hash:
http://blockchain.info/block/000000000000039ce32a9b18b1c676f14658ee02ae15dd5791f8604ae2d31968
will only be valid when it has 13 0's before the rest of the string.
This means that except from all the 0's in the beginning, there is no known method for predicting the content of the rest of the string before it's been generated.

Thanks for any feedback.

By the way, what is the function of the Merkle Root?

And another: It seems that going from 13 to 14 0's in the beginning of the hash is a quite large adjustment; about 8%. How can the network adjust difficulty just a few percent up and down?

Thanks again.
Jump to: