The article on the "hitchhiker's paradox" that this links to made this much more clear to me (as well as being shorter): <a href="https://the8layers.com/2016/10/30/how-long-will-you-wait-hitchhiking-on-the-road/" rel="nofollow">https://the8layers.com/2016/10/30/how-long-will-you-wait-hit...</a>
I have been thinking about this as well, in another context. When I am at the tennis court, I always seem to be surrounded by players which are far above average.<p>This seems paradoxical, but you're more likely to meet the players which train most often, and they are also most likely to be the best tennis players.
Bitcoin mining = "Guess a random number between 1 and 5"<p>If the network guesses too fast due to more cumulative guesses per second, the target number increases.<p>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 upwards two to three times as long as there wasn't enough hash power to guess the magic number in time.<p>Eventually the miners returned to mine BTC core and transaction times returned to normal, other than the backlog in the memory pool that built up during that period.
"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?"<p><a href="https://twitter.com/pwuille/status/967878361782652928" rel="nofollow">https://twitter.com/pwuille/status/967878361782652928</a>
This is why I like block times of 2.5 minutes that Litecoin does. Rarely the block takes over 4 minutes. So even if it takes a couple of blocks, it's still within 10 minutes. Even 5 minutes a block would be better than bitcoin's 10. With bitcoin, if you put a reasonable fee, but your transaction doesn't make the next block, it can take more than an hour, which makes impractical certain transaction types like online shopping.
Say you have 10,000 miners, once you find a hash you can start all your miners mining the next block. Can you use the time between blocks to your advantage?<p>If you find the hash after say 6 minutes, you could delay broadcasting the block to the network for another minute or two, and give yourself an advantage.<p>Yes there’s a risk another miner would find the same hash, but statistically you could estimate the optimal delay for risk vs reward.
A related statistical "mystery" is the miner cooperation without communication property of Proof-of-Work I describe here: <a href="https://grisha.org/blog/2018/01/23/explaining-proof-of-work/" rel="nofollow">https://grisha.org/blog/2018/01/23/explaining-proof-of-work/</a> It too is rooted in that the mining problem is progress-free.<p>Contemplating adding the "20 minute paradox" as a section since I already explain the foundational principles in the write-up.
The timing of block arrivals also greatly affects the guarantees against double spending, so this paradox may have some security implications.<p>Accepting transactions blindly after 5 confirmations/blocks throws away the information of the amount of time it takes to generate those blocks<p><a href="https://eprint.iacr.org/2018/040" rel="nofollow">https://eprint.iacr.org/2018/040</a>
The Monty Hall problem for the 21st century.<p>Note that the dependency of the expected value on sampling method also show up in other places, like Benford's law. The expected value of the first digit of a number drawn from a uniform distribution depends on how the upper bound of that distribution is chosen.
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. Two events have been chosen resulting in a conditional probability.<p>Put more clearly, an event happens on average 10 minutes in the past, but using the same starting point for the event in the future links the events with a dependency. We could also arbitrarily start looking forward at the instance of the event in the past, or another random point in time.
I wrote a quick little program to sort of prove this to myself: <a href="https://play.golang.org/p/fITZrZgzTT7" rel="nofollow">https://play.golang.org/p/fITZrZgzTT7</a><p>While the average difference in time between one record and the next is 10, the weighted average over the entire duration is 20.
> 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.<p>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.<p><a href="https://gist.github.com/tvladeck/e7a164dfe70fa765b10c1af64b382b02" rel="nofollow">https://gist.github.com/tvladeck/e7a164dfe70fa765b10c1af64b3...</a>
Does this mean that the second block from a random point in time is, on average, 20 minutes away?<p>Anyone know what the longest wait time on a block in recent history was?<p>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 then the probability would eventually go down for a long enough wait between blocks (assuming there exists some massive mining operation).
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.<p>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.<p>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.<p>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.<p>You can check this yourself on bitinfocharts.com for each blockchain under Block Time.
Hmm if this is similar to the hitchhiker’s paradoxon, then one would expect to wait 5 min for the next block by intuition, which is wrong and we have to wait 10 minutes. But i do not get why the intuition should be wrong by a factor of 4x (20 mins) instead by a factor of 2x (10 mins).
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.
OT: From my perspective, HN is the reference regarding tech content. The upvoted stories, the comments, the discussions are of such a high quality. It's just the best resource to stay informed and educated in tech.<p>Surprisingly this is not true with Blockchain topics. Upvoted Blockchain stories feel ok but not that relevant or often random. Comments, discussions are sometimes constuctive (like this one) but often anti-blockchain or of low quality.