Pages:
Author

Topic: Optimal Hard Fork Survival Strategies - page 2. (Read 1332 times)

full member
Activity: 136
Merit: 100
Get your filthy fiat off me you damn dirty state.
June 23, 2015, 02:05:54 PM
#1
Sometime early next year it's likely the blockchain will fork into the XT-chain (allowing for bigger blocks) and the Core-chain (with the 1MB block limit). Assuming Gavin's current proposal is what gets included into XT, it will happen 2 weeks after 75% of the mining power indicates they are mining on the XT-chain. After that the Core-chain will either die or survive. I've been thinking about scenarios in which the Core-chain survives.

To keep things simple I only look at survivability with 25% of the miners or less. It's possible that some miners will come back or even that some miners falsely voted for the XT fork, but it's not good to plan on that.

In every case, the Core-chain would need to survive the first two difficulty adjustments in order to get back to producing 10 minute blocks on average. Directly after the fork blocks would be very slow (40 minute blocks or slower). Difficulty is adjusted each 2016 blocks (typically 2 weeks, but this is an atypical situation). How long it would take to get to the first adjustment, and what the difficulty is afterwards, depends on when the actual fork occurs during one of these 2016 block windows.

Color Codes for Block Speeds

To get an idea for what can happen, here are some color codes:

Red: blocks take > 30 minutes on average
Amber: blocks take 30 minutes on average
Yellow: blocks take 20 minutes on average
Green: blocks take 10 minutes on average

It's unavoidable that we are in the red zone directly after the fork. Probably the worst case is if the fork happens right after a difficulty adjustment. In that case, the Core chain would be in the red zone for at least 8 weeks, with blocks taking 40 minutes or more on average. The only good thing about this scenario is that we would go directly to the green zone. I doubt 8 weeks in the red zone is survivable.

I wanted to find out when the "best" time for the fork would be. It depends on what the strategy is, of course. I considered two strategies:

Strategy 1. Get out of the red zone and into the amber zone as quickly as possible. After that, stay in the amber zone with 30 minute blocks for about 6 weeks. After that, we're green.

Strategy 2. Stay a little longer in the red zone and get into the yellow zone as quickly as possible. After that, stay in the yellow zone with 20 minute blocks for about 4 weeks. After that, we're green.

To get some concrete numbers a friend and I wrote a little python code. (Well, I talked; he coded.) It's on github: https://github.com/cjbauer/forkstats

Results

With 25% of the mining power and Strategy 1, the best option is for the fork to happen 89% of the way through the difficulty period (almost 13 days into the two weeks). Then it would take about 1 week to get to the difficulty adjustment and into the amber zone.

With 25% of the mining power and Strategy 2, the best option is for the fork to happen 2/3 of the way through the difficulty period (a little over 9 days into the two weeks). Then it would take almost 3 weeks in the red zone to get to the yellow zone.

The numbers are similar if we get down to 20% or 15% of the mining power, but for each drop add another week or so in the red zone.

If we're down to 10%, then aiming for the yellow zone is unreasonable, since it would require being in the red zone for over two months. It is possible to get to the amber zone after 5 weeks in the red zone.

With 5% survivability becomes unreasonable. To even get to the amber zone would require 3 months in the red zone.

All of this is if we are fortunate enough to fork at an opportune time. In general, the best time is roughly 75% of the way through the difficulty window.

Preemptive Forking

If the Core-chain is passive, then the actual fork will happen at the time when the XT-miners choose to mine their first big block.

On the other hand, there is this 2 week grace period after the 75% threshhold has been reached. Those miners supporting the Core-chain could decide now that during the 2 week grace period at the appropriate block (the one roughly 75% through the difficulty window) they will stop building on blocks that indicate (with the version number) that they will continue on the XT-chain. That is, the Core-chain could choose to preemptively fork at a time that makes it most likely to survive.
Pages:
Jump to: