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

Switch v10 difficulty algorithm back to v8 #151

Merged
merged 1 commit into from
Sep 10, 2018

Conversation

jagerman
Copy link
Contributor

@jagerman jagerman commented Sep 6, 2018

The difficulty tweak added in v9 makes the difficulty drop too fast, but only after the difficulty has already been dropping for 3 blocks.

This causes two problems: first, difficulty drops too fast and by too much. Second we get considerably more erratic block times than we should be getting as a result. Second, because this adjustment is applied asymmetrically (it can only decrease diff but never increase it), it results in long run average difficulty coming in consistently too low, making average block times (and thus daily emissions) a little fast.

As to the first point: Zawy DA already drops quite fast after a long block, but the v9 adjustment makes it drop even faster. The end result is that we see a consistent pattern for months now of "coin hopping": a large hashrate (estimated at about 2-4x times the collective hashrate of known pools) jumps into Graft mining when difficulty drops, scooping up around 10 or so easy blocks until it drives the difficulty back up. This added hash then departs as quickly as it arrived, leaving the network with considerably less actual hashrate than the current network difficulty is configured for, thus inducing some long blocks, which starts the difficulty plummeting all over again.

The bigger problem with this is that it is leading to never-ending cycles of exceptionally long blocks times followed by brief bursts of exceptionally short block times. Overall we're seeing about 30% more blocks under 1 minute than we should ideally see, and more than five times as many blocks over 15 minutes (212 since block 100K, while we should have seen around 37).

This distribution isn't entirely due to the v9 adjustment, but the v9 adjustment is exacerbating the problem.

This commit restores the DA back to the v8 algorithm (but keeps the FTL and median timestamp changes that v9 added).

Fixes #133

There is some more discussion (including a histogram of solve times since block 100K) in #133.

The difficulty tweak added in v9 makes the difficulty drop too fast,
but only *after* the difficulty has already been dropping for 3 blocks.

This causes two problems: first, difficulty drops too fast and by too
much.  Second we get considerably more erratic block times than we
should be getting as a result.  Second, because this adjustment is
applied asymmetrically (it can only decrease diff but never increase
it), it results in long run average difficulty coming in consistently
too low, making average block times (and thus daily emissions) a little
fast.

As to the first point: Zawy DA already drops quite fast after a long
block, but the v9 adjustment makes it drop even faster.  The end result
is that we see a consistent pattern for months now of "coin hopping": a
large hashrate (estimated at about 2-4x times the collective hashrate of
known pools) jumps into Graft mining when difficulty drops, scooping up
around 10 or so easy blocks until it drives the difficulty back up.
This added hash then departs as quickly as it arrived, leaving the
network with considerably less actual hashrate than the current network
difficulty is configured for, thus inducing some long blocks, which
starts the difficulty plummeting all over again.

The bigger problem with this is that it is leading to never-ending
cycles of exceptionally long blocks times followed by brief bursts of
exceptionally short block times.  Overall we're seeing about 30% more
blocks under 1 minute than we should ideally see, and more than five
times as many blocks over 15 minutes (212 since block 100K, while we
should have seen around 37).

This distribution isn't entirely due to the v9 adjustment, but the v9
adjustment is exacerbating the problem.

This commit restores the DA back to the v8 algorithm (but keeps the FTL
and median timestamp changes that v9 added).
@mbg033 mbg033 requested a review from bitkis September 10, 2018 19:40
@mbg033 mbg033 merged commit d98cbd4 into graft-project:adjust-block-reward Sep 10, 2018
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.

3 participants