Bitcoin Forks — 1 Aug & beyond — USAF, Segwit2x Saga

Priyab Dash
Jul 21, 2017 · 9 min read

Background

The Blocksize Debate & Scalability issues

The current 1 megabyte block-size limit allows the Bitcoin network to process up to seven transactions per second.In case if block size is decreased,undersized blocks, could limit Bitcoin’s potential and increase the cost of transacting which many create failure of the system.

Increasing the block size too much could further centralize Bitcoin on a protocol level as mining the data for large blockchain will need more space and processing power forcing centralization of the infrastructure.

Some in Bitcoin core community envision a future where bitcoin is transacted over added layers, such as the Lightning Network, treechains and more. But Miners and many other in the bitcoin community want an onchain solution to settle the Blocksize debate, including a more durable block-size policy (perhaps flexcaps ), additional scaling layers, and other optimizations. Segregated Witness is that midway solution that gives added time to work on a long-term solutions and opening opportunities build added layers for faster transaction processing.

Forks

To make any software upgrade or change to the Bitcoin p2p network there are many levels the upgrades can be done. And for any such upgrade depending on the complexity of the software change a consensus mechnism between nodes running bitcoin (including mining nodes) is required.

While most of such upgrades do not impact the network as a whole but the below types of software upgrades or called as “forks” have significant impact on how Bitcoin nodes are run or interact with each other and Bitcoin ecosystem as a whole:

Soft Fork

A consensus fork wherein everything that was previously invalid remains invalid while blocks that would have previously considered valid become invalid. A hashrate majority of miners can impose the new rules. They have some deployment advantages like backward compatibility.

In soft fork nodes running old bitcoin version will still be able to use the program.If soft fork runs on majority node, then as needed hard fork may be implemented for the remaining minority. Else it’s completely reversible to go back to the older version.

Hard Fork

A consensus fork that makes previously invalid blocks valid. Hardforks require all users to upgrade. A hard fork is a permanent divergence from the previous version of the blockchain, and nodes running previous versions will no longer be accepted by the newest version. This essentially creates a fork in the blockchain, one path which follows the new, upgraded blockchain, and one path which continues along the old path.If you don’t update — you will be stuck with the old blockchain while others move to another blockchain which impacts the asset value present in those chains.

Replay attack

In case a fork does occur and you get value of the bitcoin in both chains old and new a hacker can use information from one of your coins to steal the other.

The way to avoid it is to:
Make sure the wallet you are using has implemented replay attack counter measures
Don’t spend any Bitcoins until you’ve verified point #1

Bitcoin’s Price

Assuming Bitcoin forks and splits then the price of each of these coins will probably be worth a lot less than the current price. Given lot of people will start selling the coins that they don’t support, which will in turn drive the price down.

Segwit (BIP 141)

This BIP defines a new structure called a “witness” that is committed to blocks separately from the transaction merkle tree.
The witness is committed in a tree that is nested into the block’s existing merkle root via the coinbase transaction for the purpose of making this BIP soft fork compatible.The original plan was to deploy by “version bits” BIP9 with the name “segwit” and using bit 1.
For Bitcoin mainnet, the BIP9 period was midnight 15 november 2016 UTC to midnight 15 november 2017 UTC. And to mine it 2016 blocks are required.

But given the disagreement between core developers & major mining pools on segwit only 44.16% signalling (1916/2016 Threshold) was achived and was somehow stuck at that point for some time. Possibly there were two reasons

  • BIP 141 requires a super majority of miners to signal their readiness within a two-week (2,016 block) activation period.
  • Some miners were holding out for a block-size increase

UASF (BPI 148 & 149)

Given with the deadlock over the SegWit not getting activated and also efforts like Bitcoin Unlimited also not generating enough traction among miners, a section of the pro-segwit developers put forth two proposals BIP 148, 149 that were floated by Shaolin Fry for changing the consensus mechanism defined by BIP 9 and rather focus on Economic majority of nodes in achiving Segwit consensus, rather than Mining nodes.

BIP 148

This BIP was planned be activated between midnight August 1st 2017 and midnight November 15th 2017 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.

User Activated Soft Fork
On August 1st if majority miners do not signal support for SegWit through BIP148 , but at least some do and if their percentage is significant,Bitcoin’s blockchain will split in two. In that case, there would be two types of Bitcoin tokens one on soft forked chain, and “Legacy BTC” coins on chain that did not activate the soft fork.

SegWit2x & New York Agreement (BIP 91)

New York Agreement

As part of this agreement and to resolve the Segwit deadlock, a group of 58 companies agreed to immediately supported the following parallel upgrades to the bitcoin protocol, which would be deployed simultaneously and based on the original Segwit2Mb proposal:

  • Activate Segregated Witness at an 80% threshold, signaling at bit 4
  • Activate a 2 MB hard fork within six months

Segwith2x

This BIP provides a way for a simple majority of miners to coordinate activation of the existing segwit deployment with less than 95% hashpower.
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).
This BIP will be deployed by a “version bits” with an 80%(this can be adjusted if desired) 269 block activation threshold and 336 block confirmation window BIP9 with the name “segsignal” and using bit 4.

Benifits
It would enable SegWit, which alters how some data is stored on the network.
It would set a timeline for increasing the network’s block size to 2MB, up from 1MB today at three months after the SegWit activation.

UAHF (As proposed by Bitmain)

As BIP148 forced upon a situation of chain split and also miners were not ready for BIP148, hence as a response to UASF, on June 14 they declared UHAF as a contigency.

This was a reaction to the growing distrust between Bitmain which was also a signatory to to New York agreement and the actions of some of the Bitcoin Core developer initiating UASF and promoting in various forums agressively.

Bitmain further details there is no replay attack protection for UASF and lots of users and businesses may suffer with issues. They were also developing options for miners to voluntarily join them.

Plan
Bitmain will have mined the chain for a minimum of 72 hours after the BIP148 forking point with a certain percentage of hash rate supplied by their 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. There were plans to launch a new coin from this fork and also to bring changes to the underlying consensus which would result in a new Altcoin. This news had a major impact as based on hashrate Bitmain owns the biggest share of the Bitcoin Mining pool.

Finally

But recently with the implementation fo BIP91, more and more miners were aligning with BIP91 as the whole ecosystem wanted to avoid BIP148 chain split and even in many circiles BIP148 was termed as a blackmail to miners to fasten the adoption on BIP91.

Impact

Impact to Miners & Users

The below image explains all possible scenarios of a chain split. And the below link gives all possible scenarios that can happen in short term and long term:

Countdown to SegWit: These Are the Dates to Keep an Eye On

Impact to Exchanges & Service Providers

Bitcoin UASF on August 1st is a situation for which many exchanges and service providers and wallets are not fully ready for all the eventualities that may occur GDAX & Polonix stated that the exchange will temporarily suspend the deposit and withdrawal of bitcoin and may pause the trading of bitcoin as well for a temporary period till there is clarity and stability in the situation. Many of the exchanges and wallets support segwit and are segwit ready.

Impact to Bitcoin Ecosystem — Long term

Now despite the volatility with more and more miners providing their support for BIP, it is increasingly seen as a much needed compromise to bring the volatility in Bitcoin ecosystem to rest and start aligning with the New York agreement for a long term solution to the scalability debate.

After seeing support from the major mining pools for BIP 91, even the market sentiments have improved and Bitcoin price has skyrocketed and has crossed 3000$ USD mark.

The Future

BIP91 Lock In — July 21

Again, this shouldn’t really affect regular users.But if you are a miner and BIP91 does activate, you now have another day or two to comply with the BIP91 soft fork. If you don’t, you risk mining invalid blocks.

BIP 91 activation is scheduled to take place in: 352 Blocks. Miners have until this time to upgrade their nodes. Blocks not signalling BIP 141 (bit 1) will be rejected after activation.

Late October to Mid-November: SegWit2x Hard Fork

The hard fork of SegWit2x should take place. To be exact, This hard fork activates three months after SegWit locks in. This activation means that a “base block”/genesis bigger than 1 megabyte should be mined, which makes such clients incompatible with all Bitcoin classic clients that do not have the hard fork code implemented.

If you are a miner and you were only running the Segwit2x client to help activate SegWit with no intention to support the hard fork, you should make sure to switch back to a non-BTC1 client before this hard fork takes place.

Conclusion

Finally Segwit2x got implemented despite all the issues and controversy with the way it was implemented and potential concerns about its current stability. At least the debate now has moved to the next level of how to scale Bitcoin and make it a true transaction medium for common people, rather than a priced asset for a few traders.

The celebratory party and for a good summary on segwit2x and its activation pelase check the video below.

Reference

CRYPT BYTES TECH

Articles on ICO, Cryptocurrency, Blockchain. If you like the blog then please help support the publication via https://www.patreon.com/cryptbytestech. You can join to chat with me at https://t.me/joinchat/E-6WAkQsiIyJ2tQ4423hrA.

Priyab Dash

Written by

CRYPT BYTES TECH

Articles on ICO, Cryptocurrency, Blockchain. If you like the blog then please help support the publication via https://www.patreon.com/cryptbytestech. You can join to chat with me at https://t.me/joinchat/E-6WAkQsiIyJ2tQ4423hrA.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade