Lucky Streaks in Block Assignments

Has anyone noticed that when you get blocks you’ll tend to get them close together and in quick succession and then nothing for awhile? I noticed this with my pool LOVE over the last two epochs and was curious if this is a trend or just random luck of the draw. Since I run pooltool.io I figured, why not pull the data.

In epoch 212 my pool had enough stake to ideally create about 30 blocks. In an simplistic world, those blocks would be spread out over the epoch in somewhat regular intervals like this.

However, in reality the 30 blocks came like this:

Which in itself is not all that surprising. If some blocks are assigned close together I’d expect others to be far apart so on average on regular intervals. However, when I look closer at the data, that is not the case at all.

If I plot the time difference in seconds between all the blocks I get this:
histogramlove
The orange dashed line represents something I would expect to see (a distribution around an average value) while the blue is actual. The average time between blocks is 12235 seconds, but the median is only 7707 seconds so its clearly shifted towards the shorter time periods between blocks…

Next I normalized the data and looked it it across a lot more pools to see if my pool was an outlier. To normalize the data I divided the time delta by the ideal time delta as calculated for each pool based on their stake. So now 1 becomes the ideal time difference between blocks.

allpoolsstreaks
So again, I’ve placed a orange dotted line as something closer to what I would expect, while the blue is actual data.

So, bottom line, its not just me. blocks tend to be assigned in streaks. Its like mining for gold, you find a vein and hold on on.

It will be interesting to see how this changes as d shifts lower. Its possible that this is an artifact of the temporary state we are in when pools are only making 20% of the blocks. Please let me know your thoughts.

Mike (pooltool.io) - ticker: LOVE

Note: I only used the larger pools to do the analysis, > 10 blocks assigned per epoch. The dataset used here included the following pools:

IOG8, OCEA5, DIGI, BCSH0, SWIM, JOY, DIGI2, IOG9, CHEAP, 1PCT0, IOG19, IOG4, 1PCT8, LOVE, BCSH, ADAFR, IOG6, BLOOM, IOG11, 1PCT2, HOPE, ACL, ATADA, ZZZ4, AAA, POP3, EMUR2, IOG15, IOG20, IOG7, EMUR3, NUTS, JP3, KAIZN, LEO3, CCJ3, MS2, ADAST, RDLRT, OCTAS, JAZZ, SP₳CE, OCEA2, WILL, EKTRP, IOHK, MS1, IOG16, SCAR, JAZZ3, POP2, KTN2, 1PCT7, ADLT2, 1PCT3, OCEA3, 1PCT1, EMUR1, 1PCT6, SOBIT, JAPAN, STACK, KTN, JP2, POP, BLOOM, 4ADA, SPS2, OCEA4, 1PCT9, JP4, NAP, COOL, COOL2, GAGA, IOG1, CLIO1, KTN3, KTN4, SKY, ZZZ3, 1PCT, ZZZ2, AHL, HRMS, SPS, 1PCT5, 1PCT4, LEO4, IOG13, LEO2, IOG5, IOG10, IOG17, IOG14, IOG2, OCEAN, CRDNS, LEO, IOG3, ADLT, ZZZ5, ZZZ, IOG18, STKH1, IOG12

10 Likes

Sweet analysis MIke. I don’t recall however anywhere in the spec where it specifies a normal distribution.Perhaps that could be an attack vector if pool block production/distribution can be determined apriori. As far as I know the specs only specify probabilities of total blocks. It’d be interesting to get an understanding on what affects distribution and better yet, get a “leader logs” like the ITN. That’s honestly about the only thing I miss from the ITN :slight_smile:

CPX has only minted 2 blocks so far in the same epoch and for those 2 blocks, they were also in relatively quick succession I think < 12 hours apart and most certainly same day

1 Like

At least according to visitors here, it would be considered a good thing, and this issue confirms the implementation of this on mainnet is still being considered:

I would think of it more as a defence strategy than as an attack vector, though this may be more typical of small pools whose reputation depends on availability to produce that crucial 1 block per epoch.

2 Likes

Hi Mike, I already observed the same (irregular slot leadership distribution within the epochs) on the ITN, as documented on github (see link below) which did raise a few eyebrows. I have no information whether the distribution algorithm as been modified since then…

3 Likes

interesting this proves my own observations.

The graph shows all Blocks produced by CLIO1 so far.
Highlighted the short phases with multiple blocks after a previous quiet phase

3 Likes

I heard from the IOHK engineers on this:

You can see block production as a (discretised) Poisson process, where blocks are produced with some constant probability at any point. Then the time between such events should follow an exponential distribution.

In other words, lucky streaks are expected (or at least what looks like lucky streaks)

3 Likes

Letting an individual know their own schedule is different than everyone knowing everyone’s schedule. It is also different than everyone knowing a pattern of everyone’s schedule.

1 Like

Precisely this.

1 Like

I was told by IOHK that block production follows a binomial distribution, which makes sense as the VRF output is a simple yes/no response. the nodes check for leadership every second which also means it is s discrete probability.