The Blocksize War – Chapter 17 – User-Activated Softfork

Chapter 17 of the book The Blocksize War is published below. The full book is available on Amazon. As a reminder, 50% of any profits from physical book sales will be donated to Médecins Sans Frontières, a charity that provides medical assistance to people affected by conflict, epidemics, disasters, or exclusion from healthcare.*

* Note: Applies to sales up until the earlier of i. the death of the author and ii. January 2031


The Blocksize War – Chapter 17 – User-Activated Softfork

The idea of a UASF in Bitcoin resolving the current stalemate and activating SegWit appears to also have originated from the pseudonymous developer Shaolinfry, in an email sent to the Bitcoin mailing list on February 25, 2017:

The problem with supermajority hash power signaling is it draws unnecessary attention to miners which can become unnecessarily political. Already misunderstood as a vote, miners may feel pressure to “make a decision” on behalf of the community: who is and isn’t signalling becomes a huge public focus and may put pressures onto miners they are unprepared for. Some miners may not be in a position to upgrade, or may prefer not to participate in the soft fork which is their right. However, that miner may now become a lone reason that vetoes activation for everyone, where the soft fork is an opt-in feature! This situation seems to be against the voluntary nature of the Bitcoin system where participation at all levels is voluntary and kept honest by well balanced incentives.

...

The alternative discussed here is “flag day activation” where nodes begin enforcement at a predetermined time in the future. This method needs a longer lead time than a hash power based activation trigger, but offers a number of advantages and perhaps provides a better tradeoff.

On March 12, 2017, Shaolinfry formalised his proposal and it became known as BIP 148. The idea was to force miners to flag support for SegWit by a consensus rule, thereby activating it. In a way, it was a softfork to activate another softfork. The forced miner flagging was scheduled to start on August 1, 2017, around four and a half months away. This could then activate the original SegWit softfork, before the activation window expired.

Motivation

Segwit increases the blocksize, fixes transaction malleability, and makes scripting easier to upgrade as well as bringing many other benefits.

It is hoped that miners will respond to this BIP by activating segwit early, before this BIP takes effect. Otherwise this BIP will cause the mandatory activation of the existing segwit deployment before the end of midnight November 15th 2017.

Specification

All times are specified according to median past time.

This BIP will be active between midnight August 1st 2017 (epoch time 1501545600) and midnight November 15th 2017 (epoch time 1510704000) if the existing segwit deployment is not locked-in or activated before epoch time 1501545600. This BIP will cease to be active when segwit is locked-in.

While this BIP is active, all blocks must set the nVersion header top 3 bits to 001 together with bit field (1<<1) (according to the existing segwit deployment). Blocks that do not signal as required will be rejected.

The idea was extremely controversial and a very risky move, from the small blockers point of view. Firstly, most of the small blocker narrative up until this point was about patience and only changing the consensus rules in a calm and safe manner. This was a dangerous upgrade: it required miners to flag support and, if they did not, it could result in a chain-split. Secondly, it was very risky because, if the BIP 148 UASF failed, which seemed very possible, it could hand the initiative to the larger blockers. At this point in the war, the large blockers had split into several factions: for example, between those that believed Craig Wright was Satoshi and those that thought he was a conman; between those that thought Bitcoin Unlimited was a robust idea and those that thought it was flawed; and between those that had left to launch new initial coin offerings and those who remained focused on Bitcoin. However, to their credit, up until this point the small blockers had been mostly united. This was a key strength for the small blocker side and helped them gain a lot of traction in the war. This controversial play from the small block camp risked splitting them in two, which could have been devastating for their cause.

For instance, Gregory Maxwell, one of the most influential thinkers on the small blocker side, opposed the UASF and clearly articulated this view in an email on April 14, 2017:

I do not support the BIP148 UASF for some of the same reasons that I do support segwit: Bitcoin is valuable in part because it has high security and stability, segwit was carefully designed to support and amplify that engineering integrity that people can count on now and into the future.

I do not feel the (sic) approach proposed in BIP148 really measures up to the standard set by segwit itself, or the existing best practices in protocol development in this community.

The primary flaw in BIP148 is that by forcing the activation of the existing (non-UASF segwit) nodes it almost guarantees at a minor level of disruption.

Segwit was carefully engineered so that older unmodified miners could continue operating _completely_ without interruption after segwit activates.

Older nodes will not include segwit spends, and so their blocks will not be invalid even if they do not have segwit support. They can upgrade to it on their own schedule. The only risk non-participating miners take after segwit activation is that if someone else mines an invalid block they would extend it, a risk many miners already frequently take with spy-mining.

I do not think it is a horrible proposal: it is better engineered than many things that many altcoins do, but just not up to our normal standards. I respect the motivations of the authors of BIP 148. If your goal is the fastest possible segwit activation then it is very useful to exploit the >80% of existing nodes that already support the original version of segwit.

But the fastest support should not be our goal, as a community– there is always some reckless altcoin or centralized system that can support something faster than we can– trying to match that would only erode our distinguishing value in being well engineered and stable.

“First do no harm.” We should use the least disruptive mechanisms available, and the BIP148 proposal does not meet that test. To hear some people– non-developers on reddit and such– a few even see the forced orphaning of 148 as a virtue, that it’s punitive for misbehaving miners. I could not (sic) disagree with that perspective any more strongly.

Of course, I do not oppose the general concept of a UASF but _generally_ a soft-fork (of any kind) does not need to risk disruption of mining, just as segwit’s activation does not. UASF are the original kind of soft-fork and were the only kind of fork practiced by Satoshi. P2SH was activated based on a date, and all prior ones were based on times or heights. We introduced miner based activation as part of a process of making Bitcoin more stable in the common case where the ecosystem is all in harmony. It’s kind of weird to see UASF portrayed as something new.

It’s important the users not be at the mercy of any one part of the ecosystem to the extent that we can avoid it– be it developers, exchanges, chat forums, or mining hardware makers. Ultimately the rules of Bitcoin work because they’re enforced by the users collectively– that is what makes Bitcoin Bitcoin, it’s what makes it something people can count on: the rules aren’t easy to just change.

There have been some other UASF proposals that avoid the forced disruption– by just defining a new witness bit and allowing non-upgraded-to-uasf miners and nodes to continue as non-upgraded, I think they are vastly superior. They would be slower to deploy, but I do not think that is a flaw.

We should have patience. Bitcoin is a system that should last for all ages and power mankind for a long time– ten years from now a couple years of dispute will seem like nothing. But the reputation we earn for stability and integrity, for being a system of money people can count on will mean everything.

If these discussions come up, they’ll come up in the form of reminding people that Bitcoin isn’t easily changed at a whim, even when the whims are obviously good, and how that protects it from being managed like all the competing systems of money that the world used to use were managed. 🙂

So have patience, don’t take short cuts. Segwit is a good improvement and we should respect it by knowing that it’s good enough to wait for, and for however its activated to be done the best way we know how.

One of the first well-known Bitcoin developers to support the UASF was Luke Dashjr, the developer who discovered how it was possible to make SegWit a softfork in the first place. Luke had really stuck his neck out here, supporting the alternative consensus rules when almost nobody else did. However, given his personality, this wasn’t likely to bother him, and didn’t seem to. One of the most respected developers in the small block camp, Pieter Wuille, who had written much of the code for the SegWit softfork, also opposed BIP 148. In May 2017, in an internet relay chat with Luke, Pieter made the following comments:

my expectation is that every economically relevant full node will revert away from bip148 code hours after the hashrate fails to adopts it

luke-jr: i think you’re insane

It should be noted that Pieter quickly apologised for the “insane” comment. Given the views of developers such as Pieter and Gregory, it now seemed extremely unlikely that Bitcoin Core would release a client which implemented BIP 148. If the UASF plan was to succeed, small blockers would, ironically, have to run an alternative client with different consensus rules, just as the large blockers had done with Bitcoin XT, Bitcoin Classic and Bitcoin Unlimited. 

This is exactly what happened: Luke eventually released a client implementing BIP 148, with the user agent tag “/Satoshi:0.14.2/UASF-Segwit:0.3(BIP148)/”. Users were also encouraged to keep running Bitcoin Core and change the user agent ID to show support for BIP 148, which also appeared to be a popular practice at the time. Some argued that this was a bad practice since the client did not actually implement BIP148 rules, however others responded that this was about intentions and it indicated the users would upgrade prior to August 1. Some pointed out that this was a bit hypocritical, as this was exactly the kind of behaviour which small blockers had ridiculed and criticised the large blockers for.

In early May 2017, I sat down in Hong Kong for a chat with one of the most significant behind-the-scenes proponents of the UASF. The developer I spoke to had written code for the UASF client and maintained several of the pro-UASF campaign websites. I explained to him that the UASF was risky and that it was important to be patient with the Bitcoin consensus rules. He gave a long and robust response. “In normal times, you are correct”, he asserted, “however, these are not normal times, we are in war.” He continued: “Bitcoin is in a crisis situation, Bitmain is maliciously exploiting the ASICBoost vulnerability, SegWit fixes this vulnerability and we need to urgently fix this. It is an emergency situation and therefore we do not have time for the normal, patient approach.” He went on to explain that, in a war, you do not always have the luxury of choosing the right time. He appreciated that the UASF activation was only a few months away, but he explained that the small blockers were currently in a dominant position in the war and there was no guarantee this would last. “Now is the time to get the big weapons out,” he proclaimed, “when we are strong.” He continued: “We have no other choice, we need to act now, go nuclear and decisively win this war, for the future of Bitcoin. If we do not, we risk defeat and Bitcoin will be dead.” This developer appeared to have thought through all the scenarios and was convinced BIP 148 would work. In his mind, the fact that BIP 148 was a softfork, a subset of the current consensus rules, was a significant advantage and would help force miners to switch to the BIP 148 chain. His view was that BIP 148 was a threat and miners would cave from the pressure early, activating SegWit, such that the softfork in August 2017 would never actually occur. “BIP 148 contains code such that it doesn’t apply if SegWit is already activated,” he explained.

While, initially, the idea was controversial within the small block camp, by May 2017 it had gained significant traction. The Dragons’ Den was now in full campaign mode, supporting BIP 148 and the UASF. Samson Mow had even organised, sold and distributed a hat with the letters UASF embroidered on the front. This hat was typically in military colours and worn by small blockers at Bitcoin conferences and events to indicate their support for this grassroots campaign. At this point, UASF discussion was only prevalent inside the small block community, while the large blockers and the wider cryptocurrency industry mostly ignored it. It was only towards the end of May 2017 when the idea became more widely explored outside of the small block camp.

From a tactical point of view, the large blockers were too slow to react and too slow to understand the UASF. Large blockers should have seen the potential split in the small block camp and attempted to highlight and exploit it, just as the small blockers had done with potential splits in the large blocker camp. Instead, they mostly ignored the UASF. Towards the end of May, I spoke to one of the most prominent large blockers to discuss the UASF. He explained to me that he did not believe Gregory Maxwell really opposed the UASF; it was just his “normal lies and games”, he explained. It seemed that, by this point, the level of mistrust was so high that, combined with a very different understanding of how Bitcoin works, the large blockers were almost unable to tell what the small blockers were up to. It seemed to me that the small blockers had finally made their move and left an opening. If this war was to continue, the large blockers needed to react and exploit the opening, but they did not appear to understand what to do.

The large blockers also seemed genuinely concerned by the UASF. At the start of the war, they had greatly underestimated the size and influence of the small blocker camp, expecting an easy victory in the war. The large blockers often derided the small blockers as insignificant and naive. At this point, however, after three failed hardfork attempts – defeats which took them by surprise – most large blockers now appeared to overestimate the power and influence of the small blockers. In reality, the smaller blockers were far less powerful than they thought; the main reason for their success in defeating the large blockers up until this point was their superior understanding of Bitcoin, tactical blunders from the large blockers themselves and Bitcoin’s inherent resilience against contentious protocol rule changes. Due to an incomplete understanding, at least to some extent, the large blockers instead blamed their defeats on shrewd manoeuvring from the cunning and powerful small blockers. Therefore, the large blockers seemed to revere the small blockers and many of them feared the UASF, which they saw as the next big play by the small blockers. They were blind to the tactical opportunity it gave them. An opportunity they therefore failed to exploit. 

At this point, the UASF had almost no support from the cryptocurrency exchanges. Most exchange CEOs I spoke to at the time either expected the UASF to fail, or they did not even know what it was. The level of economic support for the UASF outside of the small block camp was tiny. This was a risky move from the small blockers, and it seemed likely to me they may be left behind on a lower proof-of-work blockchain not regarded as Bitcoin. What the large blockers should have considered was the release of a “counter-softfork”, which banned the BIP 148 flags in the blocks. This chain would likely have the economic majority and the majority hashrate. This counter UASF would have also ensured it was a clean split, with the non-UASF chain no longer vulnerable to wipeout. However, this is simply not how the large blockers thought. They wanted a hardfork blocksize increase; they didn’t have the expertise or desire to implement a counter-softfork.

Jihan Wu appeared extremely angered by the UASF campaign. To him, a UASF undermined the narrative he had built that miners had significant influence over the protocol rules. On May 28, 2017, Jihan Tweeted with the tag #UASF alongside a picture of the murder victims of the Jonestown massacre. The anger and fear he had for the UASF appeared to be strong.

In mid-June, the exchange ViaBTC, which was linked to Jihan Wu, listed BIP 148 futures on the platform. This was clearly an idea taken from Bitfinex a few months earlier and their Bitcoin Unlimited token. It was an attempt to undermine BIP 148, just like the Bitfinex futures had undermined Bitcoin Unlimited. However, the contract terms were quite odd and somewhat rigged. If one invested in the BIP 148 token, you could only get a payout if both the BIP 148 token chain and the original rules chain (the non-BIP 148 chain) continued to exist. This is clearly not what BIP 148 backers wanted. They believed the original rules chain would cease to exist, in particular because the original rules chain was vulnerable to wipeout from the BIP 148 chain. Therefore, investing in a token dependent on the continued existence of the non-BIP 148 chain made little sense for BIP 148 supporters. The contract failed to achieve any significant trading volume and it did not appear to undermine the BIP 148 cause.

On June 14, 2017, Bitmain published a blog which outlined a contingency plan in response to the UASF:

BIP148 is very dangerous for exchanges and other business. There is no sign of significant economic support behind BIP148 and when it is alive as a blockchain, the economic support would most likely be based on speculation. The mining activity behind a UASF chain may stop without notice, and investors who buy in the BIP148 propaganda may lose all their investment. Any exchanges that decide to support a UASF token after the forking point need to consider the stagnation risk attached to it.

The UASF chain presents a risk of the original chain being wiped out. If there is no contingency plan, all economic activity that occurs on the original chain after the UASF forking point will face the risk of being wiped out. This has disastrous consequences for the entire Bitcoin ecosystem. UASF is an attack against users and enterprises who disagree with activating SegWit right now without a block size increase, which is a very important clause in the Hong Kong agreement made by the global Bitcoin community in February, 2016.

This plan is for a User Activated Hard Fork, or UAHF

Bitmain will mine the chain for a minimum of 72 hours after the BIP148 forking point with a certain percentage of hash rate supplied by our own mining operations. Bitmain will likely not release immediately the mined blocks to the public network unless circumstances call for it, which means that Bitmain will mine such chain privately first. We intend in the following situations to release the mined blocks to the public (non-exhaustive list):

The BIP148 chain is activated and subsequently gains significant support from the mining industry, i.e. after BIP148 has already successfully split the chain;

Market sentiment for a big block hard fork is strong, and economic rationale drives us to mine it, for example, the exchange rate is in favor of big-block Bitcoin;

If there is already a significant amount of other miners mining a big-block chain publicly and we decide that it is rational for us to mine on top of that chain. In such a case, we will also consider joining that chain and give up our privately mined chain so that the public UAHF chain will not be under the risk of being reorganized.

Once Bitmain starts to mine a UAHF chain publicly, we will mine it persistently and ignore short-term economic incentives. We believe a roadmap including the option to adjust block size will serve users better so we expect it to attract a higher market price in the long term. 

The Bitmain plan was to activate a hardfork at around the same time as the UASF was due to activate, which would increase the blocksize limit. The hardfork plan even included a blocksize limit increase schedule. The blocksize limit would start at 2 MB in August 2017, then gradually increase in additional, pre-determined steps to 16.8 MB by August 2019. This plan appeared to be some kind of threat, aimed at the UASF proponents. The large blockers would get their new hardfork chain, something they perceived the small blockers were desperately hoping to prevent them from achieving.

Although Jihan did not appear to realise it, this plan was actually incredibly favourable to the UASF cause, because it meant that the UASF chain was more likely to obtain the proof-of-work lead over the original rules chain, since Bitmain indicated it had planned to move away to an alternative hardfork chain. In addition to this, Bitmain planned to mine the new hardfork chain in secret, for a 72-hour period. This was a very bad move, if the plan was for the hardforked chain to gain any traction, since nobody would be able to see the chain, or run a client supporting it, and exchanges would not be able to support the token. It is unclear what had motivated this blogpost. It appears as if Jihan was extremely angry and quickly developed a plan designed to frustrate his opponents, but had not thought it through at all. What Jihan should have announced, of course, is that, in the event of the UASF, he would keep mining the original rules chain and meanwhile arranged a counter UASF. However, this would have left him stuck with 1 MB blocks, so maybe he felt he did not have much of an option.

Within the Dragons’ Den, the small blockers celebrated the Bitmain blogpost with delight, as it almost assured them of complete victory. However, some took a more cautious tone, “just because Jihan says that he will do something stupid, don’t assume he will”. It seemed to me that this more cautious stance was the correct approach. As August 1 got closer, Jihan would very likely realise that his plan made no sense and pivot to something else more effective.

As the UASF deadline approached, the large blockers were on the back foot as they did not know how to effectively respond. It was almost as if they had no viable options left. It looked like the large blockers were finally heading for a humiliating defeat, and they knew it. They needed some kind of face-saving exercise.