UASF/Segwit2x Scenarios and Timelines

A bunch of miners started signaling for BIP91 yesterday and a lot of people are feeling more hopeful about the state of Bitcoin as Segwit looks to lock in and activate. In this post, I’m going to update you on the latest developments and what could happen when.

BIP91 Signaling

In case you are not familiar, BIP91 is a mechanism by which Segwit (BIP141) can get activated using only 80% of network agreement instead of the 95% required by BIP141. Essentially, BIP91 requires blocks to signal for BIP141 once 80% of a 336-block epoch signals at bit 4. After BIP91 activation, if blocks don’t signal for BIP141, these blocks are orphaned in exactly the same fashion as BIP148 (UASF) is supposed to do. This is a way to front-run BIP148 and remove the possibility of a fork.

Segwit2x, the most popular client that’s incorporated BIP91, was supposed to be released on July 21, but it looks like several miners started signaling for BIP91 a little early. Segwit2x is apparently code complete so this is not a surprise.

So the question you might have at this point is, what’s going to happen now? Will all the dates be moved up a few days? What happens if a single miner defects and BIP91 fails to meet the 80% threshold? Will Segwit get adopted? What about the hard fork? These are excellent questions and I’ll try to lay out what can happen in the next two weeks.

BIP91 Lock-In

BIP91 has a special mechanism for lock-in that’s different than other BIP9-based soft forks. BIP141 (Segwit) requires 95% over 2016 blocks whereas BIP91 requires 80% over 336 blocks (336 was apparently chosen because it’s 2016/6). This means that it takes roughly 56 hours for a single “epoch” where signaling can be counted. Since we’ve started so early, we have roughly 6 “epochs” where BIP91 can lock in. (Please note here that “epoch” is my term, used for convenience, not anything official.)

Note that the actual orphaning of blocks doesn’t happen until a 336-block epoch after lock-in. This means that should BIP91 lock-in but not actually activate before August 1, BIP148 may still fork.

Optimistic Timeline

The current BIP91 epoch started at block 476112 (2017 July 16) and ends at block 476448 (~2017 July 19 02:00 GMT). As too many blocks failed to signal for BIP91 already in this epoch, BIP91 lock-in will not happen by block 476448.

The earliest that BIP91 can lock-in is block 476784, which should be around ~2017 July 21 10:00 GMT. This would be ahead of schedule as Segwit2x was scheduled to be released July 21. This would mean that BIP91 would activate 336 blocks later at block 477120 (~2017 July 23 18:00 GMT). At this point, all blocks not signaling BIP141 (Segwit) would get orphaned off the network. Since presumably at least 80% of miners would not accept such blocks, miners that create blocks without signaling BIP141 would likely lose the coinbase reward and fees (roughly 14 BTC or $30k as of this writing). As such during the 56 hours or so between blocks 476784 and 477120, we will most likely see every miner upgrade (if necessary) to signal for Segwit.

To summarize, the scenario here looks like this:

  • 2017 July 19 02:00 GMT — BIP91 epoch begins
  • 2017 July 21 10:00 GMT — BIP91 epoch closes with >80% signaling and BIP91 locks-in
  • 2017 July 23 18:00 GMT — BIP91 epoch finishes, BIP91 is activated
  • 2017 July 23 18:00 GMT onward — Every block signals BIP141 (Segwit)
  • 2017 July 27 or thereabouts — New Difficulty Adjustment Period Begins (2016 blocks). Every block will be signaling for Segwit.
  • 2017 August 1 00:00 GMT — BIP148 starts, but does nothing since every block is signaling BIP141 due to BIP91.
  • 2017 August 10 or thereabouts — Difficulty Adjustment Period closes with >95% signaling and BIP141 locks-in.
  • 2017 August 23 or thereabouts — Difficulty Adjustment Period closes and BIP141 (Segwit) is active.
  • 2017 November 18 or thereabouts — 2x Hard Fork (scheduled)

Delayed Timeline

Should BIP91 signaling not reach the 80% threshold in a particular epoch, but get there before July 28 or so, we could see a similar scenario playing out. In this scenario, some New York Agreement miners somehow are delayed in signaling for BIP91 and it would look something like this:

  • 2017 July 19 02:00 GMT — BIP91 epoch begins
  • 2017 July 21 10:00 GMT — BIP91 epoch closes with <80% signaling.
  • 2017 July 23 18:00 GMT — BIP91 epoch closes with <80% signaling.
  • 2017 July 26 02:00 GMT — BIP91 epoch closes with >80% signaling and BIP91 locks in.
  • 2017 July 28 10:00 GMT — BIP91 epoch closes, BIP91 is activated.
  • 2017 July 28 10:00 GMT onward — Every block signals BIP141 (Segwit)
  • 2017 July 27 or thereabouts — New Difficulty Adjustment Period Begins (2016 blocks). Every block from 7/28 will be signaling for Segwit, which is likely to be enough (95%).
  • 2017 August 1 00:00 GMT — BIP148 starts, but does nothing since every block is signaling BIP141 due to BIP91.
  • 2017 August 10 or thereabouts — Difficulty Adjustment Period closes with >95% signaling and BIP141 locks-in.
  • 2017 August 23 or thereabouts — Difficulty Adjustment Period closes and BIP141 (Segwit) is active.
  • 2017 November 18 or thereabouts — 2x Hard Fork (scheduled)

Notice here that even with the delayed timeline, Segwit activation won’t actually be delayed as a new Difficulty Adjustment Period will begin around July 27.

Failed BIP91 Timeline

Should BIP91 signaling somehow not reach 80% before July 28 or so, we’ll most likely split:

  • 2017 July 19 02:00 GMT — BIP91 epoch begins
  • 2017 July 20 10:00 GMT — BIP91 epoch closes with <80% signaling.
  • 2017 July 22 18:00 GMT — BIP91 epoch closes with <80% signaling.
  • 2017 July 25 02:00 GMT — BIP91 epoch closes with <80% signaling.
  • 2017 July 27 10:00 GMT — BIP91 epoch closes with <80% signaling.
  • 2017 July 29 18:00 GMT — BIP91 epoch closes with <80% signaling.
  • 2017 August 1 00:00 GMT — BIP148 starts. This likely results in two chains on the network whether with minority hash rate or with majority hash rate and a hard fork by miners.

At this point a whole host of things can happen, including Bitmain running Bitcoin ABC in response to the UASF, a proof-of-work change and a lot of other things that I covered in another article.

What would be interesting is if the epoch closing around 2017 July 29 18:00 GMT closes with >80% signaling. BIP148 advocates may decide that waiting a day to start their fork may prevent a split and may delay for that reason. Such a scenario is possible, though somewhat unlikely.

Probability of Each Scenario

The two scenarios where there is no split (and where Segwit activates) seem more likely than the failed BIP91 scenario. The Failed BIP91 scenario can only really come about if a miner who signed the New York Agreement decides to betray it. This is obviously possible, but would probably engender all manner of mistrust, especially among the NYA signers.

More low-probability scenarios like signaling BIP91 and then not signaling BIP141 by a majority of miners is possible, but are very unlikely and thus aren’t covered here.

Conclusion

It looks as if BIP91 will lock in if the New York Agreement holds. An epoch with 80% signaling should happen in the next week or so and a mandatory BIP141 signaling soft-fork rule will be on the network a couple days later. This should mean BIP148 will be front-run and won’t result in a network split.

Should BIP91 fail to reach 80% in the next couple of weeks, this results in a hot war in Bitcoin. This does seem like a lower probability scenario and likely won’t come to pass. That said, BIP91 and Segwit activation probably only delays the fight, not avoids it. Segwit2x’s hard fork to 2x will be the next big deadline which will be around November.

Want to get curated Technical Bitcoin News? Sign up for the Bitcoin Tech Talk newsletter!