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: 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 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: Hashrate as in gh/s? Because the number of days to mine a block seems wayyyy too big... http://jsfiddle.net/a6a3ca0f/10/Code: Network Difficulty * 2^32 / hashrate = time in seconds to find a block 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: Hashrate as in gh/s? Because the number of days to mine a block seems wayyyy too big... http://jsfiddle.net/a6a3ca0f/10/Code: Network Difficulty * 2^32 / hashrate = time in seconds to find a block 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 You use the same formula to calculate expected earnings per day... Code: 25 / 1968.7 = 0.01269874 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: Hashrate as in gh/s? Because the number of days to mine a block seems wayyyy too big... http://jsfiddle.net/a6a3ca0f/10/Code: Network Difficulty * 2^32 / hashrate = time in seconds to find a block 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 You use the same formula to calculate expected earnings per day... Code: 25 / 1968.7 = 0.01269874 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: Hashrate as in gh/s? Because the number of days to mine a block seems wayyyy too big... http://jsfiddle.net/a6a3ca0f/10/Code: Network Difficulty * 2^32 / hashrate = time in seconds to find a block 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 You use the same formula to calculate expected earnings per day... Code: 25 / 1968.7 = 0.01269874 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/ |