Live data from Hacker News

Why Is It Taking 20 Minutes to Mine This Bitcoin Block?

r6.ca

91–100 of 128 posts

Re: Why Is It Taking 20 Minutes to Mine This Bitcoin Block?

#91

Earlier quoted context omitted.

Thanks. Why can't all math teachers talk like that? I mean... I know you're clever and all, but if you were really clever you'd explain it in a way that's easy to understand. Still, kudos to the OP. That was a great attempt to be precise.

That simple explanation is exactly wrong though! You don't expect to wait 2x the average. You expect to wait 1x the average, but you also expect that when you start waiting the previous block happened 1x the average time ago, and 1+1=2.

But you are waiting 2x the average, because the average waiting time should be half of the period.

Consider buses which arrive every ten minutes, exactly. You arrive at the bus stop at a random time. How long should you expect to wait? Not 10 min but 5 min, on average. You are equally likely to arrive at any point during the 10 minutes wait.

Now change the buses to a Poisson process with mean rate 1 bus every 10 minutes. Now you arrive during an interval of average length 20 min, but wait on average 10 min.

Re: Why Is It Taking 20 Minutes to Mine This Bitcoin Block?

#92
post #84
post #29

TLDR: Since blocks that take a long time to mine fill up more wall-clock time, if you pick an arbitrary instant of wall clock time, you're more likely to be in a "slow" block than a fast block. Specifically, you expect to wait 2x the average.

That's not correct. That's the opposite of the correct reason. Consider a simple (not-exactly-Poisson) set of blocks: 20x1minute intervals, plus 1x10minute interval. The average interval size is (20x1min + 1x10min)/21 = ~1.4min A random moment in time is twice as likely to be in a fast blocks as in the slow blocks. But average wait time (given a uniformly random start times) is (20min 0.5min + 10min 10min)/30min = 11…

[deleted]

Re: Why Is It Taking 20 Minutes to Mine This Bitcoin Block?

#93

Bitcoin mining = "Guess a random number between 1 and 5" If the network guesses too fast due to more cumulative guesses per second, the target number increases. Interesting historical antidote, in early November of 2017 there was an event where it became more profitable to mine Bitcoin Cash. During that time about 60% of the miners left BTC Core in unison to focus on BTC Cash. Transactions for BTC Core started taking…

I never understood why the people behind Bitcoin Cash didn't "manually" lower the difficulty at the forking block. This would've been a strong incentive for miners to mine the fork and could've been good publicity. Instead most people didn't bother to mine the least profitable fork which had the same difficulty as the "main" chain. That resulted in a few chaotic days where almost no blocks were mined before the difficulty automatically and slowly adjusted.

Re: Why Is It Taking 20 Minutes to Mine This Bitcoin Block?

#94
post #84
post #29

TLDR: Since blocks that take a long time to mine fill up more wall-clock time, if you pick an arbitrary instant of wall clock time, you're more likely to be in a "slow" block than a fast block. Specifically, you expect to wait 2x the average.

That's not correct. That's the opposite of the correct reason. Consider a simple (not-exactly-Poisson) set of blocks: 20x1minute intervals, plus 1x10minute interval. The average interval size is (20x1min + 1x10min)/21 = ~1.4min A random moment in time is twice as likely to be in a fast blocks as in the slow blocks. But average wait time (given a uniformly random start times) is (20min 0.5min + 10min 10min)/30min = 11…

I think there are some misunderstandings here:

First of all, when the GP says "you are more likely to be in a slow block", it means "you are more likely to be in a slow block, relative to how many blocks there are".

In your example, if you pick a block at random, you have 1/21 chance of being in a slow block. If you pick a block by choosing a moment in time at random, you have 1/3 chance.

It is obviously not true that with any distribution you would be absolutely more likely to be a slower block.

Secondly, your last sentence seems to give a reason which doesn't fully make sense, and certainly isn't 'the opposite' of the given reason. Slow blocks of course have longer average wait-times than fast blocks. But this affects both the 'time-weighted' average and the 'block-weighted' average.

If you think that slow blocks have a longer wait-time than fast blocks, but that slow blocks are less likely than fast blocks (in the time-weighted average), shouldn't that make the time-weighted average LOWER?

Re: Why Is It Taking 20 Minutes to Mine This Bitcoin Block?

#95
post #3
post #2

"Assume a hashrate and difficulty corresponding to 1 block per 10 minutes. If I uniformly randomly pick a point in time, what is the expected time between the previous block and the next block?" https://twitter.com/pwuille/status/967878361782652928

This is like a common core math problem. Poorly worded to the point of obscuring any real math talent that could be applied in finding a “correct” result, and instead we get to debate what the question means . A more interesting question, I think, is given a POW algorithm which adjusts difficultly to target a 10 minute block rate, and assuming network hash rate is constant and propagation is instant, what percentage…

Your questions have been answered, by Poisson. (The answers are all e to the minus something or other.)

Re: Why Is It Taking 20 Minutes to Mine This Bitcoin Block?

#96
post #14

Does this mean that the second block from a random point in time is, on average, 20 minutes away? Anyone know what the longest wait time on a block in recent history was? Final question -- do large mining operations network their miners so that they don't overlap their hashes. I'm thinking the overhead in doing that would probably be counter-productive given the massive problem space. But, if they were networked that…

With bitcoin (not bitcoin cash) the difficulty is adjusted every 2016 blocks. If too many blocks were mined in this period the difficulty will decrease and vice versa. This means that many blocks could be mined faster or slower in this period. Until of course the difficulty adjustment occurs again.

You use what is called the nonce in the block header. Each time you do a hash of the block you increment this nonce. If your hash is under or equal to the difficulty the block is valid. The difficulty essentially means how many zeroes are in front of your hash.

What big mining operations do is to slice this nonce into appropriate ranges for each miner. So no miner is hashing with the same nonce. So miner 1 starts at nonce=0 and miner 2 on nonce=2000. The nonce range depends on how many hashes each miner can do in a ten minutes span. By doing this each miner is not doing hashing with the same nonce. That would be wasting hashing operations.

Now bitcoin cash changed the difficulty adjustment algorithm (DAA). Instead of adjusting the difficulty every 2016 blocks this is done after each block has been found. This was done to stabilize the difficulty. So miners stay mining bitcoin cash instead of switching between the most profitable chain (bitcoin or bitcoin cash). This was a problem before the new DAA was implemented for bitcoin cash.

There has been times in recent history were no new block was found for 20 minutes on bitcoin. For bitcoin cash around 2 hours. This was in November 2017. It has been 10 minutes stable ever since.

You can check this yourself on bitinfocharts.com for each blockchain under Block Time.

Re: Why Is It Taking 20 Minutes to Mine This Bitcoin Block?

#97
With bitcoin (not bitcoin cash) the difficulty is adjusted every 2016 blocks. If too many blocks were mined in this period the difficulty will decrease and vice versa. This means that many blocks could be mined faster or slower in this period. Until of course the difficulty adjustment occurs again. You use what is called the nonce in the block header. Each time you do a hash of the block you increment this nonce. If your hash is under or equal to the difficulty the block is valid. The difficulty essentially means how many zeroes are in front of your hash.

What big mining operations do is to slice this nonce into appropriate ranges for each miner. So no miner is hashing with the same nonce. So miner 1 starts at nonce=0 and miner 2 on nonce=2000. The nonce range depends on how many hashes each miner can do in a ten minutes span. By doing this each miner is not doing hashing with the same nonce. That would be wasting hashing operations.

Now bitcoin cash changed the difficulty adjustment algorithm (DAA). Instead of adjusting the difficulty every 2016 blocks this is done after each block has been found. This was done to stabilize the difficulty. So miners stay mining bitcoin cash instead of switching between the most profitable chain (bitcoin or bitcoin cash). This was a problem before the new DAA was implemented for bitcoin cash.

There has been times in recent history were no new block was found for 20 minutes on bitcoin. For bitcoin cash around 2 hours. This was in November 2017. It has been 10 minutes stable ever since.

You can check this yourself on bitinfocharts.com for each blockchain under Block Time.

Re: Why Is It Taking 20 Minutes to Mine This Bitcoin Block?

#98

> Correct, that is exactly what I am saying. If you pick a random point in time, you expect 20 minutes between the previous block and the next block on average. I thought this sounded funny, and I did a little simulation to see if it was correct. Given his assumptions (poisson with lambda 10), you do not get that answer. I got right around 10, which is what I would expect. https://gist.github.com/tvladeck/e7a164dfe70…

You are using rpois as if it returned the time between blocks, but that's wrong. It returns a count of blocks mined in a certain amount of time.

Here is a formula to calculate your cumulative_times array correctly for a 10,000 minute period (which is expected to generate 1,000 blocks but may vary of course):

    minutes = 10000
    cumulative_times 
See https://en.wikipedia.org/wiki/Poisson_point_process#Simulati...

With correct block times, I get ~20 minutes from your formula.

Re: Why Is It Taking 20 Minutes to Mine This Bitcoin Block?

#99

Earlier quoted context omitted.

This is the best explanation of the phenomenon. Simple and actually explains why it's 2x and not 3x or 4x.

Is it actually true though? Compare these two comments buried downthread: https://news.ycombinator.com/item?id=16470358 > The hitchhiker's paradox is correct, taking a point and looking backward or forward will correctly give an average event 10 minutes away, but combining the events to give an average of 20 minutes is false. https://news.ycombinator.com/item?id=16471544 > I thought this sounded funny, and I did a li…

Yes, it is true. I'm not sure what the first commenter is trying to say exactly. The second commenter's code was wrong, and correcting it gives the expected 20 minute average period.

Re: Why Is It Taking 20 Minutes to Mine This Bitcoin Block?

#100
post #87

Earlier quoted context omitted.

Yes, it takes 10 minutes on average for a transaction to be included in a block. Potentially much longer if you are unlucky or didn't pay a high enough fee. On top of that most places won't accept just one block. The standard is 6 blocks, so 1 hour on average. That's the price you pay for a truly trustless distributed system. Still (much) faster than ACH or wire transfers or securities trade settlement.

.. but slower than contactless or other card transactions, and (usually) slower than Faster Payments. (Comparing to securities settlement is interesting, because cryptocurrency exchanges use off-blockchain "settlement" within themselves. Trades execute near-instantly because they're just updating a database. However, settling your money out of an exchange can take a lot longer)

[deleted]
Post reply on HN