Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tblb to use correct theoretical formula #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dgenr8
Copy link

@dgenr8 dgenr8 commented Feb 1, 2015

The tblb formula is sensitive to hashrate deviation from difficulty, which causes wild inaccuracy when <interval> is large, by assuming that the deviation will last the entire time.

Also, "time between blocks which take <interval> seconds to create" is ambiguous. Are the current and/or final block intervals included or excluded?

There is a simple closed-form theoretical formula for this quantity, which is analogous to the wait time required before a chicken that takes i seconds to cross the road, can cross a road with poisson traffic.

Theoretical expected time to start of next block interval >= <interval> seconds is 600(exp(interval/600)-interval/600-1)

@dgenr8
Copy link
Author

dgenr8 commented Feb 28, 2015

It could be argued that the current deviation-sensitive formula is more likely to match reality for short intervals. But the current formula also lacks an adjustment for the upcoming retargeting, which happens inside 3 days more than 20% of the time.

Tie it all up with the fact that hashrate is quite variable and the next 3 days are not likely to match the last 3 days very closely, and the current formula just looks broken and should be replaced by the theoretical one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant