Hacker News new | ask | show | jobs
by rusbus 3033 days ago
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.
7 comments

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.

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 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.

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.
Understanding is one thing, explaining in layman or easy to undertand terms is another, and sometimes it takes a lot of effort.
https://www.youtube.com/watch?v=FjHJ7FmV0M4

You guys would love Richard Feynman.

Another resource there: http://www.feynmanlectures.caltech.edu/

That collection is a series of lectures from Feynman, and his characteristic clarity, on physics across the breadth of all major topics. It's quite amazing to realize how little you, in general, truly understand even really basic concepts like the conservation laws until you read the writings of a person who did genuinely understand what he was talking about and could share that insight in such a uniquely effective way.

Explaining is usually more difficult than understanding, as well.
I've had multiple teachers tell me that if you can't explain something you don't completely understand it yet. grok what I'm saying? :)
I've heard this a few times but thoroughly disagree.

Being able to explain/teach something to others is a very different skill to understanding it and isn't compulsory.

An expert is someone who can take something you already understand, and make it sound confusing.
This is the exact same reason that it always seems like you are in “the slow lane” in congested traffic. You spend considerably more time going slow than going fast, and while your lane is slow you have to watch all the other sporadically fast lanes go by.
Ha that's why I spend most of my driving time stuck in traffic.

And why do 3 buses come at once? Because the first one takes all the passengers, so stops more and gets slowed down. The other 2 catch up.

And also if you do half your trip and 10mph and the other at 20mph your average isn't 15mph. You spent more time at 10mph!

> if you do half your trip and 10mph and the other at 20mph your average isn't 15mph. You spent more time at 10mph!

If you're measuring "half your trip" in terms of distance covered, sure. If "half your trip" refers to half the total time, then your average is exactly 15 mph.

> And why do 3 buses come at once? Because the first one takes all the passengers, so stops more and gets slowed down. The other 2 catch up.

This is not related to the other phenomena you mention; as described here, the buses are actually being driven together as opposed to varying randomly.

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 (20min0.5min + 10min 10min)/30min = 110min^2/30min = ~3.6min.

That per-start-instant average wait time is longer NOT because you are more likely to be in a slow block, but because being in a slow block has a much longer average wait-time than being in any of the fast blocks.

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?

Splitting a long block into two shorter (but still long) blocks doesn't make you less likely to be in the covered interval, but does reduce the average weight time.

  you expect to wait 2x the average.
Actually, this is also slightly incorrect, conflating "expected wait time until next block" with "average current block duration". These are two different expectancies: You always expect to wait exactly the average wait time of 10min until next block; and you expect your block to be of double average duration (20min, with the instant of sampling lying somewhere in the middle).

The concept of memorylessness is not very intuitive, and thus from the true statements "average block time 10min" together with "the current instant is expected to be somewhere in the middle between two blocks" is drawn the wrong conclusion (disregarding memorylessness): "average wait time is 10/2 = 5min". So, new attempt at a tl;dr:

"you expect to wait 2x the intuitively (wrongly) expected time (of 5min)"

Okay but i expect to wait 5 min on avg. so due to the paradoxon it is 10 min not 20 min
If a bunch of miners decide to flee Bitcoin, it might take an hour or more to mine a block.

I've been thinking about the game theory aspect of that, and it's a bit hard to work out whether that will cause even more miners to flee. If so, that could very well be a death spiral.

It's hard because transaction fees might make up the difference. Though it's hard to imagine everyone being ok with >$100 transaction fees.

If a bunch of miners flee, the expected profit for the remaining miners actually increases (marginally). Assume instant network propagation, the probability that a given hash will result in a block is constant. Since miners fleeing does not decrease the hash power of the miners that choice to stay, they have the same hashrate, so the rate at which they mine blocks is constant, and their expected profit is unaffected.

If we acknowledge the propagation delay, their expected profit increases slightly because of the reduction in the probability that their blocks would be orphaned.

Additionally, the increased congestion would likely increase the transaction fees, further increasing the per-block profits.

Once the network readjusts and the difficulty decreases, the remaining miners would see a windfall profit.

The potential death-spiral would only come if the temporary increase in delay causes the value of bitcoin to fall, in which case more miners will likely flee. If this happens fast enough, the blockchain may never reach its next adjustment.