Bitcoin Forum

Bitcoin => Mining speculation => Topic started by: busterroni on November 13, 2014, 12:27:23 AM



Title: Calculating amount of time to find a block
Post by: busterroni on November 13, 2014, 12:27:23 AM
Hey everyone,

Here's an equation I developed that tells you how long it will take to find a block.

((100/((userHashrate/difficulty)*100))/144);

Explanation:
userHashrate/difficulty: chance the user finds a block
(userHashrate/difficulty)*100: converts the chance to a percentage (100>percentage>0)
100/((userHashrate/difficulty)*100): ...I forget what this does :/
((100/((userHashrate/difficulty)*100))/144): 144 blocks are found per day on average, this calculates how many days it'll take to find a block

Here's a working jsfiddle with the equation: http://jsfiddle.net/a6a3ca0f/6/. Click 'Run' in the top left to restart it.

The only possibly incorrect parts that I can think of are:

a) I forget why I divide it all by 100 in 100/((userHashrate/difficulty)*100). I'm pretty confident that it's correct to do so, but I can't remember what it does. I figured it out! It's how often you'll find a block (e.g. you will find one block every xx blocks mined).

b) Right now I divide the user's hashrate by the difficulty, not by the entire hashrate. Does this make it incorrect?

I'd appreciate feedback on these two problems and the equation in general.

Thanks,
busterroni


Title: Re: Calculating amount of time to find a block
Post by: AJinNYC on November 14, 2014, 10:45:25 AM
What is the unit for the userHashrate supposed to be? As in, should it be defined as MH/s, GH/s, etc.


Title: Re: Calculating amount of time to find a block
Post by: busterroni on November 14, 2014, 04:02:11 PM
What is the unit for the userHashrate supposed to be? As in, should it be defined as MH/s, GH/s, etc.
It's GH/s. I've also fixed it, I've changed it from difficulty to Blockchain.info's estimated total hashrate. I think at this point it's just a matter of whether or not the equation is correct, and I think it is. Here's an updated version: http://jsfiddle.net/a6a3ca0f/9/


Title: Re: Calculating amount of time to find a block
Post by: jonnybravo0311 on November 14, 2014, 04:29:31 PM
Expected time to find a block is:
Code:
Network Difficulty * 2^32 / hashrate = time in seconds to find a block
Not sure why you've done something different...


Title: Re: Calculating amount of time to find a block
Post by: busterroni on November 14, 2014, 05:15:56 PM
Expected time to find a block is:
Code:
Network Difficulty * 2^32 / hashrate = time in seconds to find a block
Not sure why you've done something different...
Hashrate as in gh/s? Because the number of days to mine a block seems wayyyy too big... http://jsfiddle.net/a6a3ca0f/10/


Title: Re: Calculating amount of time to find a block
Post by: jonnybravo0311 on November 14, 2014, 05:32:00 PM
Expected time to find a block is:
Code:
Network Difficulty * 2^32 / hashrate = time in seconds to find a block
Not sure why you've done something different...
Hashrate as in gh/s? Because the number of days to mine a block seems wayyyy too big... http://jsfiddle.net/a6a3ca0f/10/
Sorry... let me break it down for you:
Network Difficulty = current bitcoin network difficulty target (39603666252)
2^32 = difficulty 1 share
hashrate = hashes per second (1 GH/s would be 1000000000)

Example of how long it would take to find a block for somebody with 1TH/s:
Code:
39603666252 * 2^32 / 1000000000000 = 170096451.35
170096451.35 seconds = 1968.7 days = 5.39 years

You use the same formula to calculate expected earnings per day...
Code:
25 / 1968.7 = 0.01269874
You can expect your 1TH/s to earn 0.01269874BTC a day.


Title: Re: Calculating amount of time to find a block
Post by: philipma1957 on November 14, 2014, 05:38:34 PM
go to

https://bitcoinwisdom.com/bitcoin/difficulty

put in your hash amount  it gives you what that should earn in a day.  1th should earn .0127 btc


a block is 25 btc   divide it by  the .0127 you get  1968.5  not quite right due to rounding but easy to do.


so a s-3 at 450gh should earn .005714 a day or 4375.218 chance for a block today.

I am running 8 s-3's and 1 asicminer prisma or 4.7th this is .05968btc in a day or a 418.9 chance at a block today


Title: Re: Calculating amount of time to find a block
Post by: busterroni on November 15, 2014, 12:10:51 AM
Expected time to find a block is:
Code:
Network Difficulty * 2^32 / hashrate = time in seconds to find a block
Not sure why you've done something different...
Hashrate as in gh/s? Because the number of days to mine a block seems wayyyy too big... http://jsfiddle.net/a6a3ca0f/10/
Sorry... let me break it down for you:
Network Difficulty = current bitcoin network difficulty target (39603666252)
2^32 = difficulty 1 share
hashrate = hashes per second (1 GH/s would be 1000000000)

Example of how long it would take to find a block for somebody with 1TH/s:
Code:
39603666252 * 2^32 / 1000000000000 = 170096451.35
170096451.35 seconds = 1968.7 days = 5.39 years

You use the same formula to calculate expected earnings per day...
Code:
25 / 1968.7 = 0.01269874
You can expect your 1TH/s to earn 0.01269874BTC a day.
Ah, thanks :) My mistake was that I was calculating in gh/s, not h/s. It's now fixed: http://jsfiddle.net/a6a3ca0f/11/


Title: Re: Calculating amount of time to find a block
Post by: philipma1957 on November 24, 2014, 03:30:26 AM
Expected time to find a block is:
Code:
Network Difficulty * 2^32 / hashrate = time in seconds to find a block
Not sure why you've done something different...
Hashrate as in gh/s? Because the number of days to mine a block seems wayyyy too big... http://jsfiddle.net/a6a3ca0f/10/
Sorry... let me break it down for you:
Network Difficulty = current bitcoin network difficulty target (39603666252)
2^32 = difficulty 1 share
hashrate = hashes per second (1 GH/s would be 1000000000)

Example of how long it would take to find a block for somebody with 1TH/s:
Code:
39603666252 * 2^32 / 1000000000000 = 170096451.35
170096451.35 seconds = 1968.7 days = 5.39 years

You use the same formula to calculate expected earnings per day...
Code:
25 / 1968.7 = 0.01269874
You can expect your 1TH/s to earn 0.01269874BTC a day.
Ah, thanks :) My mistake was that I was calculating in gh/s, not h/s. It's now fixed: http://jsfiddle.net/a6a3ca0f/11/
will try it on monday


Title: Re: Calculating amount of time to find a block
Post by: busterroni on November 24, 2014, 01:55:23 PM
will try it on monday
Use this version: http://jsfiddle.net/a6a3ca0f/15/