BTC vs BCC
July 28, 2017
Investing in BitConnect Lending
August 7, 2017
Show all

What is SegWit?

Bobby Lee, the CEO of leading Chinese bitcoin exchange BTCC, revealed that over 95 percent of blocks mined by major mining pools including Antpool, Bitfury, Bitcoin.com F2Poo, ViaBTC and Slush Pool have all signaled for the activation of the Bitcoin Core development team’s transaction malleability fix and scaling solution Segregated Witness (Segwit).

What is SegWit?

SegWit is short for segregated witnesses and it is a proposal presented by the Bitcoin Core team. It comes in the form of a soft fork, a forward compatible upgrade that can work even if some users don’t update their software (without resulting in a chain split). It was released on the 0.13.1 version of Bitcoin Core client.

In transactions there are three key elements. The sender, receiver and the signatures (commonly referred to as witnesses) and these make up a big part of the transaction size. Contrary to popular belief, however, SegWit does not seperate this witness data into a “witness block”.

Instead, Segwit updates the 1MB block size limit into a 4 million unit block weight limit, counting serialised witness data as one unit and core block data as four units. It essentially introduces a new transaction format.

What this means is that the block size is actually increased. SegWit counts each byte in a witness as 0.25 bytes towards the maximum block size limit (1MB), meaning the maximum size of a block becomes just under 4MB. This doesn’t mean that the data gets smaller, it simply means that it is counted in a way that allows for the 1MB limit to be increased. This change, however, only affects witness data and each non-witness byte is still counted as 1 byte towards the maximum block size limit (1MB) or as 4 units towards a maximum block weight of 4M units.

Bitcoin Core:

“As transactions that use segwit features begin to be used, this change will allow more data to be included per block (with 100% of transactions using segwit features this is expected to be about 2MB of data per block, however in the worst case could be up to 4MB of data per block). In so far as it allows a greater transaction volume, it can be expected to increase the UTXO database more quickly (with 100% of transactions using segwit features, the rate of increase might be expected to approximately double; however because segwit is a soft fork, the worst case UTXO growth is unchanged).”

Segwit via BIP 141, Bit 1 and BIP 91, Secure Yet Efficient Scaling

Initially, the bitcoin mining community led by powerhouse mining pools such as Antpool pushed for the activation of Segwit2x, a solution which activates Segwit and executes a hard fork to increase the block size to 2 MB.

However, as the Bitcoin Core development team along with many analysts noted, the codebase of Segwit2x was not ready and untested until its deadline. Hence, as the last opportunity to avoid a chain split, the mining community agreed to activate BIP 91, a kludge-like solution between the original Segwit proposal BIP 141 and Segwit2x.

On July 16, when the BIP 91 activation threshold of 80 percent of hash rate was met, bitcoin price increased from $1,850 to $2,350. Investors and traders became certain that Segwit was going to activate via BIP 91.

On July 21, as BIP 91 fully locked in, bitcoin price increased once again from $2,350 to $2,600, demonstrating a staggering $800 increase within a 5-day period.

On July 22, at the time of reporting, bitcoin price has surpassed $2,860, with most indicators pointing toward an optimistic upward momentum for bitcoin price.

Other Benefits

The most evident benefit to SegWit is a capacity increased that is introduced in the form of a different transaction format. However, there are also other benefits to SegWit. This includes increased security for multi signature transactions, linear scaling of sighash operations, script versioning and more.

However, fixing transaction malleability issues is the most important of these. Transaction malleability exists because the signatures that protect the rest of the transaction from being modified cannot protect themselves. This means that the way the transaction id (txid) is calculated allows anyone to make changes to this same transaction id.

SegWit fixes this by removing the signatures from the transaction id data, making it impossible for anyone to change the signature data (that was previously in the txid). With SegWit, the txid is then calculated from data that cannot be changed.

The transaction malleability fix also paves the way for payment channels like the Lightning Network (LN). Although these can already be implemented in Bitcoin, they are risky because transactions can be changed (due to the malleability problem mentioned above). This can make transactions get stuck. This is because these payment channels like LN rely on spending previous transactions that are referenced by their txid.

Furthermore, other bug fixes are also useful for LN like the increased multisig transactions and a bigger block size limit.

This is one of the reasons some miners and mining pool operators dislike SegWit. Transactions that go through this payment channels are not part of the Bitcoin network, which means that their fees will not go to miners.

Activation

In order for SegWit to be activated, it requires a 95% miner approva. The voting is done by miners that include certain data in the blocks they mine to signal their decision regarding the proposal. The 95% threshold is based on the BIP 34 (supermajority) softfork activation method, which stipulates the required 95%. Although this wouldn’t be strictly necessary, it minimizes the risk of future forks or double spends after SegWit activation.