3 ms·
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 form
by modeless 9y ago
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 <- sort(runif(rpois(1, minutes/10), 0, minutes))
See https://en.wikipedia.org/wiki/Poisson_point_process#Simulation https://en.wikipedia.org/wiki/Poisson_point_process#Simulati...
With correct block times, I get ~20 minutes from your formula.
- tvladeck 9y agoahhh you're right