Author

Topic: Calculating amount of time to find a block (Read 1960 times)

sr. member
Activity: 277
Merit: 250
legendary
Activity: 4242
Merit: 8515
'The right to privacy matters'
November 23, 2014, 11:30:26 PM
#9
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 Smiley 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
sr. member
Activity: 277
Merit: 250
November 14, 2014, 08:10:51 PM
#8
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 Smiley My mistake was that I was calculating in gh/s, not h/s. It's now fixed: http://jsfiddle.net/a6a3ca0f/11/
legendary
Activity: 4242
Merit: 8515
'The right to privacy matters'
November 14, 2014, 01:38:34 PM
#7
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
legendary
Activity: 1344
Merit: 1024
Mine at Jonny's Pool
November 14, 2014, 01:32:00 PM
#6
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.
sr. member
Activity: 277
Merit: 250
November 14, 2014, 01:15:56 PM
#5
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/
legendary
Activity: 1344
Merit: 1024
Mine at Jonny's Pool
November 14, 2014, 12:29:31 PM
#4
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...
sr. member
Activity: 277
Merit: 250
November 14, 2014, 12:02:11 PM
#3
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/
member
Activity: 84
Merit: 10
Bored with you morons.
November 14, 2014, 06:45:25 AM
#2
What is the unit for the userHashrate supposed to be? As in, should it be defined as MH/s, GH/s, etc.
sr. member
Activity: 277
Merit: 250
November 12, 2014, 08:27:23 PM
#1
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
Jump to: