SIP2-Increase-Work-Weighting-For-Higher-Fields

From Snowblossom Wiki
Revision as of 06:00, 30 October 2018 by Fireduck (talk | contribs) (migration)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Snowblossom Improvement Proposal 2

SIP2: Increase Work Weighting For Higher Fields

Background

Without this change, a miner with decent hash power but not a majority can do the following:

  • Wait until the network goes to a new field and the hash rate drops due to some miners slowing down or dropping out.
  • Miner forks the chain as a private fork just before the new snow field activates.
  • They control their block times to keep field from activating.
  • Since the main network is dropping in difficulty and the miner is keeping the difficulty high (but not quite high enough to trigger new field) their private change ends up having more work on it than the main chain.
  • Miner broadcasts their chain and causes a major reorg

Fix

The fix is fairly simple, it is to add a weighting to the work sum such that higher fields are prefered. In this fix, each increase of the snow field 4x the effective work added per block. This doesn't make the attack above impossible, it just makes it harder. The attacker would have to keep the hash rate of their chain at four times that of the main chain to have a higher work sum.

Code

Working branch for this is sip2

Questions

Should it be 4x or higher? The higher it is, the harder this attack is. However, if it is very high then someone can go back to when the network got near but did not enter a new field and make a few blocks into the new field and reorg into that. If we do 4x for example, they could do that with 1/4 the hash power of the full network, but would have to maintain 1/4 the hash power on the higher field, which will probably be a challenge.

Deployment

Since nodes don't have to actually agree on what the worksum is, nodes can update whenever. They will just start using the new worksum math and it is fine. No need to even nuke database and restart.

Voting

  • Passes when 1000 blocks pass containing 25% voting and >50% agreement
  • Pools will represent their miners.
  • Set in your miner or pool configuration file either
    • vote_yes=2
    • vote_no=2

Sponsors

  • Joseph Gleason - Fireduck (slack) - fireduck64 (github)
  • Zachary Coon - Clueless (slack) - cluelessperson (github)