Bitcoin Forum

Bitcoin => Mining => Topic started by: ranger on February 21, 2011, 07:34:07 PM



Title: Mining Probability Calculation and market predictions.
Post by: ranger on February 21, 2011, 07:34:07 PM
Hi guys, I'm new here. I just started mining with HD6870 using the OpenCL miner. I'm doing about 210Mhash/sec, which according to the probability calculator (http://www.alloscomp.com/bitcoin/calculator.php) means that on average I should generate a block about every 8 days.

Instead, I have generated 3 blocks in about 4 days. This can mean two things: 1. I'm extremely lucky, or 2. the rate calculator is not quite right.

This discovery has got me thinking, if Bitcoins can be generated this quickly by just a single PC, doesn't that make the bitcoin market very unstable and likely to collapse? The more people learn about bitcoins, the more will be generated. Supply will increase, the value will go down. I'm talking about the bitcoin/USD exchange rate here, which seems rather volatile. I've read a lot of posts here on the forum by people who support bitcoin with all their heart (as do I!), who are predicting the exchange rate to soar the coming year. That seems rather impossible to me, considering how fast the coins are going to be generated from now on. I realize the system balances itself by increasing the difficulty factor, but the next devaluation is still 90000 blocks away, and who knows what that will do to the market.

Any thoughts?


Title: Re: Mining Probability Calculation and market predictions.
Post by: theGECK on February 21, 2011, 07:36:08 PM
I seem to remember that the difficulty adjusts every 2016 blocks, not ever 90k+ blocks. The frequent adjustments of the difficulty should be enough to stop what you are saying could happen.


Title: Re: Mining Probability Calculation and market predictions.
Post by: ribuck on February 21, 2011, 07:38:11 PM
You were just lucky with your generated blocks. Generations are highly variable. When you have a long dry spell without a block (which you will), just look back and remember that there were good times too.

As theGECK said, the generation difficulty factor adjusts every 2016 blocks (every couple of weeks). The adjustment in 90,000 blocks will be to the payout rate, from 50 to 25 BTC per block, which is a tapering-off so that generation of new coins will eventually stop.


Title: Re: Mining Probability Calculation and market predictions.
Post by: ranger on February 21, 2011, 07:42:26 PM
Since we're on the topic, another question: how is the difficulty level managed? Is it just coded into the clients so they know to increase the difficulty level by themselves? What if a client doesn't increase their difficulty and calculates an easy block instead? Will the network reject it?

Also, I'm wondering just how lucky I was, since that's basically 3 blocks after another being generated in less than average time. If the chance of finding a block with my calculation rate in 2days were 10%, then the chance of finding 3 blocks this quickly would be less than 0.1%. Quite strange if you ask me.


Title: Re: Mining Probability Calculation and market predictions.
Post by: N12 on February 21, 2011, 07:45:43 PM
Since we're on the topic, another question: how is the difficulty level managed? Is it just coded into the clients so they know to increase the difficulty level by themselves? What if a client doesn't increase their difficulty and calculates an easy block instead? Will the network reject it?
The difficulty is determined by the network by analyzing how long it took to generate 2016 blocks. The ideal is 14 days, so if it takes shorter than this, and it usually does (http://nullvoid.org/bitcoin/difficultiez.php), the difficulty will rise accordingly.


Title: Re: Mining Probability Calculation and market predictions.
Post by: ribuck on February 21, 2011, 07:48:51 PM
the chance of finding 3 blocks this quickly would be less than 0.1%
If there are a thousand people generating, someone's likely to have a 0.1% experience. This was your turn. Don't worry, you're unlikely to find the next three so quickly.


Title: Re: Mining Probability Calculation and market predictions.
Post by: jgarzik on February 21, 2011, 07:49:27 PM
Hi guys, I'm new here. I just started mining with HD6870 using the OpenCL miner. I'm doing about 210Mhash/sec, which according to the probability calculator (http://www.alloscomp.com/bitcoin/calculator.php) means that on average I should generate a block about every 8 days.

Instead, I have generated 3 blocks in about 4 days. This can mean two things: 1. I'm extremely lucky, or 2. the rate calculator is not quite right.

You were lucky.  In 3-4 days, my 1000 Mhash/sec generated no blocks.

It's a lottery.

Over time you should see the statistical average, but right now your sample size is tiny.


Title: Re: Mining Probability Calculation and market predictions.
Post by: Raulo on February 21, 2011, 07:49:50 PM
Also, I'm wondering just how lucky I was, since that's basically 3 blocks after another being generated in less than average time. If the chance of finding a block with my calculation rate in 2days were 10%, then the chance of finding 3 blocks this quickly would be less than 0.1%. Quite strange if you ask me.

You were lucky but not that lucky. The probability is described by Poisson distribution. The probability of getting at least 3 blocks when only 0.5 were expected on average is 1.4%
http://stattrek.com/Tables/Poisson.aspx



Title: Re: Mining Probability Calculation and market predictions.
Post by: ranger on February 21, 2011, 08:45:25 PM
That's pretty interesting. So I'm less lucky than I thought, and the calculation was correct. That's good news then, since it's not entirely unlikely for me to expect a similar result in the future ;)

I tried to summarize what I know about bitcoins and bitcoin mining on my blog. Would welcome some feedback: http://rheide.wordpress.com/2011/02/21/thoughts-on-bitcoin-mining/


Title: Re: Mining Probability Calculation and market predictions.
Post by: ribuck on February 21, 2011, 08:51:38 PM
Would welcome some feedback: http://rheide.wordpress.com/2011/02/21/thoughts-on-bitcoin-mining/
You wrote in the article that "eventually everyone will hit the jackpot". I think it's important not to raise people's expectations too high. Already, you need a GPU to have a reliable chance of generating blocks. And the difficulty is likely to keep rising. Many of those who are generating with a CPU will never generate a block.


Title: Re: Mining Probability Calculation and market predictions.
Post by: ranger on February 21, 2011, 11:49:08 PM
Would welcome some feedback: http://rheide.wordpress.com/2011/02/21/thoughts-on-bitcoin-mining/
You wrote in the article that "eventually everyone will hit the jackpot". I think it's important not to raise people's expectations too high. Already, you need a GPU to have a reliable chance of generating blocks. And the difficulty is likely to keep rising. Many of those who are generating with a CPU will never generate a block.

Thanks. I added a note about it.


Title: Re: Mining Probability Calculation and market predictions.
Post by: ranger on February 22, 2011, 12:03:03 AM
Also, one more question. The wiki here (https://en.bitcoin.it/wiki/Target) says that 'the network' decides the next target for each round. Who is 'the network'? Am I correct in understanding that each client analyzes the past block chain and then decides for itself what the next target will be? I feel there's still a gap in my understanding between the network acknowledging what constitutes a 'winning' hash and that hash actually being converted into tangible (well..) bitcoins.



Title: Re: Mining Probability Calculation and market predictions.
Post by: casascius on February 22, 2011, 04:58:02 AM
Also, one more question. The wiki here (https://en.bitcoin.it/wiki/Target) says that 'the network' decides the next target for each round. Who is 'the network'? Am I correct in understanding that each client analyzes the past block chain and then decides for itself what the next target will be? I feel there's still a gap in my understanding between the network acknowledging what constitutes a 'winning' hash and that hash actually being converted into tangible (well..) bitcoins.



Yes, that is exactly true, but only on certain block numbers where that is allowed - once every 2016 blocks.  If you are the miner that mines one of those blocks, your calculation of difficulty is the one that sticks.  It is saved in the block itself, and everybody uses it for the next 2016 blocks.

What converts the block into bitcoins is... each miner is constantly attempting to hash a block of all the most recent transactions, plus an acknowledgment of the latest block, plus a brand new transaction that gives 50 new btc to himself.  So every miner is trying to hash a different "version" of the most recent block...one that pays himself the reward.


Title: Re: Mining Probability Calculation and market predictions.
Post by: bitk on February 23, 2011, 09:12:44 PM
To me, the calculator looks off by a 10% factor or more.
It's expected value is higher of what I get on slush's pool, and since the pool is meant to get your throughput (almost) at the expected value, it's either something wrong with me and the pool, or an over optimistic calculator.
Also, I went mining for about 5 days, with an expected 3 days of payout, but I found nothing. But that sounded perfectly normal to my ears.


Title: Re: Mining Probability Calculation and market predictions.
Post by: casascius on February 23, 2011, 09:55:26 PM
To me, the calculator looks off by a 10% factor or more.
It's expected value is higher of what I get on slush's pool, and since the pool is meant to get your throughput (almost) at the expected value, it's either something wrong with me and the pool, or an over optimistic calculator.
Also, I went mining for about 5 days, with an expected 3 days of payout, but I found nothing. But that sounded perfectly normal to my ears.

Slush keeps the 10% for himself


Title: Re: Mining Probability Calculation and market predictions.
Post by: gusti on February 23, 2011, 09:57:20 PM
To me, the calculator looks off by a 10% factor or more.
It's expected value is higher of what I get on slush's pool, and since the pool is meant to get your throughput (almost) at the expected value, it's either something wrong with me and the pool, or an over optimistic calculator.
Also, I went mining for about 5 days, with an expected 3 days of payout, but I found nothing. But that sounded perfectly normal to my ears.

Slush keeps the 10% for himself

You mean he keeps more than the advised 2% ?


Title: Re: Mining Probability Calculation and market predictions.
Post by: Raulo on February 23, 2011, 10:05:26 PM
Slush keeps the 10% for himself

You mean he keeps more than the advised 2% ?


No, it means caucasius is not aware variability can be that high.

Slush's pool has some daily variability. Bad day for the pool, and your mining income can be 20% lower.


Title: Re: Mining Probability Calculation and market predictions.
Post by: slush on February 23, 2011, 10:06:29 PM
It's expected value is higher of what I get on slush's pool, and since the pool is meant to get your throughput (almost) at the expected value, it's either something wrong with me and the pool, or an over optimistic calculator.
Also, I went mining for about 5 days, with an expected 3 days of payout, but I found nothing. But that sounded perfectly normal to my ears.

1) My pool keeps 2%, not 10%
2) Mining is still probabilistic, even in the pool. Even pool have bad or good days.
3) There were some outages, because keep getwork based pool up is quite difficult. This also cut the daily reward
4) I don't know your hashrate, but score based system makes pool mining more probabilistic than share based. If you have poor hashrate, you still might be more unlucky.



Title: Re: Mining Probability Calculation and market predictions.
Post by: Nefario on February 24, 2011, 02:47:21 AM
the chance of finding 3 blocks this quickly would be less than 0.1%
If there are a thousand people generating, someone's likely to have a 0.1% experience. This was your turn. Don't worry, you're unlikely to find the next three so quickly.

If you play the lottery I am sure your chance of winning is much worse than 0.1% but people still win.


Title: Re: Mining Probability Calculation and market predictions.
Post by: ranger on February 24, 2011, 10:44:16 AM
Being confronted with not finding any coins for days, I can't help but think about reasons why I haven't found them. I keep thinking that perhaps if I restart the client more often, or restart my PC, or erase my entire Bitcoin folder and start from scratch, that I'll find as much coins as I did in the beginning.

I know that all of that does not make any sense based on the things I know about bitcoins. The system simply doesn't (shouldn't?) work that way, technically. But has anyone actually tried this? I wonder if people have their own 'good luck charms' - eg. actions that you perform that makes you think that you'll find bitcoins faster. Thoughts?


Title: Re: Mining Probability Calculation and market predictions.
Post by: ribuck on February 24, 2011, 11:45:15 AM
If you know the proverb "A watched pot never boils", it also applies to Bitcoin generation.

Don't go checking for generated blocks. Then, occasionally, when you least expect it you will be delightfully surprised to see a new block maturing.


Title: Re: Mining Probability Calculation and market predictions.
Post by: Grinder on February 24, 2011, 11:46:08 AM
It's like they say in poker, superstition means bad luck. It causes you to make bad decisions, which lowers your chance of winning. The time you spend doing these things wastes cycles, and that lowers your chance of solving a block.


Title: Re: Mining Probability Calculation and market predictions.
Post by: casascius on February 24, 2011, 01:47:47 PM
If you know the proverb "A watched pot never boils", it also applies to Bitcoin generation.

Don't go checking for generated blocks. Then, occasionally, when you least expect it you will be delightfully surprised to see a new block maturing.

The following thought has crossed my mind:  "Maybe the SHA256 algorithm isn't as truly random as is thought, and there is some sort of bias against results with so many zeroes in the beginning, and the total hash power on the network is greater than estimated, and mine is therefore a smaller proportion than I thought".

Not that I seriously suspect this to be the case...


Title: Re: Mining Probability Calculation and market predictions.
Post by: Raulo on February 24, 2011, 02:19:27 PM
The following thought has crossed my mind:  "Maybe the SHA256 algorithm isn't as truly random as is thought, and there is some sort of bias against results with so many zeroes in the beginning, and the total hash power on the network is greater than estimated, and mine is therefore a smaller proportion than I thought".

Not that I seriously suspect this to be the case...

There is no known bias in sha256.

The problem is that you have to have tens of thousands of blocks found to be within 1% of theoretical value. Even after 100 blocks, there is 17% probablility of finding 10% less blocks than the average value. With 10000 blocks found, you have 16% of getting 99% of the theoretical value. Every time you double your theoretical blocks number, you have sqrt(2) less variance.

I run a modified miner that prints all hashes with difficulty one. And after collecting more than 200k of such results, it agrees with the printed hashrate to less than 0.2%. Imagine running this experiment with the current difficulty.


Title: Re: Mining Probability Calculation and market predictions.
Post by: Cryptoman on February 24, 2011, 03:46:15 PM
I've been following my mining results over the last month, and at any given point in time the actual blocks found has varied from a low of 70% to a high of 132% of expected return.  It's currently at 95%.  This is with 14 GPUs and CPUs and a lucky head start.  If you have fewer devices, you can expect the variance to be higher.


Title: Re: Mining Probability Calculation and market predictions.
Post by: caston on May 14, 2011, 02:22:59 PM
Are there things I can do to increase my probability of finding a block?


Title: Re: Mining Probability Calculation and market predictions.
Post by: dikidera on May 14, 2011, 07:12:16 PM
Unless you buy more cards, no.


Title: Re: Mining Probability Calculation and market predictions.
Post by: caston on May 14, 2011, 11:36:19 PM
But what affect does the quantity and quality of your connections have on probability?