Bitcoin Forum

Bitcoin => Mining => Topic started by: shadyyaser on August 19, 2015, 03:31:37 AM



Title: mining hardware can find new block in seconds , then why they take days ?!!
Post by: shadyyaser on August 19, 2015, 03:31:37 AM
Finding new block in the mining process is based on changing the nonce value then hashing , and repeating this until reaching a hash whose value is equal to or lower than the target . The nonce is 32 bit long , which means that all possible changes that can be made to the nonce value is 2^32 -1 , then the maximum number of hashes that needed to be made by a mining hardware until reaching the desired hash is 2^32 -1 = 4294967295 (approximately 4 billion hashes) . This number of hashes can be made in one second by ASIC whose hash rate is 4 Ghash/s (4 billion hashes per second ), and can even be done in millisecond by ASIC whose hash rate is 4 Thash/s .
All of this is the mathematical calculation , but in practical it takes days for 4 Ghash/s ASIC or 4 Thash/s ASIC to find one block !!
So why is this huge difference between the mathematical calculation and the practical thing ?!! is there something that I don't understand well ?


Title: Re: mining hardware can find new block in seconds , then why they take days ?!!
Post by: trendax on August 19, 2015, 10:35:50 AM
I think someone should check my work but 2^32 * difficulty = hashes to find a block on average


Title: Re: mining hardware can find new block in seconds , then why they take days ?!!
Post by: TheRealSteve on August 19, 2015, 11:02:26 AM
Yep.

See: https://en.bitcoin.it/wiki/Difficulty#How_soon_might_I_expect_to_generate_a_block.3F


Title: Re: mining hardware can find new block in seconds , then why they take days ?!!
Post by: jonnybravo0311 on August 19, 2015, 12:58:10 PM
I think someone should check my work but 2^32 * difficulty = hashes to find a block on average

Close enough for government work.  The actual formula for calculating expected time to solve a block is:
Code:
2^256 / (((2^224 - 2^208) / difficulty) * hashrate) = expected time in seconds to find a block

@shadyyaser you're forgetting about the target difficulty in your stats.  Use my formula, plug in the network difficulty and a hash rate, and you'll see that it's considerably different than what you're thinking.