Javatpoint Logo
Javatpoint Logo

Bitcoin Forks and SegWit

In this section, we will learn about the bitcoin forks and Segregated Witness (SegWit). Let us first discuss what Bitcoin Forks is.

Bitcoin Forks

A fork is a change to the digital currency software that creates two different paths of the blockchain with a shared history. This forks can be temporary, or lasting for a few minutes, or can be permanent.

There are many reasons why a fork happens. Changes made to the bitcoin software can require either a Soft Fork or Hard Fork.

Soft Fork

A soft fork introduces a change that is backward compatible with the previous version. It means that you don't have to upgrade the older version of the bitcoin software necessarily. The users who are running the older version of the software will still recognize new blocks created by computers. It is called ?soft' because both groups of users(old and new users) will continue to mine new blocks on the same blockchain. As they remain part of the same network, a soft fork will never result in the formation of a new digital currency.

A soft fork is considered complete when the majority of nodes in the bitcoin network have updated their software. If this doesn't happen, the minority group may eventually decide to abandon the proposed update or move to implement a hard fork instead.

Hard Fork

A hard fork introduces a change that forces everyone to upgrade the software. The Hard fork is not backward compatible with older versions of the software. The users who are running the older version of the software in the Bitcoin network would be necessary to upgrade their software in order to recognize new blocks.

For this reason, hard forks lead to a split in the blockchain network with a group of users to form a cryptocurrency of their own. The new network takes an exact copy of the blockchain as it was at the point of the split, with both versions remaining separate thereafter. Users who owned bitcoin at the time of the split can often claim new coins on the forked network.

Segregated Witness

The concept of Segregate Witness is invented by Pieter Wuille who is part of the Bitcoin core development team since 2011. SegWit(Segregated Witness) is a protocol upgrade that changes the structure of bitcoin transaction data. It was activated on bitcoin on 23 August 2017. It is characterized as a soft fork in the bitcoin chain and has been widely accepted by bitcoin miners and users.

It basically improves the scalability of bitcoin without increasing the block size. ?Segregated witness, if activated, will fixed transaction malleability by allowing transaction-producing software to separate (segregate) transaction signatures (witnesses) from the part of the data in a transaction that is covered by the transaction id and storing it outside the base transaction block.?

The soft fork that was represented for segregate witness does not require upgrading to remain on the blockchain. It means that if miners have not upgraded the segregate witness can still remain on the blockchain. They won't have access all the functionality that segregated witness can provide and also being able to participate in segregated witness transaction. However, they would still be able to validate the block that does not include the segregate witness information in them.

Now, we analyze about the segregate witness. To do this let us first understand the contents of the bitcoin transaction. There are three main components of the bitcoin transaction. They are

  • Input: Where the coin/funds are coming from.
  • Amount: How many bitcoins are coming from the source.
  • Output: Where that bitcoin are actually headed.

A transaction is very similar to check. In check, there is inputs, amount, and output. For the transaction to happen someone who has bitcoin need to sign that transaction. This signature makes sure that your bitcoin cannot be spent by someone who is not authorized. This is because you have the private keys that will only be controlled by you. This is called a digital signature.

Now in SegWit transaction, the digital signature needs to be segregated from the transaction data. This would increase the 1 MB limit for block sizes. The digital signature freezes up about 60-65% of the space in a given transaction. SegWit attempts to ignore the data attached to a signature by pulled out the signature from within the input and moving it to a structure towards the end of a transaction. In addition, SegWit also solves the problem where a receiver could intercept and modify the sender's transaction ID to get more coins from the sender. Since the digital signature would be detached from the input, the unauthorized party would have no way of changing the transaction ID without also nullifying the digital signature.

Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA