Bitcoin Forum
November 07, 2024, 01:36:13 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Calculating amount of time to find a block  (Read 1973 times)
busterroni (OP)
Sr. Member
****
Offline Offline

Activity: 277
Merit: 250


View Profile
November 13, 2014, 12:27:23 AM
Last edit: November 13, 2014, 12:37:51 AM by busterroni
 #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
AJinNYC
Member
**
Offline Offline

Activity: 84
Merit: 10

Bored with you morons.


View Profile
November 14, 2014, 10: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.

Done with this forum. Goodbye all.
busterroni (OP)
Sr. Member
****
Offline Offline

Activity: 277
Merit: 250


View Profile
November 14, 2014, 04: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/
jonnybravo0311
Legendary
*
Offline Offline

Activity: 1344
Merit: 1024


Mine at Jonny's Pool


View Profile WWW
November 14, 2014, 04: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...

Jonny's Pool - Mine with us and help us grow!  Support a pool that supports Bitcoin, not a hardware manufacturer's pockets!  No SPV cheats.  No empty blocks.
busterroni (OP)
Sr. Member
****
Offline Offline

Activity: 277
Merit: 250


View Profile
November 14, 2014, 05: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/
jonnybravo0311
Legendary
*
Offline Offline

Activity: 1344
Merit: 1024


Mine at Jonny's Pool


View Profile WWW
November 14, 2014, 05: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.

Jonny's Pool - Mine with us and help us grow!  Support a pool that supports Bitcoin, not a hardware manufacturer's pockets!  No SPV cheats.  No empty blocks.
philipma1957
Legendary
*
Online Online

Activity: 4298
Merit: 8799


'The right to privacy matters'


View Profile WWW
November 14, 2014, 05: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

▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
.
 MΞTAWIN  THE FIRST WEB3 CASINO   
.
.. PLAY NOW ..
busterroni (OP)
Sr. Member
****
Offline Offline

Activity: 277
Merit: 250


View Profile
November 15, 2014, 12:10:51 AM
 #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/
philipma1957
Legendary
*
Online Online

Activity: 4298
Merit: 8799


'The right to privacy matters'


View Profile WWW
November 24, 2014, 03:30:26 AM
 #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

▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
.
 MΞTAWIN  THE FIRST WEB3 CASINO   
.
.. PLAY NOW ..
busterroni (OP)
Sr. Member
****
Offline Offline

Activity: 277
Merit: 250


View Profile
November 24, 2014, 01:55:23 PM
 #10

will try it on monday
Use this version: http://jsfiddle.net/a6a3ca0f/15/
Pages: [1]
  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!