C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
Bitcoin Forks and SegWitIn this section, we are going to learn about the bitcoin forks and Segregated Witness (SegWit). Let us first discuss what Bitcoin Forks is. Bitcoin ForksA fork is a change to the digital currency software which creates two different paths of the blockchain with a shared history. The forks can be temporary, or lasting for a few minutes, or can be permanent. There are many reasons why a fork happens. The changes made to the bitcoin software can require either a Soft Fork or Hard Fork. Soft ForkA soft fork introduces a change which is backwards compatible with the previous version. It means there is no need 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 ForkA hard fork introduces a change that forces everyone to upgrade the software. The hard fork is not backwards compatible with older versions of the software. The users who are running the older version of the software in the Bitcoin network needs to upgrade their software to recognize new blocks. As a result, hard forks lead to a split in the blockchain network with a group of users to form a cryptocurrency. The new network takes an exact copy of the blockchain as it was at the point of the split, and after that, both versions remain separate. Users who owned bitcoin at the time of the split can often claim new coins on the forked network. Segregated WitnessThe concept of Segregated Witness is invented by Pieter Wuille, who is a 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 and characterized as a soft fork in the bitcoin chain, and then it has been widely accepted by bitcoin miners and users. The segregated witness improves the scalability of bitcoin without increasing the block size. If it is activated, then it will fixed transaction malleability. It does this by allowing transaction-producing software to separate transaction signatures 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 segregated witness does not require upgrading to remain on the blockchain. It means that if miners have not upgraded the segregated 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 segregated witness information in them. Now, we analyze about the segregated 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
A transaction is very similar to a bank check, which contains inputs, amount, and output. For the transaction to happen, someone who has bitcoin needs to sign that transaction. The signature makes sure that your bitcoin cannot be used by someone who is not authorized. It is because you have the private keys that can be controlled by you only. Now in SegWit transaction, the digital signature needs to be segregated from the transaction data. It 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 transaction ignores 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. It 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.
Next TopicBlockchain Merkle Tree
|